1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for Zabbix 5.4.9.
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.4.9'
581PACKAGE_STRING='Zabbix 5.4.9'
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
633WEBSERVICE_CONFIG_FILE
634AGENT2_CONFIG_FILE
635AGENT_CONFIG_FILE
636PROXY_CONFIG_FILE
637SERVER_CONFIG_FILE
638ZBXJS_LIBS
639ZBXJS_LDFLAGS
640SENDER_LIBS
641SENDER_LDFLAGS
642ZBXGET_LIBS
643ZBXGET_LDFLAGS
644CGO_LDFLAGS
645CGO_CFLAGS
646AGENT2_LIBS
647AGENT2_LDFLAGS
648AGENT_LIBS
649AGENT_LDFLAGS
650PROXY_LIBS
651PROXY_LDFLAGS
652SERVER_LIBS
653SERVER_LDFLAGS
654RANLIB
655ICONV_LDFLAGS
656ICONV_CFLAGS
657ICONV_LIBS
658LIBPCRE_LIBS
659LIBPCRE_LDFLAGS
660LIBPCRE_CFLAGS
661HAVE_LIBCURL_FALSE
662HAVE_LIBCURL_TRUE
663LIBCURL_LIBS
664LIBCURL_LDFLAGS
665LIBCURL_CFLAGS
666_libcurl_config
667LDAP_LIBS
668LDAP_LDFLAGS
669LDAP_CPPFLAGS
670JAR
671JAVAC
672GO
673HAVE_LIBMODBUS_FALSE
674HAVE_LIBMODBUS_TRUE
675LIBMODBUS_LIBS
676LIBMODBUS_LDFLAGS
677LIBMODBUS_CFLAGS
678TLS_CFLAGS
679OPENSSL_LIBS
680OPENSSL_LDFLAGS
681OPENSSL_CFLAGS
682GNUTLS_LIBS
683GNUTLS_LDFLAGS
684GNUTLS_CFLAGS
685LIBEVENT_LIBS
686LIBEVENT_LDFLAGS
687LIBEVENT_CFLAGS
688PROXY_IPCSERVICE_FALSE
689PROXY_IPCSERVICE_TRUE
690HAVE_LIBXML2_FALSE
691HAVE_LIBXML2_TRUE
692HAVE_IPMI_FALSE
693HAVE_IPMI_TRUE
694LIBPTHREAD_LIBS
695LIBPTHREAD_LDFLAGS
696LIBPTHREAD_CFLAGS
697ZLIB_LIBS
698ZLIB_LDFLAGS
699ZLIB_CFLAGS
700OPENIPMI_LIBS
701OPENIPMI_LDFLAGS
702OPENIPMI_CFLAGS
703SSH_LIBS
704SSH_LDFLAGS
705SSH_CFLAGS
706SSH2_LIBS
707SSH2_LDFLAGS
708SSH2_CFLAGS
709SNMP_LIBS
710SNMP_LDFLAGS
711SNMP_CFLAGS
712_libnetsnmp_config
713UNIXODBC_LIBS
714UNIXODBC_CFLAGS
715UNIXODBC_LDFLAGS
716ODBC_CONFIG
717LIBXML2_LIBS
718LIBXML2_LDFLAGS
719LIBXML2_CFLAGS
720LIBXML2_VERSION
721PKG_CONFIG_LIBDIR
722PKG_CONFIG_PATH
723PKG_CONFIG
724DB_LIBS
725DB_LDFLAGS
726DB_CFLAGS
727SQLITE3_VERSION
728SQLITE3_LIBS
729SQLITE3_LDFLAGS
730SQLITE3_CPPFLAGS
731POSTGRESQL_VERSION
732POSTGRESQL_LIBS
733POSTGRESQL_LDFLAGS
734POSTGRESQL_CFLAGS
735PG_CONFIG
736ORACLE_OCI_LIBS
737ORACLE_OCI_LDFLAGS
738ORACLE_OCI_CFLAGS
739ORACLE_OCI_VERSION
740MYSQL_LIBS
741MYSQL_LDFLAGS
742MYSQL_CFLAGS
743MYSQL_VERSION
744MYSQL_CONFIG
745ZBXCMOCKA_FALSE
746ZBXCMOCKA_TRUE
747DBSCHEMA_FALSE
748DBSCHEMA_TRUE
749IPV6_FALSE
750IPV6_TRUE
751JAVA_FALSE
752JAVA_TRUE
753WEBSERVICE_FALSE
754WEBSERVICE_TRUE
755AGENT2_FALSE
756AGENT2_TRUE
757AGENT_FALSE
758AGENT_TRUE
759PROXY_FALSE
760PROXY_TRUE
761SERVER_FALSE
762SERVER_TRUE
763ARCH
764LIBOBJS
765RESOLV_LIBS
766EGREP
767GREP
768CPP
769am__fastdepCC_FALSE
770am__fastdepCC_TRUE
771CCDEPMODE
772am__nodep
773AMDEPBACKSLASH
774AMDEP_FALSE
775AMDEP_TRUE
776am__include
777DEPDIR
778OBJEXT
779EXEEXT
780ac_ct_CC
781CPPFLAGS
782LDFLAGS
783CFLAGS
784CC
785host_os
786host_vendor
787host_cpu
788host
789build_os
790build_vendor
791build_cpu
792build
793AM_BACKSLASH
794AM_DEFAULT_VERBOSITY
795AM_DEFAULT_V
796AM_V
797am__untar
798am__tar
799AMTAR
800am__leading_dot
801SET_MAKE
802AWK
803mkdir_p
804MKDIR_P
805INSTALL_STRIP_PROGRAM
806STRIP
807install_sh
808MAKEINFO
809AUTOHEADER
810AUTOMAKE
811AUTOCONF
812ACLOCAL
813VERSION
814PACKAGE
815CYGPATH_W
816am__isrc
817INSTALL_DATA
818INSTALL_SCRIPT
819INSTALL_PROGRAM
820target_alias
821host_alias
822build_alias
823LIBS
824ECHO_T
825ECHO_N
826ECHO_C
827DEFS
828mandir
829localedir
830libdir
831psdir
832pdfdir
833dvidir
834htmldir
835infodir
836docdir
837oldincludedir
838includedir
839runstatedir
840localstatedir
841sharedstatedir
842sysconfdir
843datadir
844datarootdir
845libexecdir
846sbindir
847bindir
848program_transform_name
849prefix
850exec_prefix
851PACKAGE_URL
852PACKAGE_BUGREPORT
853PACKAGE_STRING
854PACKAGE_VERSION
855PACKAGE_TARNAME
856PACKAGE_NAME
857PATH_SEPARATOR
858SHELL
859am__quote'
860ac_subst_files=''
861ac_user_opts='
862enable_option_checking
863enable_silent_rules
864enable_dependency_tracking
865enable_largefile
866enable_static
867enable_static_libs
868enable_server
869enable_proxy
870enable_agent
871enable_agent2
872enable_webservice
873enable_java
874enable_ipv6
875with_mysql
876with_oracle
877with_oracle_include
878with_oracle_lib
879with_postgresql
880with_sqlite3
881with_libxml2
882with_unixodbc
883with_net_snmp
884with_ssh2
885with_ssh
886with_openipmi
887with_zlib
888with_zlib_include
889with_zlib_lib
890with_libpthread
891with_libpthread_include
892with_libpthread_lib
893with_libevent
894with_libevent_include
895with_libevent_lib
896with_gnutls
897with_openssl
898with_libmodbus
899with_ldap
900with_libcurl
901with_libpcre
902with_libpcre_include
903with_libpcre_lib
904with_iconv
905with_iconv_include
906with_iconv_lib
907'
908      ac_precious_vars='build_alias
909host_alias
910target_alias
911CC
912CFLAGS
913LDFLAGS
914LIBS
915CPPFLAGS
916CPP
917PKG_CONFIG
918PKG_CONFIG_PATH
919PKG_CONFIG_LIBDIR'
920
921
922# Initialize some variables set by options.
923ac_init_help=
924ac_init_version=false
925ac_unrecognized_opts=
926ac_unrecognized_sep=
927# The variables have the same names as the options, with
928# dashes changed to underlines.
929cache_file=/dev/null
930exec_prefix=NONE
931no_create=
932no_recursion=
933prefix=NONE
934program_prefix=NONE
935program_suffix=NONE
936program_transform_name=s,x,x,
937silent=
938site=
939srcdir=
940verbose=
941x_includes=NONE
942x_libraries=NONE
943
944# Installation directory options.
945# These are left unexpanded so users can "make install exec_prefix=/foo"
946# and all the variables that are supposed to be based on exec_prefix
947# by default will actually change.
948# Use braces instead of parens because sh, perl, etc. also accept them.
949# (The list follows the same order as the GNU Coding Standards.)
950bindir='${exec_prefix}/bin'
951sbindir='${exec_prefix}/sbin'
952libexecdir='${exec_prefix}/libexec'
953datarootdir='${prefix}/share'
954datadir='${datarootdir}'
955sysconfdir='${prefix}/etc'
956sharedstatedir='${prefix}/com'
957localstatedir='${prefix}/var'
958runstatedir='${localstatedir}/run'
959includedir='${prefix}/include'
960oldincludedir='/usr/include'
961docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
962infodir='${datarootdir}/info'
963htmldir='${docdir}'
964dvidir='${docdir}'
965pdfdir='${docdir}'
966psdir='${docdir}'
967libdir='${exec_prefix}/lib'
968localedir='${datarootdir}/locale'
969mandir='${datarootdir}/man'
970
971ac_prev=
972ac_dashdash=
973for ac_option
974do
975  # If the previous option needs an argument, assign it.
976  if test -n "$ac_prev"; then
977    eval $ac_prev=\$ac_option
978    ac_prev=
979    continue
980  fi
981
982  case $ac_option in
983  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
984  *=)   ac_optarg= ;;
985  *)    ac_optarg=yes ;;
986  esac
987
988  # Accept the important Cygnus configure options, so we can diagnose typos.
989
990  case $ac_dashdash$ac_option in
991  --)
992    ac_dashdash=yes ;;
993
994  -bindir | --bindir | --bindi | --bind | --bin | --bi)
995    ac_prev=bindir ;;
996  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
997    bindir=$ac_optarg ;;
998
999  -build | --build | --buil | --bui | --bu)
1000    ac_prev=build_alias ;;
1001  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1002    build_alias=$ac_optarg ;;
1003
1004  -cache-file | --cache-file | --cache-fil | --cache-fi \
1005  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1006    ac_prev=cache_file ;;
1007  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1008  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1009    cache_file=$ac_optarg ;;
1010
1011  --config-cache | -C)
1012    cache_file=config.cache ;;
1013
1014  -datadir | --datadir | --datadi | --datad)
1015    ac_prev=datadir ;;
1016  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1017    datadir=$ac_optarg ;;
1018
1019  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1020  | --dataroo | --dataro | --datar)
1021    ac_prev=datarootdir ;;
1022  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1023  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1024    datarootdir=$ac_optarg ;;
1025
1026  -disable-* | --disable-*)
1027    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1028    # Reject names that are not valid shell variable names.
1029    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1030      as_fn_error $? "invalid feature name: $ac_useropt"
1031    ac_useropt_orig=$ac_useropt
1032    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1033    case $ac_user_opts in
1034      *"
1035"enable_$ac_useropt"
1036"*) ;;
1037      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1038	 ac_unrecognized_sep=', ';;
1039    esac
1040    eval enable_$ac_useropt=no ;;
1041
1042  -docdir | --docdir | --docdi | --doc | --do)
1043    ac_prev=docdir ;;
1044  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1045    docdir=$ac_optarg ;;
1046
1047  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1048    ac_prev=dvidir ;;
1049  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1050    dvidir=$ac_optarg ;;
1051
1052  -enable-* | --enable-*)
1053    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1054    # Reject names that are not valid shell variable names.
1055    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1056      as_fn_error $? "invalid feature name: $ac_useropt"
1057    ac_useropt_orig=$ac_useropt
1058    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1059    case $ac_user_opts in
1060      *"
1061"enable_$ac_useropt"
1062"*) ;;
1063      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1064	 ac_unrecognized_sep=', ';;
1065    esac
1066    eval enable_$ac_useropt=\$ac_optarg ;;
1067
1068  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1069  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1070  | --exec | --exe | --ex)
1071    ac_prev=exec_prefix ;;
1072  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1073  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1074  | --exec=* | --exe=* | --ex=*)
1075    exec_prefix=$ac_optarg ;;
1076
1077  -gas | --gas | --ga | --g)
1078    # Obsolete; use --with-gas.
1079    with_gas=yes ;;
1080
1081  -help | --help | --hel | --he | -h)
1082    ac_init_help=long ;;
1083  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1084    ac_init_help=recursive ;;
1085  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1086    ac_init_help=short ;;
1087
1088  -host | --host | --hos | --ho)
1089    ac_prev=host_alias ;;
1090  -host=* | --host=* | --hos=* | --ho=*)
1091    host_alias=$ac_optarg ;;
1092
1093  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1094    ac_prev=htmldir ;;
1095  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1096  | --ht=*)
1097    htmldir=$ac_optarg ;;
1098
1099  -includedir | --includedir | --includedi | --included | --include \
1100  | --includ | --inclu | --incl | --inc)
1101    ac_prev=includedir ;;
1102  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1103  | --includ=* | --inclu=* | --incl=* | --inc=*)
1104    includedir=$ac_optarg ;;
1105
1106  -infodir | --infodir | --infodi | --infod | --info | --inf)
1107    ac_prev=infodir ;;
1108  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1109    infodir=$ac_optarg ;;
1110
1111  -libdir | --libdir | --libdi | --libd)
1112    ac_prev=libdir ;;
1113  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1114    libdir=$ac_optarg ;;
1115
1116  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1117  | --libexe | --libex | --libe)
1118    ac_prev=libexecdir ;;
1119  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1120  | --libexe=* | --libex=* | --libe=*)
1121    libexecdir=$ac_optarg ;;
1122
1123  -localedir | --localedir | --localedi | --localed | --locale)
1124    ac_prev=localedir ;;
1125  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1126    localedir=$ac_optarg ;;
1127
1128  -localstatedir | --localstatedir | --localstatedi | --localstated \
1129  | --localstate | --localstat | --localsta | --localst | --locals)
1130    ac_prev=localstatedir ;;
1131  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1132  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1133    localstatedir=$ac_optarg ;;
1134
1135  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1136    ac_prev=mandir ;;
1137  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1138    mandir=$ac_optarg ;;
1139
1140  -nfp | --nfp | --nf)
1141    # Obsolete; use --without-fp.
1142    with_fp=no ;;
1143
1144  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1145  | --no-cr | --no-c | -n)
1146    no_create=yes ;;
1147
1148  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1149  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1150    no_recursion=yes ;;
1151
1152  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1153  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1154  | --oldin | --oldi | --old | --ol | --o)
1155    ac_prev=oldincludedir ;;
1156  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1157  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1158  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1159    oldincludedir=$ac_optarg ;;
1160
1161  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1162    ac_prev=prefix ;;
1163  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1164    prefix=$ac_optarg ;;
1165
1166  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1167  | --program-pre | --program-pr | --program-p)
1168    ac_prev=program_prefix ;;
1169  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1170  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1171    program_prefix=$ac_optarg ;;
1172
1173  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1174  | --program-suf | --program-su | --program-s)
1175    ac_prev=program_suffix ;;
1176  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1177  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1178    program_suffix=$ac_optarg ;;
1179
1180  -program-transform-name | --program-transform-name \
1181  | --program-transform-nam | --program-transform-na \
1182  | --program-transform-n | --program-transform- \
1183  | --program-transform | --program-transfor \
1184  | --program-transfo | --program-transf \
1185  | --program-trans | --program-tran \
1186  | --progr-tra | --program-tr | --program-t)
1187    ac_prev=program_transform_name ;;
1188  -program-transform-name=* | --program-transform-name=* \
1189  | --program-transform-nam=* | --program-transform-na=* \
1190  | --program-transform-n=* | --program-transform-=* \
1191  | --program-transform=* | --program-transfor=* \
1192  | --program-transfo=* | --program-transf=* \
1193  | --program-trans=* | --program-tran=* \
1194  | --progr-tra=* | --program-tr=* | --program-t=*)
1195    program_transform_name=$ac_optarg ;;
1196
1197  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1198    ac_prev=pdfdir ;;
1199  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1200    pdfdir=$ac_optarg ;;
1201
1202  -psdir | --psdir | --psdi | --psd | --ps)
1203    ac_prev=psdir ;;
1204  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1205    psdir=$ac_optarg ;;
1206
1207  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1208  | -silent | --silent | --silen | --sile | --sil)
1209    silent=yes ;;
1210
1211  -runstatedir | --runstatedir | --runstatedi | --runstated \
1212  | --runstate | --runstat | --runsta | --runst | --runs \
1213  | --run | --ru | --r)
1214    ac_prev=runstatedir ;;
1215  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1216  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1217  | --run=* | --ru=* | --r=*)
1218    runstatedir=$ac_optarg ;;
1219
1220  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1221    ac_prev=sbindir ;;
1222  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1223  | --sbi=* | --sb=*)
1224    sbindir=$ac_optarg ;;
1225
1226  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1227  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1228  | --sharedst | --shareds | --shared | --share | --shar \
1229  | --sha | --sh)
1230    ac_prev=sharedstatedir ;;
1231  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1232  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1233  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1234  | --sha=* | --sh=*)
1235    sharedstatedir=$ac_optarg ;;
1236
1237  -site | --site | --sit)
1238    ac_prev=site ;;
1239  -site=* | --site=* | --sit=*)
1240    site=$ac_optarg ;;
1241
1242  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1243    ac_prev=srcdir ;;
1244  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1245    srcdir=$ac_optarg ;;
1246
1247  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1248  | --syscon | --sysco | --sysc | --sys | --sy)
1249    ac_prev=sysconfdir ;;
1250  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1251  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1252    sysconfdir=$ac_optarg ;;
1253
1254  -target | --target | --targe | --targ | --tar | --ta | --t)
1255    ac_prev=target_alias ;;
1256  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1257    target_alias=$ac_optarg ;;
1258
1259  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1260    verbose=yes ;;
1261
1262  -version | --version | --versio | --versi | --vers | -V)
1263    ac_init_version=: ;;
1264
1265  -with-* | --with-*)
1266    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1267    # Reject names that are not valid shell variable names.
1268    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1269      as_fn_error $? "invalid package name: $ac_useropt"
1270    ac_useropt_orig=$ac_useropt
1271    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1272    case $ac_user_opts in
1273      *"
1274"with_$ac_useropt"
1275"*) ;;
1276      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1277	 ac_unrecognized_sep=', ';;
1278    esac
1279    eval with_$ac_useropt=\$ac_optarg ;;
1280
1281  -without-* | --without-*)
1282    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1283    # Reject names that are not valid shell variable names.
1284    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1285      as_fn_error $? "invalid package name: $ac_useropt"
1286    ac_useropt_orig=$ac_useropt
1287    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1288    case $ac_user_opts in
1289      *"
1290"with_$ac_useropt"
1291"*) ;;
1292      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1293	 ac_unrecognized_sep=', ';;
1294    esac
1295    eval with_$ac_useropt=no ;;
1296
1297  --x)
1298    # Obsolete; use --with-x.
1299    with_x=yes ;;
1300
1301  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1302  | --x-incl | --x-inc | --x-in | --x-i)
1303    ac_prev=x_includes ;;
1304  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1305  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1306    x_includes=$ac_optarg ;;
1307
1308  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1309  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1310    ac_prev=x_libraries ;;
1311  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1312  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1313    x_libraries=$ac_optarg ;;
1314
1315  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1316Try \`$0 --help' for more information"
1317    ;;
1318
1319  *=*)
1320    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1321    # Reject names that are not valid shell variable names.
1322    case $ac_envvar in #(
1323      '' | [0-9]* | *[!_$as_cr_alnum]* )
1324      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1325    esac
1326    eval $ac_envvar=\$ac_optarg
1327    export $ac_envvar ;;
1328
1329  *)
1330    # FIXME: should be removed in autoconf 3.0.
1331    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1332    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1333      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1334    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1335    ;;
1336
1337  esac
1338done
1339
1340if test -n "$ac_prev"; then
1341  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1342  as_fn_error $? "missing argument to $ac_option"
1343fi
1344
1345if test -n "$ac_unrecognized_opts"; then
1346  case $enable_option_checking in
1347    no) ;;
1348    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1349    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1350  esac
1351fi
1352
1353# Check all directory arguments for consistency.
1354for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1355		datadir sysconfdir sharedstatedir localstatedir includedir \
1356		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1357		libdir localedir mandir runstatedir
1358do
1359  eval ac_val=\$$ac_var
1360  # Remove trailing slashes.
1361  case $ac_val in
1362    */ )
1363      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1364      eval $ac_var=\$ac_val;;
1365  esac
1366  # Be sure to have absolute directory names.
1367  case $ac_val in
1368    [\\/$]* | ?:[\\/]* )  continue;;
1369    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1370  esac
1371  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1372done
1373
1374# There might be people who depend on the old broken behavior: `$host'
1375# used to hold the argument of --host etc.
1376# FIXME: To remove some day.
1377build=$build_alias
1378host=$host_alias
1379target=$target_alias
1380
1381# FIXME: To remove some day.
1382if test "x$host_alias" != x; then
1383  if test "x$build_alias" = x; then
1384    cross_compiling=maybe
1385  elif test "x$build_alias" != "x$host_alias"; then
1386    cross_compiling=yes
1387  fi
1388fi
1389
1390ac_tool_prefix=
1391test -n "$host_alias" && ac_tool_prefix=$host_alias-
1392
1393test "$silent" = yes && exec 6>/dev/null
1394
1395
1396ac_pwd=`pwd` && test -n "$ac_pwd" &&
1397ac_ls_di=`ls -di .` &&
1398ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1399  as_fn_error $? "working directory cannot be determined"
1400test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1401  as_fn_error $? "pwd does not report name of working directory"
1402
1403
1404# Find the source files, if location was not specified.
1405if test -z "$srcdir"; then
1406  ac_srcdir_defaulted=yes
1407  # Try the directory containing this script, then the parent directory.
1408  ac_confdir=`$as_dirname -- "$as_myself" ||
1409$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1410	 X"$as_myself" : 'X\(//\)[^/]' \| \
1411	 X"$as_myself" : 'X\(//\)$' \| \
1412	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1413$as_echo X"$as_myself" |
1414    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1415	    s//\1/
1416	    q
1417	  }
1418	  /^X\(\/\/\)[^/].*/{
1419	    s//\1/
1420	    q
1421	  }
1422	  /^X\(\/\/\)$/{
1423	    s//\1/
1424	    q
1425	  }
1426	  /^X\(\/\).*/{
1427	    s//\1/
1428	    q
1429	  }
1430	  s/.*/./; q'`
1431  srcdir=$ac_confdir
1432  if test ! -r "$srcdir/$ac_unique_file"; then
1433    srcdir=..
1434  fi
1435else
1436  ac_srcdir_defaulted=no
1437fi
1438if test ! -r "$srcdir/$ac_unique_file"; then
1439  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1440  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1441fi
1442ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1443ac_abs_confdir=`(
1444	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1445	pwd)`
1446# When building in place, set srcdir=.
1447if test "$ac_abs_confdir" = "$ac_pwd"; then
1448  srcdir=.
1449fi
1450# Remove unnecessary trailing slashes from srcdir.
1451# Double slashes in file names in object file debugging info
1452# mess up M-x gdb in Emacs.
1453case $srcdir in
1454*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1455esac
1456for ac_var in $ac_precious_vars; do
1457  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1458  eval ac_env_${ac_var}_value=\$${ac_var}
1459  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1460  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1461done
1462
1463#
1464# Report the --help message.
1465#
1466if test "$ac_init_help" = "long"; then
1467  # Omit some internal or obsolete options to make the list less imposing.
1468  # This message is too long to be a string in the A/UX 3.1 sh.
1469  cat <<_ACEOF
1470\`configure' configures Zabbix 5.4.9 to adapt to many kinds of systems.
1471
1472Usage: $0 [OPTION]... [VAR=VALUE]...
1473
1474To assign environment variables (e.g., CC, CFLAGS...), specify them as
1475VAR=VALUE.  See below for descriptions of some of the useful variables.
1476
1477Defaults for the options are specified in brackets.
1478
1479Configuration:
1480  -h, --help              display this help and exit
1481      --help=short        display options specific to this package
1482      --help=recursive    display the short help of all the included packages
1483  -V, --version           display version information and exit
1484  -q, --quiet, --silent   do not print \`checking ...' messages
1485      --cache-file=FILE   cache test results in FILE [disabled]
1486  -C, --config-cache      alias for \`--cache-file=config.cache'
1487  -n, --no-create         do not create output files
1488      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1489
1490Installation directories:
1491  --prefix=PREFIX         install architecture-independent files in PREFIX
1492                          [$ac_default_prefix]
1493  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1494                          [PREFIX]
1495
1496By default, \`make install' will install all the files in
1497\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1498an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1499for instance \`--prefix=\$HOME'.
1500
1501For better control, use the options below.
1502
1503Fine tuning of the installation directories:
1504  --bindir=DIR            user executables [EPREFIX/bin]
1505  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1506  --libexecdir=DIR        program executables [EPREFIX/libexec]
1507  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1508  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1509  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1510  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1511  --libdir=DIR            object code libraries [EPREFIX/lib]
1512  --includedir=DIR        C header files [PREFIX/include]
1513  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1514  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1515  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1516  --infodir=DIR           info documentation [DATAROOTDIR/info]
1517  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1518  --mandir=DIR            man documentation [DATAROOTDIR/man]
1519  --docdir=DIR            documentation root [DATAROOTDIR/doc/zabbix]
1520  --htmldir=DIR           html documentation [DOCDIR]
1521  --dvidir=DIR            dvi documentation [DOCDIR]
1522  --pdfdir=DIR            pdf documentation [DOCDIR]
1523  --psdir=DIR             ps documentation [DOCDIR]
1524_ACEOF
1525
1526  cat <<\_ACEOF
1527
1528Program names:
1529  --program-prefix=PREFIX            prepend PREFIX to installed program names
1530  --program-suffix=SUFFIX            append SUFFIX to installed program names
1531  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1532
1533System types:
1534  --build=BUILD     configure for building on BUILD [guessed]
1535  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1536_ACEOF
1537fi
1538
1539if test -n "$ac_init_help"; then
1540  case $ac_init_help in
1541     short | recursive ) echo "Configuration of Zabbix 5.4.9:";;
1542   esac
1543  cat <<\_ACEOF
1544
1545Optional Features:
1546  --disable-option-checking  ignore unrecognized --enable/--with options
1547  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1548  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1549  --enable-silent-rules   less verbose build output (undo: "make V=1")
1550  --disable-silent-rules  verbose build output (undo: "make V=0")
1551  --enable-dependency-tracking
1552                          do not reject slow dependency extractors
1553  --disable-dependency-tracking
1554                          speeds up one-time build
1555  --disable-largefile     omit support for large files
1556  --enable-static         Build statically linked binaries
1557  --enable-static-libs    Build statically linked binaries with selected libs from default folders
1558  --enable-server         Turn on build of Zabbix server
1559  --enable-proxy          Turn on build of Zabbix proxy
1560  --enable-agent          Turn on build of Zabbix agent and client utilities
1561  --enable-agent2         Turn on build of Zabbix agent 2
1562  --enable-webservice         Turn on build of Zabbix web service
1563  --enable-java           Turn on build of Zabbix Java gateway
1564  --enable-ipv6           Turn on support of IPv6
1565
1566Optional Packages:
1567  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1568  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1569  --with-mysql[=ARG]      use MySQL client library [default=no], optionally
1570                          specify path to mysql_config
1571  --with-oracle[=ARG]     use Oracle OCI API from given Oracle home
1572                          (ARG=path); use existing ORACLE_HOME (ARG=yes);
1573                          disable Oracle OCI support (ARG=no)
1574  --with-oracle-include[=DIR]
1575                          use Oracle OCI API headers from given path
1576  --with-oracle-lib[=DIR] use Oracle OCI API libraries from given path
1577  --with-postgresql[=ARG] use PostgreSQL library [default=no], optionally
1578                          specify path to pg_config
1579  --with-sqlite3[=ARG]    use SQLite 3 library [default=no], optionally
1580                          specify the prefix for sqlite3 library
1581
1582If you want to use XML library:
1583  --with-libxml2[=ARG]    use libxml2 client library [default=no], see
1584                          PKG_CONFIG_PATH environment variable to specify .pc
1585                          file location
1586
1587If you want to use unixODBC library:
1588  --with-unixodbc[=ARG]   use ODBC driver against unixODBC package
1589                          [default=no], optionally specify full path to
1590                          odbc_config binary.
1591
1592If you want to use Net-SNMP library:
1593  --with-net-snmp[=ARG]   use Net-SNMP package [default=no], optionally
1594                          specify path to net-snmp-config
1595
1596If you want to use SSH2 based checks:
1597  --with-ssh2[=DIR]       use SSH2 package [default=no], DIR is the SSH2
1598                          library install directory.
1599
1600If you want to use SSH based checks:
1601  --with-ssh[=DIR]        use SSH package [default=no], DIR is the SSH library
1602                          install directory.
1603
1604If you want to check IPMI devices:
1605  --with-openipmi[=DIR]   Include OPENIPMI support [default=no]. DIR is the
1606                          OPENIPMI base install directory, default is to
1607                          search through a number of common places for the
1608                          OPENIPMI files.
1609
1610If you want to specify zlib installation directories:
1611  --with-zlib[=DIR]       use zlib from given base install directory (DIR),
1612                          default is to search through a number of common
1613                          places for the zlib files.
1614  --with-zlib-include=DIR use zlib include headers from given path.
1615  --with-zlib-lib=DIR     use zlib libraries from given path.
1616
1617If you want to specify pthread installation directories:
1618  --with-libpthread[=DIR] use libpthread from given base install directory
1619                          (DIR), default is to search through a number of
1620                          common places for the libpthread files.
1621  --with-libpthread-include[=DIR]
1622                          use libpthread include headers from given path.
1623  --with-libpthread-lib[=DIR]
1624                          use libpthread libraries from given path.
1625
1626If you want to specify libevent installation directories:
1627  --with-libevent[=DIR]   use libevent from given base install directory
1628                          (DIR), default is to search through a number of
1629                          common places for the libevent files.
1630  --with-libevent-include[=DIR]
1631                          use libevent include headers from given path.
1632  --with-libevent-lib[=DIR]
1633                          use libevent libraries from given path.
1634
1635If you want to use encryption provided by GnuTLS library:
1636  --with-gnutls[=DIR]     use GnuTLS package [default=no], DIR is the
1637                          libgnutls install directory.
1638
1639If you want to use encryption provided by OpenSSL library:
1640  --with-openssl[=DIR]    use OpenSSL package [default=no], DIR is the libssl
1641                          and libcrypto install directory.
1642
1643If you want to use MODBUS based checks:
1644  --with-libmodbus[=DIR]  use MODBUS package [default=no], DIR is the MODBUS
1645                          library install directory.
1646
1647If you want to check LDAP servers:
1648  --with-ldap[=DIR]       Include LDAP support [default=no]. DIR is the LDAP
1649                          base install directory, default is to search through
1650                          a number of common places for the LDAP files.
1651
1652If you want to use cURL library:
1653  --with-libcurl[=DIR]    use cURL package [default=no], optionally specify
1654                          path to curl-config
1655
1656If you want to specify libpcre installation directories:
1657  --with-libpcre[=DIR]    use libpcre from given base install directory (DIR),
1658                          default is to search through a number of common
1659                          places for the libpcre files.
1660  --with-libpcre-include[=DIR]
1661                          use libpcre include headers from given path.
1662  --with-libpcre-lib[=DIR]
1663                          use libpcre libraries from given path.
1664
1665If you want to specify iconv installation directories:
1666  --with-iconv[=DIR]      use iconv from given base install directory (DIR),
1667                          default is to search through a number of common
1668                          places for the iconv files.
1669  --with-iconv-include[=DIR]
1670                          use iconv include headers from given path.
1671  --with-iconv-lib[=DIR]  use iconv libraries from given path.
1672
1673Some influential environment variables:
1674  CC          C compiler command
1675  CFLAGS      C compiler flags
1676  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1677              nonstandard directory <lib dir>
1678  LIBS        libraries to pass to the linker, e.g. -l<library>
1679  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1680              you have headers in a nonstandard directory <include dir>
1681  CPP         C preprocessor
1682  PKG_CONFIG  path to pkg-config utility
1683  PKG_CONFIG_PATH
1684              directories to add to pkg-config's search path
1685  PKG_CONFIG_LIBDIR
1686              path overriding pkg-config's built-in search path
1687
1688Use these variables to override the choices made by `configure' or to help
1689it to find libraries and programs with nonstandard names/locations.
1690
1691Report bugs to the package provider.
1692_ACEOF
1693ac_status=$?
1694fi
1695
1696if test "$ac_init_help" = "recursive"; then
1697  # If there are subdirs, report their specific --help.
1698  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1699    test -d "$ac_dir" ||
1700      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1701      continue
1702    ac_builddir=.
1703
1704case "$ac_dir" in
1705.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1706*)
1707  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1708  # A ".." for each directory in $ac_dir_suffix.
1709  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1710  case $ac_top_builddir_sub in
1711  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1712  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1713  esac ;;
1714esac
1715ac_abs_top_builddir=$ac_pwd
1716ac_abs_builddir=$ac_pwd$ac_dir_suffix
1717# for backward compatibility:
1718ac_top_builddir=$ac_top_build_prefix
1719
1720case $srcdir in
1721  .)  # We are building in place.
1722    ac_srcdir=.
1723    ac_top_srcdir=$ac_top_builddir_sub
1724    ac_abs_top_srcdir=$ac_pwd ;;
1725  [\\/]* | ?:[\\/]* )  # Absolute name.
1726    ac_srcdir=$srcdir$ac_dir_suffix;
1727    ac_top_srcdir=$srcdir
1728    ac_abs_top_srcdir=$srcdir ;;
1729  *) # Relative name.
1730    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1731    ac_top_srcdir=$ac_top_build_prefix$srcdir
1732    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1733esac
1734ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1735
1736    cd "$ac_dir" || { ac_status=$?; continue; }
1737    # Check for guested configure.
1738    if test -f "$ac_srcdir/configure.gnu"; then
1739      echo &&
1740      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1741    elif test -f "$ac_srcdir/configure"; then
1742      echo &&
1743      $SHELL "$ac_srcdir/configure" --help=recursive
1744    else
1745      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1746    fi || ac_status=$?
1747    cd "$ac_pwd" || { ac_status=$?; break; }
1748  done
1749fi
1750
1751test -n "$ac_init_help" && exit $ac_status
1752if $ac_init_version; then
1753  cat <<\_ACEOF
1754Zabbix configure 5.4.9
1755generated by GNU Autoconf 2.69
1756
1757Copyright (C) 2012 Free Software Foundation, Inc.
1758This configure script is free software; the Free Software Foundation
1759gives unlimited permission to copy, distribute and modify it.
1760_ACEOF
1761  exit
1762fi
1763
1764## ------------------------ ##
1765## Autoconf initialization. ##
1766## ------------------------ ##
1767
1768# ac_fn_c_try_compile LINENO
1769# --------------------------
1770# Try to compile conftest.$ac_ext, and return whether this succeeded.
1771ac_fn_c_try_compile ()
1772{
1773  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774  rm -f conftest.$ac_objext
1775  if { { ac_try="$ac_compile"
1776case "(($ac_try" in
1777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778  *) ac_try_echo=$ac_try;;
1779esac
1780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781$as_echo "$ac_try_echo"; } >&5
1782  (eval "$ac_compile") 2>conftest.err
1783  ac_status=$?
1784  if test -s conftest.err; then
1785    grep -v '^ *+' conftest.err >conftest.er1
1786    cat conftest.er1 >&5
1787    mv -f conftest.er1 conftest.err
1788  fi
1789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1790  test $ac_status = 0; } && {
1791	 test -z "$ac_c_werror_flag" ||
1792	 test ! -s conftest.err
1793       } && test -s conftest.$ac_objext; then :
1794  ac_retval=0
1795else
1796  $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799	ac_retval=1
1800fi
1801  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1802  as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_compile
1805
1806# ac_fn_c_try_cpp LINENO
1807# ----------------------
1808# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1809ac_fn_c_try_cpp ()
1810{
1811  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812  if { { ac_try="$ac_cpp conftest.$ac_ext"
1813case "(($ac_try" in
1814  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815  *) ac_try_echo=$ac_try;;
1816esac
1817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818$as_echo "$ac_try_echo"; } >&5
1819  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1820  ac_status=$?
1821  if test -s conftest.err; then
1822    grep -v '^ *+' conftest.err >conftest.er1
1823    cat conftest.er1 >&5
1824    mv -f conftest.er1 conftest.err
1825  fi
1826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827  test $ac_status = 0; } > conftest.i && {
1828	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1829	 test ! -s conftest.err
1830       }; then :
1831  ac_retval=0
1832else
1833  $as_echo "$as_me: failed program was:" >&5
1834sed 's/^/| /' conftest.$ac_ext >&5
1835
1836    ac_retval=1
1837fi
1838  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839  as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_cpp
1842
1843# ac_fn_c_try_run LINENO
1844# ----------------------
1845# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1846# that executables *can* be run.
1847ac_fn_c_try_run ()
1848{
1849  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850  if { { ac_try="$ac_link"
1851case "(($ac_try" in
1852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853  *) ac_try_echo=$ac_try;;
1854esac
1855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856$as_echo "$ac_try_echo"; } >&5
1857  (eval "$ac_link") 2>&5
1858  ac_status=$?
1859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1860  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1861  { { case "(($ac_try" in
1862  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863  *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867  (eval "$ac_try") 2>&5
1868  ac_status=$?
1869  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870  test $ac_status = 0; }; }; then :
1871  ac_retval=0
1872else
1873  $as_echo "$as_me: program exited with status $ac_status" >&5
1874       $as_echo "$as_me: failed program was:" >&5
1875sed 's/^/| /' conftest.$ac_ext >&5
1876
1877       ac_retval=$ac_status
1878fi
1879  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1880  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1881  as_fn_set_status $ac_retval
1882
1883} # ac_fn_c_try_run
1884
1885# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1886# -------------------------------------------------------
1887# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1888# the include files in INCLUDES and setting the cache variable VAR
1889# accordingly.
1890ac_fn_c_check_header_mongrel ()
1891{
1892  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893  if eval \${$3+:} false; then :
1894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895$as_echo_n "checking for $2... " >&6; }
1896if eval \${$3+:} false; then :
1897  $as_echo_n "(cached) " >&6
1898fi
1899eval ac_res=\$$3
1900	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901$as_echo "$ac_res" >&6; }
1902else
1903  # Is the header compilable?
1904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1905$as_echo_n "checking $2 usability... " >&6; }
1906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h.  */
1908$4
1909#include <$2>
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912  ac_header_compiler=yes
1913else
1914  ac_header_compiler=no
1915fi
1916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1918$as_echo "$ac_header_compiler" >&6; }
1919
1920# Is the header present?
1921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1922$as_echo_n "checking $2 presence... " >&6; }
1923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h.  */
1925#include <$2>
1926_ACEOF
1927if ac_fn_c_try_cpp "$LINENO"; then :
1928  ac_header_preproc=yes
1929else
1930  ac_header_preproc=no
1931fi
1932rm -f conftest.err conftest.i conftest.$ac_ext
1933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1934$as_echo "$ac_header_preproc" >&6; }
1935
1936# So?  What about this header?
1937case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1938  yes:no: )
1939    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1940$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1941    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1942$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1943    ;;
1944  no:yes:* )
1945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1946$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1947    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1948$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1949    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1950$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1951    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1952$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1953    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1954$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1955    ;;
1956esac
1957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1958$as_echo_n "checking for $2... " >&6; }
1959if eval \${$3+:} false; then :
1960  $as_echo_n "(cached) " >&6
1961else
1962  eval "$3=\$ac_header_compiler"
1963fi
1964eval ac_res=\$$3
1965	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1966$as_echo "$ac_res" >&6; }
1967fi
1968  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969
1970} # ac_fn_c_check_header_mongrel
1971
1972# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1973# -------------------------------------------------------
1974# Tests whether HEADER exists and can be compiled using the include files in
1975# INCLUDES, setting the cache variable VAR accordingly.
1976ac_fn_c_check_header_compile ()
1977{
1978  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1980$as_echo_n "checking for $2... " >&6; }
1981if eval \${$3+:} false; then :
1982  $as_echo_n "(cached) " >&6
1983else
1984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1985/* end confdefs.h.  */
1986$4
1987#include <$2>
1988_ACEOF
1989if ac_fn_c_try_compile "$LINENO"; then :
1990  eval "$3=yes"
1991else
1992  eval "$3=no"
1993fi
1994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1995fi
1996eval ac_res=\$$3
1997	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998$as_echo "$ac_res" >&6; }
1999  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000
2001} # ac_fn_c_check_header_compile
2002
2003# ac_fn_c_try_link LINENO
2004# -----------------------
2005# Try to link conftest.$ac_ext, and return whether this succeeded.
2006ac_fn_c_try_link ()
2007{
2008  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009  rm -f conftest.$ac_objext conftest$ac_exeext
2010  if { { ac_try="$ac_link"
2011case "(($ac_try" in
2012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013  *) ac_try_echo=$ac_try;;
2014esac
2015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016$as_echo "$ac_try_echo"; } >&5
2017  (eval "$ac_link") 2>conftest.err
2018  ac_status=$?
2019  if test -s conftest.err; then
2020    grep -v '^ *+' conftest.err >conftest.er1
2021    cat conftest.er1 >&5
2022    mv -f conftest.er1 conftest.err
2023  fi
2024  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2025  test $ac_status = 0; } && {
2026	 test -z "$ac_c_werror_flag" ||
2027	 test ! -s conftest.err
2028       } && test -s conftest$ac_exeext && {
2029	 test "$cross_compiling" = yes ||
2030	 test -x conftest$ac_exeext
2031       }; then :
2032  ac_retval=0
2033else
2034  $as_echo "$as_me: failed program was:" >&5
2035sed 's/^/| /' conftest.$ac_ext >&5
2036
2037	ac_retval=1
2038fi
2039  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2040  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2041  # interfere with the next link command; also delete a directory that is
2042  # left behind by Apple's compiler.  We do this before executing the actions.
2043  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2044  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2045  as_fn_set_status $ac_retval
2046
2047} # ac_fn_c_try_link
2048
2049# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2050# -------------------------------------------
2051# Tests whether TYPE exists after having included INCLUDES, setting cache
2052# variable VAR accordingly.
2053ac_fn_c_check_type ()
2054{
2055  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2057$as_echo_n "checking for $2... " >&6; }
2058if eval \${$3+:} false; then :
2059  $as_echo_n "(cached) " >&6
2060else
2061  eval "$3=no"
2062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h.  */
2064$4
2065int
2066main ()
2067{
2068if (sizeof ($2))
2069	 return 0;
2070  ;
2071  return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h.  */
2077$4
2078int
2079main ()
2080{
2081if (sizeof (($2)))
2082	    return 0;
2083  ;
2084  return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088
2089else
2090  eval "$3=yes"
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095fi
2096eval ac_res=\$$3
2097	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2098$as_echo "$ac_res" >&6; }
2099  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2100
2101} # ac_fn_c_check_type
2102
2103# ac_fn_c_check_func LINENO FUNC VAR
2104# ----------------------------------
2105# Tests whether FUNC exists, setting the cache variable VAR accordingly
2106ac_fn_c_check_func ()
2107{
2108  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110$as_echo_n "checking for $2... " >&6; }
2111if eval \${$3+:} false; then :
2112  $as_echo_n "(cached) " >&6
2113else
2114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h.  */
2116/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2117   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2118#define $2 innocuous_$2
2119
2120/* System header to define __stub macros and hopefully few prototypes,
2121    which can conflict with char $2 (); below.
2122    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2123    <limits.h> exists even on freestanding compilers.  */
2124
2125#ifdef __STDC__
2126# include <limits.h>
2127#else
2128# include <assert.h>
2129#endif
2130
2131#undef $2
2132
2133/* Override any GCC internal prototype to avoid an error.
2134   Use char because int might match the return type of a GCC
2135   builtin and then its argument prototype would still apply.  */
2136#ifdef __cplusplus
2137extern "C"
2138#endif
2139char $2 ();
2140/* The GNU C library defines this for functions which it implements
2141    to always fail with ENOSYS.  Some functions are actually named
2142    something starting with __ and the normal name is an alias.  */
2143#if defined __stub_$2 || defined __stub___$2
2144choke me
2145#endif
2146
2147int
2148main ()
2149{
2150return $2 ();
2151  ;
2152  return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_link "$LINENO"; then :
2156  eval "$3=yes"
2157else
2158  eval "$3=no"
2159fi
2160rm -f core conftest.err conftest.$ac_objext \
2161    conftest$ac_exeext conftest.$ac_ext
2162fi
2163eval ac_res=\$$3
2164	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2165$as_echo "$ac_res" >&6; }
2166  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2167
2168} # ac_fn_c_check_func
2169
2170# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2171# --------------------------------------------
2172# Tries to find the compile-time value of EXPR in a program that includes
2173# INCLUDES, setting VAR accordingly. Returns whether the value could be
2174# computed
2175ac_fn_c_compute_int ()
2176{
2177  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178  if test "$cross_compiling" = yes; then
2179    # Depending upon the size, compute the lo and hi bounds.
2180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h.  */
2182$4
2183int
2184main ()
2185{
2186static int test_array [1 - 2 * !(($2) >= 0)];
2187test_array [0] = 0;
2188return test_array [0];
2189
2190  ;
2191  return 0;
2192}
2193_ACEOF
2194if ac_fn_c_try_compile "$LINENO"; then :
2195  ac_lo=0 ac_mid=0
2196  while :; do
2197    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h.  */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2204test_array [0] = 0;
2205return test_array [0];
2206
2207  ;
2208  return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212  ac_hi=$ac_mid; break
2213else
2214  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2215			if test $ac_lo -le $ac_mid; then
2216			  ac_lo= ac_hi=
2217			  break
2218			fi
2219			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2220fi
2221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222  done
2223else
2224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h.  */
2226$4
2227int
2228main ()
2229{
2230static int test_array [1 - 2 * !(($2) < 0)];
2231test_array [0] = 0;
2232return test_array [0];
2233
2234  ;
2235  return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_compile "$LINENO"; then :
2239  ac_hi=-1 ac_mid=-1
2240  while :; do
2241    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h.  */
2243$4
2244int
2245main ()
2246{
2247static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2248test_array [0] = 0;
2249return test_array [0];
2250
2251  ;
2252  return 0;
2253}
2254_ACEOF
2255if ac_fn_c_try_compile "$LINENO"; then :
2256  ac_lo=$ac_mid; break
2257else
2258  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2259			if test $ac_mid -le $ac_hi; then
2260			  ac_lo= ac_hi=
2261			  break
2262			fi
2263			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266  done
2267else
2268  ac_lo= ac_hi=
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2273# Binary search between lo and hi bounds.
2274while test "x$ac_lo" != "x$ac_hi"; do
2275  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h.  */
2278$4
2279int
2280main ()
2281{
2282static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2283test_array [0] = 0;
2284return test_array [0];
2285
2286  ;
2287  return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"; then :
2291  ac_hi=$ac_mid
2292else
2293  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296done
2297case $ac_lo in #((
2298?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2299'') ac_retval=1 ;;
2300esac
2301  else
2302    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305static long int longval () { return $2; }
2306static unsigned long int ulongval () { return $2; }
2307#include <stdio.h>
2308#include <stdlib.h>
2309int
2310main ()
2311{
2312
2313  FILE *f = fopen ("conftest.val", "w");
2314  if (! f)
2315    return 1;
2316  if (($2) < 0)
2317    {
2318      long int i = longval ();
2319      if (i != ($2))
2320	return 1;
2321      fprintf (f, "%ld", i);
2322    }
2323  else
2324    {
2325      unsigned long int i = ulongval ();
2326      if (i != ($2))
2327	return 1;
2328      fprintf (f, "%lu", i);
2329    }
2330  /* Do not output a trailing newline, as this causes \r\n confusion
2331     on some platforms.  */
2332  return ferror (f) || fclose (f) != 0;
2333
2334  ;
2335  return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_run "$LINENO"; then :
2339  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2340else
2341  ac_retval=1
2342fi
2343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2344  conftest.$ac_objext conftest.beam conftest.$ac_ext
2345rm -f conftest.val
2346
2347  fi
2348  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349  as_fn_set_status $ac_retval
2350
2351} # ac_fn_c_compute_int
2352cat >config.log <<_ACEOF
2353This file contains any messages produced by compilers while
2354running configure, to aid debugging if configure makes a mistake.
2355
2356It was created by Zabbix $as_me 5.4.9, which was
2357generated by GNU Autoconf 2.69.  Invocation command line was
2358
2359  $ $0 $@
2360
2361_ACEOF
2362exec 5>>config.log
2363{
2364cat <<_ASUNAME
2365## --------- ##
2366## Platform. ##
2367## --------- ##
2368
2369hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2370uname -m = `(uname -m) 2>/dev/null || echo unknown`
2371uname -r = `(uname -r) 2>/dev/null || echo unknown`
2372uname -s = `(uname -s) 2>/dev/null || echo unknown`
2373uname -v = `(uname -v) 2>/dev/null || echo unknown`
2374
2375/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2376/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2377
2378/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2379/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2380/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2381/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2382/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2383/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2384/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2385
2386_ASUNAME
2387
2388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391  IFS=$as_save_IFS
2392  test -z "$as_dir" && as_dir=.
2393    $as_echo "PATH: $as_dir"
2394  done
2395IFS=$as_save_IFS
2396
2397} >&5
2398
2399cat >&5 <<_ACEOF
2400
2401
2402## ----------- ##
2403## Core tests. ##
2404## ----------- ##
2405
2406_ACEOF
2407
2408
2409# Keep a trace of the command line.
2410# Strip out --no-create and --no-recursion so they do not pile up.
2411# Strip out --silent because we don't want to record it for future runs.
2412# Also quote any args containing shell meta-characters.
2413# Make two passes to allow for proper duplicate-argument suppression.
2414ac_configure_args=
2415ac_configure_args0=
2416ac_configure_args1=
2417ac_must_keep_next=false
2418for ac_pass in 1 2
2419do
2420  for ac_arg
2421  do
2422    case $ac_arg in
2423    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2424    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2425    | -silent | --silent | --silen | --sile | --sil)
2426      continue ;;
2427    *\'*)
2428      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2429    esac
2430    case $ac_pass in
2431    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2432    2)
2433      as_fn_append ac_configure_args1 " '$ac_arg'"
2434      if test $ac_must_keep_next = true; then
2435	ac_must_keep_next=false # Got value, back to normal.
2436      else
2437	case $ac_arg in
2438	  *=* | --config-cache | -C | -disable-* | --disable-* \
2439	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2440	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2441	  | -with-* | --with-* | -without-* | --without-* | --x)
2442	    case "$ac_configure_args0 " in
2443	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2444	    esac
2445	    ;;
2446	  -* ) ac_must_keep_next=true ;;
2447	esac
2448      fi
2449      as_fn_append ac_configure_args " '$ac_arg'"
2450      ;;
2451    esac
2452  done
2453done
2454{ ac_configure_args0=; unset ac_configure_args0;}
2455{ ac_configure_args1=; unset ac_configure_args1;}
2456
2457# When interrupted or exit'd, cleanup temporary files, and complete
2458# config.log.  We remove comments because anyway the quotes in there
2459# would cause problems or look ugly.
2460# WARNING: Use '\'' to represent an apostrophe within the trap.
2461# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2462trap 'exit_status=$?
2463  # Save into config.log some information that might help in debugging.
2464  {
2465    echo
2466
2467    $as_echo "## ---------------- ##
2468## Cache variables. ##
2469## ---------------- ##"
2470    echo
2471    # The following way of writing the cache mishandles newlines in values,
2472(
2473  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2474    eval ac_val=\$$ac_var
2475    case $ac_val in #(
2476    *${as_nl}*)
2477      case $ac_var in #(
2478      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2479$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2480      esac
2481      case $ac_var in #(
2482      _ | IFS | as_nl) ;; #(
2483      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2484      *) { eval $ac_var=; unset $ac_var;} ;;
2485      esac ;;
2486    esac
2487  done
2488  (set) 2>&1 |
2489    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2490    *${as_nl}ac_space=\ *)
2491      sed -n \
2492	"s/'\''/'\''\\\\'\'''\''/g;
2493	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2494      ;; #(
2495    *)
2496      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2497      ;;
2498    esac |
2499    sort
2500)
2501    echo
2502
2503    $as_echo "## ----------------- ##
2504## Output variables. ##
2505## ----------------- ##"
2506    echo
2507    for ac_var in $ac_subst_vars
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
2517    if test -n "$ac_subst_files"; then
2518      $as_echo "## ------------------- ##
2519## File substitutions. ##
2520## ------------------- ##"
2521      echo
2522      for ac_var in $ac_subst_files
2523      do
2524	eval ac_val=\$$ac_var
2525	case $ac_val in
2526	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2527	esac
2528	$as_echo "$ac_var='\''$ac_val'\''"
2529      done | sort
2530      echo
2531    fi
2532
2533    if test -s confdefs.h; then
2534      $as_echo "## ----------- ##
2535## confdefs.h. ##
2536## ----------- ##"
2537      echo
2538      cat confdefs.h
2539      echo
2540    fi
2541    test "$ac_signal" != 0 &&
2542      $as_echo "$as_me: caught signal $ac_signal"
2543    $as_echo "$as_me: exit $exit_status"
2544  } >&5
2545  rm -f core *.core core.conftest.* &&
2546    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2547    exit $exit_status
2548' 0
2549for ac_signal in 1 2 13 15; do
2550  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2551done
2552ac_signal=0
2553
2554# confdefs.h avoids OS command line length limits that DEFS can exceed.
2555rm -f -r conftest* confdefs.h
2556
2557$as_echo "/* confdefs.h */" > confdefs.h
2558
2559# Predefined preprocessor variables.
2560
2561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_NAME "$PACKAGE_NAME"
2563_ACEOF
2564
2565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2567_ACEOF
2568
2569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_VERSION "$PACKAGE_VERSION"
2571_ACEOF
2572
2573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_STRING "$PACKAGE_STRING"
2575_ACEOF
2576
2577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2579_ACEOF
2580
2581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_URL "$PACKAGE_URL"
2583_ACEOF
2584
2585
2586# Let the site file select an alternate cache file if it wants to.
2587# Prefer an explicitly selected file to automatically selected ones.
2588ac_site_file1=NONE
2589ac_site_file2=NONE
2590if test -n "$CONFIG_SITE"; then
2591  # We do not want a PATH search for config.site.
2592  case $CONFIG_SITE in #((
2593    -*)  ac_site_file1=./$CONFIG_SITE;;
2594    */*) ac_site_file1=$CONFIG_SITE;;
2595    *)   ac_site_file1=./$CONFIG_SITE;;
2596  esac
2597elif test "x$prefix" != xNONE; then
2598  ac_site_file1=$prefix/share/config.site
2599  ac_site_file2=$prefix/etc/config.site
2600else
2601  ac_site_file1=$ac_default_prefix/share/config.site
2602  ac_site_file2=$ac_default_prefix/etc/config.site
2603fi
2604for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2605do
2606  test "x$ac_site_file" = xNONE && continue
2607  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2608    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2609$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2610    sed 's/^/| /' "$ac_site_file" >&5
2611    . "$ac_site_file" \
2612      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2614as_fn_error $? "failed to load site script $ac_site_file
2615See \`config.log' for more details" "$LINENO" 5; }
2616  fi
2617done
2618
2619if test -r "$cache_file"; then
2620  # Some versions of bash will fail to source /dev/null (special files
2621  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2622  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2623    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2624$as_echo "$as_me: loading cache $cache_file" >&6;}
2625    case $cache_file in
2626      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2627      *)                      . "./$cache_file";;
2628    esac
2629  fi
2630else
2631  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2632$as_echo "$as_me: creating cache $cache_file" >&6;}
2633  >$cache_file
2634fi
2635
2636# Check that the precious variables saved in the cache have kept the same
2637# value.
2638ac_cache_corrupted=false
2639for ac_var in $ac_precious_vars; do
2640  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2641  eval ac_new_set=\$ac_env_${ac_var}_set
2642  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2643  eval ac_new_val=\$ac_env_${ac_var}_value
2644  case $ac_old_set,$ac_new_set in
2645    set,)
2646      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2648      ac_cache_corrupted=: ;;
2649    ,set)
2650      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2651$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2652      ac_cache_corrupted=: ;;
2653    ,);;
2654    *)
2655      if test "x$ac_old_val" != "x$ac_new_val"; then
2656	# differences in whitespace do not lead to failure.
2657	ac_old_val_w=`echo x $ac_old_val`
2658	ac_new_val_w=`echo x $ac_new_val`
2659	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2660	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2661$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2662	  ac_cache_corrupted=:
2663	else
2664	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2665$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2666	  eval $ac_var=\$ac_old_val
2667	fi
2668	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2669$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2670	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2671$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2672      fi;;
2673  esac
2674  # Pass precious variables to config.status.
2675  if test "$ac_new_set" = set; then
2676    case $ac_new_val in
2677    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2678    *) ac_arg=$ac_var=$ac_new_val ;;
2679    esac
2680    case " $ac_configure_args " in
2681      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2682      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2683    esac
2684  fi
2685done
2686if $ac_cache_corrupted; then
2687  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2689  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2690$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2691  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2692fi
2693## -------------------- ##
2694## Main body of script. ##
2695## -------------------- ##
2696
2697ac_ext=c
2698ac_cpp='$CPP $CPPFLAGS'
2699ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2700ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2701ac_compiler_gnu=$ac_cv_c_compiler_gnu
2702
2703
2704
2705am__api_version='1.16'
2706
2707ac_aux_dir=
2708for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2709  if test -f "$ac_dir/install-sh"; then
2710    ac_aux_dir=$ac_dir
2711    ac_install_sh="$ac_aux_dir/install-sh -c"
2712    break
2713  elif test -f "$ac_dir/install.sh"; then
2714    ac_aux_dir=$ac_dir
2715    ac_install_sh="$ac_aux_dir/install.sh -c"
2716    break
2717  elif test -f "$ac_dir/shtool"; then
2718    ac_aux_dir=$ac_dir
2719    ac_install_sh="$ac_aux_dir/shtool install -c"
2720    break
2721  fi
2722done
2723if test -z "$ac_aux_dir"; then
2724  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2725fi
2726
2727# These three variables are undocumented and unsupported,
2728# and are intended to be withdrawn in a future Autoconf release.
2729# They can cause serious problems if a builder's source tree is in a directory
2730# whose full name contains unusual characters.
2731ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2732ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2733ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2734
2735
2736# Find a good install program.  We prefer a C program (faster),
2737# so one script is as good as another.  But avoid the broken or
2738# incompatible versions:
2739# SysV /etc/install, /usr/sbin/install
2740# SunOS /usr/etc/install
2741# IRIX /sbin/install
2742# AIX /bin/install
2743# AmigaOS /C/install, which installs bootblocks on floppy discs
2744# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2745# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2746# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2747# OS/2's system install, which has a completely different semantic
2748# ./install, which can be erroneously created by make from ./install.sh.
2749# Reject install programs that cannot install multiple files.
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2751$as_echo_n "checking for a BSD-compatible install... " >&6; }
2752if test -z "$INSTALL"; then
2753if ${ac_cv_path_install+:} false; then :
2754  $as_echo_n "(cached) " >&6
2755else
2756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2757for as_dir in $PATH
2758do
2759  IFS=$as_save_IFS
2760  test -z "$as_dir" && as_dir=.
2761    # Account for people who put trailing slashes in PATH elements.
2762case $as_dir/ in #((
2763  ./ | .// | /[cC]/* | \
2764  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2765  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2766  /usr/ucb/* ) ;;
2767  *)
2768    # OSF1 and SCO ODT 3.0 have their own names for install.
2769    # Don't use installbsd from OSF since it installs stuff as root
2770    # by default.
2771    for ac_prog in ginstall scoinst install; do
2772      for ac_exec_ext in '' $ac_executable_extensions; do
2773	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2774	  if test $ac_prog = install &&
2775	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2776	    # AIX install.  It has an incompatible calling convention.
2777	    :
2778	  elif test $ac_prog = install &&
2779	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2780	    # program-specific install script used by HP pwplus--don't use.
2781	    :
2782	  else
2783	    rm -rf conftest.one conftest.two conftest.dir
2784	    echo one > conftest.one
2785	    echo two > conftest.two
2786	    mkdir conftest.dir
2787	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2788	      test -s conftest.one && test -s conftest.two &&
2789	      test -s conftest.dir/conftest.one &&
2790	      test -s conftest.dir/conftest.two
2791	    then
2792	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2793	      break 3
2794	    fi
2795	  fi
2796	fi
2797      done
2798    done
2799    ;;
2800esac
2801
2802  done
2803IFS=$as_save_IFS
2804
2805rm -rf conftest.one conftest.two conftest.dir
2806
2807fi
2808  if test "${ac_cv_path_install+set}" = set; then
2809    INSTALL=$ac_cv_path_install
2810  else
2811    # As a last resort, use the slow shell script.  Don't cache a
2812    # value for INSTALL within a source directory, because that will
2813    # break other packages using the cache if that directory is
2814    # removed, or if the value is a relative name.
2815    INSTALL=$ac_install_sh
2816  fi
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2819$as_echo "$INSTALL" >&6; }
2820
2821# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2822# It thinks the first close brace ends the variable substitution.
2823test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2824
2825test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2826
2827test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2828
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2830$as_echo_n "checking whether build environment is sane... " >&6; }
2831# Reject unsafe characters in $srcdir or the absolute working directory
2832# name.  Accept space and tab only in the latter.
2833am_lf='
2834'
2835case `pwd` in
2836  *[\\\"\#\$\&\'\`$am_lf]*)
2837    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2838esac
2839case $srcdir in
2840  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
2841    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2842esac
2843
2844# Do 'set' in a subshell so we don't clobber the current shell's
2845# arguments.  Must try -L first in case configure is actually a
2846# symlink; some systems play weird games with the mod time of symlinks
2847# (eg FreeBSD returns the mod time of the symlink's containing
2848# directory).
2849if (
2850   am_has_slept=no
2851   for am_try in 1 2; do
2852     echo "timestamp, slept: $am_has_slept" > conftest.file
2853     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2854     if test "$*" = "X"; then
2855	# -L didn't work.
2856	set X `ls -t "$srcdir/configure" conftest.file`
2857     fi
2858     if test "$*" != "X $srcdir/configure conftest.file" \
2859	&& test "$*" != "X conftest.file $srcdir/configure"; then
2860
2861	# If neither matched, then we have a broken ls.  This can happen
2862	# if, for instance, CONFIG_SHELL is bash and it inherits a
2863	# broken ls alias from the environment.  This has actually
2864	# happened.  Such a system could not be considered "sane".
2865	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
2866  alias in your environment" "$LINENO" 5
2867     fi
2868     if test "$2" = conftest.file || test $am_try -eq 2; then
2869       break
2870     fi
2871     # Just in case.
2872     sleep 1
2873     am_has_slept=yes
2874   done
2875   test "$2" = conftest.file
2876   )
2877then
2878   # Ok.
2879   :
2880else
2881   as_fn_error $? "newly created file is older than distributed files!
2882Check your system clock" "$LINENO" 5
2883fi
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2885$as_echo "yes" >&6; }
2886# If we didn't sleep, we still need to ensure time stamps of config.status and
2887# generated files are strictly newer.
2888am_sleep_pid=
2889if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2890  ( sleep 1 ) &
2891  am_sleep_pid=$!
2892fi
2893
2894rm -f conftest.file
2895
2896test "$program_prefix" != NONE &&
2897  program_transform_name="s&^&$program_prefix&;$program_transform_name"
2898# Use a double $ so make ignores it.
2899test "$program_suffix" != NONE &&
2900  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2901# Double any \ or $.
2902# By default was `s,x,x', remove it if useless.
2903ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2904program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2905
2906# Expand $ac_aux_dir to an absolute path.
2907am_aux_dir=`cd "$ac_aux_dir" && pwd`
2908
2909if test x"${MISSING+set}" != xset; then
2910  MISSING="\${SHELL} '$am_aux_dir/missing'"
2911fi
2912# Use eval to expand $SHELL
2913if eval "$MISSING --is-lightweight"; then
2914  am_missing_run="$MISSING "
2915else
2916  am_missing_run=
2917  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2918$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2919fi
2920
2921if test x"${install_sh+set}" != xset; then
2922  case $am_aux_dir in
2923  *\ * | *\	*)
2924    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2925  *)
2926    install_sh="\${SHELL} $am_aux_dir/install-sh"
2927  esac
2928fi
2929
2930# Installed binaries are usually stripped using 'strip' when the user
2931# run "make install-strip".  However 'strip' might not be the right
2932# tool to use in cross-compilation environments, therefore Automake
2933# will honor the 'STRIP' environment variable to overrule this program.
2934if test "$cross_compiling" != no; then
2935  if test -n "$ac_tool_prefix"; then
2936  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2937set dummy ${ac_tool_prefix}strip; ac_word=$2
2938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2939$as_echo_n "checking for $ac_word... " >&6; }
2940if ${ac_cv_prog_STRIP+:} false; then :
2941  $as_echo_n "(cached) " >&6
2942else
2943  if test -n "$STRIP"; then
2944  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2945else
2946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2947for as_dir in $PATH
2948do
2949  IFS=$as_save_IFS
2950  test -z "$as_dir" && as_dir=.
2951    for ac_exec_ext in '' $ac_executable_extensions; do
2952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2953    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2955    break 2
2956  fi
2957done
2958  done
2959IFS=$as_save_IFS
2960
2961fi
2962fi
2963STRIP=$ac_cv_prog_STRIP
2964if test -n "$STRIP"; then
2965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2966$as_echo "$STRIP" >&6; }
2967else
2968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2969$as_echo "no" >&6; }
2970fi
2971
2972
2973fi
2974if test -z "$ac_cv_prog_STRIP"; then
2975  ac_ct_STRIP=$STRIP
2976  # Extract the first word of "strip", so it can be a program name with args.
2977set dummy strip; ac_word=$2
2978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2979$as_echo_n "checking for $ac_word... " >&6; }
2980if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2981  $as_echo_n "(cached) " >&6
2982else
2983  if test -n "$ac_ct_STRIP"; then
2984  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2985else
2986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2987for as_dir in $PATH
2988do
2989  IFS=$as_save_IFS
2990  test -z "$as_dir" && as_dir=.
2991    for ac_exec_ext in '' $ac_executable_extensions; do
2992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2993    ac_cv_prog_ac_ct_STRIP="strip"
2994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995    break 2
2996  fi
2997done
2998  done
2999IFS=$as_save_IFS
3000
3001fi
3002fi
3003ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3004if test -n "$ac_ct_STRIP"; then
3005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3006$as_echo "$ac_ct_STRIP" >&6; }
3007else
3008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3009$as_echo "no" >&6; }
3010fi
3011
3012  if test "x$ac_ct_STRIP" = x; then
3013    STRIP=":"
3014  else
3015    case $cross_compiling:$ac_tool_warned in
3016yes:)
3017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3019ac_tool_warned=yes ;;
3020esac
3021    STRIP=$ac_ct_STRIP
3022  fi
3023else
3024  STRIP="$ac_cv_prog_STRIP"
3025fi
3026
3027fi
3028INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3029
3030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3031$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3032if test -z "$MKDIR_P"; then
3033  if ${ac_cv_path_mkdir+:} false; then :
3034  $as_echo_n "(cached) " >&6
3035else
3036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3038do
3039  IFS=$as_save_IFS
3040  test -z "$as_dir" && as_dir=.
3041    for ac_prog in mkdir gmkdir; do
3042	 for ac_exec_ext in '' $ac_executable_extensions; do
3043	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3044	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3045	     'mkdir (GNU coreutils) '* | \
3046	     'mkdir (coreutils) '* | \
3047	     'mkdir (fileutils) '4.1*)
3048	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3049	       break 3;;
3050	   esac
3051	 done
3052       done
3053  done
3054IFS=$as_save_IFS
3055
3056fi
3057
3058  test -d ./--version && rmdir ./--version
3059  if test "${ac_cv_path_mkdir+set}" = set; then
3060    MKDIR_P="$ac_cv_path_mkdir -p"
3061  else
3062    # As a last resort, use the slow shell script.  Don't cache a
3063    # value for MKDIR_P within a source directory, because that will
3064    # break other packages using the cache if that directory is
3065    # removed, or if the value is a relative name.
3066    MKDIR_P="$ac_install_sh -d"
3067  fi
3068fi
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3070$as_echo "$MKDIR_P" >&6; }
3071
3072for ac_prog in gawk mawk nawk awk
3073do
3074  # Extract the first word of "$ac_prog", so it can be a program name with args.
3075set dummy $ac_prog; ac_word=$2
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077$as_echo_n "checking for $ac_word... " >&6; }
3078if ${ac_cv_prog_AWK+:} false; then :
3079  $as_echo_n "(cached) " >&6
3080else
3081  if test -n "$AWK"; then
3082  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3083else
3084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085for as_dir in $PATH
3086do
3087  IFS=$as_save_IFS
3088  test -z "$as_dir" && as_dir=.
3089    for ac_exec_ext in '' $ac_executable_extensions; do
3090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3091    ac_cv_prog_AWK="$ac_prog"
3092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3093    break 2
3094  fi
3095done
3096  done
3097IFS=$as_save_IFS
3098
3099fi
3100fi
3101AWK=$ac_cv_prog_AWK
3102if test -n "$AWK"; then
3103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3104$as_echo "$AWK" >&6; }
3105else
3106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
3108fi
3109
3110
3111  test -n "$AWK" && break
3112done
3113
3114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3115$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3116set x ${MAKE-make}
3117ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3118if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3119  $as_echo_n "(cached) " >&6
3120else
3121  cat >conftest.make <<\_ACEOF
3122SHELL = /bin/sh
3123all:
3124	@echo '@@@%%%=$(MAKE)=@@@%%%'
3125_ACEOF
3126# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3127case `${MAKE-make} -f conftest.make 2>/dev/null` in
3128  *@@@%%%=?*=@@@%%%*)
3129    eval ac_cv_prog_make_${ac_make}_set=yes;;
3130  *)
3131    eval ac_cv_prog_make_${ac_make}_set=no;;
3132esac
3133rm -f conftest.make
3134fi
3135if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3137$as_echo "yes" >&6; }
3138  SET_MAKE=
3139else
3140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3141$as_echo "no" >&6; }
3142  SET_MAKE="MAKE=${MAKE-make}"
3143fi
3144
3145rm -rf .tst 2>/dev/null
3146mkdir .tst 2>/dev/null
3147if test -d .tst; then
3148  am__leading_dot=.
3149else
3150  am__leading_dot=_
3151fi
3152rmdir .tst 2>/dev/null
3153
3154# Check whether --enable-silent-rules was given.
3155if test "${enable_silent_rules+set}" = set; then :
3156  enableval=$enable_silent_rules;
3157fi
3158
3159case $enable_silent_rules in # (((
3160  yes) AM_DEFAULT_VERBOSITY=0;;
3161   no) AM_DEFAULT_VERBOSITY=1;;
3162    *) AM_DEFAULT_VERBOSITY=1;;
3163esac
3164am_make=${MAKE-make}
3165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3166$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3167if ${am_cv_make_support_nested_variables+:} false; then :
3168  $as_echo_n "(cached) " >&6
3169else
3170  if $as_echo 'TRUE=$(BAR$(V))
3171BAR0=false
3172BAR1=true
3173V=1
3174am__doit:
3175	@$(TRUE)
3176.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3177  am_cv_make_support_nested_variables=yes
3178else
3179  am_cv_make_support_nested_variables=no
3180fi
3181fi
3182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3183$as_echo "$am_cv_make_support_nested_variables" >&6; }
3184if test $am_cv_make_support_nested_variables = yes; then
3185    AM_V='$(V)'
3186  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3187else
3188  AM_V=$AM_DEFAULT_VERBOSITY
3189  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3190fi
3191AM_BACKSLASH='\'
3192
3193if test "`cd $srcdir && pwd`" != "`pwd`"; then
3194  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3195  # is not polluted with repeated "-I."
3196  am__isrc=' -I$(srcdir)'
3197  # test to see if srcdir already configured
3198  if test -f $srcdir/config.status; then
3199    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3200  fi
3201fi
3202
3203# test whether we have cygpath
3204if test -z "$CYGPATH_W"; then
3205  if (cygpath --version) >/dev/null 2>/dev/null; then
3206    CYGPATH_W='cygpath -w'
3207  else
3208    CYGPATH_W=echo
3209  fi
3210fi
3211
3212
3213# Define the identity of the package.
3214 PACKAGE='zabbix'
3215 VERSION='5.4.9'
3216
3217
3218cat >>confdefs.h <<_ACEOF
3219#define PACKAGE "$PACKAGE"
3220_ACEOF
3221
3222
3223cat >>confdefs.h <<_ACEOF
3224#define VERSION "$VERSION"
3225_ACEOF
3226
3227# Some tools Automake needs.
3228
3229ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3230
3231
3232AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3233
3234
3235AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3236
3237
3238AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3239
3240
3241MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3242
3243# For better backward compatibility.  To be removed once Automake 1.9.x
3244# dies out for good.  For more background, see:
3245# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3246# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3247mkdir_p='$(MKDIR_P)'
3248
3249# We need awk for the "check" target (and possibly the TAP driver).  The
3250# system "awk" is bad on some platforms.
3251# Always define AMTAR for backward compatibility.  Yes, it's still used
3252# in the wild :-(  We should find a proper way to deprecate it ...
3253AMTAR='$${TAR-tar}'
3254
3255
3256# We'll loop over all known methods to create a tar archive until one works.
3257_am_tools='gnutar  pax cpio none'
3258
3259am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3260
3261
3262
3263
3264
3265
3266# POSIX will say in a future version that running "rm -f" with no argument
3267# is OK; and we want to be able to make that assumption in our Makefile
3268# recipes.  So use an aggressive probe to check that the usage we want is
3269# actually supported "in the wild" to an acceptable degree.
3270# See automake bug#10828.
3271# To make any issue more visible, cause the running configure to be aborted
3272# by default if the 'rm' program in use doesn't match our expectations; the
3273# user can still override this though.
3274if rm -f && rm -fr && rm -rf; then : OK; else
3275  cat >&2 <<'END'
3276Oops!
3277
3278Your 'rm' program seems unable to run without file operands specified
3279on the command line, even when the '-f' option is present.  This is contrary
3280to the behaviour of most rm programs out there, and not conforming with
3281the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3282
3283Please tell bug-automake@gnu.org about your system, including the value
3284of your $PATH and any error possibly output before this message.  This
3285can help us improve future automake versions.
3286
3287END
3288  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3289    echo 'Configuration will proceed anyway, since you have set the' >&2
3290    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3291    echo >&2
3292  else
3293    cat >&2 <<'END'
3294Aborting the configuration process, to ensure you take notice of the issue.
3295
3296You can download and install GNU coreutils to get an 'rm' implementation
3297that behaves properly: <https://www.gnu.org/software/coreutils/>.
3298
3299If you want to complete the configuration process using your problematic
3300'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3301to "yes", and re-run configure.
3302
3303END
3304    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3305  fi
3306fi
3307
3308
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&5
3310$as_echo "$as_me: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&6;}
3311
3312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3313$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3314set x ${MAKE-make}
3315ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3316if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3317  $as_echo_n "(cached) " >&6
3318else
3319  cat >conftest.make <<\_ACEOF
3320SHELL = /bin/sh
3321all:
3322	@echo '@@@%%%=$(MAKE)=@@@%%%'
3323_ACEOF
3324# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3325case `${MAKE-make} -f conftest.make 2>/dev/null` in
3326  *@@@%%%=?*=@@@%%%*)
3327    eval ac_cv_prog_make_${ac_make}_set=yes;;
3328  *)
3329    eval ac_cv_prog_make_${ac_make}_set=no;;
3330esac
3331rm -f conftest.make
3332fi
3333if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3335$as_echo "yes" >&6; }
3336  SET_MAKE=
3337else
3338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3339$as_echo "no" >&6; }
3340  SET_MAKE="MAKE=${MAKE-make}"
3341fi
3342
3343
3344ac_config_headers="$ac_config_headers include/config.h"
3345
3346
3347# Make sure we can run config.sub.
3348$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3349  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3350
3351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3352$as_echo_n "checking build system type... " >&6; }
3353if ${ac_cv_build+:} false; then :
3354  $as_echo_n "(cached) " >&6
3355else
3356  ac_build_alias=$build_alias
3357test "x$ac_build_alias" = x &&
3358  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3359test "x$ac_build_alias" = x &&
3360  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3361ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3362  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3363
3364fi
3365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3366$as_echo "$ac_cv_build" >&6; }
3367case $ac_cv_build in
3368*-*-*) ;;
3369*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3370esac
3371build=$ac_cv_build
3372ac_save_IFS=$IFS; IFS='-'
3373set x $ac_cv_build
3374shift
3375build_cpu=$1
3376build_vendor=$2
3377shift; shift
3378# Remember, the first character of IFS is used to create $*,
3379# except with old shells:
3380build_os=$*
3381IFS=$ac_save_IFS
3382case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3383
3384
3385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3386$as_echo_n "checking host system type... " >&6; }
3387if ${ac_cv_host+:} false; then :
3388  $as_echo_n "(cached) " >&6
3389else
3390  if test "x$host_alias" = x; then
3391  ac_cv_host=$ac_cv_build
3392else
3393  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3394    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3395fi
3396
3397fi
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3399$as_echo "$ac_cv_host" >&6; }
3400case $ac_cv_host in
3401*-*-*) ;;
3402*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3403esac
3404host=$ac_cv_host
3405ac_save_IFS=$IFS; IFS='-'
3406set x $ac_cv_host
3407shift
3408host_cpu=$1
3409host_vendor=$2
3410shift; shift
3411# Remember, the first character of IFS is used to create $*,
3412# except with old shells:
3413host_os=$*
3414IFS=$ac_save_IFS
3415case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3416
3417
3418
3419
3420ac_ext=c
3421ac_cpp='$CPP $CPPFLAGS'
3422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3424ac_compiler_gnu=$ac_cv_c_compiler_gnu
3425if test -n "$ac_tool_prefix"; then
3426  for ac_prog in cc c99 gcc clang
3427  do
3428    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3429set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3431$as_echo_n "checking for $ac_word... " >&6; }
3432if ${ac_cv_prog_CC+:} false; then :
3433  $as_echo_n "(cached) " >&6
3434else
3435  if test -n "$CC"; then
3436  ac_cv_prog_CC="$CC" # Let the user override the test.
3437else
3438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3439for as_dir in $PATH
3440do
3441  IFS=$as_save_IFS
3442  test -z "$as_dir" && as_dir=.
3443    for ac_exec_ext in '' $ac_executable_extensions; do
3444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3445    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3447    break 2
3448  fi
3449done
3450  done
3451IFS=$as_save_IFS
3452
3453fi
3454fi
3455CC=$ac_cv_prog_CC
3456if test -n "$CC"; then
3457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3458$as_echo "$CC" >&6; }
3459else
3460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3461$as_echo "no" >&6; }
3462fi
3463
3464
3465    test -n "$CC" && break
3466  done
3467fi
3468if test -z "$CC"; then
3469  ac_ct_CC=$CC
3470  for ac_prog in cc c99 gcc clang
3471do
3472  # Extract the first word of "$ac_prog", so it can be a program name with args.
3473set dummy $ac_prog; ac_word=$2
3474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3475$as_echo_n "checking for $ac_word... " >&6; }
3476if ${ac_cv_prog_ac_ct_CC+:} false; then :
3477  $as_echo_n "(cached) " >&6
3478else
3479  if test -n "$ac_ct_CC"; then
3480  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3481else
3482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3483for as_dir in $PATH
3484do
3485  IFS=$as_save_IFS
3486  test -z "$as_dir" && as_dir=.
3487    for ac_exec_ext in '' $ac_executable_extensions; do
3488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3489    ac_cv_prog_ac_ct_CC="$ac_prog"
3490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3491    break 2
3492  fi
3493done
3494  done
3495IFS=$as_save_IFS
3496
3497fi
3498fi
3499ac_ct_CC=$ac_cv_prog_ac_ct_CC
3500if test -n "$ac_ct_CC"; then
3501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3502$as_echo "$ac_ct_CC" >&6; }
3503else
3504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3505$as_echo "no" >&6; }
3506fi
3507
3508
3509  test -n "$ac_ct_CC" && break
3510done
3511
3512  if test "x$ac_ct_CC" = x; then
3513    CC=""
3514  else
3515    case $cross_compiling:$ac_tool_warned in
3516yes:)
3517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3519ac_tool_warned=yes ;;
3520esac
3521    CC=$ac_ct_CC
3522  fi
3523fi
3524
3525
3526test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3528as_fn_error $? "no acceptable C compiler found in \$PATH
3529See \`config.log' for more details" "$LINENO" 5; }
3530
3531# Provide some information about the compiler.
3532$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3533set X $ac_compile
3534ac_compiler=$2
3535for ac_option in --version -v -V -qversion; do
3536  { { ac_try="$ac_compiler $ac_option >&5"
3537case "(($ac_try" in
3538  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3539  *) ac_try_echo=$ac_try;;
3540esac
3541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3542$as_echo "$ac_try_echo"; } >&5
3543  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3544  ac_status=$?
3545  if test -s conftest.err; then
3546    sed '10a\
3547... rest of stderr output deleted ...
3548         10q' conftest.err >conftest.er1
3549    cat conftest.er1 >&5
3550  fi
3551  rm -f conftest.er1 conftest.err
3552  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3553  test $ac_status = 0; }
3554done
3555
3556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3557/* end confdefs.h.  */
3558
3559int
3560main ()
3561{
3562
3563  ;
3564  return 0;
3565}
3566_ACEOF
3567ac_clean_files_save=$ac_clean_files
3568ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3569# Try to create an executable without -o first, disregard a.out.
3570# It will help us diagnose broken compilers, and finding out an intuition
3571# of exeext.
3572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3573$as_echo_n "checking whether the C compiler works... " >&6; }
3574ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3575
3576# The possible output files:
3577ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3578
3579ac_rmfiles=
3580for ac_file in $ac_files
3581do
3582  case $ac_file in
3583    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3584    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3585  esac
3586done
3587rm -f $ac_rmfiles
3588
3589if { { ac_try="$ac_link_default"
3590case "(($ac_try" in
3591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592  *) ac_try_echo=$ac_try;;
3593esac
3594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3595$as_echo "$ac_try_echo"; } >&5
3596  (eval "$ac_link_default") 2>&5
3597  ac_status=$?
3598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3599  test $ac_status = 0; }; then :
3600  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3601# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3602# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3603# so that the user can short-circuit this test for compilers unknown to
3604# Autoconf.
3605for ac_file in $ac_files ''
3606do
3607  test -f "$ac_file" || continue
3608  case $ac_file in
3609    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3610	;;
3611    [ab].out )
3612	# We found the default executable, but exeext='' is most
3613	# certainly right.
3614	break;;
3615    *.* )
3616	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3617	then :; else
3618	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3619	fi
3620	# We set ac_cv_exeext here because the later test for it is not
3621	# safe: cross compilers may not add the suffix if given an `-o'
3622	# argument, so we may need to know it at that point already.
3623	# Even if this section looks crufty: it has the advantage of
3624	# actually working.
3625	break;;
3626    * )
3627	break;;
3628  esac
3629done
3630test "$ac_cv_exeext" = no && ac_cv_exeext=
3631
3632else
3633  ac_file=''
3634fi
3635if test -z "$ac_file"; then :
3636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3637$as_echo "no" >&6; }
3638$as_echo "$as_me: failed program was:" >&5
3639sed 's/^/| /' conftest.$ac_ext >&5
3640
3641{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3643as_fn_error 77 "C compiler cannot create executables
3644See \`config.log' for more details" "$LINENO" 5; }
3645else
3646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3647$as_echo "yes" >&6; }
3648fi
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3650$as_echo_n "checking for C compiler default output file name... " >&6; }
3651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3652$as_echo "$ac_file" >&6; }
3653ac_exeext=$ac_cv_exeext
3654
3655rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3656ac_clean_files=$ac_clean_files_save
3657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3658$as_echo_n "checking for suffix of executables... " >&6; }
3659if { { ac_try="$ac_link"
3660case "(($ac_try" in
3661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3662  *) ac_try_echo=$ac_try;;
3663esac
3664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3665$as_echo "$ac_try_echo"; } >&5
3666  (eval "$ac_link") 2>&5
3667  ac_status=$?
3668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3669  test $ac_status = 0; }; then :
3670  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3671# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3672# work properly (i.e., refer to `conftest.exe'), while it won't with
3673# `rm'.
3674for ac_file in conftest.exe conftest conftest.*; do
3675  test -f "$ac_file" || continue
3676  case $ac_file in
3677    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3678    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3679	  break;;
3680    * ) break;;
3681  esac
3682done
3683else
3684  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3686as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3687See \`config.log' for more details" "$LINENO" 5; }
3688fi
3689rm -f conftest conftest$ac_cv_exeext
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3691$as_echo "$ac_cv_exeext" >&6; }
3692
3693rm -f conftest.$ac_ext
3694EXEEXT=$ac_cv_exeext
3695ac_exeext=$EXEEXT
3696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3697/* end confdefs.h.  */
3698#include <stdio.h>
3699int
3700main ()
3701{
3702FILE *f = fopen ("conftest.out", "w");
3703 return ferror (f) || fclose (f) != 0;
3704
3705  ;
3706  return 0;
3707}
3708_ACEOF
3709ac_clean_files="$ac_clean_files conftest.out"
3710# Check that the compiler produces executables we can run.  If not, either
3711# the compiler is broken, or we cross compile.
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3713$as_echo_n "checking whether we are cross compiling... " >&6; }
3714if test "$cross_compiling" != yes; then
3715  { { ac_try="$ac_link"
3716case "(($ac_try" in
3717  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3718  *) ac_try_echo=$ac_try;;
3719esac
3720eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3721$as_echo "$ac_try_echo"; } >&5
3722  (eval "$ac_link") 2>&5
3723  ac_status=$?
3724  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3725  test $ac_status = 0; }
3726  if { ac_try='./conftest$ac_cv_exeext'
3727  { { case "(($ac_try" in
3728  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3729  *) ac_try_echo=$ac_try;;
3730esac
3731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3732$as_echo "$ac_try_echo"; } >&5
3733  (eval "$ac_try") 2>&5
3734  ac_status=$?
3735  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3736  test $ac_status = 0; }; }; then
3737    cross_compiling=no
3738  else
3739    if test "$cross_compiling" = maybe; then
3740	cross_compiling=yes
3741    else
3742	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3744as_fn_error $? "cannot run C compiled programs.
3745If you meant to cross compile, use \`--host'.
3746See \`config.log' for more details" "$LINENO" 5; }
3747    fi
3748  fi
3749fi
3750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3751$as_echo "$cross_compiling" >&6; }
3752
3753rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3754ac_clean_files=$ac_clean_files_save
3755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3756$as_echo_n "checking for suffix of object files... " >&6; }
3757if ${ac_cv_objext+:} false; then :
3758  $as_echo_n "(cached) " >&6
3759else
3760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761/* end confdefs.h.  */
3762
3763int
3764main ()
3765{
3766
3767  ;
3768  return 0;
3769}
3770_ACEOF
3771rm -f conftest.o conftest.obj
3772if { { ac_try="$ac_compile"
3773case "(($ac_try" in
3774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3775  *) ac_try_echo=$ac_try;;
3776esac
3777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3778$as_echo "$ac_try_echo"; } >&5
3779  (eval "$ac_compile") 2>&5
3780  ac_status=$?
3781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3782  test $ac_status = 0; }; then :
3783  for ac_file in conftest.o conftest.obj conftest.*; do
3784  test -f "$ac_file" || continue;
3785  case $ac_file in
3786    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3787    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3788       break;;
3789  esac
3790done
3791else
3792  $as_echo "$as_me: failed program was:" >&5
3793sed 's/^/| /' conftest.$ac_ext >&5
3794
3795{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3797as_fn_error $? "cannot compute suffix of object files: cannot compile
3798See \`config.log' for more details" "$LINENO" 5; }
3799fi
3800rm -f conftest.$ac_cv_objext conftest.$ac_ext
3801fi
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3803$as_echo "$ac_cv_objext" >&6; }
3804OBJEXT=$ac_cv_objext
3805ac_objext=$OBJEXT
3806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3807$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3808if ${ac_cv_c_compiler_gnu+:} false; then :
3809  $as_echo_n "(cached) " >&6
3810else
3811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3812/* end confdefs.h.  */
3813
3814int
3815main ()
3816{
3817#ifndef __GNUC__
3818       choke me
3819#endif
3820
3821  ;
3822  return 0;
3823}
3824_ACEOF
3825if ac_fn_c_try_compile "$LINENO"; then :
3826  ac_compiler_gnu=yes
3827else
3828  ac_compiler_gnu=no
3829fi
3830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3831ac_cv_c_compiler_gnu=$ac_compiler_gnu
3832
3833fi
3834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3835$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3836if test $ac_compiler_gnu = yes; then
3837  GCC=yes
3838else
3839  GCC=
3840fi
3841ac_test_CFLAGS=${CFLAGS+set}
3842ac_save_CFLAGS=$CFLAGS
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3844$as_echo_n "checking whether $CC accepts -g... " >&6; }
3845if ${ac_cv_prog_cc_g+:} false; then :
3846  $as_echo_n "(cached) " >&6
3847else
3848  ac_save_c_werror_flag=$ac_c_werror_flag
3849   ac_c_werror_flag=yes
3850   ac_cv_prog_cc_g=no
3851   CFLAGS="-g"
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  ac_cv_prog_cc_g=yes
3865else
3866  CFLAGS=""
3867      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3868/* end confdefs.h.  */
3869
3870int
3871main ()
3872{
3873
3874  ;
3875  return 0;
3876}
3877_ACEOF
3878if ac_fn_c_try_compile "$LINENO"; then :
3879
3880else
3881  ac_c_werror_flag=$ac_save_c_werror_flag
3882	 CFLAGS="-g"
3883	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3884/* end confdefs.h.  */
3885
3886int
3887main ()
3888{
3889
3890  ;
3891  return 0;
3892}
3893_ACEOF
3894if ac_fn_c_try_compile "$LINENO"; then :
3895  ac_cv_prog_cc_g=yes
3896fi
3897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3898fi
3899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3900fi
3901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3902   ac_c_werror_flag=$ac_save_c_werror_flag
3903fi
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3905$as_echo "$ac_cv_prog_cc_g" >&6; }
3906if test "$ac_test_CFLAGS" = set; then
3907  CFLAGS=$ac_save_CFLAGS
3908elif test $ac_cv_prog_cc_g = yes; then
3909  if test "$GCC" = yes; then
3910    CFLAGS="-g -O2"
3911  else
3912    CFLAGS="-g"
3913  fi
3914else
3915  if test "$GCC" = yes; then
3916    CFLAGS="-O2"
3917  else
3918    CFLAGS=
3919  fi
3920fi
3921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3922$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3923if ${ac_cv_prog_cc_c89+:} false; then :
3924  $as_echo_n "(cached) " >&6
3925else
3926  ac_cv_prog_cc_c89=no
3927ac_save_CC=$CC
3928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3929/* end confdefs.h.  */
3930#include <stdarg.h>
3931#include <stdio.h>
3932struct stat;
3933/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3934struct buf { int x; };
3935FILE * (*rcsopen) (struct buf *, struct stat *, int);
3936static char *e (p, i)
3937     char **p;
3938     int i;
3939{
3940  return p[i];
3941}
3942static char *f (char * (*g) (char **, int), char **p, ...)
3943{
3944  char *s;
3945  va_list v;
3946  va_start (v,p);
3947  s = g (p, va_arg (v,int));
3948  va_end (v);
3949  return s;
3950}
3951
3952/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3953   function prototypes and stuff, but not '\xHH' hex character constants.
3954   These don't provoke an error unfortunately, instead are silently treated
3955   as 'x'.  The following induces an error, until -std is added to get
3956   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3957   array size at least.  It's necessary to write '\x00'==0 to get something
3958   that's true only with -std.  */
3959int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3960
3961/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3962   inside strings and character constants.  */
3963#define FOO(x) 'x'
3964int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3965
3966int test (int i, double x);
3967struct s1 {int (*f) (int a);};
3968struct s2 {int (*f) (double a);};
3969int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3970int argc;
3971char **argv;
3972int
3973main ()
3974{
3975return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3976  ;
3977  return 0;
3978}
3979_ACEOF
3980for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3981	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3982do
3983  CC="$ac_save_CC $ac_arg"
3984  if ac_fn_c_try_compile "$LINENO"; then :
3985  ac_cv_prog_cc_c89=$ac_arg
3986fi
3987rm -f core conftest.err conftest.$ac_objext
3988  test "x$ac_cv_prog_cc_c89" != "xno" && break
3989done
3990rm -f conftest.$ac_ext
3991CC=$ac_save_CC
3992
3993fi
3994# AC_CACHE_VAL
3995case "x$ac_cv_prog_cc_c89" in
3996  x)
3997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3998$as_echo "none needed" >&6; } ;;
3999  xno)
4000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4001$as_echo "unsupported" >&6; } ;;
4002  *)
4003    CC="$CC $ac_cv_prog_cc_c89"
4004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4005$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4006esac
4007if test "x$ac_cv_prog_cc_c89" != xno; then :
4008
4009fi
4010
4011ac_ext=c
4012ac_cpp='$CPP $CPPFLAGS'
4013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4015ac_compiler_gnu=$ac_cv_c_compiler_gnu
4016
4017ac_ext=c
4018ac_cpp='$CPP $CPPFLAGS'
4019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4021ac_compiler_gnu=$ac_cv_c_compiler_gnu
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4023$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4024if ${am_cv_prog_cc_c_o+:} false; then :
4025  $as_echo_n "(cached) " >&6
4026else
4027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4028/* end confdefs.h.  */
4029
4030int
4031main ()
4032{
4033
4034  ;
4035  return 0;
4036}
4037_ACEOF
4038  # Make sure it works both with $CC and with simple cc.
4039  # Following AC_PROG_CC_C_O, we do the test twice because some
4040  # compilers refuse to overwrite an existing .o file with -o,
4041  # though they will create one.
4042  am_cv_prog_cc_c_o=yes
4043  for am_i in 1 2; do
4044    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4045   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4046   ac_status=$?
4047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4048   (exit $ac_status); } \
4049         && test -f conftest2.$ac_objext; then
4050      : OK
4051    else
4052      am_cv_prog_cc_c_o=no
4053      break
4054    fi
4055  done
4056  rm -f core conftest*
4057  unset am_i
4058fi
4059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4060$as_echo "$am_cv_prog_cc_c_o" >&6; }
4061if test "$am_cv_prog_cc_c_o" != yes; then
4062   # Losing compiler, so override with the script.
4063   # FIXME: It is wrong to rewrite CC.
4064   # But if we don't then we get into trouble of one sort or another.
4065   # A longer-term fix would be to have automake use am__CC in this case,
4066   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4067   CC="$am_aux_dir/compile $CC"
4068fi
4069ac_ext=c
4070ac_cpp='$CPP $CPPFLAGS'
4071ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4072ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4073ac_compiler_gnu=$ac_cv_c_compiler_gnu
4074
4075DEPDIR="${am__leading_dot}deps"
4076
4077ac_config_commands="$ac_config_commands depfiles"
4078
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4080$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
4081cat > confinc.mk << 'END'
4082am__doit:
4083	@echo this is the am__doit target >confinc.out
4084.PHONY: am__doit
4085END
4086am__include="#"
4087am__quote=
4088# BSD make does it like this.
4089echo '.include "confinc.mk" # ignored' > confmf.BSD
4090# Other make implementations (GNU, Solaris 10, AIX) do it like this.
4091echo 'include confinc.mk # ignored' > confmf.GNU
4092_am_result=no
4093for s in GNU BSD; do
4094  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4095   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4096   ac_status=$?
4097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4098   (exit $ac_status); }
4099  case $?:`cat confinc.out 2>/dev/null` in #(
4100  '0:this is the am__doit target') :
4101    case $s in #(
4102  BSD) :
4103    am__include='.include' am__quote='"' ;; #(
4104  *) :
4105    am__include='include' am__quote='' ;;
4106esac ;; #(
4107  *) :
4108     ;;
4109esac
4110  if test "$am__include" != "#"; then
4111    _am_result="yes ($s style)"
4112    break
4113  fi
4114done
4115rm -f confinc.* confmf.*
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4117$as_echo "${_am_result}" >&6; }
4118
4119# Check whether --enable-dependency-tracking was given.
4120if test "${enable_dependency_tracking+set}" = set; then :
4121  enableval=$enable_dependency_tracking;
4122fi
4123
4124if test "x$enable_dependency_tracking" != xno; then
4125  am_depcomp="$ac_aux_dir/depcomp"
4126  AMDEPBACKSLASH='\'
4127  am__nodep='_no'
4128fi
4129 if test "x$enable_dependency_tracking" != xno; then
4130  AMDEP_TRUE=
4131  AMDEP_FALSE='#'
4132else
4133  AMDEP_TRUE='#'
4134  AMDEP_FALSE=
4135fi
4136
4137
4138
4139depcc="$CC"   am_compiler_list=
4140
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4142$as_echo_n "checking dependency style of $depcc... " >&6; }
4143if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4144  $as_echo_n "(cached) " >&6
4145else
4146  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4147  # We make a subdir and do the tests there.  Otherwise we can end up
4148  # making bogus files that we don't know about and never remove.  For
4149  # instance it was reported that on HP-UX the gcc test will end up
4150  # making a dummy file named 'D' -- because '-MD' means "put the output
4151  # in D".
4152  rm -rf conftest.dir
4153  mkdir conftest.dir
4154  # Copy depcomp to subdir because otherwise we won't find it if we're
4155  # using a relative directory.
4156  cp "$am_depcomp" conftest.dir
4157  cd conftest.dir
4158  # We will build objects and dependencies in a subdirectory because
4159  # it helps to detect inapplicable dependency modes.  For instance
4160  # both Tru64's cc and ICC support -MD to output dependencies as a
4161  # side effect of compilation, but ICC will put the dependencies in
4162  # the current directory while Tru64 will put them in the object
4163  # directory.
4164  mkdir sub
4165
4166  am_cv_CC_dependencies_compiler_type=none
4167  if test "$am_compiler_list" = ""; then
4168     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4169  fi
4170  am__universal=false
4171  case " $depcc " in #(
4172     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4173     esac
4174
4175  for depmode in $am_compiler_list; do
4176    # Setup a source with many dependencies, because some compilers
4177    # like to wrap large dependency lists on column 80 (with \), and
4178    # we should not choose a depcomp mode which is confused by this.
4179    #
4180    # We need to recreate these files for each test, as the compiler may
4181    # overwrite some of them when testing with obscure command lines.
4182    # This happens at least with the AIX C compiler.
4183    : > sub/conftest.c
4184    for i in 1 2 3 4 5 6; do
4185      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4186      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4187      # Solaris 10 /bin/sh.
4188      echo '/* dummy */' > sub/conftst$i.h
4189    done
4190    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4191
4192    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4193    # mode.  It turns out that the SunPro C++ compiler does not properly
4194    # handle '-M -o', and we need to detect this.  Also, some Intel
4195    # versions had trouble with output in subdirs.
4196    am__obj=sub/conftest.${OBJEXT-o}
4197    am__minus_obj="-o $am__obj"
4198    case $depmode in
4199    gcc)
4200      # This depmode causes a compiler race in universal mode.
4201      test "$am__universal" = false || continue
4202      ;;
4203    nosideeffect)
4204      # After this tag, mechanisms are not by side-effect, so they'll
4205      # only be used when explicitly requested.
4206      if test "x$enable_dependency_tracking" = xyes; then
4207	continue
4208      else
4209	break
4210      fi
4211      ;;
4212    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4213      # This compiler won't grok '-c -o', but also, the minuso test has
4214      # not run yet.  These depmodes are late enough in the game, and
4215      # so weak that their functioning should not be impacted.
4216      am__obj=conftest.${OBJEXT-o}
4217      am__minus_obj=
4218      ;;
4219    none) break ;;
4220    esac
4221    if depmode=$depmode \
4222       source=sub/conftest.c object=$am__obj \
4223       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4224       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4225         >/dev/null 2>conftest.err &&
4226       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4227       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4228       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4229       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4230      # icc doesn't choke on unknown options, it will just issue warnings
4231      # or remarks (even with -Werror).  So we grep stderr for any message
4232      # that says an option was ignored or not supported.
4233      # When given -MP, icc 7.0 and 7.1 complain thusly:
4234      #   icc: Command line warning: ignoring option '-M'; no argument required
4235      # The diagnosis changed in icc 8.0:
4236      #   icc: Command line remark: option '-MP' not supported
4237      if (grep 'ignoring option' conftest.err ||
4238          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4239        am_cv_CC_dependencies_compiler_type=$depmode
4240        break
4241      fi
4242    fi
4243  done
4244
4245  cd ..
4246  rm -rf conftest.dir
4247else
4248  am_cv_CC_dependencies_compiler_type=none
4249fi
4250
4251fi
4252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4253$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4254CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4255
4256 if
4257  test "x$enable_dependency_tracking" != xno \
4258  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4259  am__fastdepCC_TRUE=
4260  am__fastdepCC_FALSE='#'
4261else
4262  am__fastdepCC_TRUE='#'
4263  am__fastdepCC_FALSE=
4264fi
4265
4266
4267
4268
4269
4270
4271ac_ext=c
4272ac_cpp='$CPP $CPPFLAGS'
4273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4275ac_compiler_gnu=$ac_cv_c_compiler_gnu
4276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4277$as_echo_n "checking how to run the C preprocessor... " >&6; }
4278# On Suns, sometimes $CPP names a directory.
4279if test -n "$CPP" && test -d "$CPP"; then
4280  CPP=
4281fi
4282if test -z "$CPP"; then
4283  if ${ac_cv_prog_CPP+:} false; then :
4284  $as_echo_n "(cached) " >&6
4285else
4286      # Double quotes because CPP needs to be expanded
4287    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4288    do
4289      ac_preproc_ok=false
4290for ac_c_preproc_warn_flag in '' yes
4291do
4292  # Use a header file that comes with gcc, so configuring glibc
4293  # with a fresh cross-compiler works.
4294  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4295  # <limits.h> exists even on freestanding compilers.
4296  # On the NeXT, cc -E runs the code through the compiler's parser,
4297  # not just through cpp. "Syntax error" is here to catch this case.
4298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4299/* end confdefs.h.  */
4300#ifdef __STDC__
4301# include <limits.h>
4302#else
4303# include <assert.h>
4304#endif
4305		     Syntax error
4306_ACEOF
4307if ac_fn_c_try_cpp "$LINENO"; then :
4308
4309else
4310  # Broken: fails on valid input.
4311continue
4312fi
4313rm -f conftest.err conftest.i conftest.$ac_ext
4314
4315  # OK, works on sane cases.  Now check whether nonexistent headers
4316  # can be detected and how.
4317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4318/* end confdefs.h.  */
4319#include <ac_nonexistent.h>
4320_ACEOF
4321if ac_fn_c_try_cpp "$LINENO"; then :
4322  # Broken: success on invalid input.
4323continue
4324else
4325  # Passes both tests.
4326ac_preproc_ok=:
4327break
4328fi
4329rm -f conftest.err conftest.i conftest.$ac_ext
4330
4331done
4332# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4333rm -f conftest.i conftest.err conftest.$ac_ext
4334if $ac_preproc_ok; then :
4335  break
4336fi
4337
4338    done
4339    ac_cv_prog_CPP=$CPP
4340
4341fi
4342  CPP=$ac_cv_prog_CPP
4343else
4344  ac_cv_prog_CPP=$CPP
4345fi
4346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4347$as_echo "$CPP" >&6; }
4348ac_preproc_ok=false
4349for ac_c_preproc_warn_flag in '' yes
4350do
4351  # Use a header file that comes with gcc, so configuring glibc
4352  # with a fresh cross-compiler works.
4353  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4354  # <limits.h> exists even on freestanding compilers.
4355  # On the NeXT, cc -E runs the code through the compiler's parser,
4356  # not just through cpp. "Syntax error" is here to catch this case.
4357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358/* end confdefs.h.  */
4359#ifdef __STDC__
4360# include <limits.h>
4361#else
4362# include <assert.h>
4363#endif
4364		     Syntax error
4365_ACEOF
4366if ac_fn_c_try_cpp "$LINENO"; then :
4367
4368else
4369  # Broken: fails on valid input.
4370continue
4371fi
4372rm -f conftest.err conftest.i conftest.$ac_ext
4373
4374  # OK, works on sane cases.  Now check whether nonexistent headers
4375  # can be detected and how.
4376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4377/* end confdefs.h.  */
4378#include <ac_nonexistent.h>
4379_ACEOF
4380if ac_fn_c_try_cpp "$LINENO"; then :
4381  # Broken: success on invalid input.
4382continue
4383else
4384  # Passes both tests.
4385ac_preproc_ok=:
4386break
4387fi
4388rm -f conftest.err conftest.i conftest.$ac_ext
4389
4390done
4391# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4392rm -f conftest.i conftest.err conftest.$ac_ext
4393if $ac_preproc_ok; then :
4394
4395else
4396  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4398as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4399See \`config.log' for more details" "$LINENO" 5; }
4400fi
4401
4402ac_ext=c
4403ac_cpp='$CPP $CPPFLAGS'
4404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4406ac_compiler_gnu=$ac_cv_c_compiler_gnu
4407
4408
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4410$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4411if ${ac_cv_path_GREP+:} false; then :
4412  $as_echo_n "(cached) " >&6
4413else
4414  if test -z "$GREP"; then
4415  ac_path_GREP_found=false
4416  # Loop through the user's path and test for each of PROGNAME-LIST
4417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4418for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4419do
4420  IFS=$as_save_IFS
4421  test -z "$as_dir" && as_dir=.
4422    for ac_prog in grep ggrep; do
4423    for ac_exec_ext in '' $ac_executable_extensions; do
4424      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4425      as_fn_executable_p "$ac_path_GREP" || continue
4426# Check for GNU ac_path_GREP and select it if it is found.
4427  # Check for GNU $ac_path_GREP
4428case `"$ac_path_GREP" --version 2>&1` in
4429*GNU*)
4430  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4431*)
4432  ac_count=0
4433  $as_echo_n 0123456789 >"conftest.in"
4434  while :
4435  do
4436    cat "conftest.in" "conftest.in" >"conftest.tmp"
4437    mv "conftest.tmp" "conftest.in"
4438    cp "conftest.in" "conftest.nl"
4439    $as_echo 'GREP' >> "conftest.nl"
4440    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4441    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4442    as_fn_arith $ac_count + 1 && ac_count=$as_val
4443    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4444      # Best one so far, save it but keep looking for a better one
4445      ac_cv_path_GREP="$ac_path_GREP"
4446      ac_path_GREP_max=$ac_count
4447    fi
4448    # 10*(2^10) chars as input seems more than enough
4449    test $ac_count -gt 10 && break
4450  done
4451  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4452esac
4453
4454      $ac_path_GREP_found && break 3
4455    done
4456  done
4457  done
4458IFS=$as_save_IFS
4459  if test -z "$ac_cv_path_GREP"; then
4460    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4461  fi
4462else
4463  ac_cv_path_GREP=$GREP
4464fi
4465
4466fi
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4468$as_echo "$ac_cv_path_GREP" >&6; }
4469 GREP="$ac_cv_path_GREP"
4470
4471
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4473$as_echo_n "checking for egrep... " >&6; }
4474if ${ac_cv_path_EGREP+:} false; then :
4475  $as_echo_n "(cached) " >&6
4476else
4477  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4478   then ac_cv_path_EGREP="$GREP -E"
4479   else
4480     if test -z "$EGREP"; then
4481  ac_path_EGREP_found=false
4482  # Loop through the user's path and test for each of PROGNAME-LIST
4483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4484for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4485do
4486  IFS=$as_save_IFS
4487  test -z "$as_dir" && as_dir=.
4488    for ac_prog in egrep; do
4489    for ac_exec_ext in '' $ac_executable_extensions; do
4490      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4491      as_fn_executable_p "$ac_path_EGREP" || continue
4492# Check for GNU ac_path_EGREP and select it if it is found.
4493  # Check for GNU $ac_path_EGREP
4494case `"$ac_path_EGREP" --version 2>&1` in
4495*GNU*)
4496  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4497*)
4498  ac_count=0
4499  $as_echo_n 0123456789 >"conftest.in"
4500  while :
4501  do
4502    cat "conftest.in" "conftest.in" >"conftest.tmp"
4503    mv "conftest.tmp" "conftest.in"
4504    cp "conftest.in" "conftest.nl"
4505    $as_echo 'EGREP' >> "conftest.nl"
4506    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4507    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4508    as_fn_arith $ac_count + 1 && ac_count=$as_val
4509    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4510      # Best one so far, save it but keep looking for a better one
4511      ac_cv_path_EGREP="$ac_path_EGREP"
4512      ac_path_EGREP_max=$ac_count
4513    fi
4514    # 10*(2^10) chars as input seems more than enough
4515    test $ac_count -gt 10 && break
4516  done
4517  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4518esac
4519
4520      $ac_path_EGREP_found && break 3
4521    done
4522  done
4523  done
4524IFS=$as_save_IFS
4525  if test -z "$ac_cv_path_EGREP"; then
4526    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4527  fi
4528else
4529  ac_cv_path_EGREP=$EGREP
4530fi
4531
4532   fi
4533fi
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4535$as_echo "$ac_cv_path_EGREP" >&6; }
4536 EGREP="$ac_cv_path_EGREP"
4537
4538
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4540$as_echo_n "checking for ANSI C header files... " >&6; }
4541if ${ac_cv_header_stdc+:} false; then :
4542  $as_echo_n "(cached) " >&6
4543else
4544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h.  */
4546#include <stdlib.h>
4547#include <stdarg.h>
4548#include <string.h>
4549#include <float.h>
4550
4551int
4552main ()
4553{
4554
4555  ;
4556  return 0;
4557}
4558_ACEOF
4559if ac_fn_c_try_compile "$LINENO"; then :
4560  ac_cv_header_stdc=yes
4561else
4562  ac_cv_header_stdc=no
4563fi
4564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4565
4566if test $ac_cv_header_stdc = yes; then
4567  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569/* end confdefs.h.  */
4570#include <string.h>
4571
4572_ACEOF
4573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4574  $EGREP "memchr" >/dev/null 2>&1; then :
4575
4576else
4577  ac_cv_header_stdc=no
4578fi
4579rm -f conftest*
4580
4581fi
4582
4583if test $ac_cv_header_stdc = yes; then
4584  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4586/* end confdefs.h.  */
4587#include <stdlib.h>
4588
4589_ACEOF
4590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4591  $EGREP "free" >/dev/null 2>&1; then :
4592
4593else
4594  ac_cv_header_stdc=no
4595fi
4596rm -f conftest*
4597
4598fi
4599
4600if test $ac_cv_header_stdc = yes; then
4601  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4602  if test "$cross_compiling" = yes; then :
4603  :
4604else
4605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4606/* end confdefs.h.  */
4607#include <ctype.h>
4608#include <stdlib.h>
4609#if ((' ' & 0x0FF) == 0x020)
4610# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4611# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4612#else
4613# define ISLOWER(c) \
4614		   (('a' <= (c) && (c) <= 'i') \
4615		     || ('j' <= (c) && (c) <= 'r') \
4616		     || ('s' <= (c) && (c) <= 'z'))
4617# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4618#endif
4619
4620#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4621int
4622main ()
4623{
4624  int i;
4625  for (i = 0; i < 256; i++)
4626    if (XOR (islower (i), ISLOWER (i))
4627	|| toupper (i) != TOUPPER (i))
4628      return 2;
4629  return 0;
4630}
4631_ACEOF
4632if ac_fn_c_try_run "$LINENO"; then :
4633
4634else
4635  ac_cv_header_stdc=no
4636fi
4637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4638  conftest.$ac_objext conftest.beam conftest.$ac_ext
4639fi
4640
4641fi
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4644$as_echo "$ac_cv_header_stdc" >&6; }
4645if test $ac_cv_header_stdc = yes; then
4646
4647$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4648
4649fi
4650
4651# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4652for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4653		  inttypes.h stdint.h unistd.h
4654do :
4655  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4656ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4657"
4658if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4659  cat >>confdefs.h <<_ACEOF
4660#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4661_ACEOF
4662
4663fi
4664
4665done
4666
4667
4668for ac_header in stdio.h stdlib.h string.h unistd.h netdb.h signal.h \
4669  syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \
4670  math.h sys/socket.h dirent.h ctype.h \
4671  mtent.h fcntl.h sys/param.h arpa/inet.h \
4672  sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \
4673  sys/socket.h sys/loadavg.h arpa/inet.h \
4674  sys/vmmeter.h strings.h vm/vm_param.h \
4675  sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
4676  stdint.h mach/host_info.h mach/mach_host.h knlist.h pwd.h \
4677  sys/var.h arpa/nameser.h assert.h sys/dkstat.h sys/disk.h sys/sched.h \
4678  zone.h nlist.h kvm.h linux/kernel.h procinfo.h sys/dk.h \
4679  sys/resource.h pthread.h windows.h process.h conio.h sys/wait.h \
4680  stdarg.h winsock2.h pdh.h psapi.h sys/sem.h sys/ipc.h sys/shm.h Winldap.h \
4681  Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
4682  execinfo.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
4683  dlfcn.h sys/utsname.h sys/un.h sys/protosw.h stddef.h limits.h float.h
4684do :
4685  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4686ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4687if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4688  cat >>confdefs.h <<_ACEOF
4689#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4690_ACEOF
4691
4692fi
4693
4694done
4695
4696for ac_header in resolv.h
4697do :
4698  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
4699#ifdef HAVE_SYS_TYPES_H
4700#  include <sys/types.h>
4701#endif
4702#ifdef HAVE_NETINET_IN_H
4703#  include <netinet/in.h>
4704#endif
4705#ifdef HAVE_ARPA_NAMESER_H
4706#  include <arpa/nameser.h>
4707#endif
4708#ifdef HAVE_NETDB_H
4709#  include <netdb.h>
4710#endif
4711
4712"
4713if test "x$ac_cv_header_resolv_h" = xyes; then :
4714  cat >>confdefs.h <<_ACEOF
4715#define HAVE_RESOLV_H 1
4716_ACEOF
4717
4718fi
4719
4720done
4721
4722for ac_header in net/if.h net/if_mib.h
4723do :
4724  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4725ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4726#include <stdio.h>
4727#ifdef STDC_HEADERS
4728#  include <stdlib.h>
4729#  include <stddef.h>
4730#else
4731#  ifdef HAVE_STDLIB_H
4732#    include <stdlib.h>
4733#  endif
4734#endif
4735#ifdef HAVE_SYS_TYPES_H
4736#  include <sys/types.h>
4737#endif
4738#ifdef HAVE_SYS_SOCKET_H
4739#  include <sys/socket.h>
4740#endif
4741/* for net/if_mib.h */
4742#ifdef HAVE_NET_IF_H
4743#  include <net/if.h>
4744#endif
4745
4746"
4747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4748  cat >>confdefs.h <<_ACEOF
4749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4750_ACEOF
4751
4752fi
4753
4754done
4755
4756
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Werror=cpp" >&5
4758$as_echo_n "checking whether compiler supports -Werror=cpp... " >&6; }
4759checked_werror_cpp_CFLAGS=""
4760saved_CFLAGS="$CFLAGS"
4761CFLAGS="$CFLAGS -Werror=cpp"
4762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4763/* end confdefs.h.  */
4764
4765int
4766main ()
4767{
4768
4769  void f() {};
4770
4771  ;
4772  return 0;
4773}
4774_ACEOF
4775if ac_fn_c_try_compile "$LINENO"; then :
4776  checked_werror_cpp_CFLAGS="-Werror=cpp"
4777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4778$as_echo "yes" >&6; }
4779else
4780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4781$as_echo "no" >&6; }
4782
4783fi
4784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4785CFLAGS="$saved_CFLAGS"
4786
4787saved_CFLAGS="$CFLAGS"
4788CFLAGS="$checked_werror_cpp_CFLAGS $CFLAGS"
4789for ac_header in sys/mount.h sys/proc.h sys/sysctl.h sys/user.h
4790do :
4791  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4792ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4793#ifdef HAVE_SYS_TYPES_H
4794#  include <sys/types.h>
4795#endif
4796#ifdef HAVE_SYS_PARAM_H
4797#  include <sys/param.h>
4798#endif
4799
4800"
4801if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4802  cat >>confdefs.h <<_ACEOF
4803#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4804_ACEOF
4805
4806fi
4807
4808done
4809
4810CFLAGS="$saved_CFLAGS"
4811
4812for ac_header in sys/swap.h
4813do :
4814  ac_fn_c_check_header_compile "$LINENO" "sys/swap.h" "ac_cv_header_sys_swap_h" "
4815#ifdef HAVE_SYS_PARAM_H
4816#  include <sys/param.h>
4817#endif
4818
4819"
4820if test "x$ac_cv_header_sys_swap_h" = xyes; then :
4821  cat >>confdefs.h <<_ACEOF
4822#define HAVE_SYS_SWAP_H 1
4823_ACEOF
4824
4825fi
4826
4827done
4828
4829for ac_header in sys/ucontext.h
4830do :
4831  ac_fn_c_check_header_compile "$LINENO" "sys/ucontext.h" "ac_cv_header_sys_ucontext_h" "
4832#ifdef HAVE_SIGNAL_H
4833#  include <signal.h>
4834#endif
4835
4836"
4837if test "x$ac_cv_header_sys_ucontext_h" = xyes; then :
4838  cat >>confdefs.h <<_ACEOF
4839#define HAVE_SYS_UCONTEXT_H 1
4840_ACEOF
4841
4842fi
4843
4844done
4845
4846for ac_header in devstat.h
4847do :
4848  ac_fn_c_check_header_compile "$LINENO" "devstat.h" "ac_cv_header_devstat_h" "
4849#ifdef HAVE_SYS_DKSTAT_H
4850#  include <sys/dkstat.h>
4851#endif
4852
4853"
4854if test "x$ac_cv_header_devstat_h" = xyes; then :
4855  cat >>confdefs.h <<_ACEOF
4856#define HAVE_DEVSTAT_H 1
4857_ACEOF
4858
4859fi
4860
4861done
4862
4863for ac_header in linux/netlink.h
4864do :
4865  ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
4866#ifdef HAVE_SYS_SOCKET_H
4867#  include <sys/socket.h>
4868#endif
4869
4870"
4871if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
4872  cat >>confdefs.h <<_ACEOF
4873#define HAVE_LINUX_NETLINK_H 1
4874_ACEOF
4875
4876	for ac_header in linux/inet_diag.h
4877do :
4878  ac_fn_c_check_header_mongrel "$LINENO" "linux/inet_diag.h" "ac_cv_header_linux_inet_diag_h" "$ac_includes_default"
4879if test "x$ac_cv_header_linux_inet_diag_h" = xyes; then :
4880  cat >>confdefs.h <<_ACEOF
4881#define HAVE_LINUX_INET_DIAG_H 1
4882_ACEOF
4883
4884
4885$as_echo "#define HAVE_INET_DIAG 1" >>confdefs.h
4886
4887
4888fi
4889
4890done
4891
4892
4893fi
4894
4895done
4896
4897for ac_header in libperfstat.h
4898do :
4899  ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" "
4900#ifdef HAVE_SYS_PROTOSW_H
4901#  include <sys/protosw.h>
4902#endif
4903
4904"
4905if test "x$ac_cv_header_libperfstat_h" = xyes; then :
4906  cat >>confdefs.h <<_ACEOF
4907#define HAVE_LIBPERFSTAT_H 1
4908_ACEOF
4909
4910fi
4911
4912done
4913
4914
4915
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
4917$as_echo_n "checking for library containing socket... " >&6; }
4918if ${ac_cv_search_socket+:} false; then :
4919  $as_echo_n "(cached) " >&6
4920else
4921  ac_func_search_save_LIBS=$LIBS
4922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923/* end confdefs.h.  */
4924
4925/* Override any GCC internal prototype to avoid an error.
4926   Use char because int might match the return type of a GCC
4927   builtin and then its argument prototype would still apply.  */
4928#ifdef __cplusplus
4929extern "C"
4930#endif
4931char socket ();
4932int
4933main ()
4934{
4935return socket ();
4936  ;
4937  return 0;
4938}
4939_ACEOF
4940for ac_lib in '' socket; do
4941  if test -z "$ac_lib"; then
4942    ac_res="none required"
4943  else
4944    ac_res=-l$ac_lib
4945    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4946  fi
4947  if ac_fn_c_try_link "$LINENO"; then :
4948  ac_cv_search_socket=$ac_res
4949fi
4950rm -f core conftest.err conftest.$ac_objext \
4951    conftest$ac_exeext
4952  if ${ac_cv_search_socket+:} false; then :
4953  break
4954fi
4955done
4956if ${ac_cv_search_socket+:} false; then :
4957
4958else
4959  ac_cv_search_socket=no
4960fi
4961rm conftest.$ac_ext
4962LIBS=$ac_func_search_save_LIBS
4963fi
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
4965$as_echo "$ac_cv_search_socket" >&6; }
4966ac_res=$ac_cv_search_socket
4967if test "$ac_res" != no; then :
4968  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4969
4970fi
4971
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kstat_open" >&5
4973$as_echo_n "checking for library containing kstat_open... " >&6; }
4974if ${ac_cv_search_kstat_open+:} false; then :
4975  $as_echo_n "(cached) " >&6
4976else
4977  ac_func_search_save_LIBS=$LIBS
4978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979/* end confdefs.h.  */
4980
4981/* Override any GCC internal prototype to avoid an error.
4982   Use char because int might match the return type of a GCC
4983   builtin and then its argument prototype would still apply.  */
4984#ifdef __cplusplus
4985extern "C"
4986#endif
4987char kstat_open ();
4988int
4989main ()
4990{
4991return kstat_open ();
4992  ;
4993  return 0;
4994}
4995_ACEOF
4996for ac_lib in '' kstat; do
4997  if test -z "$ac_lib"; then
4998    ac_res="none required"
4999  else
5000    ac_res=-l$ac_lib
5001    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5002  fi
5003  if ac_fn_c_try_link "$LINENO"; then :
5004  ac_cv_search_kstat_open=$ac_res
5005fi
5006rm -f core conftest.err conftest.$ac_objext \
5007    conftest$ac_exeext
5008  if ${ac_cv_search_kstat_open+:} false; then :
5009  break
5010fi
5011done
5012if ${ac_cv_search_kstat_open+:} false; then :
5013
5014else
5015  ac_cv_search_kstat_open=no
5016fi
5017rm conftest.$ac_ext
5018LIBS=$ac_func_search_save_LIBS
5019fi
5020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kstat_open" >&5
5021$as_echo "$ac_cv_search_kstat_open" >&6; }
5022ac_res=$ac_cv_search_kstat_open
5023if test "$ac_res" != no; then :
5024  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5025
5026fi
5027
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
5029$as_echo_n "checking for library containing gethostbyname... " >&6; }
5030if ${ac_cv_search_gethostbyname+:} false; then :
5031  $as_echo_n "(cached) " >&6
5032else
5033  ac_func_search_save_LIBS=$LIBS
5034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5035/* end confdefs.h.  */
5036
5037/* Override any GCC internal prototype to avoid an error.
5038   Use char because int might match the return type of a GCC
5039   builtin and then its argument prototype would still apply.  */
5040#ifdef __cplusplus
5041extern "C"
5042#endif
5043char gethostbyname ();
5044int
5045main ()
5046{
5047return gethostbyname ();
5048  ;
5049  return 0;
5050}
5051_ACEOF
5052for ac_lib in '' nsl; do
5053  if test -z "$ac_lib"; then
5054    ac_res="none required"
5055  else
5056    ac_res=-l$ac_lib
5057    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5058  fi
5059  if ac_fn_c_try_link "$LINENO"; then :
5060  ac_cv_search_gethostbyname=$ac_res
5061fi
5062rm -f core conftest.err conftest.$ac_objext \
5063    conftest$ac_exeext
5064  if ${ac_cv_search_gethostbyname+:} false; then :
5065  break
5066fi
5067done
5068if ${ac_cv_search_gethostbyname+:} false; then :
5069
5070else
5071  ac_cv_search_gethostbyname=no
5072fi
5073rm conftest.$ac_ext
5074LIBS=$ac_func_search_save_LIBS
5075fi
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
5077$as_echo "$ac_cv_search_gethostbyname" >&6; }
5078ac_res=$ac_cv_search_gethostbyname
5079if test "$ac_res" != no; then :
5080  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5081
5082fi
5083
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
5085$as_echo_n "checking for library containing clock_gettime... " >&6; }
5086if ${ac_cv_search_clock_gettime+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089  ac_func_search_save_LIBS=$LIBS
5090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5091/* end confdefs.h.  */
5092
5093/* Override any GCC internal prototype to avoid an error.
5094   Use char because int might match the return type of a GCC
5095   builtin and then its argument prototype would still apply.  */
5096#ifdef __cplusplus
5097extern "C"
5098#endif
5099char clock_gettime ();
5100int
5101main ()
5102{
5103return clock_gettime ();
5104  ;
5105  return 0;
5106}
5107_ACEOF
5108for ac_lib in '' rt; do
5109  if test -z "$ac_lib"; then
5110    ac_res="none required"
5111  else
5112    ac_res=-l$ac_lib
5113    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5114  fi
5115  if ac_fn_c_try_link "$LINENO"; then :
5116  ac_cv_search_clock_gettime=$ac_res
5117fi
5118rm -f core conftest.err conftest.$ac_objext \
5119    conftest$ac_exeext
5120  if ${ac_cv_search_clock_gettime+:} false; then :
5121  break
5122fi
5123done
5124if ${ac_cv_search_clock_gettime+:} false; then :
5125
5126else
5127  ac_cv_search_clock_gettime=no
5128fi
5129rm conftest.$ac_ext
5130LIBS=$ac_func_search_save_LIBS
5131fi
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
5133$as_echo "$ac_cv_search_clock_gettime" >&6; }
5134ac_res=$ac_cv_search_clock_gettime
5135if test "$ac_res" != no; then :
5136  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5137
5138fi
5139
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
5141$as_echo_n "checking for library containing dlopen... " >&6; }
5142if ${ac_cv_search_dlopen+:} false; then :
5143  $as_echo_n "(cached) " >&6
5144else
5145  ac_func_search_save_LIBS=$LIBS
5146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147/* end confdefs.h.  */
5148
5149/* Override any GCC internal prototype to avoid an error.
5150   Use char because int might match the return type of a GCC
5151   builtin and then its argument prototype would still apply.  */
5152#ifdef __cplusplus
5153extern "C"
5154#endif
5155char dlopen ();
5156int
5157main ()
5158{
5159return dlopen ();
5160  ;
5161  return 0;
5162}
5163_ACEOF
5164for ac_lib in '' dl; do
5165  if test -z "$ac_lib"; then
5166    ac_res="none required"
5167  else
5168    ac_res=-l$ac_lib
5169    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5170  fi
5171  if ac_fn_c_try_link "$LINENO"; then :
5172  ac_cv_search_dlopen=$ac_res
5173fi
5174rm -f core conftest.err conftest.$ac_objext \
5175    conftest$ac_exeext
5176  if ${ac_cv_search_dlopen+:} false; then :
5177  break
5178fi
5179done
5180if ${ac_cv_search_dlopen+:} false; then :
5181
5182else
5183  ac_cv_search_dlopen=no
5184fi
5185rm conftest.$ac_ext
5186LIBS=$ac_func_search_save_LIBS
5187fi
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
5189$as_echo "$ac_cv_search_dlopen" >&6; }
5190ac_res=$ac_cv_search_dlopen
5191if test "$ac_res" != no; then :
5192  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5193
5194fi
5195
5196
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_memory_total" >&5
5198$as_echo_n "checking for library containing perfstat_memory_total... " >&6; }
5199if ${ac_cv_search_perfstat_memory_total+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  ac_func_search_save_LIBS=$LIBS
5203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204/* end confdefs.h.  */
5205
5206/* Override any GCC internal prototype to avoid an error.
5207   Use char because int might match the return type of a GCC
5208   builtin and then its argument prototype would still apply.  */
5209#ifdef __cplusplus
5210extern "C"
5211#endif
5212char perfstat_memory_total ();
5213int
5214main ()
5215{
5216return perfstat_memory_total ();
5217  ;
5218  return 0;
5219}
5220_ACEOF
5221for ac_lib in '' perfstat; do
5222  if test -z "$ac_lib"; then
5223    ac_res="none required"
5224  else
5225    ac_res=-l$ac_lib
5226    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5227  fi
5228  if ac_fn_c_try_link "$LINENO"; then :
5229  ac_cv_search_perfstat_memory_total=$ac_res
5230fi
5231rm -f core conftest.err conftest.$ac_objext \
5232    conftest$ac_exeext
5233  if ${ac_cv_search_perfstat_memory_total+:} false; then :
5234  break
5235fi
5236done
5237if ${ac_cv_search_perfstat_memory_total+:} false; then :
5238
5239else
5240  ac_cv_search_perfstat_memory_total=no
5241fi
5242rm conftest.$ac_ext
5243LIBS=$ac_func_search_save_LIBS
5244fi
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_perfstat_memory_total" >&5
5246$as_echo "$ac_cv_search_perfstat_memory_total" >&6; }
5247ac_res=$ac_cv_search_perfstat_memory_total
5248if test "$ac_res" != no; then :
5249  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5250
5251$as_echo "#define HAVE_LIBPERFSTAT 1" >>confdefs.h
5252
5253fi
5254
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing devstat_getdevs" >&5
5256$as_echo_n "checking for library containing devstat_getdevs... " >&6; }
5257if ${ac_cv_search_devstat_getdevs+:} false; then :
5258  $as_echo_n "(cached) " >&6
5259else
5260  ac_func_search_save_LIBS=$LIBS
5261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262/* end confdefs.h.  */
5263
5264/* Override any GCC internal prototype to avoid an error.
5265   Use char because int might match the return type of a GCC
5266   builtin and then its argument prototype would still apply.  */
5267#ifdef __cplusplus
5268extern "C"
5269#endif
5270char devstat_getdevs ();
5271int
5272main ()
5273{
5274return devstat_getdevs ();
5275  ;
5276  return 0;
5277}
5278_ACEOF
5279for ac_lib in '' devstat; do
5280  if test -z "$ac_lib"; then
5281    ac_res="none required"
5282  else
5283    ac_res=-l$ac_lib
5284    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5285  fi
5286  if ac_fn_c_try_link "$LINENO"; then :
5287  ac_cv_search_devstat_getdevs=$ac_res
5288fi
5289rm -f core conftest.err conftest.$ac_objext \
5290    conftest$ac_exeext
5291  if ${ac_cv_search_devstat_getdevs+:} false; then :
5292  break
5293fi
5294done
5295if ${ac_cv_search_devstat_getdevs+:} false; then :
5296
5297else
5298  ac_cv_search_devstat_getdevs=no
5299fi
5300rm conftest.$ac_ext
5301LIBS=$ac_func_search_save_LIBS
5302fi
5303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_devstat_getdevs" >&5
5304$as_echo "$ac_cv_search_devstat_getdevs" >&6; }
5305ac_res=$ac_cv_search_devstat_getdevs
5306if test "$ac_res" != no; then :
5307  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5308
5309$as_echo "#define HAVE_LIBDEVSTAT 1" >>confdefs.h
5310
5311fi
5312
5313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getdevs" >&5
5314$as_echo_n "checking for library containing getdevs... " >&6; }
5315if ${ac_cv_search_getdevs+:} false; then :
5316  $as_echo_n "(cached) " >&6
5317else
5318  ac_func_search_save_LIBS=$LIBS
5319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320/* end confdefs.h.  */
5321
5322/* Override any GCC internal prototype to avoid an error.
5323   Use char because int might match the return type of a GCC
5324   builtin and then its argument prototype would still apply.  */
5325#ifdef __cplusplus
5326extern "C"
5327#endif
5328char getdevs ();
5329int
5330main ()
5331{
5332return getdevs ();
5333  ;
5334  return 0;
5335}
5336_ACEOF
5337for ac_lib in '' devstat; do
5338  if test -z "$ac_lib"; then
5339    ac_res="none required"
5340  else
5341    ac_res=-l$ac_lib
5342    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5343  fi
5344  if ac_fn_c_try_link "$LINENO"; then :
5345  ac_cv_search_getdevs=$ac_res
5346fi
5347rm -f core conftest.err conftest.$ac_objext \
5348    conftest$ac_exeext
5349  if ${ac_cv_search_getdevs+:} false; then :
5350  break
5351fi
5352done
5353if ${ac_cv_search_getdevs+:} false; then :
5354
5355else
5356  ac_cv_search_getdevs=no
5357fi
5358rm conftest.$ac_ext
5359LIBS=$ac_func_search_save_LIBS
5360fi
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getdevs" >&5
5362$as_echo "$ac_cv_search_getdevs" >&6; }
5363ac_res=$ac_cv_search_getdevs
5364if test "$ac_res" != no; then :
5365  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5366
5367$as_echo "#define HAVE_LIBDEVSTAT 1" >>confdefs.h
5368
5369fi
5370
5371
5372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
5373$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
5374if ${ac_cv_search_backtrace_symbols+:} false; then :
5375  $as_echo_n "(cached) " >&6
5376else
5377  ac_func_search_save_LIBS=$LIBS
5378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5379/* end confdefs.h.  */
5380
5381/* Override any GCC internal prototype to avoid an error.
5382   Use char because int might match the return type of a GCC
5383   builtin and then its argument prototype would still apply.  */
5384#ifdef __cplusplus
5385extern "C"
5386#endif
5387char backtrace_symbols ();
5388int
5389main ()
5390{
5391return backtrace_symbols ();
5392  ;
5393  return 0;
5394}
5395_ACEOF
5396for ac_lib in '' execinfo; do
5397  if test -z "$ac_lib"; then
5398    ac_res="none required"
5399  else
5400    ac_res=-l$ac_lib
5401    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5402  fi
5403  if ac_fn_c_try_link "$LINENO"; then :
5404  ac_cv_search_backtrace_symbols=$ac_res
5405fi
5406rm -f core conftest.err conftest.$ac_objext \
5407    conftest$ac_exeext
5408  if ${ac_cv_search_backtrace_symbols+:} false; then :
5409  break
5410fi
5411done
5412if ${ac_cv_search_backtrace_symbols+:} false; then :
5413
5414else
5415  ac_cv_search_backtrace_symbols=no
5416fi
5417rm conftest.$ac_ext
5418LIBS=$ac_func_search_save_LIBS
5419fi
5420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
5421$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
5422ac_res=$ac_cv_search_backtrace_symbols
5423if test "$ac_res" != no; then :
5424  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5425
5426$as_echo "#define HAVE_LIBEXECINFO 1" >>confdefs.h
5427
5428fi
5429
5430
5431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
5432$as_echo_n "checking for main in -lm... " >&6; }
5433if ${ac_cv_lib_m_main+:} false; then :
5434  $as_echo_n "(cached) " >&6
5435else
5436  ac_check_lib_save_LIBS=$LIBS
5437LIBS="-lm  $LIBS"
5438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5439/* end confdefs.h.  */
5440
5441
5442int
5443main ()
5444{
5445return main ();
5446  ;
5447  return 0;
5448}
5449_ACEOF
5450if ac_fn_c_try_link "$LINENO"; then :
5451  ac_cv_lib_m_main=yes
5452else
5453  ac_cv_lib_m_main=no
5454fi
5455rm -f core conftest.err conftest.$ac_objext \
5456    conftest$ac_exeext conftest.$ac_ext
5457LIBS=$ac_check_lib_save_LIBS
5458fi
5459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
5460$as_echo "$ac_cv_lib_m_main" >&6; }
5461if test "x$ac_cv_lib_m_main" = xyes; then :
5462  cat >>confdefs.h <<_ACEOF
5463#define HAVE_LIBM 1
5464_ACEOF
5465
5466  LIBS="-lm $LIBS"
5467
5468fi
5469
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkvm" >&5
5471$as_echo_n "checking for main in -lkvm... " >&6; }
5472if ${ac_cv_lib_kvm_main+:} false; then :
5473  $as_echo_n "(cached) " >&6
5474else
5475  ac_check_lib_save_LIBS=$LIBS
5476LIBS="-lkvm  $LIBS"
5477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h.  */
5479
5480
5481int
5482main ()
5483{
5484return main ();
5485  ;
5486  return 0;
5487}
5488_ACEOF
5489if ac_fn_c_try_link "$LINENO"; then :
5490  ac_cv_lib_kvm_main=yes
5491else
5492  ac_cv_lib_kvm_main=no
5493fi
5494rm -f core conftest.err conftest.$ac_objext \
5495    conftest$ac_exeext conftest.$ac_ext
5496LIBS=$ac_check_lib_save_LIBS
5497fi
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_main" >&5
5499$as_echo "$ac_cv_lib_kvm_main" >&6; }
5500if test "x$ac_cv_lib_kvm_main" = xyes; then :
5501  cat >>confdefs.h <<_ACEOF
5502#define HAVE_LIBKVM 1
5503_ACEOF
5504
5505  LIBS="-lkvm $LIBS"
5506
5507fi
5508
5509
5510found_resolv="no"
5511
5512	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DNS lookup functions" >&5
5513$as_echo_n "checking for DNS lookup functions... " >&6; }
5514
5515
5516am_save_LIBS="$LIBS"
5517LIBS="$LIBS "
5518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h.  */
5520
5521#ifdef HAVE_SYS_TYPES_H
5522#	include <sys/types.h>
5523#endif
5524#ifdef HAVE_NETINET_IN_H
5525#	include <netinet/in.h>
5526#endif
5527#ifdef HAVE_ARPA_NAMESER_H
5528#	include <arpa/nameser.h>
5529#endif
5530#ifdef HAVE_RESOLV_H
5531#	include <resolv.h>
5532#endif
5533#ifndef C_IN
5534#	define C_IN	ns_c_in
5535#endif	/* C_IN */
5536#ifndef T_SOA
5537#	define T_SOA	ns_t_soa
5538#endif	/* T_SOA */
5539
5540int
5541main ()
5542{
5543
5544	char	*buf;
5545
5546	res_init();
5547	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5548
5549  ;
5550  return 0;
5551}
5552_ACEOF
5553if ac_fn_c_try_link "$LINENO"; then :
5554  found_resolv="yes"
5555RESOLV_LIBS=""
5556fi
5557rm -f core conftest.err conftest.$ac_objext \
5558    conftest$ac_exeext conftest.$ac_ext
5559LIBS="$am_save_LIBS"
5560
5561
5562	if test "x$found_resolv" != "xyes"; then
5563
5564am_save_LIBS="$LIBS"
5565LIBS="$LIBS -lresolv"
5566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5567/* end confdefs.h.  */
5568
5569#ifdef HAVE_SYS_TYPES_H
5570#	include <sys/types.h>
5571#endif
5572#ifdef HAVE_NETINET_IN_H
5573#	include <netinet/in.h>
5574#endif
5575#ifdef HAVE_ARPA_NAMESER_H
5576#	include <arpa/nameser.h>
5577#endif
5578#ifdef HAVE_RESOLV_H
5579#	include <resolv.h>
5580#endif
5581#ifndef C_IN
5582#	define C_IN	ns_c_in
5583#endif	/* C_IN */
5584#ifndef T_SOA
5585#	define T_SOA	ns_t_soa
5586#endif	/* T_SOA */
5587
5588int
5589main ()
5590{
5591
5592	char	*buf;
5593
5594	res_init();
5595	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5596
5597  ;
5598  return 0;
5599}
5600_ACEOF
5601if ac_fn_c_try_link "$LINENO"; then :
5602  found_resolv="yes"
5603RESOLV_LIBS="-lresolv"
5604fi
5605rm -f core conftest.err conftest.$ac_objext \
5606    conftest$ac_exeext conftest.$ac_ext
5607LIBS="$am_save_LIBS"
5608
5609	fi
5610	if test "x$found_resolv" != "xyes"; then
5611
5612am_save_LIBS="$LIBS"
5613LIBS="$LIBS -lbind"
5614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h.  */
5616
5617#ifdef HAVE_SYS_TYPES_H
5618#	include <sys/types.h>
5619#endif
5620#ifdef HAVE_NETINET_IN_H
5621#	include <netinet/in.h>
5622#endif
5623#ifdef HAVE_ARPA_NAMESER_H
5624#	include <arpa/nameser.h>
5625#endif
5626#ifdef HAVE_RESOLV_H
5627#	include <resolv.h>
5628#endif
5629#ifndef C_IN
5630#	define C_IN	ns_c_in
5631#endif	/* C_IN */
5632#ifndef T_SOA
5633#	define T_SOA	ns_t_soa
5634#endif	/* T_SOA */
5635
5636int
5637main ()
5638{
5639
5640	char	*buf;
5641
5642	res_init();
5643	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5644
5645  ;
5646  return 0;
5647}
5648_ACEOF
5649if ac_fn_c_try_link "$LINENO"; then :
5650  found_resolv="yes"
5651RESOLV_LIBS="-lbind"
5652fi
5653rm -f core conftest.err conftest.$ac_objext \
5654    conftest$ac_exeext conftest.$ac_ext
5655LIBS="$am_save_LIBS"
5656
5657	fi
5658	if test "x$found_resolv" != "xyes"; then
5659
5660am_save_LIBS="$LIBS"
5661LIBS="$LIBS -lsocket"
5662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5663/* end confdefs.h.  */
5664
5665#ifdef HAVE_SYS_TYPES_H
5666#	include <sys/types.h>
5667#endif
5668#ifdef HAVE_NETINET_IN_H
5669#	include <netinet/in.h>
5670#endif
5671#ifdef HAVE_ARPA_NAMESER_H
5672#	include <arpa/nameser.h>
5673#endif
5674#ifdef HAVE_RESOLV_H
5675#	include <resolv.h>
5676#endif
5677#ifndef C_IN
5678#	define C_IN	ns_c_in
5679#endif	/* C_IN */
5680#ifndef T_SOA
5681#	define T_SOA	ns_t_soa
5682#endif	/* T_SOA */
5683
5684int
5685main ()
5686{
5687
5688	char	*buf;
5689
5690	res_init();
5691	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5692
5693  ;
5694  return 0;
5695}
5696_ACEOF
5697if ac_fn_c_try_link "$LINENO"; then :
5698  found_resolv="yes"
5699RESOLV_LIBS="-lsocket"
5700fi
5701rm -f core conftest.err conftest.$ac_objext \
5702    conftest$ac_exeext conftest.$ac_ext
5703LIBS="$am_save_LIBS"
5704
5705	fi
5706
5707	if test "x$found_resolv" = "xyes"; then
5708
5709$as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
5710
5711	else
5712		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5713$as_echo "no" >&6; }
5714	fi
5715
5716	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_resolv" >&5
5717$as_echo "$found_resolv" >&6; }
5718
5719
5720
5721if test "x$found_resolv" != "xyes"; then
5722	as_fn_error $? "Unable to do DNS lookups (libresolv check failed)" "$LINENO" 5
5723fi
5724LIBS="${LIBS} ${RESOLV_LIBS}"
5725
5726
5727largefile=yes
5728
5729case "${host_os}" in
5730	solaris*)
5731		largefile=no
5732		;;
5733esac
5734
5735if test "x$largefile" = "xyes"; then
5736	# Check whether --enable-largefile was given.
5737if test "${enable_largefile+set}" = set; then :
5738  enableval=$enable_largefile;
5739fi
5740
5741if test "$enable_largefile" != no; then
5742
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5744$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5745if ${ac_cv_sys_largefile_CC+:} false; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748  ac_cv_sys_largefile_CC=no
5749     if test "$GCC" != yes; then
5750       ac_save_CC=$CC
5751       while :; do
5752	 # IRIX 6.2 and later do not support large files by default,
5753	 # so use the C compiler's -n32 option if that helps.
5754	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5755/* end confdefs.h.  */
5756#include <sys/types.h>
5757 /* Check that off_t can represent 2**63 - 1 correctly.
5758    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5759    since some C++ compilers masquerading as C compilers
5760    incorrectly reject 9223372036854775807.  */
5761#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5762  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5763		       && LARGE_OFF_T % 2147483647 == 1)
5764		      ? 1 : -1];
5765int
5766main ()
5767{
5768
5769  ;
5770  return 0;
5771}
5772_ACEOF
5773	 if ac_fn_c_try_compile "$LINENO"; then :
5774  break
5775fi
5776rm -f core conftest.err conftest.$ac_objext
5777	 CC="$CC -n32"
5778	 if ac_fn_c_try_compile "$LINENO"; then :
5779  ac_cv_sys_largefile_CC=' -n32'; break
5780fi
5781rm -f core conftest.err conftest.$ac_objext
5782	 break
5783       done
5784       CC=$ac_save_CC
5785       rm -f conftest.$ac_ext
5786    fi
5787fi
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5789$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5790  if test "$ac_cv_sys_largefile_CC" != no; then
5791    CC=$CC$ac_cv_sys_largefile_CC
5792  fi
5793
5794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5795$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5796if ${ac_cv_sys_file_offset_bits+:} false; then :
5797  $as_echo_n "(cached) " >&6
5798else
5799  while :; do
5800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5801/* end confdefs.h.  */
5802#include <sys/types.h>
5803 /* Check that off_t can represent 2**63 - 1 correctly.
5804    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5805    since some C++ compilers masquerading as C compilers
5806    incorrectly reject 9223372036854775807.  */
5807#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5808  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5809		       && LARGE_OFF_T % 2147483647 == 1)
5810		      ? 1 : -1];
5811int
5812main ()
5813{
5814
5815  ;
5816  return 0;
5817}
5818_ACEOF
5819if ac_fn_c_try_compile "$LINENO"; then :
5820  ac_cv_sys_file_offset_bits=no; break
5821fi
5822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5824/* end confdefs.h.  */
5825#define _FILE_OFFSET_BITS 64
5826#include <sys/types.h>
5827 /* Check that off_t can represent 2**63 - 1 correctly.
5828    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5829    since some C++ compilers masquerading as C compilers
5830    incorrectly reject 9223372036854775807.  */
5831#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5832  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5833		       && LARGE_OFF_T % 2147483647 == 1)
5834		      ? 1 : -1];
5835int
5836main ()
5837{
5838
5839  ;
5840  return 0;
5841}
5842_ACEOF
5843if ac_fn_c_try_compile "$LINENO"; then :
5844  ac_cv_sys_file_offset_bits=64; break
5845fi
5846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5847  ac_cv_sys_file_offset_bits=unknown
5848  break
5849done
5850fi
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5852$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5853case $ac_cv_sys_file_offset_bits in #(
5854  no | unknown) ;;
5855  *)
5856cat >>confdefs.h <<_ACEOF
5857#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5858_ACEOF
5859;;
5860esac
5861rm -rf conftest*
5862  if test $ac_cv_sys_file_offset_bits = unknown; then
5863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5864$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5865if ${ac_cv_sys_large_files+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  while :; do
5869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870/* end confdefs.h.  */
5871#include <sys/types.h>
5872 /* Check that off_t can represent 2**63 - 1 correctly.
5873    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5874    since some C++ compilers masquerading as C compilers
5875    incorrectly reject 9223372036854775807.  */
5876#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5877  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5878		       && LARGE_OFF_T % 2147483647 == 1)
5879		      ? 1 : -1];
5880int
5881main ()
5882{
5883
5884  ;
5885  return 0;
5886}
5887_ACEOF
5888if ac_fn_c_try_compile "$LINENO"; then :
5889  ac_cv_sys_large_files=no; break
5890fi
5891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5893/* end confdefs.h.  */
5894#define _LARGE_FILES 1
5895#include <sys/types.h>
5896 /* Check that off_t can represent 2**63 - 1 correctly.
5897    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5898    since some C++ compilers masquerading as C compilers
5899    incorrectly reject 9223372036854775807.  */
5900#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5901  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5902		       && LARGE_OFF_T % 2147483647 == 1)
5903		      ? 1 : -1];
5904int
5905main ()
5906{
5907
5908  ;
5909  return 0;
5910}
5911_ACEOF
5912if ac_fn_c_try_compile "$LINENO"; then :
5913  ac_cv_sys_large_files=1; break
5914fi
5915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5916  ac_cv_sys_large_files=unknown
5917  break
5918done
5919fi
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5921$as_echo "$ac_cv_sys_large_files" >&6; }
5922case $ac_cv_sys_large_files in #(
5923  no | unknown) ;;
5924  *)
5925cat >>confdefs.h <<_ACEOF
5926#define _LARGE_FILES $ac_cv_sys_large_files
5927_ACEOF
5928;;
5929esac
5930rm -rf conftest*
5931  fi
5932
5933
5934fi
5935
5936fi
5937
5938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
5939$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
5940if ${ac_cv_c_const+:} false; then :
5941  $as_echo_n "(cached) " >&6
5942else
5943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5944/* end confdefs.h.  */
5945
5946int
5947main ()
5948{
5949
5950#ifndef __cplusplus
5951  /* Ultrix mips cc rejects this sort of thing.  */
5952  typedef int charset[2];
5953  const charset cs = { 0, 0 };
5954  /* SunOS 4.1.1 cc rejects this.  */
5955  char const *const *pcpcc;
5956  char **ppc;
5957  /* NEC SVR4.0.2 mips cc rejects this.  */
5958  struct point {int x, y;};
5959  static struct point const zero = {0,0};
5960  /* AIX XL C 1.02.0.0 rejects this.
5961     It does not let you subtract one const X* pointer from another in
5962     an arm of an if-expression whose if-part is not a constant
5963     expression */
5964  const char *g = "string";
5965  pcpcc = &g + (g ? g-g : 0);
5966  /* HPUX 7.0 cc rejects these. */
5967  ++pcpcc;
5968  ppc = (char**) pcpcc;
5969  pcpcc = (char const *const *) ppc;
5970  { /* SCO 3.2v4 cc rejects this sort of thing.  */
5971    char tx;
5972    char *t = &tx;
5973    char const *s = 0 ? (char *) 0 : (char const *) 0;
5974
5975    *t++ = 0;
5976    if (s) return 0;
5977  }
5978  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5979    int x[] = {25, 17};
5980    const int *foo = &x[0];
5981    ++foo;
5982  }
5983  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5984    typedef const int *iptr;
5985    iptr p = 0;
5986    ++p;
5987  }
5988  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
5989       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5990    struct s { int j; const int *ap[3]; } bx;
5991    struct s *b = &bx; b->j = 5;
5992  }
5993  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5994    const int foo = 10;
5995    if (!foo) return 0;
5996  }
5997  return !cs[0] && !zero.x;
5998#endif
5999
6000  ;
6001  return 0;
6002}
6003_ACEOF
6004if ac_fn_c_try_compile "$LINENO"; then :
6005  ac_cv_c_const=yes
6006else
6007  ac_cv_c_const=no
6008fi
6009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010fi
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6012$as_echo "$ac_cv_c_const" >&6; }
6013if test $ac_cv_c_const = no; then
6014
6015$as_echo "#define const /**/" >>confdefs.h
6016
6017fi
6018
6019ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6020if test "x$ac_cv_type_pid_t" = xyes; then :
6021
6022else
6023
6024cat >>confdefs.h <<_ACEOF
6025#define pid_t int
6026_ACEOF
6027
6028fi
6029
6030
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6032$as_echo_n "checking for socklen_t... " >&6; }
6033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034/* end confdefs.h.  */
6035
6036#include <sys/types.h>
6037#include <unistd.h>
6038#include <sys/socket.h>
6039
6040int
6041main ()
6042{
6043socklen_t s;
6044  ;
6045  return 0;
6046}
6047_ACEOF
6048if ac_fn_c_try_compile "$LINENO"; then :
6049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6050$as_echo "yes" >&6; }
6051else
6052
6053$as_echo "#define socklen_t int" >>confdefs.h
6054
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6056$as_echo "no" >&6; }
6057fi
6058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6059
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for actual socklen_t parameter type in socket functions" >&5
6061$as_echo_n "checking for actual socklen_t parameter type in socket functions... " >&6; }
6062zbx_socklen_t=
6063for arg2 in "struct sockaddr" void; do
6064  for arg3 in socklen_t size_t int; do
6065    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6066/* end confdefs.h.  */
6067
6068#ifdef HAVE_SYS_TYPES_H
6069#  include <sys/types.h>
6070#endif
6071#ifdef HAVE_SYS_SOCKET_H
6072#  include <sys/socket.h>
6073#endif
6074      extern int getpeername(int sockfd, $arg2 *addr, $arg3 *addrlen);
6075
6076int
6077main ()
6078{
6079
6080      $arg3 addrlen;
6081      getpeername(0, 0, &addrlen);
6082
6083  ;
6084  return 0;
6085}
6086_ACEOF
6087if ac_fn_c_try_compile "$LINENO"; then :
6088
6089      zbx_socklen_t="$arg3"
6090      break 2
6091
6092fi
6093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6094  done
6095done
6096if test "x$zbx_socklen_t" != "x"; then
6097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $zbx_socklen_t" >&5
6098$as_echo "$zbx_socklen_t" >&6; }
6099
6100cat >>confdefs.h <<_ACEOF
6101#define ZBX_SOCKLEN_T $zbx_socklen_t
6102_ACEOF
6103
6104else
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: leaving undefined" >&5
6106$as_echo "leaving undefined" >&6; }
6107fi
6108
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for integer field name in union sigval of struct siginfo_t" >&5
6110$as_echo_n "checking for integer field name in union sigval of struct siginfo_t... " >&6; }
6111zbx_sival_int=
6112for field in sival_int sigval_int; do
6113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6114/* end confdefs.h.  */
6115
6116#ifdef HAVE_SIGNAL_H
6117#  include <signal.h>
6118#endif
6119
6120int
6121main ()
6122{
6123
6124    siginfo_t siginfo;
6125    siginfo.si_value.$field = 0;
6126
6127  ;
6128  return 0;
6129}
6130_ACEOF
6131if ac_fn_c_try_compile "$LINENO"; then :
6132
6133    zbx_sival_int="$field"
6134    break
6135
6136fi
6137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6138done
6139if test "x$zbx_sival_int" != "x"; then
6140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $zbx_sival_int" >&5
6141$as_echo "$zbx_sival_int" >&6; }
6142
6143cat >>confdefs.h <<_ACEOF
6144#define ZBX_SIVAL_INT $zbx_sival_int
6145_ACEOF
6146
6147else
6148  as_fn_error $? "Unable to find integer field name in union sigval of struct siginfo_t" "$LINENO" 5
6149fi
6150
6151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ninit" >&5
6152$as_echo_n "checking for res_ninit... " >&6; }
6153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6154/* end confdefs.h.  */
6155
6156#ifdef HAVE_SYS_TYPES_H
6157#	include <sys/types.h>
6158#endif
6159#ifdef HAVE_NETINET_IN_H
6160#	include <netinet/in.h>
6161#endif
6162#ifdef HAVE_ARPA_NAMESER_H
6163#	include <arpa/nameser.h>
6164#endif
6165#ifdef HAVE_RESOLV_H
6166#	include <resolv.h>
6167#endif
6168#ifndef C_IN
6169#	define C_IN	ns_c_in
6170#endif	/* C_IN */
6171#ifndef T_SOA
6172#	define T_SOA	ns_t_soa
6173#endif	/* T_SOA */
6174
6175int
6176main ()
6177{
6178
6179	struct __res_state	res_state_local;
6180
6181	res_ninit(&res_state_local);
6182
6183  ;
6184  return 0;
6185}
6186_ACEOF
6187if ac_fn_c_try_link "$LINENO"; then :
6188
6189$as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h
6190
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6192$as_echo "yes" >&6; }
6193else
6194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195$as_echo "no" >&6; }
6196fi
6197rm -f core conftest.err conftest.$ac_objext \
6198    conftest$ac_exeext conftest.$ac_ext
6199
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy" >&5
6201$as_echo_n "checking for res_ndestroy... " >&6; }
6202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6203/* end confdefs.h.  */
6204
6205#ifdef HAVE_SYS_TYPES_H
6206#	include <sys/types.h>
6207#endif
6208#ifdef HAVE_NETINET_IN_H
6209#	include <netinet/in.h>
6210#endif
6211#ifdef HAVE_ARPA_NAMESER_H
6212#	include <arpa/nameser.h>
6213#endif
6214#ifdef HAVE_RESOLV_H
6215#	include <resolv.h>
6216#endif
6217#ifndef C_IN
6218#	define C_IN	ns_c_in
6219#endif	/* C_IN */
6220#ifndef T_SOA
6221#	define T_SOA	ns_t_soa
6222#endif	/* T_SOA */
6223
6224int
6225main ()
6226{
6227
6228	struct __res_state	res_state_local;
6229
6230	res_ninit(&res_state_local);
6231	res_ndestroy(&res_state_local);
6232
6233  ;
6234  return 0;
6235}
6236_ACEOF
6237if ac_fn_c_try_link "$LINENO"; then :
6238
6239$as_echo "#define HAVE_RES_NDESTROY 1" >>confdefs.h
6240
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6242$as_echo "yes" >&6; }
6243else
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
6246fi
6247rm -f core conftest.err conftest.$ac_objext \
6248    conftest$ac_exeext conftest.$ac_ext
6249
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._u._ext.nsaddrs" >&5
6251$as_echo_n "checking for _res._u._ext.nsaddrs... " >&6; }
6252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6253/* end confdefs.h.  */
6254
6255#ifdef HAVE_SYS_TYPES_H
6256#	include <sys/types.h>
6257#endif
6258#ifdef HAVE_NETINET_IN_H
6259#	include <netinet/in.h>
6260#endif
6261#ifdef HAVE_ARPA_NAMESER_H
6262#	include <arpa/nameser.h>
6263#endif
6264#ifdef HAVE_RESOLV_H
6265#	include <resolv.h>
6266#endif
6267#ifndef C_IN
6268#	define C_IN	ns_c_in
6269#endif	/* C_IN */
6270#ifndef T_SOA
6271#	define T_SOA	ns_t_soa
6272#endif	/* T_SOA */
6273
6274int
6275main ()
6276{
6277
6278	struct sockaddr_in6	*sockaddrin6;
6279
6280	sockaddrin6 = _res._u._ext.nsaddrs[0];
6281
6282  ;
6283  return 0;
6284}
6285_ACEOF
6286if ac_fn_c_try_link "$LINENO"; then :
6287
6288$as_echo "#define HAVE_RES_U_EXT 1" >>confdefs.h
6289
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6291$as_echo "yes" >&6; }
6292else
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294$as_echo "no" >&6; }
6295fi
6296rm -f core conftest.err conftest.$ac_objext \
6297    conftest$ac_exeext conftest.$ac_ext
6298
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._u._ext.ext" >&5
6300$as_echo_n "checking for _res._u._ext.ext... " >&6; }
6301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6302/* end confdefs.h.  */
6303
6304#ifdef HAVE_SYS_TYPES_H
6305#	include <sys/types.h>
6306#endif
6307#ifdef HAVE_NETINET_IN_H
6308#	include <netinet/in.h>
6309#endif
6310#ifdef HAVE_ARPA_NAMESER_H
6311#	include <arpa/nameser.h>
6312#endif
6313#ifdef HAVE_RESOLV_H
6314#	include <resolv.h>
6315#endif
6316#ifndef C_IN
6317#	define C_IN	ns_c_in
6318#endif	/* C_IN */
6319#ifndef T_SOA
6320#	define T_SOA	ns_t_soa
6321#endif	/* T_SOA */
6322
6323int
6324main ()
6325{
6326
6327	struct __res_state_ext	*ext;
6328
6329	ext = _res._u._ext.ext;
6330
6331  ;
6332  return 0;
6333}
6334_ACEOF
6335if ac_fn_c_try_link "$LINENO"; then :
6336
6337$as_echo "#define HAVE_RES_U_EXT_EXT 1" >>confdefs.h
6338
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6340$as_echo "yes" >&6; }
6341else
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343$as_echo "no" >&6; }
6344fi
6345rm -f core conftest.err conftest.$ac_objext \
6346    conftest$ac_exeext conftest.$ac_ext
6347
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._ext.ext.nsaddrs" >&5
6349$as_echo_n "checking for _res._ext.ext.nsaddrs... " >&6; }
6350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6351/* end confdefs.h.  */
6352
6353#ifdef HAVE_SYS_TYPES_H
6354#	include <sys/types.h>
6355#endif
6356#ifdef HAVE_NETINET_IN_H
6357#	include <netinet/in.h>
6358#endif
6359#ifdef HAVE_ARPA_NAMESER_H
6360#	include <arpa/nameser.h>
6361#endif
6362#ifdef HAVE_RESOLV_H
6363#	include <resolv.h>
6364#endif
6365#ifndef C_IN
6366#	define C_IN	ns_c_in
6367#endif	/* C_IN */
6368#ifndef T_SOA
6369#	define T_SOA	ns_t_soa
6370#endif	/* T_SOA */
6371
6372int
6373main ()
6374{
6375
6376	union res_sockaddr_union	*na;
6377
6378	na = &_res._ext.ext.nsaddrs[0];
6379
6380  ;
6381  return 0;
6382}
6383_ACEOF
6384if ac_fn_c_try_link "$LINENO"; then :
6385
6386$as_echo "#define HAVE_RES_EXT_EXT 1" >>confdefs.h
6387
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6389$as_echo "yes" >&6; }
6390else
6391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394rm -f core conftest.err conftest.$ac_objext \
6395    conftest$ac_exeext conftest.$ac_ext
6396
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6.sin6_len" >&5
6398$as_echo_n "checking for struct sockaddr_in6.sin6_len... " >&6; }
6399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400/* end confdefs.h.  */
6401
6402#ifdef HAVE_SYS_TYPES_H
6403#	include <sys/types.h>
6404#endif
6405#ifdef HAVE_NETINET_IN_H
6406#	include <netinet/in.h>
6407#endif
6408#ifdef HAVE_ARPA_NAMESER_H
6409#	include <arpa/nameser.h>
6410#endif
6411#ifdef HAVE_RESOLV_H
6412#	include <resolv.h>
6413#endif
6414#ifndef C_IN
6415#	define C_IN	ns_c_in
6416#endif	/* C_IN */
6417#ifndef T_SOA
6418#	define T_SOA	ns_t_soa
6419#endif	/* T_SOA */
6420
6421int
6422main ()
6423{
6424
6425	struct sockaddr_in6	sin6;
6426	unsigned int		len;
6427
6428	len = sin6.sin6_len;
6429
6430  ;
6431  return 0;
6432}
6433_ACEOF
6434if ac_fn_c_try_link "$LINENO"; then :
6435
6436$as_echo "#define HAVE_RES_SIN6_LEN 1" >>confdefs.h
6437
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6439$as_echo "yes" >&6; }
6440else
6441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6442$as_echo "no" >&6; }
6443fi
6444rm -f core conftest.err conftest.$ac_objext \
6445    conftest$ac_exeext conftest.$ac_ext
6446
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for union semun" >&5
6448$as_echo_n "checking for union semun... " >&6; }
6449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450/* end confdefs.h.  */
6451
6452#include <sys/types.h>
6453#include <sys/ipc.h>
6454#include <sys/sem.h>
6455
6456int
6457main ()
6458{
6459union semun foo;
6460  ;
6461  return 0;
6462}
6463_ACEOF
6464if ac_fn_c_try_compile "$LINENO"; then :
6465
6466$as_echo "#define HAVE_SEMUN 1" >>confdefs.h
6467
6468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6469$as_echo "yes" >&6; }
6470else
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6475
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct swaptable in sys/swap.h" >&5
6477$as_echo_n "checking for struct swaptable in sys/swap.h... " >&6; }
6478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479/* end confdefs.h.  */
6480
6481#include <stdlib.h>
6482#include <sys/types.h>
6483#include <sys/syscall.h>
6484#include <sys/swap.h>
6485
6486#ifndef NULL
6487#define NULL (void *)0
6488#endif
6489
6490int
6491main ()
6492{
6493
6494    register int cnt, i;
6495    register int t, f;
6496    struct swaptable *swt;
6497    struct swapent *ste;
6498    static char path[256];
6499
6500    /* get total number of swap entries */
6501    cnt = swapctl(SC_GETNSWP, 0);
6502
6503    /* allocate enough space to hold count + n swapents */
6504    swt = (struct swaptable *)malloc(sizeof(int) +
6505             cnt * sizeof(struct swapent));
6506    if (swt == NULL)
6507    {
6508  return;
6509    }
6510    swt->swt_n = cnt;
6511
6512    /* fill in ste_path pointers: we do not care about the paths, so we
6513point
6514       them all to the same buffer */
6515    ste = &(swt->swt_ent[0]);
6516    i = cnt;
6517    while (--i >= 0)
6518    {
6519  ste++->ste_path = path;
6520    }
6521
6522    /* grab all swap info */
6523    swapctl(SC_LIST, swt);
6524
6525    /* walk through the structs and sum up the fields */
6526    t = f = 0;
6527    ste = &(swt->swt_ent[0]);
6528    i = cnt;
6529    while (--i >= 0)
6530    {
6531  /* do not count slots being deleted */
6532  if (!(ste->ste_flags & ST_INDEL) &&
6533      !(ste->ste_flags & ST_DOINGDEL))
6534  {
6535      t += ste->ste_pages;
6536      f += ste->ste_free;
6537  } ste++;
6538    }
6539
6540    /* fill in the results */
6541    free(swt);
6542
6543
6544  ;
6545  return 0;
6546}
6547_ACEOF
6548if ac_fn_c_try_compile "$LINENO"; then :
6549
6550$as_echo "#define HAVE_SYS_SWAP_SWAPTABLE 1" >>confdefs.h
6551
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6553$as_echo "yes" >&6; }
6554else
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556$as_echo "no" >&6; }
6557fi
6558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6559
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sensordev in sys/sensors.h" >&5
6561$as_echo_n "checking for struct sensordev in sys/sensors.h... " >&6; }
6562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6563/* end confdefs.h.  */
6564
6565#include <stdlib.h>
6566#include <sys/queue.h>
6567#include <sys/sensors.h>
6568int
6569main ()
6570{
6571struct sensordev sensordev;
6572sensordev.xname[0]='\0';
6573sensordev.maxnumt[0]=0;
6574
6575  ;
6576  return 0;
6577}
6578_ACEOF
6579if ac_fn_c_try_compile "$LINENO"; then :
6580
6581$as_echo "#define HAVE_SENSORDEV 1" >>confdefs.h
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6584$as_echo "yes" >&6; }
6585else
6586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statvfs64 in sys/statvfs.h" >&5
6592$as_echo_n "checking for struct statvfs64 in sys/statvfs.h... " >&6; }
6593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6594/* end confdefs.h.  */
6595
6596#ifdef HAVE_SYS_TYPES_H
6597#	include <sys/types.h>
6598#endif
6599#ifdef HAVE_SYS_STATVFS_H
6600#	include <sys/statvfs.h>
6601#endif
6602
6603int
6604main ()
6605{
6606
6607	struct statvfs64	s;
6608	s.f_frsize = s.f_blocks = s.f_bfree = s.f_bavail = 0;
6609	statvfs64("/", &s);
6610
6611  ;
6612  return 0;
6613}
6614_ACEOF
6615if ac_fn_c_try_compile "$LINENO"; then :
6616
6617$as_echo "#define HAVE_SYS_STATVFS64 1" >>confdefs.h
6618
6619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6620$as_echo "yes" >&6; }
6621else
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623$as_echo "no" >&6; }
6624fi
6625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6626
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statfs64 in sys/statfs.h" >&5
6628$as_echo_n "checking for struct statfs64 in sys/statfs.h... " >&6; }
6629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630/* end confdefs.h.  */
6631
6632#ifdef HAVE_SYS_TYPES_H
6633#	include <sys/types.h>
6634#endif
6635#ifdef HAVE_SYS_STATFS_H
6636#	include <sys/statfs.h>
6637#endif
6638
6639int
6640main ()
6641{
6642
6643	struct statfs64	s;
6644	s.f_bsize = s.f_blocks = s.f_bfree = s.f_bavail = 0;
6645	statfs64("/", &s);
6646
6647  ;
6648  return 0;
6649}
6650_ACEOF
6651if ac_fn_c_try_compile "$LINENO"; then :
6652
6653$as_echo "#define HAVE_SYS_STATFS64 1" >>confdefs.h
6654
6655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6656$as_echo "yes" >&6; }
6657else
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659$as_echo "no" >&6; }
6660fi
6661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6662
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field ss_family in struct sockaddr_storage" >&5
6664$as_echo_n "checking for field ss_family in struct sockaddr_storage... " >&6; }
6665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6666/* end confdefs.h.  */
6667#include <sys/socket.h>
6668int
6669main ()
6670{
6671struct sockaddr_storage ss;
6672ss.ss_family = 0;
6673
6674  ;
6675  return 0;
6676}
6677_ACEOF
6678if ac_fn_c_try_compile "$LINENO"; then :
6679
6680$as_echo "#define HAVE_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
6681
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6683$as_echo "yes" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6689
6690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field mem_unit in struct sysinfo" >&5
6691$as_echo_n "checking for field mem_unit in struct sysinfo... " >&6; }
6692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6693/* end confdefs.h.  */
6694#include <sys/sysinfo.h>
6695int
6696main ()
6697{
6698struct sysinfo sysinfo;
6699sysinfo.mem_unit=0;
6700
6701  ;
6702  return 0;
6703}
6704_ACEOF
6705if ac_fn_c_try_compile "$LINENO"; then :
6706
6707$as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
6708
6709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6710$as_echo "yes" >&6; }
6711else
6712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713$as_echo "no" >&6; }
6714fi
6715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6716
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field freeswap in struct sysinfo" >&5
6718$as_echo_n "checking for field freeswap in struct sysinfo... " >&6; }
6719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6720/* end confdefs.h.  */
6721#include <sys/sysinfo.h>
6722int
6723main ()
6724{
6725struct sysinfo sysinfo;
6726sysinfo.freeswap=0;
6727
6728  ;
6729  return 0;
6730}
6731_ACEOF
6732if ac_fn_c_try_compile "$LINENO"; then :
6733
6734$as_echo "#define HAVE_SYSINFO_FREESWAP 1" >>confdefs.h
6735
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6737$as_echo "yes" >&6; }
6738else
6739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6743
6744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field totalswap in struct sysinfo" >&5
6745$as_echo_n "checking for field totalswap in struct sysinfo... " >&6; }
6746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6747/* end confdefs.h.  */
6748#include <sys/sysinfo.h>
6749int
6750main ()
6751{
6752struct sysinfo sysinfo;
6753sysinfo.totalswap=0;
6754
6755  ;
6756  return 0;
6757}
6758_ACEOF
6759if ac_fn_c_try_compile "$LINENO"; then :
6760
6761$as_echo "#define HAVE_SYSINFO_TOTALSWAP 1" >>confdefs.h
6762
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6764$as_echo "yes" >&6; }
6765else
6766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6767$as_echo "no" >&6; }
6768fi
6769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6770
6771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field totalram in struct sysinfo" >&5
6772$as_echo_n "checking for field totalram in struct sysinfo... " >&6; }
6773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6774/* end confdefs.h.  */
6775#include <sys/sysinfo.h>
6776int
6777main ()
6778{
6779struct sysinfo sysinfo;
6780sysinfo.totalram=0;
6781
6782  ;
6783  return 0;
6784}
6785_ACEOF
6786if ac_fn_c_try_compile "$LINENO"; then :
6787
6788$as_echo "#define HAVE_SYSINFO_TOTALRAM 1" >>confdefs.h
6789
6790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6791$as_echo "yes" >&6; }
6792else
6793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794$as_echo "no" >&6; }
6795fi
6796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6797
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field sharedram in struct sysinfo" >&5
6799$as_echo_n "checking for field sharedram in struct sysinfo... " >&6; }
6800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6801/* end confdefs.h.  */
6802#include <sys/sysinfo.h>
6803int
6804main ()
6805{
6806struct sysinfo sysinfo;
6807sysinfo.sharedram=0;
6808
6809  ;
6810  return 0;
6811}
6812_ACEOF
6813if ac_fn_c_try_compile "$LINENO"; then :
6814
6815$as_echo "#define HAVE_SYSINFO_SHAREDRAM 1" >>confdefs.h
6816
6817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6818$as_echo "yes" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6824
6825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field bufferram in struct sysinfo" >&5
6826$as_echo_n "checking for field bufferram in struct sysinfo... " >&6; }
6827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6828/* end confdefs.h.  */
6829#include <sys/sysinfo.h>
6830int
6831main ()
6832{
6833struct sysinfo sysinfo;
6834sysinfo.bufferram=0;
6835
6836  ;
6837  return 0;
6838}
6839_ACEOF
6840if ac_fn_c_try_compile "$LINENO"; then :
6841
6842$as_echo "#define HAVE_SYSINFO_BUFFERRAM 1" >>confdefs.h
6843
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6845$as_echo "yes" >&6; }
6846else
6847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6848$as_echo "no" >&6; }
6849fi
6850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6851
6852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field freeram in struct sysinfo" >&5
6853$as_echo_n "checking for field freeram in struct sysinfo... " >&6; }
6854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855/* end confdefs.h.  */
6856#include <sys/sysinfo.h>
6857int
6858main ()
6859{
6860struct sysinfo sysinfo;
6861sysinfo.freeram=0;
6862
6863  ;
6864  return 0;
6865}
6866_ACEOF
6867if ac_fn_c_try_compile "$LINENO"; then :
6868
6869$as_echo "#define HAVE_SYSINFO_FREERAM 1" >>confdefs.h
6870
6871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6872$as_echo "yes" >&6; }
6873else
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875$as_echo "no" >&6; }
6876fi
6877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6878
6879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field uptime in struct sysinfo" >&5
6880$as_echo_n "checking for field uptime in struct sysinfo... " >&6; }
6881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6882/* end confdefs.h.  */
6883#include <sys/sysinfo.h>
6884int
6885main ()
6886{
6887struct sysinfo sysinfo;
6888sysinfo.uptime=0;
6889
6890  ;
6891  return 0;
6892}
6893_ACEOF
6894if ac_fn_c_try_compile "$LINENO"; then :
6895
6896$as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
6897
6898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6899$as_echo "yes" >&6; }
6900else
6901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6902$as_echo "no" >&6; }
6903fi
6904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6905
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field procs in struct sysinfo" >&5
6907$as_echo_n "checking for field procs in struct sysinfo... " >&6; }
6908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6909/* end confdefs.h.  */
6910#include <sys/sysinfo.h>
6911int
6912main ()
6913{
6914struct sysinfo sysinfo;
6915sysinfo.procs=0;
6916
6917  ;
6918  return 0;
6919}
6920_ACEOF
6921if ac_fn_c_try_compile "$LINENO"; then :
6922
6923$as_echo "#define HAVE_SYSINFO_PROCS 1" >>confdefs.h
6924
6925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6926$as_echo "yes" >&6; }
6927else
6928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929$as_echo "no" >&6; }
6930fi
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field tm_gmtoff in struct tm" >&5
6934$as_echo_n "checking for field tm_gmtoff in struct tm... " >&6; }
6935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6936/* end confdefs.h.  */
6937
6938#ifdef HAVE_SYS_TIME_H
6939#include <sys/time.h>
6940#endif	/* HAVE_SYS_TIME_H */
6941
6942#ifdef HAVE_TIME_H
6943#include <time.h>
6944#endif	/* HAVE_TIME_H */
6945
6946int
6947main ()
6948{
6949
6950	struct tm tm;
6951	tm.tm_gmtoff;
6952
6953  ;
6954  return 0;
6955}
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"; then :
6958
6959$as_echo "#define HAVE_TM_TM_GMTOFF 1" >>confdefs.h
6960
6961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6962$as_echo "yes" >&6; }
6963else
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6965$as_echo "no" >&6; }
6966fi
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker options --start-group/--end-group" >&5
6970$as_echo_n "checking for linker options --start-group/--end-group... " >&6; }
6971saved_LDFLAGS="$LDFLAGS"
6972LDFLAGS="-Wl,--start-group -Wl,--end-group"
6973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6974/* end confdefs.h.  */
6975
6976int
6977main ()
6978{
6979
6980  ;
6981  return 0;
6982}
6983_ACEOF
6984if ac_fn_c_try_link "$LINENO"; then :
6985  HAVE_START_GROUP="yes"
6986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6987$as_echo "yes" >&6; }
6988else
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6990$as_echo "no" >&6; }
6991
6992fi
6993rm -f core conftest.err conftest.$ac_objext \
6994    conftest$ac_exeext conftest.$ac_ext
6995LDFLAGS="$saved_LDFLAGS"
6996
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for '__thread' compiler support" >&5
6998$as_echo_n "checking for '__thread' compiler support... " >&6; }
6999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000/* end confdefs.h.  */
7001#include <stdio.h>
7002int
7003main ()
7004{
7005static __thread int a = 0;
7006  ;
7007  return 0;
7008}
7009_ACEOF
7010if ac_fn_c_try_compile "$LINENO"; then :
7011
7012$as_echo "#define HAVE_THREAD_LOCAL 1" >>confdefs.h
7013
7014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7015$as_echo "yes" >&6; }
7016else
7017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7018$as_echo "no" >&6; }
7019HAVE_THREAD_LOCAL="no"
7020fi
7021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7022
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field updates in struct vminfo_t" >&5
7024$as_echo_n "checking for field updates in struct vminfo_t... " >&6; }
7025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026/* end confdefs.h.  */
7027
7028#include <sys/sysinfo.h>
7029
7030int
7031main ()
7032{
7033
7034	vminfo_t vminfo;
7035	vminfo.updates;
7036
7037  ;
7038  return 0;
7039}
7040_ACEOF
7041if ac_fn_c_try_compile "$LINENO"; then :
7042
7043$as_echo "#define HAVE_VMINFO_T_UPDATES 1" >>confdefs.h
7044
7045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7046$as_echo "yes" >&6; }
7047else
7048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7049$as_echo "no" >&6; }
7050fi
7051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7052
7053
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysconf() in unistd.h" >&5
7055$as_echo_n "checking for function sysconf() in unistd.h... " >&6; }
7056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h.  */
7058
7059#include <unistd.h>
7060
7061int
7062main ()
7063{
7064	int i;
7065
7066	i=sysconf(_SC_PHYS_PAGES)*sysconf(_SC_PHYS_PAGES);
7067	i=sysconf(_SC_AVPHYS_PAGES)*sysconf(_SC_PHYS_PAGES);
7068
7069  ;
7070  return 0;
7071}
7072_ACEOF
7073if ac_fn_c_try_compile "$LINENO"; then :
7074
7075$as_echo "#define HAVE_UNISTD_SYSCONF 1" >>confdefs.h
7076
7077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7078$as_echo "yes" >&6; }
7079else
7080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7081$as_echo "no" >&6; }
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function initgroups()" >&5
7086$as_echo_n "checking for function initgroups()... " >&6; }
7087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7088/* end confdefs.h.  */
7089
7090#include <sys/types.h>
7091#include <grp.h>
7092
7093int
7094main ()
7095{
7096
7097	char	*user = "zabbix";
7098	initgroups(user, 0);
7099
7100  ;
7101  return 0;
7102}
7103_ACEOF
7104if ac_fn_c_try_link "$LINENO"; then :
7105
7106$as_echo "#define HAVE_FUNCTION_INITGROUPS 1" >>confdefs.h
7107
7108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7109$as_echo "yes" >&6; }
7110else
7111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7112$as_echo "no" >&6; }
7113fi
7114rm -f core conftest.err conftest.$ac_objext \
7115    conftest$ac_exeext conftest.$ac_ext
7116
7117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for functions seteuid() and setegid()" >&5
7118$as_echo_n "checking for functions seteuid() and setegid()... " >&6; }
7119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120/* end confdefs.h.  */
7121
7122#include <sys/types.h>
7123#include <unistd.h>
7124
7125int
7126main ()
7127{
7128
7129	seteuid(0);
7130	setegid(0);
7131
7132  ;
7133  return 0;
7134}
7135_ACEOF
7136if ac_fn_c_try_link "$LINENO"; then :
7137
7138$as_echo "#define HAVE_FUNCTION_SETEUID 1" >>confdefs.h
7139
7140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7141$as_echo "yes" >&6; }
7142else
7143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144$as_echo "no" >&6; }
7145fi
7146rm -f core conftest.err conftest.$ac_objext \
7147    conftest$ac_exeext conftest.$ac_ext
7148
7149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function setproctitle()" >&5
7150$as_echo_n "checking for function setproctitle()... " >&6; }
7151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152/* end confdefs.h.  */
7153
7154#include <sys/types.h>
7155#include <unistd.h>
7156
7157int
7158main ()
7159{
7160
7161	setproctitle("Test %d", 1);
7162
7163  ;
7164  return 0;
7165}
7166_ACEOF
7167if ac_fn_c_try_link "$LINENO"; then :
7168
7169$as_echo "#define HAVE_FUNCTION_SETPROCTITLE 1" >>confdefs.h
7170
7171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7172$as_echo "yes" >&6; }
7173else
7174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7175$as_echo "no" >&6; }
7176fi
7177rm -f core conftest.err conftest.$ac_objext \
7178    conftest$ac_exeext conftest.$ac_ext
7179
7180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctlbyname()" >&5
7181$as_echo_n "checking for function sysctlbyname()... " >&6; }
7182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7183/* end confdefs.h.  */
7184
7185#ifdef HAVE_SYS_TYPES_H
7186#include <sys/types.h>
7187#endif /* HAVE_SYS_TYPES_H */
7188
7189#ifdef HAVE_SYS_PARAM_H
7190#include <sys/param.h>
7191#endif /* HAVE_SYS_PARAM_H */
7192
7193#include <sys/sysctl.h>
7194
7195int
7196main ()
7197{
7198
7199	sysctlbyname("", 0, 0, 0, 0);
7200
7201  ;
7202  return 0;
7203}
7204_ACEOF
7205if ac_fn_c_try_link "$LINENO"; then :
7206
7207$as_echo "#define HAVE_FUNCTION_SYSCTLBYNAME 1" >>confdefs.h
7208
7209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7210$as_echo "yes" >&6; }
7211else
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
7214fi
7215rm -f core conftest.err conftest.$ac_objext \
7216    conftest$ac_exeext conftest.$ac_ext
7217
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_BOOTTIME)" >&5
7219$as_echo_n "checking for function sysctl (KERN_BOOTTIME)... " >&6; }
7220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h.  */
7222
7223#ifdef HAVE_SYS_TYPES_H
7224#include <sys/types.h>
7225#endif /* HAVE_SYS_TYPES_H */
7226
7227#ifdef HAVE_SYS_PARAM_H
7228#include <sys/param.h>
7229#endif /* HAVE_SYS_PARAM_H */
7230
7231#include <sys/sysctl.h>
7232#include <unistd.h>
7233#include <time.h>
7234#include <sys/time.h>
7235
7236int
7237main ()
7238{
7239
7240	size_t		len;
7241	struct timeval	uptime;
7242        int		mib[2];
7243
7244        mib[0] = CTL_KERN;
7245        mib[1] = KERN_BOOTTIME;
7246
7247        len = sizeof(uptime);
7248        sysctl(mib, 2, &uptime, &len, 0, 0);
7249
7250  ;
7251  return 0;
7252}
7253_ACEOF
7254if ac_fn_c_try_compile "$LINENO"; then :
7255
7256$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_BOOTTIME 1" >>confdefs.h
7257
7258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7259$as_echo "yes" >&6; }
7260else
7261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7262$as_echo "no" >&6; }
7263fi
7264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7265
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (HW_NCPU)" >&5
7267$as_echo_n "checking for function sysctl (HW_NCPU)... " >&6; }
7268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7269/* end confdefs.h.  */
7270
7271#ifdef HAVE_SYS_TYPES_H
7272#include <sys/types.h>
7273#endif /* HAVE_SYS_TYPES_H */
7274
7275#ifdef HAVE_SYS_PARAM_H
7276#include <sys/param.h>
7277#endif /* HAVE_SYS_PARAM_H */
7278
7279#include <sys/sysctl.h>
7280
7281int
7282main ()
7283{
7284
7285	size_t	len;
7286	int	mib[2], ncpu;
7287
7288	mib[0] = CTL_HW;
7289	mib[1] = HW_NCPU;
7290
7291	len = sizeof(ncpu);
7292	sysctl(mib, 2, &ncpu, &len, 0, 0);
7293
7294  ;
7295  return 0;
7296}
7297_ACEOF
7298if ac_fn_c_try_compile "$LINENO"; then :
7299
7300$as_echo "#define HAVE_FUNCTION_SYSCTL_HW_NCPU 1" >>confdefs.h
7301
7302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7303$as_echo "yes" >&6; }
7304else
7305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
7307fi
7308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7309
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_MAXFILES)" >&5
7311$as_echo_n "checking for function sysctl (KERN_MAXFILES)... " >&6; }
7312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7313/* end confdefs.h.  */
7314
7315#ifdef HAVE_SYS_TYPES_H
7316#include <sys/types.h>
7317#endif /* HAVE_SYS_TYPES_H */
7318
7319#ifdef HAVE_SYS_PARAM_H
7320#include <sys/param.h>
7321#endif /* HAVE_SYS_PARAM_H */
7322
7323#include <sys/sysctl.h>
7324
7325int
7326main ()
7327{
7328
7329	size_t	len;
7330        int	mib[2], maxfiles;
7331
7332        mib[0] = CTL_KERN;
7333        mib[1] = KERN_MAXFILES;
7334
7335        len = sizeof(maxfiles);
7336        sysctl(mib, 2, &maxfiles, &len, 0, 0);
7337
7338  ;
7339  return 0;
7340}
7341_ACEOF
7342if ac_fn_c_try_compile "$LINENO"; then :
7343
7344$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_MAXFILES 1" >>confdefs.h
7345
7346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7347$as_echo "yes" >&6; }
7348else
7349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7350$as_echo "no" >&6; }
7351fi
7352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7353
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_MAXPROC)" >&5
7355$as_echo_n "checking for function sysctl (KERN_MAXPROC)... " >&6; }
7356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7357/* end confdefs.h.  */
7358
7359#ifdef HAVE_SYS_TYPES_H
7360#include <sys/types.h>
7361#endif /* HAVE_SYS_TYPES_H */
7362
7363#ifdef HAVE_SYS_PARAM_H
7364#include <sys/param.h>
7365#endif /* HAVE_SYS_PARAM_H */
7366
7367#include <sys/sysctl.h>
7368
7369int
7370main ()
7371{
7372
7373	size_t	len;
7374	int	mib[2], maxproc;
7375
7376        mib[0] = CTL_KERN;
7377        mib[1] = KERN_MAXPROC;
7378
7379        len = sizeof(maxproc);
7380        sysctl(mib, 2, &maxproc, &len, 0, 0);
7381
7382  ;
7383  return 0;
7384}
7385_ACEOF
7386if ac_fn_c_try_compile "$LINENO"; then :
7387
7388$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_MAXPROC 1" >>confdefs.h
7389
7390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7391$as_echo "yes" >&6; }
7392else
7393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
7395fi
7396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_CPTIME,KERN_CPTIME2)" >&5
7399$as_echo_n "checking for function sysctl (KERN_CPTIME,KERN_CPTIME2)... " >&6; }
7400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7401/* end confdefs.h.  */
7402
7403#include <sys/param.h>
7404#include <sys/sysctl.h>
7405#if defined(HAVE_SYS_DKSTAT_H)
7406#	include <sys/dkstat.h>
7407#elif defined(HAVE_SYS_SCHED_H)
7408#	include <sys/sched.h>
7409#endif
7410
7411int
7412main ()
7413{
7414
7415size_t	sz;
7416int	i[] = {CP_USER, CP_NICE, CP_SYS, CP_INTR, CP_IDLE};
7417
7418{
7419	long	states[CPUSTATES];
7420	int	mib[2] = {CTL_KERN, KERN_CPTIME};
7421
7422	sz = sizeof(states);
7423	sysctl(mib, 2, &states, &sz, NULL, 0);
7424}
7425
7426{
7427	u_int64_t	states[CPUSTATES];
7428	int		mib[3] = {CTL_KERN, KERN_CPTIME2, 0};
7429
7430	sz = sizeof(states);
7431	sysctl(mib, 3, &states, &sz, NULL, 0);
7432}
7433
7434  ;
7435  return 0;
7436}
7437_ACEOF
7438if ac_fn_c_try_compile "$LINENO"; then :
7439
7440$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_CPTIME 1" >>confdefs.h
7441
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7443$as_echo "yes" >&6; }
7444else
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
7447fi
7448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7449
7450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function clock_gettime in time.h" >&5
7451$as_echo_n "checking for function clock_gettime in time.h... " >&6; }
7452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7453/* end confdefs.h.  */
7454
7455#ifdef HAVE_TIME_H
7456#	include <time.h>
7457#elif HAVE_SYS_TIME_H
7458#	include <sys/time.h>
7459#endif	/* HAVE_SYS_TIME_H */
7460
7461int
7462main ()
7463{
7464struct timespec tp;
7465clock_gettime(CLOCK_REALTIME, &tp);
7466
7467  ;
7468  return 0;
7469}
7470_ACEOF
7471if ac_fn_c_try_link "$LINENO"; then :
7472
7473$as_echo "#define HAVE_TIME_CLOCK_GETTIME 1" >>confdefs.h
7474
7475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7476$as_echo "yes" >&6; }
7477else
7478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479$as_echo "no" >&6; }
7480fi
7481rm -f core conftest.err conftest.$ac_objext \
7482    conftest$ac_exeext conftest.$ac_ext
7483
7484
7485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for macro __va_copy() in stdarg.h" >&5
7486$as_echo_n "checking for macro __va_copy() in stdarg.h... " >&6; }
7487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488/* end confdefs.h.  */
7489
7490#include <stdarg.h>
7491
7492int
7493main ()
7494{
7495
7496	va_list	src,dst;
7497
7498	__va_copy(dst,src);
7499
7500  ;
7501  return 0;
7502}
7503_ACEOF
7504if ac_fn_c_try_compile "$LINENO"; then :
7505
7506$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
7507
7508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7509$as_echo "yes" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7515
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for macro __VA_ARGS__" >&5
7517$as_echo_n "checking for macro __VA_ARGS__... " >&6; }
7518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519/* end confdefs.h.  */
7520
7521#define ZBX_CONST_STRING(str)   str
7522int test(const char *fmt, ...) { return 0; }
7523
7524int
7525main ()
7526{
7527
7528#define TEST(fmt, ...) test(ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
7529TEST("%s","test");
7530TEST("test");
7531
7532  ;
7533  return 0;
7534}
7535_ACEOF
7536if ac_fn_c_try_compile "$LINENO"; then :
7537
7538$as_echo "#define HAVE___VA_ARGS__ 1" >>confdefs.h
7539
7540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7541$as_echo "yes" >&6; }
7542else
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
7546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7547
7548
7549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7550$as_echo_n "checking return type of signal handlers... " >&6; }
7551if ${ac_cv_type_signal+:} false; then :
7552  $as_echo_n "(cached) " >&6
7553else
7554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7555/* end confdefs.h.  */
7556#include <sys/types.h>
7557#include <signal.h>
7558
7559int
7560main ()
7561{
7562return *(signal (0, 0)) (0) == 1;
7563  ;
7564  return 0;
7565}
7566_ACEOF
7567if ac_fn_c_try_compile "$LINENO"; then :
7568  ac_cv_type_signal=int
7569else
7570  ac_cv_type_signal=void
7571fi
7572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7573fi
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7575$as_echo "$ac_cv_type_signal" >&6; }
7576
7577cat >>confdefs.h <<_ACEOF
7578#define RETSIGTYPE $ac_cv_type_signal
7579_ACEOF
7580
7581
7582ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
7583if test "x$ac_cv_func_getloadavg" = xyes; then :
7584  $as_echo "#define HAVE_GETLOADAVG 1" >>confdefs.h
7585
7586else
7587  case " $LIBOBJS " in
7588  *" getloadavg.$ac_objext "* ) ;;
7589  *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
7590 ;;
7591esac
7592
7593fi
7594
7595
7596for ac_func in hstrerror
7597do :
7598  ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror"
7599if test "x$ac_cv_func_hstrerror" = xyes; then :
7600  cat >>confdefs.h <<_ACEOF
7601#define HAVE_HSTRERROR 1
7602_ACEOF
7603
7604fi
7605done
7606
7607for ac_func in getenv
7608do :
7609  ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv"
7610if test "x$ac_cv_func_getenv" = xyes; then :
7611  cat >>confdefs.h <<_ACEOF
7612#define HAVE_GETENV 1
7613_ACEOF
7614
7615fi
7616done
7617
7618for ac_func in putenv
7619do :
7620  ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
7621if test "x$ac_cv_func_putenv" = xyes; then :
7622  cat >>confdefs.h <<_ACEOF
7623#define HAVE_PUTENV 1
7624_ACEOF
7625
7626fi
7627done
7628
7629for ac_func in setenv
7630do :
7631  ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
7632if test "x$ac_cv_func_setenv" = xyes; then :
7633  cat >>confdefs.h <<_ACEOF
7634#define HAVE_SETENV 1
7635_ACEOF
7636
7637fi
7638done
7639
7640for ac_func in tzset
7641do :
7642  ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
7643if test "x$ac_cv_func_tzset" = xyes; then :
7644  cat >>confdefs.h <<_ACEOF
7645#define HAVE_TZSET 1
7646_ACEOF
7647
7648fi
7649done
7650
7651for ac_func in unsetenv
7652do :
7653  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
7654if test "x$ac_cv_func_unsetenv" = xyes; then :
7655  cat >>confdefs.h <<_ACEOF
7656#define HAVE_UNSETENV 1
7657_ACEOF
7658
7659fi
7660done
7661
7662for ac_func in sigqueue
7663do :
7664  ac_fn_c_check_func "$LINENO" "sigqueue" "ac_cv_func_sigqueue"
7665if test "x$ac_cv_func_sigqueue" = xyes; then :
7666  cat >>confdefs.h <<_ACEOF
7667#define HAVE_SIGQUEUE 1
7668_ACEOF
7669
7670fi
7671done
7672
7673for ac_func in round
7674do :
7675  ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
7676if test "x$ac_cv_func_round" = xyes; then :
7677  cat >>confdefs.h <<_ACEOF
7678#define HAVE_ROUND 1
7679_ACEOF
7680
7681fi
7682done
7683
7684
7685
7686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc filesystem" >&5
7687$as_echo_n "checking for /proc filesystem... " >&6; }
7688if test -d /proc; then
7689	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7690$as_echo "yes" >&6; }
7691
7692$as_echo "#define HAVE_PROC 1" >>confdefs.h
7693
7694else
7695	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7696$as_echo "no" >&6; }
7697fi
7698
7699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/stat" >&5
7700$as_echo_n "checking for file /proc/stat... " >&6; }
7701if test -r /proc/stat; then
7702	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7703$as_echo "yes" >&6; }
7704
7705$as_echo "#define HAVE_PROC_STAT 1" >>confdefs.h
7706
7707else
7708	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709$as_echo "no" >&6; }
7710fi
7711
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/cpuinfo" >&5
7713$as_echo_n "checking for file /proc/cpuinfo... " >&6; }
7714if test -r /proc/cpuinfo; then
7715	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7716$as_echo "yes" >&6; }
7717
7718$as_echo "#define HAVE_PROC_CPUINFO 1" >>confdefs.h
7719
7720else
7721	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7722$as_echo "no" >&6; }
7723fi
7724
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/0/psinfo" >&5
7726$as_echo_n "checking for file /proc/0/psinfo... " >&6; }
7727if test -r /proc/0/psinfo; then
7728	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7729$as_echo "yes" >&6; }
7730
7731$as_echo "#define HAVE_PROC_0_PSINFO 1" >>confdefs.h
7732
7733else
7734	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7735$as_echo "no" >&6; }
7736fi
7737
7738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/loadavg" >&5
7739$as_echo_n "checking for file /proc/loadavg... " >&6; }
7740if test -r /proc/loadavg; then
7741	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7742$as_echo "yes" >&6; }
7743
7744$as_echo "#define HAVE_PROC_LOADAVG 1" >>confdefs.h
7745
7746else
7747	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748$as_echo "no" >&6; }
7749fi
7750
7751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/net/dev" >&5
7752$as_echo_n "checking for file /proc/net/dev... " >&6; }
7753if test -r /proc/net/dev; then
7754	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7755$as_echo "yes" >&6; }
7756
7757$as_echo "#define HAVE_PROC_NET_DEV 1" >>confdefs.h
7758
7759else
7760	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7761$as_echo "no" >&6; }
7762fi
7763
7764
7765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long format" >&5
7766$as_echo_n "checking for long long format... " >&6; }
7767if test "$cross_compiling" = yes; then :
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7769$as_echo "no" >&6; }
7770else
7771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7772/* end confdefs.h.  */
7773
7774#include <sys/types.h>
7775int main()
7776{
7777        uint64_t i;
7778
7779        sscanf("200000000010020", "%qu", &i);
7780
7781        if (i == 200000000010020) return 0;
7782        else return -1;
7783}
7784
7785_ACEOF
7786if ac_fn_c_try_run "$LINENO"; then :
7787
7788$as_echo "#define HAVE_LONG_LONG_QU 1 " >>confdefs.h
7789
7790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7791$as_echo "yes" >&6; }
7792else
7793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7794$as_echo "no" >&6; }
7795fi
7796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7797  conftest.$ac_objext conftest.beam conftest.$ac_ext
7798fi
7799
7800
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic linking option" >&5
7802$as_echo_n "checking for -rdynamic linking option... " >&6; }
7803saved_LDFLAGS="$LDFLAGS"
7804LDFLAGS="-rdynamic $LDFLAGS"
7805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7806/* end confdefs.h.  */
7807#include <execinfo.h>
7808int
7809main ()
7810{
7811void *bcktrc[6];
7812(void)backtrace(bcktrc, 6);
7813
7814  ;
7815  return 0;
7816}
7817_ACEOF
7818if ac_fn_c_try_link "$LINENO"; then :
7819  LDFLAGS="-rdynamic $saved_LDFLAGS"
7820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7821$as_echo "yes" >&6; }
7822else
7823  LDFLAGS="$saved_LDFLAGS"
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7825$as_echo "no" >&6; }
7826fi
7827rm -f core conftest.err conftest.$ac_objext \
7828    conftest$ac_exeext conftest.$ac_ext
7829
7830
7831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperfstat 5.2.0.40 fileset" >&5
7832$as_echo_n "checking for libperfstat 5.2.0.40 fileset... " >&6; }
7833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7834/* end confdefs.h.  */
7835#include <sys/protosw.h>
7836#include <libperfstat.h>
7837int
7838main ()
7839{
7840perfstat_memory_total_t	memstats;
7841memstats.virt_active = 0;
7842
7843  ;
7844  return 0;
7845}
7846_ACEOF
7847if ac_fn_c_try_compile "$LINENO"; then :
7848
7849$as_echo "#define HAVE_AIXOSLEVEL_520004 1" >>confdefs.h
7850
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7852$as_echo "yes" >&6; }
7853else
7854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7855$as_echo "no" >&6; }
7856fi
7857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7858
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperfstat 5.3.0.60 fileset" >&5
7860$as_echo_n "checking for libperfstat 5.3.0.60 fileset... " >&6; }
7861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7862/* end confdefs.h.  */
7863#include <sys/protosw.h>
7864#include <libperfstat.h>
7865int
7866main ()
7867{
7868perfstat_partition_total_t	lparstats;
7869lparstats.type.b.donate_enabled = 0;
7870lparstats.idle_donated_purr = 0;
7871lparstats.busy_donated_purr = 0;
7872lparstats.idle_stolen_purr = 0;
7873lparstats.busy_stolen_purr = 0;
7874
7875  ;
7876  return 0;
7877}
7878_ACEOF
7879if ac_fn_c_try_compile "$LINENO"; then :
7880
7881$as_echo "#define HAVE_AIXOSLEVEL_530006 1" >>confdefs.h
7882
7883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7884$as_echo "yes" >&6; }
7885else
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7887$as_echo "no" >&6; }
7888fi
7889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7890
7891case "$host_os" in
7892linux*)
7893	ARCH="linux"
7894	;;
7895aix*)
7896	ARCH="aix"
7897	;;
7898darwin*|rhapsody*)
7899	ARCH="osx"
7900
7901$as_echo "#define MAC_OS_X 1" >>confdefs.h
7902
7903	;;
7904*solaris*)
7905	ARCH="solaris"
7906	;;
7907hpux*)
7908	ARCH="hpux"
7909	;;
7910freebsd*)
7911	ARCH="freebsd"
7912	;;
7913netbsd*)
7914	ARCH="netbsd"
7915	;;
7916osf*)
7917	ARCH="osf"
7918	;;
7919openbsd*)
7920	ARCH="openbsd"
7921	;;
7922*)
7923	ARCH="unknown"
7924	;;
7925esac
7926
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for architecture" >&5
7928$as_echo_n "checking for architecture... " >&6; }
7929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH ($host_os)" >&5
7930$as_echo "$ARCH ($host_os)" >&6; }
7931
7932if test "x$ARCH" = "xlinux"; then
7933	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the linux kernel version" >&5
7934$as_echo_n "checking for the linux kernel version... " >&6; }
7935
7936	kernel=`uname -r`
7937
7938	case "${kernel}" in
7939		2.6.*)
7940			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6 family (${kernel})" >&5
7941$as_echo "2.6 family (${kernel})" >&6; }
7942
7943$as_echo "#define KERNEL_2_6 1" >>confdefs.h
7944
7945			;;
7946		2.4.*)
7947			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4 family (${kernel})" >&5
7948$as_echo "2.4 family (${kernel})" >&6; }
7949
7950$as_echo "#define KERNEL_2_4 1" >>confdefs.h
7951
7952			;;
7953		*)
7954			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown family (${kernel})" >&5
7955$as_echo "unknown family (${kernel})" >&6; }
7956			;;
7957	esac
7958fi
7959
7960if test "x$ARCH" = "xsolaris"; then
7961				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -m64 compilation flag" >&5
7962$as_echo_n "checking for -m64 compilation flag... " >&6; }
7963	saved_CFLAGS="$CFLAGS"
7964	CFLAGS="-m64"
7965	if test "$cross_compiling" = yes; then :
7966  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7968as_fn_error $? "cannot run test program while cross compiling
7969See \`config.log' for more details" "$LINENO" 5; }
7970else
7971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7972/* end confdefs.h.  */
7973int main(void) {return 0;}
7974_ACEOF
7975if ac_fn_c_try_run "$LINENO"; then :
7976  CFLAGS="-m64 $saved_CFLAGS"
7977	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7978$as_echo "yes" >&6; }
7979else
7980  CFLAGS="$saved_CFLAGS"
7981	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7982$as_echo "no" >&6; }
7983fi
7984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7985  conftest.$ac_objext conftest.beam conftest.$ac_ext
7986fi
7987
7988	CFLAGS="${CFLAGS} -DZBX_OLD_SOLARIS"
7989fi
7990
7991if test "x$ARCH" = "xhpux"; then
7992				hpux_version=${host_os#hpux}
7993	hpux_major=${hpux_version%.*}
7994	hpux_minor=${hpux_version#*.}
7995
7996
7997cat >>confdefs.h <<_ACEOF
7998#define HPUX_VERSION $hpux_major$hpux_minor
7999_ACEOF
8000
8001
8002		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -D_HPUX_API_LEVEL=20040821 compilation flag" >&5
8003$as_echo_n "checking for -D_HPUX_API_LEVEL=20040821 compilation flag... " >&6; }
8004	saved_CFLAGS="$CFLAGS"
8005	CFLAGS="-D_HPUX_API_LEVEL=20040821"
8006	if test "$cross_compiling" = yes; then :
8007  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8009as_fn_error $? "cannot run test program while cross compiling
8010See \`config.log' for more details" "$LINENO" 5; }
8011else
8012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8013/* end confdefs.h.  */
8014
8015#ifdef HAVE_DLFCN_H
8016#	include <dlfcn.h>
8017#endif
8018#ifdef HAVE_SYS_UTSNAME_H
8019#	include <sys/utsname.h>
8020#endif
8021
8022int main(void)
8023{
8024	void		*p1, *p2;
8025	struct utsname	name;
8026
8027	/* check that the compiler (e.g., GCC 4.3.0 and above) supports function-level versioning */
8028
8029	p1 = uname;
8030	p2 = dlsym(RTLD_DEFAULT, "uname{20040821}");
8031
8032	if (p1 != p2)
8033		return 1;
8034
8035	/* uname() fails with EFAULT on HP-UX systems that were only partially upgraded to this API level */
8036
8037	return -1 == uname(&name) ? 1 : 0;
8038}
8039
8040_ACEOF
8041if ac_fn_c_try_run "$LINENO"; then :
8042  CFLAGS="-D_HPUX_API_LEVEL=20040821 $saved_CFLAGS"
8043	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8044$as_echo "yes" >&6; }
8045else
8046  CFLAGS="$saved_CFLAGS"
8047	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8048$as_echo "no" >&6; }
8049fi
8050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8051  conftest.$ac_objext conftest.beam conftest.$ac_ext
8052fi
8053
8054fi
8055
8056
8057cat >>confdefs.h <<_ACEOF
8058#define ARCH "${ARCH}"
8059_ACEOF
8060
8061
8062
8063# The cast to long int works around a bug in the HP C Compiler
8064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8066# This bug is HP SR number 8606223364.
8067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8068$as_echo_n "checking size of void *... " >&6; }
8069if ${ac_cv_sizeof_void_p+:} false; then :
8070  $as_echo_n "(cached) " >&6
8071else
8072  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
8073
8074else
8075  if test "$ac_cv_type_void_p" = yes; then
8076     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8078as_fn_error 77 "cannot compute sizeof (void *)
8079See \`config.log' for more details" "$LINENO" 5; }
8080   else
8081     ac_cv_sizeof_void_p=0
8082   fi
8083fi
8084
8085fi
8086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8087$as_echo "$ac_cv_sizeof_void_p" >&6; }
8088
8089
8090
8091cat >>confdefs.h <<_ACEOF
8092#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8093_ACEOF
8094
8095
8096
8097
8098# Check whether --enable-static was given.
8099if test "${enable_static+set}" = set; then :
8100  enableval=$enable_static; case "${enableval}" in
8101  yes)
8102    LDFLAGS="${LDFLAGS} -static"
8103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static linking is possible" >&5
8104$as_echo_n "checking if static linking is possible... " >&6; }
8105    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106/* end confdefs.h.  */
8107
8108int
8109main ()
8110{
8111
8112  ;
8113  return 0;
8114}
8115_ACEOF
8116if ac_fn_c_try_link "$LINENO"; then :
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8118$as_echo "yes" >&6; }
8119        static_linking=yes
8120else
8121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8122$as_echo "no" >&6; }
8123        static_linking=no
8124fi
8125rm -f core conftest.err conftest.$ac_objext \
8126    conftest$ac_exeext conftest.$ac_ext
8127      if test "x$static_linking" = "xno"; then
8128        as_fn_error $? "static linking is not possible on this system" "$LINENO" 5
8129      fi
8130    ;;
8131  no) ;;
8132  *) as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;;
8133esac
8134fi
8135
8136
8137# Check whether --enable-static-libs was given.
8138if test "${enable_static_libs+set}" = set; then :
8139  enableval=$enable_static_libs; case "${enableval}" in
8140  yes)
8141    static_linking_libs=yes
8142    saved_LIBS="$LIBS"
8143    LIBS="${saved_LIBS} -Wl,-bstatic -Wl,-bdynamic"
8144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libs static linking with \"-Wl,-b\" is possible" >&5
8145$as_echo_n "checking if libs static linking with \"-Wl,-b\" is possible... " >&6; }
8146    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8147/* end confdefs.h.  */
8148
8149int
8150main ()
8151{
8152
8153  ;
8154  return 0;
8155}
8156_ACEOF
8157if ac_fn_c_try_link "$LINENO"; then :
8158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8159$as_echo "yes" >&6; }
8160        static_linking_support="-Wl,-b"
8161else
8162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
8164        static_linking_support=no
8165fi
8166rm -f core conftest.err conftest.$ac_objext \
8167    conftest$ac_exeext conftest.$ac_ext
8168        LIBS="$saved_LIBS"
8169
8170    if test "x$static_linking_support" = "xno"; then
8171      LIBS="${saved_LIBS} -Wl,-Bstatic -Wl,-Bdynamic"
8172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libs static linking with \"-Wl,-B\" is possible" >&5
8173$as_echo_n "checking if libs static linking with \"-Wl,-B\" is possible... " >&6; }
8174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8175/* end confdefs.h.  */
8176
8177int
8178main ()
8179{
8180
8181  ;
8182  return 0;
8183}
8184_ACEOF
8185if ac_fn_c_try_link "$LINENO"; then :
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8187$as_echo "yes" >&6; }
8188          static_linking_support="-Wl,-B"
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192          static_linking_support=no
8193fi
8194rm -f core conftest.err conftest.$ac_objext \
8195    conftest$ac_exeext conftest.$ac_ext
8196          LIBS="$saved_LIBS"
8197    fi
8198    ;;
8199  no) ;;
8200  *) as_fn_error $? "bad value ${enableval} for --enable-static-libs" "$LINENO" 5 ;;
8201esac
8202fi
8203
8204
8205# Check whether --enable-server was given.
8206if test "${enable_server+set}" = set; then :
8207  enableval=$enable_server; case "${enableval}" in
8208  yes) server=yes ;;
8209  no)  server=no ;;
8210  *) as_fn_error $? "bad value ${enableval} for --enable-server" "$LINENO" 5 ;;
8211esac
8212else
8213  server=no
8214fi
8215
8216 if test "x$server" = "xyes"; then
8217  SERVER_TRUE=
8218  SERVER_FALSE='#'
8219else
8220  SERVER_TRUE='#'
8221  SERVER_FALSE=
8222fi
8223
8224
8225# Check whether --enable-proxy was given.
8226if test "${enable_proxy+set}" = set; then :
8227  enableval=$enable_proxy; case "${enableval}" in
8228  yes) proxy=yes ;;
8229  no)  proxy=no ;;
8230  *) as_fn_error $? "bad value ${enableval} for --enable-proxy" "$LINENO" 5 ;;
8231esac
8232else
8233  proxy=no
8234fi
8235
8236 if test "x$proxy" = "xyes"; then
8237  PROXY_TRUE=
8238  PROXY_FALSE='#'
8239else
8240  PROXY_TRUE='#'
8241  PROXY_FALSE=
8242fi
8243
8244
8245# Check whether --enable-agent was given.
8246if test "${enable_agent+set}" = set; then :
8247  enableval=$enable_agent; case "${enableval}" in
8248  yes) agent=yes ;;
8249  no)  agent=no ;;
8250  *) as_fn_error $? "bad value ${enableval} for --enable-agent" "$LINENO" 5 ;;
8251esac
8252else
8253  agent=no
8254fi
8255
8256 if test "x$agent" = "xyes"; then
8257  AGENT_TRUE=
8258  AGENT_FALSE='#'
8259else
8260  AGENT_TRUE='#'
8261  AGENT_FALSE=
8262fi
8263
8264
8265# Check whether --enable-agent2 was given.
8266if test "${enable_agent2+set}" = set; then :
8267  enableval=$enable_agent2; case "${enableval}" in
8268  yes) agent2=yes ;;
8269  no)  agent2=no ;;
8270  *) as_fn_error $? "bad value ${enableval} for --enable-agent2" "$LINENO" 5 ;;
8271esac
8272test "x$agent2" = "xyes" -a "x$HAVE_THREAD_LOCAL" = "xno" && as_fn_error $? "C compiler is not compatible with agent2 assembly" "$LINENO" 5
8273
8274else
8275  agent2=no
8276fi
8277
8278 if test "x$agent2" = "xyes"; then
8279  AGENT2_TRUE=
8280  AGENT2_FALSE='#'
8281else
8282  AGENT2_TRUE='#'
8283  AGENT2_FALSE=
8284fi
8285
8286
8287# Check whether --enable-webservice was given.
8288if test "${enable_webservice+set}" = set; then :
8289  enableval=$enable_webservice; case "${enableval}" in
8290  yes) webservice=yes ;;
8291  no)  webservice=no ;;
8292  *) as_fn_error $? "bad value ${enableval} for --enable-webservice" "$LINENO" 5 ;;
8293esac
8294test "x$webservice" = "xyes" -a "x$HAVE_THREAD_LOCAL" = "xno" && as_fn_error $? "C compiler is not compatible with webservice assembly" "$LINENO" 5
8295
8296else
8297  webservice=no
8298fi
8299
8300 if test "x$webservice" = "xyes"; then
8301  WEBSERVICE_TRUE=
8302  WEBSERVICE_FALSE='#'
8303else
8304  WEBSERVICE_TRUE='#'
8305  WEBSERVICE_FALSE=
8306fi
8307
8308
8309# Check whether --enable-java was given.
8310if test "${enable_java+set}" = set; then :
8311  enableval=$enable_java; case "${enableval}" in
8312  yes) java=yes ;;
8313  no)  java=no ;;
8314  *) as_fn_error $? "bad value ${enableval} for --enable-java" "$LINENO" 5 ;;
8315esac
8316else
8317  java=no
8318fi
8319
8320 if test "x$java" = "xyes"; then
8321  JAVA_TRUE=
8322  JAVA_FALSE='#'
8323else
8324  JAVA_TRUE='#'
8325  JAVA_FALSE=
8326fi
8327
8328
8329# Check whether --enable-ipv6 was given.
8330if test "${enable_ipv6+set}" = set; then :
8331  enableval=$enable_ipv6; case "${enableval}" in
8332  yes) ipv6=yes ;;
8333  no)  ipv6=no ;;
8334  *) as_fn_error $? "bad value ${enableval} for --enable-ipv6" "$LINENO" 5 ;;
8335esac
8336else
8337  ipv6=no
8338fi
8339
8340 if test "x$ipv6" = "xyes"; then
8341  IPV6_TRUE=
8342  IPV6_FALSE='#'
8343else
8344  IPV6_TRUE='#'
8345  IPV6_FALSE=
8346fi
8347
8348
8349 if test -d create; then
8350  DBSCHEMA_TRUE=
8351  DBSCHEMA_FALSE='#'
8352else
8353  DBSCHEMA_TRUE='#'
8354  DBSCHEMA_FALSE=
8355fi
8356
8357
8358 if (test -f m4/conf_tests.m4) && (test "x$server" = "xyes" || test "x$proxy" = "xyes" || test "x$agent" = "xyes"); then
8359  ZBXCMOCKA_TRUE=
8360  ZBXCMOCKA_FALSE='#'
8361else
8362  ZBXCMOCKA_TRUE='#'
8363  ZBXCMOCKA_FALSE=
8364fi
8365
8366
8367have_db="no"
8368have_unixodbc="no"
8369have_web_monitoring="no"
8370have_snmp="no"
8371have_ipmi="no"
8372have_ipv6="no"
8373have_ssh="no"
8374have_tls="no"
8375have_libmodbus="no"
8376
8377
8378if test "x$ipv6" = "xyes"; then
8379
8380$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8381
8382	have_ipv6="yes"
8383fi
8384
8385if test "x$server" = "xyes" || test "x$proxy" = "xyes"; then
8386
8387
8388
8389    MYSQL_CONFIG="no"
8390
8391
8392# Check whether --with-mysql was given.
8393if test "${with_mysql+set}" = set; then :
8394  withval=$with_mysql;
8395        if test "$withval" = "no"; then
8396            want_mysql="no"
8397        elif test "$withval" = "yes"; then
8398            want_mysql="yes"
8399        else
8400            want_mysql="yes"
8401            MYSQL_CONFIG="$withval"
8402        fi
8403
8404else
8405  want_mysql="no"
8406
8407fi
8408
8409
8410    MYSQL_CFLAGS=""
8411    MYSQL_LDFLAGS=""
8412    MYSQL_LIBS=""
8413    MYSQL_VERSION=""
8414
8415
8416    if test "$want_mysql" = "yes"; then
8417
8418        for ac_prog in mysql_config mariadb_config
8419do
8420  # Extract the first word of "$ac_prog", so it can be a program name with args.
8421set dummy $ac_prog; ac_word=$2
8422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8423$as_echo_n "checking for $ac_word... " >&6; }
8424if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
8425  $as_echo_n "(cached) " >&6
8426else
8427  case $MYSQL_CONFIG in
8428  [\\/]* | ?:[\\/]*)
8429  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
8430  ;;
8431  *)
8432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433for as_dir in $PATH
8434do
8435  IFS=$as_save_IFS
8436  test -z "$as_dir" && as_dir=.
8437    for ac_exec_ext in '' $ac_executable_extensions; do
8438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441    break 2
8442  fi
8443done
8444  done
8445IFS=$as_save_IFS
8446
8447  ;;
8448esac
8449fi
8450MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
8451if test -n "$MYSQL_CONFIG"; then
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
8453$as_echo "$MYSQL_CONFIG" >&6; }
8454else
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456$as_echo "no" >&6; }
8457fi
8458
8459
8460  test -n "$MYSQL_CONFIG" && break
8461done
8462
8463
8464        if test -x "$MYSQL_CONFIG"; then
8465            MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
8466            _full_libmysql_libs="`$MYSQL_CONFIG --libs`"
8467
8468            _save_mysql_ldflags="${LDFLAGS}"
8469            _save_mysql_cflags="${CFLAGS}"
8470            _save_mysql_libs="${LIBS}"
8471            LDFLAGS="${LDFLAGS} ${_full_libmysql_libs}"
8472            CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}"
8473
8474            for i in $_full_libmysql_libs; do
8475                case $i in
8476                    -lmysqlclient|-lperconaserverclient|-lmariadbclient|-lmariadb)
8477
8478                        _lib_name="`echo "$i" | cut -b3-`"
8479                        as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
8480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
8481$as_echo_n "checking for main in -l$_lib_name... " >&6; }
8482if eval \${$as_ac_Lib+:} false; then :
8483  $as_echo_n "(cached) " >&6
8484else
8485  ac_check_lib_save_LIBS=$LIBS
8486LIBS="-l$_lib_name  $LIBS"
8487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8488/* end confdefs.h.  */
8489
8490
8491int
8492main ()
8493{
8494return main ();
8495  ;
8496  return 0;
8497}
8498_ACEOF
8499if ac_fn_c_try_link "$LINENO"; then :
8500  eval "$as_ac_Lib=yes"
8501else
8502  eval "$as_ac_Lib=no"
8503fi
8504rm -f core conftest.err conftest.$ac_objext \
8505    conftest$ac_exeext conftest.$ac_ext
8506LIBS=$ac_check_lib_save_LIBS
8507fi
8508eval ac_res=\$$as_ac_Lib
8509	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8510$as_echo "$ac_res" >&6; }
8511if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8512
8513                        	MYSQL_LIBS="-l${_lib_name} ${MYSQL_LIBS}"
8514
8515else
8516
8517                        	as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
8518
8519fi
8520
8521                ;;
8522                    -L*)
8523
8524                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} $i"
8525                ;;
8526                    -R*)
8527
8528                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} -Wl,$i"
8529                ;;
8530                    -l*)
8531
8532                        _lib_name="`echo "$i" | cut -b3-`"
8533                        as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
8534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
8535$as_echo_n "checking for main in -l$_lib_name... " >&6; }
8536if eval \${$as_ac_Lib+:} false; then :
8537  $as_echo_n "(cached) " >&6
8538else
8539  ac_check_lib_save_LIBS=$LIBS
8540LIBS="-l$_lib_name  $LIBS"
8541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542/* end confdefs.h.  */
8543
8544
8545int
8546main ()
8547{
8548return main ();
8549  ;
8550  return 0;
8551}
8552_ACEOF
8553if ac_fn_c_try_link "$LINENO"; then :
8554  eval "$as_ac_Lib=yes"
8555else
8556  eval "$as_ac_Lib=no"
8557fi
8558rm -f core conftest.err conftest.$ac_objext \
8559    conftest$ac_exeext conftest.$ac_ext
8560LIBS=$ac_check_lib_save_LIBS
8561fi
8562eval ac_res=\$$as_ac_Lib
8563	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8564$as_echo "$ac_res" >&6; }
8565if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8566
8567                        	MYSQL_LIBS="${MYSQL_LIBS} ${i}"
8568
8569else
8570
8571                        	as_fn_error $? "Not found $i library" "$LINENO" 5
8572
8573fi
8574
8575                ;;
8576                esac
8577            done
8578            LDFLAGS="${_save_mysql_ldflags}"
8579            CFLAGS="${_save_mysql_cflags}"
8580
8581            CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}"
8582            LDFLAGS="${LDFLAGS} ${MYSQL_LDFLAGS}"
8583            LIBS="${LIBS} ${MYSQL_LIBS}"
8584
8585	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS support in MySQL library" >&5
8586$as_echo_n "checking for TLS support in MySQL library... " >&6; }
8587	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8588/* end confdefs.h.  */
8589
8590#include <mysql.h>
8591
8592int
8593main ()
8594{
8595
8596	unsigned int	mysql_tls_mode;
8597	MYSQL		*mysql;
8598
8599	mysql_tls_mode = SSL_MODE_REQUIRED;
8600	mysql_options(mysql, MYSQL_OPT_SSL_MODE, &mysql_tls_mode);
8601
8602	mysql_tls_mode = SSL_MODE_VERIFY_CA;
8603	mysql_options(mysql, MYSQL_OPT_SSL_MODE, &mysql_tls_mode);
8604
8605	mysql_tls_mode = SSL_MODE_VERIFY_IDENTITY;
8606	mysql_options(mysql, MYSQL_OPT_SSL_MODE, &mysql_tls_mode);
8607
8608	mysql_options(mysql, MYSQL_OPT_SSL_CA, "");
8609	mysql_options(mysql, MYSQL_OPT_SSL_KEY, "");
8610	mysql_options(mysql, MYSQL_OPT_SSL_CERT, "");
8611	mysql_options(mysql, MYSQL_OPT_SSL_CIPHER, "");
8612
8613  ;
8614  return 0;
8615}
8616_ACEOF
8617if ac_fn_c_try_link "$LINENO"; then :
8618
8619$as_echo "#define HAVE_MYSQL_TLS 1" >>confdefs.h
8620
8621	found_mysql_tls="yes"
8622	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8623$as_echo "yes" >&6; }
8624else
8625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8626$as_echo "no" >&6; }
8627fi
8628rm -f core conftest.err conftest.$ac_objext \
8629    conftest$ac_exeext conftest.$ac_ext
8630
8631            if test "$found_mysql_tls" == "yes"; then
8632
8633	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS ciphersuites in MySQL library" >&5
8634$as_echo_n "checking for TLS ciphersuites in MySQL library... " >&6; }
8635	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8636/* end confdefs.h.  */
8637
8638#include <mysql.h>
8639
8640int
8641main ()
8642{
8643
8644	MYSQL	*mysql;
8645
8646	mysql_options(mysql, MYSQL_OPT_TLS_CIPHERSUITES, "");
8647
8648  ;
8649  return 0;
8650}
8651_ACEOF
8652if ac_fn_c_try_link "$LINENO"; then :
8653
8654$as_echo "#define HAVE_MYSQL_TLS_CIPHERSUITES 1" >>confdefs.h
8655
8656	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8657$as_echo "yes" >&6; }
8658else
8659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8660$as_echo "no" >&6; }
8661fi
8662rm -f core conftest.err conftest.$ac_objext \
8663    conftest$ac_exeext conftest.$ac_ext
8664
8665            else
8666
8667	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS support in MariaDB library" >&5
8668$as_echo_n "checking for TLS support in MariaDB library... " >&6; }
8669	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8670/* end confdefs.h.  */
8671
8672#include <mysql.h>
8673
8674int
8675main ()
8676{
8677
8678	MYSQL	*mysql;
8679
8680	mysql_optionsv(mysql, MYSQL_OPT_SSL_ENFORCE, (void *)"");
8681	mysql_optionsv(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (void *)"");
8682	mysql_optionsv(mysql, MYSQL_OPT_SSL_CA, (void *)"");
8683	mysql_optionsv(mysql, MYSQL_OPT_SSL_KEY, (void *)"");
8684	mysql_optionsv(mysql, MYSQL_OPT_SSL_CERT, (void *)"");
8685	mysql_optionsv(mysql, MYSQL_OPT_SSL_CIPHER, (void *)"");
8686
8687  ;
8688  return 0;
8689}
8690_ACEOF
8691if ac_fn_c_try_link "$LINENO"; then :
8692
8693$as_echo "#define HAVE_MARIADB_TLS 1" >>confdefs.h
8694
8695	found_mariadb_tls="yes"
8696	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8697$as_echo "yes" >&6; }
8698else
8699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8700$as_echo "no" >&6; }
8701fi
8702rm -f core conftest.err conftest.$ac_objext \
8703    conftest$ac_exeext conftest.$ac_ext
8704
8705            fi
8706
8707
8708	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MariaDB init options function" >&5
8709$as_echo_n "checking for MariaDB init options function... " >&6; }
8710	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8711/* end confdefs.h.  */
8712
8713#include <mysql.h>
8714
8715int
8716main ()
8717{
8718
8719	MYSQL	*mysql;
8720
8721	mysql_optionsv(mysql, MYSQL_INIT_COMMAND, (void *)"set @@session.auto_increment_offset=1");
8722
8723  ;
8724  return 0;
8725}
8726_ACEOF
8727if ac_fn_c_try_link "$LINENO"; then :
8728
8729cat >>confdefs.h <<_ACEOF
8730#define MYSQL_OPTIONS mysql_optionsv
8731_ACEOF
8732
8733
8734cat >>confdefs.h <<_ACEOF
8735#define MYSQL_OPTIONS_ARGS_VOID_CAST (void *)
8736_ACEOF
8737
8738	found_mariadb_options="yes"
8739	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8740$as_echo "yes" >&6; }
8741else
8742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8743$as_echo "no" >&6; }
8744fi
8745rm -f core conftest.err conftest.$ac_objext \
8746    conftest$ac_exeext conftest.$ac_ext
8747
8748            if test "$found_mariadb_options" != "yes"; then
8749
8750	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL init options function" >&5
8751$as_echo_n "checking for MySQL init options function... " >&6; }
8752	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8753/* end confdefs.h.  */
8754
8755#include <mysql.h>
8756
8757int
8758main ()
8759{
8760
8761	MYSQL		*mysql;
8762
8763	mysql_options(mysql, MYSQL_INIT_COMMAND, "set @@session.auto_increment_offset=1");
8764
8765  ;
8766  return 0;
8767}
8768_ACEOF
8769if ac_fn_c_try_link "$LINENO"; then :
8770
8771cat >>confdefs.h <<_ACEOF
8772#define MYSQL_OPTIONS mysql_options
8773_ACEOF
8774
8775
8776cat >>confdefs.h <<_ACEOF
8777#define MYSQL_OPTIONS_ARGS_VOID_CAST /**/
8778_ACEOF
8779
8780	found_mysql_options="yes"
8781	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8782$as_echo "yes" >&6; }
8783else
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8785$as_echo "no" >&6; }
8786fi
8787rm -f core conftest.err conftest.$ac_objext \
8788    conftest$ac_exeext conftest.$ac_ext
8789
8790                if test "$found_mysql_options" != "yes"; then
8791                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
8793                    as_fn_error $? "Could not find the options function for mysql init" "$LINENO" 5
8794                fi
8795            fi
8796
8797            LDFLAGS="${_save_mysql_ldflags}"
8798            CFLAGS="${_save_mysql_cflags}"
8799            LIBS="${_save_mysql_libs}"
8800            unset _save_mysql_ldflags
8801            unset _save_mysql_cflags
8802            MYSQL_VERSION=`$MYSQL_CONFIG --version`
8803
8804
8805$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
8806
8807
8808            found_mysql="yes"
8809        else
8810            found_mysql="no"
8811        fi
8812    fi
8813
8814
8815    mysql_version_req=
8816
8817    if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
8818
8819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MySQL version is >= $mysql_version_req" >&5
8820$as_echo_n "checking if MySQL version is >= $mysql_version_req... " >&6; }
8821
8822                        mysql_version_req_major=`expr $mysql_version_req : '\([0-9]*\)'`
8823        mysql_version_req_minor=`expr $mysql_version_req : '[0-9]*\.\([0-9]*\)'`
8824        mysql_version_req_micro=`expr $mysql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8825        if test "x$mysql_version_req_micro" = "x"; then
8826            mysql_version_req_micro="0"
8827        fi
8828
8829        mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
8830                                   \+ $mysql_version_req_minor \* 1000 \
8831                                   \+ $mysql_version_req_micro`
8832
8833                        mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'`
8834        mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'`
8835        mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8836        if test "x$mysql_version_micro" = "x"; then
8837            mysql_version_micro="0"
8838        fi
8839
8840        mysql_version_number=`expr $mysql_version_major \* 1000000 \
8841                                   \+ $mysql_version_minor \* 1000 \
8842                                   \+ $mysql_version_micro`
8843
8844        mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
8845        if test "$mysql_version_check" = "1"; then
8846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8847$as_echo "yes" >&6; }
8848        else
8849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
8851        fi
8852    fi
8853
8854
8855
8856
8857
8858
8859	if test "x$want_mysql" = "xyes"; then
8860		if test "x$have_db" != "xno"; then
8861			as_fn_error $? "You can configure for only one database." "$LINENO" 5
8862		fi
8863
8864		if test "x$found_mysql" = "xyes"; then
8865			have_db="MySQL"
8866			have_multirow_insert="yes"
8867		else
8868			as_fn_error $? "MySQL library not found" "$LINENO" 5
8869		fi
8870	fi
8871
8872
8873
8874# Check whether --with-oracle was given.
8875if test "${with_oracle+set}" = set; then :
8876  withval=$with_oracle;
8877        if test "$withval" = "no"; then
8878            want_oracle_oci="no"
8879        elif test "$withval" = "yes"; then
8880            want_oracle_oci="yes"
8881            oracle_home_dir="$ORACLE_HOME"
8882        elif test -d "$withval"; then
8883            want_oracle_oci="yes"
8884            oracle_home_dir="$withval"
8885        else
8886            want_oracle_oci="yes"
8887            oracle_home_dir=""
8888        fi
8889
8890else
8891  want_oracle_oci="no"
8892
8893fi
8894
8895
8896
8897# Check whether --with-oracle-include was given.
8898if test "${with_oracle_include+set}" = set; then :
8899  withval=$with_oracle_include;
8900        if test "$withval" != "no"; then
8901            want_oracle_oci="yes"
8902            oracle_home_include_dir="$withval"
8903        fi
8904
8905else
8906  oracle_home_include_dir=""
8907
8908fi
8909
8910
8911# Check whether --with-oracle-lib was given.
8912if test "${with_oracle_lib+set}" = set; then :
8913  withval=$with_oracle_lib;
8914        if test "$withval" != "no"; then
8915            want_oracle_oci="yes"
8916            oracle_home_lib_dir="$withval"
8917        fi
8918
8919else
8920  oracle_home_lib_dir=""
8921
8922fi
8923
8924
8925    ORACLE_OCI_CFLAGS=""
8926    ORACLE_OCI_LDFLAGS=""
8927    ORACLE_OCI_LIBS=""
8928    ORACLE_OCI_VERSION=""
8929
8930                want_oracle_but_no_path="no"
8931
8932    if test -n "$oracle_home_dir"; then
8933
8934        if test "$oracle_home_dir" != "no" -a "$oracle_home_dir" != "yes"; then
8935
8936                        oracle_include_dir="$oracle_home_dir/rdbms/public"
8937
8938                        oracle_include_dir2="$oracle_home_dir/rdbms/demo"
8939
8940                        oracle_lib_dir="$oracle_home_dir/lib"
8941        elif test "$oracle_home_dir" = "yes"; then
8942            want_oracle_but_no_path="yes"
8943        fi
8944
8945    elif test -n "$oracle_home_include_dir" -o -n "$oracle_home_lib_dir"; then
8946
8947        if test "$oracle_home_include_dir" != "no" -a "$oracle_home_include_dir" != "yes"; then
8948            oracle_include_dir="$oracle_home_include_dir"
8949        elif test "$oracle_home_include_dir" = "yes"; then
8950            want_oracle_but_no_path="yes"
8951        fi
8952
8953        if test "$oracle_home_lib_dir" != "no" -a "$oracle_home_lib_dir" != "yes"; then
8954            oracle_lib_dir="$oracle_home_lib_dir"
8955        elif test "$oracle_home_lib_dir" = "yes"; then
8956            want_oracle_but_no_path="yes"
8957        fi
8958    fi
8959
8960    if test "$want_oracle_but_no_path" = "yes"; then
8961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle support is requested but no Oracle paths have been provided. \
8962Please, locate Oracle directories using --with-oracle or \
8963--with-oracle-include and --with-oracle-lib options." >&5
8964$as_echo "$as_me: WARNING: Oracle support is requested but no Oracle paths have been provided. \
8965Please, locate Oracle directories using --with-oracle or \
8966--with-oracle-include and --with-oracle-lib options." >&2;}
8967    fi
8968
8969                if test -n "$oracle_include_dir" -a -n "$oracle_lib_dir"; then
8970
8971        saved_CPPFLAGS="$CPPFLAGS"
8972        CPPFLAGS="$CPPFLAGS -I$oracle_include_dir"
8973
8974                if test -n "$oracle_include_dir2"; then
8975            CPPFLAGS="$CPPFLAGS -I$oracle_include_dir2"
8976        fi
8977
8978                        saved_LDFLAGS="$LDFLAGS"
8979        oci_ldflags="-L$oracle_lib_dir"
8980        LDFLAGS="$LDFLAGS $oci_ldflags"
8981
8982        saved_LIBS="$LIBS"
8983        oci_libs="-lclntsh"
8984        LIBS="$LIBS $oci_libs"
8985
8986                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI headers in $oracle_include_dir" >&5
8987$as_echo_n "checking for Oracle OCI headers in $oracle_include_dir... " >&6; }
8988
8989                if test -f "$oracle_include_dir/ociver.h"; then
8990            oracle_version_file="ociver.h"
8991        else
8992            oracle_version_file="oci.h"
8993        fi
8994
8995        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8996/* end confdefs.h.  */
8997
8998            #include <$oracle_version_file>
8999int
9000main ()
9001{
9002
9003#if defined(OCI_MAJOR_VERSION)
9004#if OCI_MAJOR_VERSION == 10 && OCI_MINOR_VERSION == 2
9005// Oracle 10.2 detected
9006#endif
9007#elif defined(OCI_V7_SYNTAX)
9008// OK, older Oracle detected
9009// TODO - mloskot: find better macro to check for older versions;
9010#else
9011#  error Oracle $oracle_version_file header not found
9012#endif
9013
9014
9015  ;
9016  return 0;
9017}
9018_ACEOF
9019if ac_fn_c_try_compile "$LINENO"; then :
9020
9021            ORACLE_OCI_CFLAGS="-I$oracle_include_dir"
9022
9023            if test -n "$oracle_include_dir2"; then
9024                ORACLE_OCI_CFLAGS="$ORACLE_OCI_CFLAGS -I$oracle_include_dir2"
9025            fi
9026
9027            oci_header_found="yes"
9028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9029$as_echo "yes" >&6; }
9030
9031else
9032
9033            oci_header_found="no"
9034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9035$as_echo "not found" >&6; }
9036
9037
9038fi
9039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9040
9041                                oracle_version_req=10.0
9042
9043        if test "$oci_header_found" = "yes"; then
9044
9045            oracle_version_major=`cat $oracle_include_dir/$oracle_version_file \
9046                                 | grep '#define.*OCI_MAJOR_VERSION.*' \
9047                                 | sed -e 's/#define OCI_MAJOR_VERSION  *//' \
9048                                 | sed -e 's/  *\/\*.*\*\///'`
9049
9050            oracle_version_minor=`cat $oracle_include_dir/$oracle_version_file \
9051                                 | grep '#define.*OCI_MINOR_VERSION.*' \
9052                                 | sed -e 's/#define OCI_MINOR_VERSION  *//' \
9053                                 | sed -e 's/  *\/\*.*\*\///'`
9054
9055                        oracle_version_number=`expr $oracle_version_major \* 1000000 \
9056                                  \+ $oracle_version_minor \* 1000`
9057
9058
9059            if test -n "$oracle_version_req"; then
9060                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle OCI version is >= $oracle_version_req" >&5
9061$as_echo_n "checking if Oracle OCI version is >= $oracle_version_req... " >&6; }
9062
9063                if test -n "$oracle_version_major" -a -n $"oracle_version_minor"; then
9064
9065                    ORACLE_OCI_VERSION="$oracle_version_major.$oracle_version_minor"
9066
9067                                                            oracle_version_req_major=`expr $oracle_version_req : '\([0-9]*\)'`
9068                    oracle_version_req_minor=`expr $oracle_version_req : '[0-9]*\.\([0-9]*\)'`
9069
9070                    oracle_version_req_number=`expr $oracle_version_req_major \* 1000000 \
9071                                               \+ $oracle_version_req_minor \* 1000`
9072
9073                    oracle_version_check=`expr $oracle_version_number \>\= $oracle_version_req_number`
9074                    if test "$oracle_version_check" = "1"; then
9075
9076                        oracle_version_checked="yes"
9077                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9078$as_echo "yes" >&6; }
9079
9080                    else
9081                        oracle_version_checked="no"
9082                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9083$as_echo "no" >&6; }
9084                        as_fn_error $? "Oracle $ORACLE_OCI_VERSION found, but required version is $oracle_version_req" "$LINENO" 5
9085                    fi
9086                else
9087                    ORACLE_OCI_VERSION="UNKNOWN"
9088                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9089$as_echo "no" >&6; }
9090                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&5
9091$as_echo "$as_me: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&2;}
9092                fi
9093            fi
9094
9095                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI version >= 10.x to use -lnnz1x flag" >&5
9096$as_echo_n "checking for Oracle OCI version >= 10.x to use -lnnz1x flag... " >&6; }
9097            oracle_nnz1x_flag=`expr $oracle_version_number / 1000000`
9098            if test "$oracle_nnz1x_flag" -ge 10; then
9099                oci_libs="$oci_libs -lnnz$oracle_nnz1x_flag"
9100                LIBS="$LIBS -lnnz$oracle_nnz1x_flag"
9101                { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lnnz$oracle_nnz1x_flag" >&5
9102$as_echo "-lnnz$oracle_nnz1x_flag" >&6; }
9103            else
9104                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105$as_echo "no" >&6; }
9106            fi
9107        fi
9108
9109                                if test "$oci_header_found" = "yes"; then
9110
9111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI libraries in $oracle_lib_dir" >&5
9112$as_echo_n "checking for Oracle OCI libraries in $oracle_lib_dir... " >&6; }
9113
9114            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9115/* end confdefs.h.  */
9116
9117                #include <oci.h>
9118int
9119main ()
9120{
9121
9122OCIEnv *envh = 0;
9123OCIEnvNlsCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0, 0, 0);
9124if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
9125
9126
9127  ;
9128  return 0;
9129}
9130_ACEOF
9131if ac_fn_c_try_link "$LINENO"; then :
9132
9133                ORACLE_OCI_LDFLAGS="$oci_ldflags"
9134                ORACLE_OCI_LIBS="$oci_libs"
9135                oci_lib_found="yes"
9136                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9137$as_echo "yes" >&6; }
9138
9139else
9140
9141                oci_lib_found="no"
9142                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9143$as_echo "not found" >&6; }
9144
9145
9146fi
9147rm -f core conftest.err conftest.$ac_objext \
9148    conftest$ac_exeext conftest.$ac_ext
9149        fi
9150
9151                                if test "$oci_header_found" = "yes"; then
9152
9153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCIServerRelease2() API in $oracle_lib_dir" >&5
9154$as_echo_n "checking for Oracle OCIServerRelease2() API in $oracle_lib_dir... " >&6; }
9155
9156            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9157/* end confdefs.h.  */
9158
9159                #include <oci.h>
9160int
9161main ()
9162{
9163
9164OCIEnv *envh = 0;
9165OCIError *errh = 0;
9166OraText buf[256];
9167ub4 version;
9168sword ret = OCIServerRelease2(envh, errh, buf, (ub4)sizeof(buf), OCI_HTYPE_SVCCTX, &version, OCI_DEFAULT);
9169
9170
9171  ;
9172  return 0;
9173}
9174_ACEOF
9175if ac_fn_c_try_link "$LINENO"; then :
9176
9177
9178$as_echo "#define HAVE_OCI_SERVER_RELEASE2 1" >>confdefs.h
9179
9180                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9181$as_echo "yes" >&6; }
9182
9183else
9184
9185                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186$as_echo "no" >&6; }
9187
9188
9189fi
9190rm -f core conftest.err conftest.$ac_objext \
9191    conftest$ac_exeext conftest.$ac_ext
9192        fi
9193
9194        CPPFLAGS="$saved_CPPFLAGS"
9195        LDFLAGS="$saved_LDFLAGS"
9196        LIBS="$saved_LIBS"
9197    fi
9198
9199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle support" >&5
9200$as_echo_n "checking for Oracle support... " >&6; }
9201
9202    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes"; then
9203
9204
9205
9206
9207
9208
9209        HAVE_ORACLE_OCI="yes"
9210    else
9211        HAVE_ORACLE_OCI="no"
9212    fi
9213
9214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ORACLE_OCI" >&5
9215$as_echo "$HAVE_ORACLE_OCI" >&6; }
9216
9217	if test "x$want_oracle_oci" = "xyes"; then
9218		if test "x$have_db" != "xno"; then
9219			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9220		fi
9221
9222		if test "x$HAVE_ORACLE_OCI" = "xyes"; then
9223			have_db="Oracle"
9224
9225			ORACLE_CPPFLAGS="$ORACLE_OCI_CFLAGS"
9226			ORACLE_LDFLAGS="$ORACLE_OCI_LDFLAGS"
9227			ORACLE_LIBS="$ORACLE_OCI_LIBS"
9228
9229
9230$as_echo "#define HAVE_ORACLE 1" >>confdefs.h
9231
9232		else
9233			as_fn_error $? "Oracle OCI library not found" "$LINENO" 5
9234		fi
9235	fi
9236
9237
9238    PG_CONFIG="no"
9239
9240
9241# Check whether --with-postgresql was given.
9242if test "${with_postgresql+set}" = set; then :
9243  withval=$with_postgresql;
9244        if test "x$withval" = "xno"; then
9245            want_postgresql="no"
9246        elif test "x$withval" = "xyes"; then
9247            want_postgresql="yes"
9248        else
9249            want_postgresql="yes"
9250            PG_CONFIG="$withval"
9251        fi
9252
9253else
9254  want_postgresql="no"
9255
9256fi
9257
9258
9259    POSTGRESQL_CFLAGS=""
9260    POSTGRESQL_LDFLAGS=""
9261    POSTGRESQL_LIBS=""
9262    POSTGRESQL_VERSION=""
9263
9264
9265    if test "x$want_postgresql" = "xyes"; then
9266        # Extract the first word of "pg_config", so it can be a program name with args.
9267set dummy pg_config; ac_word=$2
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9269$as_echo_n "checking for $ac_word... " >&6; }
9270if ${ac_cv_path_PG_CONFIG+:} false; then :
9271  $as_echo_n "(cached) " >&6
9272else
9273  case $PG_CONFIG in
9274  [\\/]* | ?:[\\/]*)
9275  ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path.
9276  ;;
9277  *)
9278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9279for as_dir in $PATH
9280do
9281  IFS=$as_save_IFS
9282  test -z "$as_dir" && as_dir=.
9283    for ac_exec_ext in '' $ac_executable_extensions; do
9284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9285    ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9287    break 2
9288  fi
9289done
9290  done
9291IFS=$as_save_IFS
9292
9293  ;;
9294esac
9295fi
9296PG_CONFIG=$ac_cv_path_PG_CONFIG
9297if test -n "$PG_CONFIG"; then
9298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
9299$as_echo "$PG_CONFIG" >&6; }
9300else
9301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
9303fi
9304
9305
9306
9307        if test -x "$PG_CONFIG"; then
9308            POSTGRESQL_CFLAGS="`$PG_CONFIG --includedir`"
9309            if test -n "$POSTGRESQL_CFLAGS"; then
9310                POSTGRESQL_CFLAGS="-I$POSTGRESQL_CFLAGS";
9311            fi
9312            POSTGRESQL_LDFLAGS="`$PG_CONFIG --libdir`"
9313            if test -n "$POSTGRESQL_LDFLAGS"; then
9314                POSTGRESQL_LDFLAGS="-L$POSTGRESQL_LDFLAGS";
9315            fi
9316            POSTGRESQL_LIBS="-lpq"
9317
9318            _save_postgresql_cflags="${CFLAGS}"
9319            _save_postgresql_ldflags="${LDFLAGS}"
9320            _save_postgresql_libs="${LIBS}"
9321            CFLAGS="${CFLAGS} ${POSTGRESQL_CFLAGS}"
9322            LDFLAGS="${LDFLAGS} ${POSTGRESQL_LDFLAGS}"
9323            LIBS="${LIBS} ${POSTGRESQL_LIBS}"
9324
9325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL libraries" >&5
9326$as_echo_n "checking for PostgreSQL libraries... " >&6; }
9327            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328/* end confdefs.h.  */
9329
9330#include <libpq-fe.h>
9331
9332int
9333main ()
9334{
9335
9336PGconn	*conn;
9337conn = PQsetdbLogin(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
9338
9339  ;
9340  return 0;
9341}
9342_ACEOF
9343if ac_fn_c_try_link "$LINENO"; then :
9344
9345$as_echo "#define HAVE_POSTGRESQL 1" >>confdefs.h
9346
9347            found_postgresql="yes"
9348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9349$as_echo "yes" >&6; }
9350else
9351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
9353fi
9354rm -f core conftest.err conftest.$ac_objext \
9355    conftest$ac_exeext conftest.$ac_ext
9356
9357            CFLAGS="${_save_postgresql_cflags}"
9358            LDFLAGS="${_save_postgresql_ldflags}"
9359            LIBS="${_save_postgresql_libs}"
9360            unset _save_postgresql_cflags
9361            unset _save_postgresql_ldflags
9362            unset _save_postgresql_libs
9363
9364            if test "x$found_postgresql" = "xyes"; then
9365                POSTGRESQL_VERSION=`$PG_CONFIG --version | cut -d' ' -f2`
9366            fi
9367        fi
9368    fi
9369
9370
9371    postgresql_version_req="9.2"
9372
9373    if test "x$found_postgresql" = "xyes" -a -n "$postgresql_version_req"; then
9374
9375                        postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([0-9]*\)'`
9376        postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[0-9]*\.\([0-9]*\)'`
9377        postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9378        if test "x$postgresql_version_minor" = "x"; then
9379            postgresql_version_minor="0"
9380        fi
9381        if test "x$postgresql_version_micro" = "x"; then
9382            postgresql_version_micro="0"
9383        fi
9384
9385        postgresql_version_number=`expr $postgresql_version_major \* 1000000 \
9386                                   \+ $postgresql_version_minor \* 1000 \
9387                                   \+ $postgresql_version_micro`
9388
9389        if test -n "$postgresql_version_req"; then
9390
9391            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PostgreSQL version is >= $postgresql_version_req" >&5
9392$as_echo_n "checking if PostgreSQL version is >= $postgresql_version_req... " >&6; }
9393
9394                                    postgresql_version_req_major=`expr $postgresql_version_req : '\([0-9]*\)'`
9395            postgresql_version_req_minor=`expr $postgresql_version_req : '[0-9]*\.\([0-9]*\)'`
9396            postgresql_version_req_micro=`expr $postgresql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9397            if test "x$postgresql_version_req_micro" = "x"; then
9398                postgresql_version_req_micro="0"
9399            fi
9400
9401            postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \
9402                                       \+ $postgresql_version_req_minor \* 1000 \
9403                                       \+ $postgresql_version_req_micro`
9404
9405            postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number`
9406            if test "$postgresql_version_check" = "1"; then
9407                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9408$as_echo "yes" >&6; }
9409            else
9410                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9411$as_echo "no" >&6; }
9412            fi
9413
9414	fi
9415
9416    fi
9417
9418
9419
9420
9421
9422
9423	if test "x$want_postgresql" = "xyes"; then
9424		if test "x$have_db" != "xno"; then
9425			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9426		fi
9427
9428		if test "x$found_postgresql" = "xyes"; then
9429			if test "$postgresql_version_check" != "1"; then
9430				as_fn_error $? "PostgreSQL version mismatch" "$LINENO" 5
9431			fi
9432
9433			have_db="PostgreSQL"
9434
9435			if test "$postgresql_version_number" -ge 8002000; then
9436				have_multirow_insert="yes"
9437			fi
9438
9439		else
9440			as_fn_error $? "PostgreSQL library not found" "$LINENO" 5
9441		fi
9442	fi
9443
9444
9445
9446# Check whether --with-sqlite3 was given.
9447if test "${with_sqlite3+set}" = set; then :
9448  withval=$with_sqlite3;
9449        if test "$withval" = "no"; then
9450            want_sqlite3="no"
9451        elif test "$withval" = "yes"; then
9452            want_sqlite3="yes"
9453            ac_sqlite3_path=""
9454        else
9455            want_sqlite3="yes"
9456            ac_sqlite3_path="$withval"
9457        fi
9458
9459else
9460  want_sqlite3="no"
9461
9462fi
9463
9464
9465    SQLITE3_CFLAGS=""
9466    SQLITE3_LDFLAGS=""
9467    SQLITE3_LIBS=""
9468    SQLITE3_VERSION=""
9469
9470    if test "x$want_sqlite3" = "xyes"; then
9471
9472        ac_sqlite3_header="sqlite3.h"
9473
9474        sqlite3_version_req=3.0.0
9475        sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([0-9]*\.[0-9]*\)'`
9476        sqlite3_version_req_major=`expr $sqlite3_version_req : '\([0-9]*\)'`
9477        sqlite3_version_req_minor=`expr $sqlite3_version_req : '[0-9]*\.\([0-9]*\)'`
9478        sqlite3_version_req_micro=`expr $sqlite3_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9479        if test "x$sqlite3_version_req_micro" = "x" ; then
9480            sqlite3_version_req_micro="0"
9481        fi
9482
9483        sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \
9484                                   \+ $sqlite3_version_req_minor \* 1000 \
9485                                   \+ $sqlite3_version_req_micro`
9486
9487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLite3 library >= $sqlite3_version_req" >&5
9488$as_echo_n "checking for SQLite3 library >= $sqlite3_version_req... " >&6; }
9489
9490        if test "$ac_sqlite3_path" != ""; then
9491            ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
9492            ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
9493        else
9494            for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do
9495                if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
9496                    && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
9497                    ac_sqlite3_path=$ac_sqlite3_path_tmp
9498                    ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
9499                    ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
9500                    break;
9501                fi
9502            done
9503        fi
9504
9505        saved_CPPFLAGS="$CPPFLAGS"
9506        CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags"
9507
9508        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9509/* end confdefs.h.  */
9510
9511            #include <sqlite3.h>
9512int
9513main ()
9514{
9515
9516#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number)
9517// Everything is okay
9518#else
9519#  error SQLite version is too old
9520#endif
9521
9522
9523  ;
9524  return 0;
9525}
9526
9527_ACEOF
9528if ac_fn_c_try_compile "$LINENO"; then :
9529
9530            found_sqlite3="yes"
9531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9532$as_echo "yes" >&6; }
9533
9534else
9535
9536            found_sqlite3="no"
9537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
9539
9540
9541fi
9542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9543
9544        CPPFLAGS="$saved_CPPFLAGS"
9545
9546        if test "$found_sqlite3" = "yes"; then
9547
9548            SQLITE3_CPPFLAGS="$ac_sqlite3_cppflags"
9549            SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
9550            SQLITE3_LIBS="-lsqlite3"
9551
9552            ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
9553
9554                        if test "x$ac_sqlite3_header_path" != "x"; then
9555                ac_sqlite3_version=`cat $ac_sqlite3_header_path \
9556                    | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \
9557                        | sed -e 's/"//'`
9558                if test $ac_sqlite3_version != ""; then
9559                    SQLITE3_VERSION=$ac_sqlite3_version
9560                else
9561                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&5
9562$as_echo "$as_me: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&2;}
9563                fi
9564            fi
9565
9566
9567
9568
9569
9570
9571$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
9572
9573        fi
9574    fi
9575
9576	if test "x$want_sqlite3" = "xyes"; then
9577		if test "x$server" = "xyes"; then
9578			as_fn_error $? "SQLite is not supported as a main Zabbix database backend." "$LINENO" 5
9579		fi
9580
9581		if test "x$have_db" != "xno"; then
9582			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9583		fi
9584
9585		if test "x$found_sqlite3" = "xyes"; then
9586			have_db="SQLite v3.x"
9587
9588			saved_CPPFLAGS="$CPPFLAGS"
9589			saved_LDFLAGS="$LDFLAGS"
9590
9591			CPPFLAGS="$CPPFLAGS $SQLITE3_CPPFLAGS"
9592			LDFLAGS="$LDFLAGS $SQLITE3_LDFLAGS $SQLITE3_LIBS"
9593
9594			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sqlite3_open_v2() in sqlite3.h" >&5
9595$as_echo_n "checking for function sqlite3_open_v2() in sqlite3.h... " >&6; }
9596			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9597/* end confdefs.h.  */
9598#include <sqlite3.h>
9599int
9600main ()
9601{
9602sqlite3 *conn = 0;
9603				sqlite3_open_v2("dbname", &conn, SQLITE_OPEN_READWRITE, 0);
9604
9605  ;
9606  return 0;
9607}
9608_ACEOF
9609if ac_fn_c_try_link "$LINENO"; then :
9610
9611$as_echo "#define HAVE_FUNCTION_SQLITE3_OPEN_V2 1" >>confdefs.h
9612
9613				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9614$as_echo "yes" >&6; }
9615else
9616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9617$as_echo "no" >&6; }
9618fi
9619rm -f core conftest.err conftest.$ac_objext \
9620    conftest$ac_exeext conftest.$ac_ext
9621
9622			CPPFLAGS="$saved_CPPFLAGS"
9623			LDFLAGS="$saved_LDFLAGS"
9624		else
9625			as_fn_error $? "SQLite3 library not found" "$LINENO" 5
9626		fi
9627	fi
9628
9629	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Zabbix server/proxy database selection" >&5
9630$as_echo_n "checking for Zabbix server/proxy database selection... " >&6; }
9631	if test "x$have_db" = "xno"; then
9632		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
9633$as_echo "error" >&6; }
9634		as_fn_error $? "No database selected for Zabbix server/proxy. Use --with-mysql or --with-oracle or --with-postgresql or --with-sqlite3." "$LINENO" 5
9635	else
9636		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9637$as_echo "ok" >&6; }
9638	fi
9639
9640	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multirow insert statements" >&5
9641$as_echo_n "checking for multirow insert statements... " >&6; }
9642	if test "x$have_multirow_insert" = "xyes"; then
9643
9644$as_echo "#define HAVE_MULTIROW_INSERT 1" >>confdefs.h
9645
9646		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9647$as_echo "yes" >&6; }
9648	else
9649		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9650$as_echo "no" >&6; }
9651	fi
9652
9653	DB_CFLAGS="$MYSQL_CFLAGS $ORACLE_CPPFLAGS $POSTGRESQL_CFLAGS $SQLITE3_CPPFLAGS"
9654	DB_LDFLAGS="$MYSQL_LDFLAGS $ORACLE_LDFLAGS $POSTGRESQL_LDFLAGS $SQLITE3_LDFLAGS"
9655	DB_LIBS="$MYSQL_LIBS $ORACLE_LIBS $POSTGRESQL_LIBS $SQLITE3_LIBS"
9656
9657
9658
9659
9660
9661	SERVER_LDFLAGS="${SERVER_LDFLAGS} ${DB_LDFLAGS}"
9662	SERVER_LIBS="${SERVER_LIBS} ${DB_LIBS}"
9663
9664	PROXY_LDFLAGS="${PROXY_LDFLAGS} ${DB_LDFLAGS}"
9665	PROXY_LIBS="${PROXY_LIBS} ${DB_LIBS}"
9666
9667
9668
9669
9670
9671
9672
9673
9674if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9675	if test -n "$ac_tool_prefix"; then
9676  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9677set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679$as_echo_n "checking for $ac_word... " >&6; }
9680if ${ac_cv_path_PKG_CONFIG+:} false; then :
9681  $as_echo_n "(cached) " >&6
9682else
9683  case $PKG_CONFIG in
9684  [\\/]* | ?:[\\/]*)
9685  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9686  ;;
9687  *)
9688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689for as_dir in $PATH
9690do
9691  IFS=$as_save_IFS
9692  test -z "$as_dir" && as_dir=.
9693    for ac_exec_ext in '' $ac_executable_extensions; do
9694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697    break 2
9698  fi
9699done
9700  done
9701IFS=$as_save_IFS
9702
9703  ;;
9704esac
9705fi
9706PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9707if test -n "$PKG_CONFIG"; then
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9709$as_echo "$PKG_CONFIG" >&6; }
9710else
9711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
9713fi
9714
9715
9716fi
9717if test -z "$ac_cv_path_PKG_CONFIG"; then
9718  ac_pt_PKG_CONFIG=$PKG_CONFIG
9719  # Extract the first word of "pkg-config", so it can be a program name with args.
9720set dummy pkg-config; ac_word=$2
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9722$as_echo_n "checking for $ac_word... " >&6; }
9723if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9724  $as_echo_n "(cached) " >&6
9725else
9726  case $ac_pt_PKG_CONFIG in
9727  [\\/]* | ?:[\\/]*)
9728  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9729  ;;
9730  *)
9731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9732for as_dir in $PATH
9733do
9734  IFS=$as_save_IFS
9735  test -z "$as_dir" && as_dir=.
9736    for ac_exec_ext in '' $ac_executable_extensions; do
9737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9738    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9740    break 2
9741  fi
9742done
9743  done
9744IFS=$as_save_IFS
9745
9746  ;;
9747esac
9748fi
9749ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9750if test -n "$ac_pt_PKG_CONFIG"; then
9751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9752$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9753else
9754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9755$as_echo "no" >&6; }
9756fi
9757
9758  if test "x$ac_pt_PKG_CONFIG" = x; then
9759    PKG_CONFIG=""
9760  else
9761    case $cross_compiling:$ac_tool_warned in
9762yes:)
9763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9765ac_tool_warned=yes ;;
9766esac
9767    PKG_CONFIG=$ac_pt_PKG_CONFIG
9768  fi
9769else
9770  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9771fi
9772
9773fi
9774if test -n "$PKG_CONFIG"; then
9775	_pkg_min_version=0.9.0
9776	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9777$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9778	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9779		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9780$as_echo "yes" >&6; }
9781	else
9782		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9783$as_echo "no" >&6; }
9784		PKG_CONFIG=""
9785	fi
9786fi
9787
9788    LIBXML2_CONFIG="no"
9789
9790
9791# Check whether --with-libxml2 was given.
9792if test "${with_libxml2+set}" = set; then :
9793  withval=$with_libxml2;
9794        if test "$withval" = "no"; then
9795            want_libxml2="no"
9796        elif test "$withval" = "yes"; then
9797            want_libxml2="yes"
9798        else
9799            want_libxml2="yes"
9800        fi
9801
9802else
9803  want_libxml2="no"
9804
9805fi
9806
9807
9808    LIBXML2_CFLAGS=""
9809    LIBXML2_LDFLAGS=""
9810    LIBXML2_LIBS=""
9811    LIBXML2_VERSION=""
9812
9813
9814    if test "$want_libxml2" = "yes"; then
9815
9816
9817
9818
9819
9820
9821
9822
9823if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9824	if test -n "$ac_tool_prefix"; then
9825  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9826set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9828$as_echo_n "checking for $ac_word... " >&6; }
9829if ${ac_cv_path_PKG_CONFIG+:} false; then :
9830  $as_echo_n "(cached) " >&6
9831else
9832  case $PKG_CONFIG in
9833  [\\/]* | ?:[\\/]*)
9834  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9835  ;;
9836  *)
9837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9838for as_dir in $PATH
9839do
9840  IFS=$as_save_IFS
9841  test -z "$as_dir" && as_dir=.
9842    for ac_exec_ext in '' $ac_executable_extensions; do
9843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9844    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9846    break 2
9847  fi
9848done
9849  done
9850IFS=$as_save_IFS
9851
9852  ;;
9853esac
9854fi
9855PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9856if test -n "$PKG_CONFIG"; then
9857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9858$as_echo "$PKG_CONFIG" >&6; }
9859else
9860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9861$as_echo "no" >&6; }
9862fi
9863
9864
9865fi
9866if test -z "$ac_cv_path_PKG_CONFIG"; then
9867  ac_pt_PKG_CONFIG=$PKG_CONFIG
9868  # Extract the first word of "pkg-config", so it can be a program name with args.
9869set dummy pkg-config; ac_word=$2
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9871$as_echo_n "checking for $ac_word... " >&6; }
9872if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9873  $as_echo_n "(cached) " >&6
9874else
9875  case $ac_pt_PKG_CONFIG in
9876  [\\/]* | ?:[\\/]*)
9877  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9878  ;;
9879  *)
9880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9881for as_dir in $PATH
9882do
9883  IFS=$as_save_IFS
9884  test -z "$as_dir" && as_dir=.
9885    for ac_exec_ext in '' $ac_executable_extensions; do
9886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9887    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9889    break 2
9890  fi
9891done
9892  done
9893IFS=$as_save_IFS
9894
9895  ;;
9896esac
9897fi
9898ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9899if test -n "$ac_pt_PKG_CONFIG"; then
9900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9901$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9902else
9903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
9905fi
9906
9907  if test "x$ac_pt_PKG_CONFIG" = x; then
9908    PKG_CONFIG=""
9909  else
9910    case $cross_compiling:$ac_tool_warned in
9911yes:)
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9914ac_tool_warned=yes ;;
9915esac
9916    PKG_CONFIG=$ac_pt_PKG_CONFIG
9917  fi
9918else
9919  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9920fi
9921
9922fi
9923if test -n "$PKG_CONFIG"; then
9924	_pkg_min_version=0.9.0
9925	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9926$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9927	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9928		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9929$as_echo "yes" >&6; }
9930	else
9931		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9932$as_echo "no" >&6; }
9933		PKG_CONFIG=""
9934	fi
9935fi
9936
9937        if test -x "$PKG_CONFIG"; then
9938
9939            LIBXML2_CFLAGS="`$PKG_CONFIG --cflags libxml-2.0`"
9940
9941            _full_libxml2_libs="`$PKG_CONFIG --libs libxml-2.0`"
9942
9943            for i in $_full_libxml2_libs; do
9944                case $i in
9945                   -lxml2)
9946                        ;;
9947                   -L*)
9948                        LIBXML2_LDFLAGS="${LIBXML2_LDFLAGS} $i"
9949                        ;;
9950                   -R*)
9951                        LIBXML2_LDFLAGS="${LIBXML2_LDFLAGS} -Wl,$i"
9952                        ;;
9953                esac
9954            done
9955
9956            if test "x$enable_static" = "xyes"; then
9957                for i in $_full_libxml2_libs; do
9958                    case $i in
9959                        -lxml2)
9960                            ;;
9961                        -l*)
9962                            _lib_name="`echo "$i" | cut -b3-`"
9963                            as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
9965$as_echo_n "checking for main in -l$_lib_name... " >&6; }
9966if eval \${$as_ac_Lib+:} false; then :
9967  $as_echo_n "(cached) " >&6
9968else
9969  ac_check_lib_save_LIBS=$LIBS
9970LIBS="-l$_lib_name  $LIBS"
9971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9972/* end confdefs.h.  */
9973
9974
9975int
9976main ()
9977{
9978return main ();
9979  ;
9980  return 0;
9981}
9982_ACEOF
9983if ac_fn_c_try_link "$LINENO"; then :
9984  eval "$as_ac_Lib=yes"
9985else
9986  eval "$as_ac_Lib=no"
9987fi
9988rm -f core conftest.err conftest.$ac_objext \
9989    conftest$ac_exeext conftest.$ac_ext
9990LIBS=$ac_check_lib_save_LIBS
9991fi
9992eval ac_res=\$$as_ac_Lib
9993	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9994$as_echo "$ac_res" >&6; }
9995if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9996
9997                                    LIBXML2_LIBS="$LIBXML2_LIBS $i"
9998
9999else
10000
10001                                    as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
10002
10003fi
10004
10005                            ;;
10006                    esac
10007                done
10008            fi
10009
10010            _save_libxml2_libs="${LIBS}"
10011            _save_libxml2_ldflags="${LDFLAGS}"
10012            _save_libxml2_cflags="${CFLAGS}"
10013            LIBS="${LIBS} ${LIBXML2_LIBS}"
10014            LDFLAGS="${LDFLAGS} ${LIBXML2_LDFLAGS}"
10015            CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}"
10016
10017            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlReadMemory in -lxml2" >&5
10018$as_echo_n "checking for xmlReadMemory in -lxml2... " >&6; }
10019if ${ac_cv_lib_xml2_xmlReadMemory+:} false; then :
10020  $as_echo_n "(cached) " >&6
10021else
10022  ac_check_lib_save_LIBS=$LIBS
10023LIBS="-lxml2  $LIBS"
10024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10025/* end confdefs.h.  */
10026
10027/* Override any GCC internal prototype to avoid an error.
10028   Use char because int might match the return type of a GCC
10029   builtin and then its argument prototype would still apply.  */
10030#ifdef __cplusplus
10031extern "C"
10032#endif
10033char xmlReadMemory ();
10034int
10035main ()
10036{
10037return xmlReadMemory ();
10038  ;
10039  return 0;
10040}
10041_ACEOF
10042if ac_fn_c_try_link "$LINENO"; then :
10043  ac_cv_lib_xml2_xmlReadMemory=yes
10044else
10045  ac_cv_lib_xml2_xmlReadMemory=no
10046fi
10047rm -f core conftest.err conftest.$ac_objext \
10048    conftest$ac_exeext conftest.$ac_ext
10049LIBS=$ac_check_lib_save_LIBS
10050fi
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlReadMemory" >&5
10052$as_echo "$ac_cv_lib_xml2_xmlReadMemory" >&6; }
10053if test "x$ac_cv_lib_xml2_xmlReadMemory" = xyes; then :
10054
10055                    LIBXML2_LIBS="-lxml2 ${LIBXML2_LIBS}"
10056
10057else
10058
10059                    as_fn_error $? "Not found libxml2 library" "$LINENO" 5
10060
10061fi
10062
10063
10064            LIBS="${_save_libxml2_libs}"
10065            LDFLAGS="${_save_libxml2_ldflags}"
10066            CFLAGS="${_save_libxml2_cflags}"
10067            unset _save_libxml2_libs
10068            unset _save_libxml2_ldflags
10069            unset _save_libxml2_cflags
10070
10071            LIBXML2_VERSION=`$PKG_CONFIG --version libxml-2.0`
10072
10073
10074$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
10075
10076
10077            found_libxml2="yes"
10078        else
10079            found_libxml2="no"
10080        fi
10081    fi
10082
10083
10084
10085
10086
10087
10088	if test "x$want_libxml2" = "xyes"; then
10089		if test "x$found_libxml2" != "xyes"; then
10090			as_fn_error $? "LIBXML2 library not found" "$LINENO" 5
10091		else
10092			have_libxml2="yes"
10093		fi
10094	fi
10095
10096	LDFLAGS="$LDFLAGS $LIBXML2_LDFLAGS"
10097	LIBS="$LIBS $LIBXML2_LIBS"
10098
10099
10100
10101
10102
10103# Check whether --with-unixodbc was given.
10104if test "${with_unixodbc+set}" = set; then :
10105  withval=$with_unixodbc;  if test "x$withval" = "xno"; then
10106            want_unixodbc="no"
10107        elif test "x$withval" = "xyes"; then
10108            want_unixodbc="yes"
10109        else
10110            want_unixodbc="yes"
10111            specified_unixodbc="yes"
10112            ODBC_CONFIG=$withval
10113        fi
10114
10115else
10116  want_unixodbc=no
10117fi
10118
10119
10120  if test "x$want_unixodbc" != "xno"; then
10121	# Extract the first word of "odbc_config", so it can be a program name with args.
10122set dummy odbc_config; ac_word=$2
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10124$as_echo_n "checking for $ac_word... " >&6; }
10125if ${ac_cv_path_ODBC_CONFIG+:} false; then :
10126  $as_echo_n "(cached) " >&6
10127else
10128  case $ODBC_CONFIG in
10129  [\\/]* | ?:[\\/]*)
10130  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
10131  ;;
10132  *)
10133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10134for as_dir in $PATH
10135do
10136  IFS=$as_save_IFS
10137  test -z "$as_dir" && as_dir=.
10138    for ac_exec_ext in '' $ac_executable_extensions; do
10139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10140    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10142    break 2
10143  fi
10144done
10145  done
10146IFS=$as_save_IFS
10147
10148  ;;
10149esac
10150fi
10151ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
10152if test -n "$ODBC_CONFIG"; then
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
10154$as_echo "$ODBC_CONFIG" >&6; }
10155else
10156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10157$as_echo "no" >&6; }
10158fi
10159
10160
10161
10162	unixodbc_error=""
10163
10164	UNIXODBC_LIBS="-lodbc"
10165
10166	if test -x "$ODBC_CONFIG"; then
10167		UNIXODBC_CFLAGS="-I`$ODBC_CONFIG --include-prefix`"
10168		UNIXODBC_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
10169	elif test "x$specified_unixodbc" = "xyes"; then
10170		unixodbc_error="file $ODBC_CONFIG not found or not executable"
10171	fi
10172
10173	if test "x$unixodbc_error" = "x"; then
10174		_save_unixodbc_cflags="${CFLAGS}"
10175		_save_unixodbc_ldflags="${LDFLAGS}"
10176		_save_unixodbc_libs="${LIBS}"
10177		CFLAGS="${CFLAGS} ${UNIXODBC_CFLAGS}"
10178		LDFLAGS="${LDFLAGS} ${UNIXODBC_LDFLAGS}"
10179		LIBS="${LIBS} ${UNIXODBC_LIBS}"
10180
10181		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
10182$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
10183if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
10184  $as_echo_n "(cached) " >&6
10185else
10186  ac_check_lib_save_LIBS=$LIBS
10187LIBS="-lodbc  $LIBS"
10188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10189/* end confdefs.h.  */
10190
10191/* Override any GCC internal prototype to avoid an error.
10192   Use char because int might match the return type of a GCC
10193   builtin and then its argument prototype would still apply.  */
10194#ifdef __cplusplus
10195extern "C"
10196#endif
10197char SQLAllocHandle ();
10198int
10199main ()
10200{
10201return SQLAllocHandle ();
10202  ;
10203  return 0;
10204}
10205_ACEOF
10206if ac_fn_c_try_link "$LINENO"; then :
10207  ac_cv_lib_odbc_SQLAllocHandle=yes
10208else
10209  ac_cv_lib_odbc_SQLAllocHandle=no
10210fi
10211rm -f core conftest.err conftest.$ac_objext \
10212    conftest$ac_exeext conftest.$ac_ext
10213LIBS=$ac_check_lib_save_LIBS
10214fi
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
10216$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
10217if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
10218  cat >>confdefs.h <<_ACEOF
10219#define HAVE_LIBODBC 1
10220_ACEOF
10221
10222  LIBS="-lodbc $LIBS"
10223
10224else
10225  unixodbc_error="unixODBC library not found"
10226fi
10227
10228
10229		if test "x$unixodbc_error" = "x"; then
10230
10231$as_echo "#define HAVE_UNIXODBC 1" >>confdefs.h
10232
10233		fi
10234
10235		CFLAGS="${_save_unixodbc_cflags}"
10236		LDFLAGS="${_save_unixodbc_ldflags}"
10237		LIBS="${_save_unixodbc_libs}"
10238	fi
10239  fi
10240
10241
10242
10243
10244
10245
10246	if test "x$want_unixodbc" = "xyes"; then
10247		if test "x$unixodbc_error" != "x"; then
10248			as_fn_error $? "$unixodbc_error" "$LINENO" 5
10249		fi
10250		have_unixodbc="yes"
10251	fi
10252	SERVER_LDFLAGS="$SERVER_LDFLAGS $UNIXODBC_LDFLAGS"
10253	SERVER_LIBS="$SERVER_LIBS $UNIXODBC_LIBS"
10254
10255	PROXY_LDFLAGS="$PROXY_LDFLAGS $UNIXODBC_LDFLAGS"
10256	PROXY_LIBS="$PROXY_LIBS $UNIXODBC_LIBS"
10257
10258
10259
10260
10261  _libnetsnmp_config="no"
10262
10263
10264# Check whether --with-net-snmp was given.
10265if test "${with_net_snmp+set}" = set; then :
10266  withval=$with_net_snmp;  if test "$withval" = "no"; then
10267            want_netsnmp="no"
10268        elif test "$withval" = "yes"; then
10269            want_netsnmp="yes"
10270        else
10271            want_netsnmp="yes"
10272            _libnetsnmp_config=$withval
10273        fi
10274
10275else
10276  want_netsnmp=no
10277fi
10278
10279
10280  SNMP_CFLAGS=""
10281  SNMP_LDFLAGS=""
10282  SNMP_LIBS=""
10283
10284  if test "x$want_netsnmp" != "xno"; then
10285
10286	if test "x$_libnetsnmp_config" = "xno"; then
10287		# Extract the first word of "net-snmp-config", so it can be a program name with args.
10288set dummy net-snmp-config; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
10291if ${ac_cv_path__libnetsnmp_config+:} false; then :
10292  $as_echo_n "(cached) " >&6
10293else
10294  case $_libnetsnmp_config in
10295  [\\/]* | ?:[\\/]*)
10296  ac_cv_path__libnetsnmp_config="$_libnetsnmp_config" # Let the user override the test with a path.
10297  ;;
10298  *)
10299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300for as_dir in $PATH
10301do
10302  IFS=$as_save_IFS
10303  test -z "$as_dir" && as_dir=.
10304    for ac_exec_ext in '' $ac_executable_extensions; do
10305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306    ac_cv_path__libnetsnmp_config="$as_dir/$ac_word$ac_exec_ext"
10307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308    break 2
10309  fi
10310done
10311  done
10312IFS=$as_save_IFS
10313
10314  ;;
10315esac
10316fi
10317_libnetsnmp_config=$ac_cv_path__libnetsnmp_config
10318if test -n "$_libnetsnmp_config"; then
10319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libnetsnmp_config" >&5
10320$as_echo "$_libnetsnmp_config" >&6; }
10321else
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
10324fi
10325
10326
10327		want_static_netsnmp="no"
10328		test "x$enable_static_libs" = "xyes" && want_static_netsnmp="yes"
10329	else
10330		want_static_netsnmp="yes"
10331	fi
10332
10333	if test -d "$_libnetsnmp_config"; then
10334		# Extract the first word of "net-snmp-config", so it can be a program name with args.
10335set dummy net-snmp-config; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path__libnetsnmp_config+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $_libnetsnmp_config in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path__libnetsnmp_config="$_libnetsnmp_config" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $_libnetsnmp_config
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path__libnetsnmp_config="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364_libnetsnmp_config=$ac_cv_path__libnetsnmp_config
10365if test -n "$_libnetsnmp_config"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libnetsnmp_config" >&5
10367$as_echo "$_libnetsnmp_config" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374	fi
10375
10376	if test -x "$_libnetsnmp_config"; then
10377
10378		netsnmp_version_req="5.3.0"
10379
10380		if test -n "$netsnmp_version_req"; then
10381			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of netsnmp library" >&5
10382$as_echo_n "checking version of netsnmp library... " >&6; }
10383			LIBNETSNMP_CONFIG_VERSION=`$_libnetsnmp_config --version`
10384			netsnmp_version_major=`expr $LIBNETSNMP_CONFIG_VERSION : '\([0-9]*\)'`
10385			netsnmp_version_minor=`expr $LIBNETSNMP_CONFIG_VERSION : '[0-9]*\.\([0-9]*\)'`
10386			netsnmp_version_micro=`expr $LIBNETSNMP_CONFIG_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
10387
10388			if test "x$netsnmp_version_micro" = "x"; then
10389				netsnmp_version_micro="0"
10390			fi
10391
10392			netsnmp_version_number=`expr $netsnmp_version_major \* 1000000 \
10393					\+ $netsnmp_version_minor \* 1000 \
10394					\+ $netsnmp_version_micro`
10395
10396			netsnmp_version_req_major=`expr $netsnmp_version_req : '\([0-9]*\)'`
10397			netsnmp_version_req_minor=`expr $netsnmp_version_req : '[0-9]*\.\([0-9]*\)'`
10398			netsnmp_version_req_micro=`expr $netsnmp_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
10399
10400			if test "x$netsnmp_version_req_micro" = "x"; then
10401				netsnmp_version_req_micro="0"
10402			fi
10403
10404			netsnmp_version_req_number=`expr $netsnmp_version_req_major \* 1000000 \
10405					\+ $netsnmp_version_req_minor \* 1000 \
10406					\+ $netsnmp_version_req_micro`
10407
10408			netsnmp_version_check=`expr $netsnmp_version_number \>\= $netsnmp_version_req_number`
10409
10410			if test "$netsnmp_version_check" != "1"; then
10411				as_fn_error $? "Net-SNMP version mismatch" "$LINENO" 5
10412			else
10413				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10414$as_echo "yes" >&6; }
10415			fi
10416		fi
10417
10418		_full_libnetsnmp_cflags="`$_libnetsnmp_config --cflags`"
10419		for i in $_full_libnetsnmp_cflags; do
10420			case $i in
10421				-I*)
10422					SNMP_CFLAGS="$SNMP_CFLAGS $i"
10423
10424			;;
10425			esac
10426		done
10427
10428		_full_libnetsnmp_libs="`$_libnetsnmp_config --netsnmp-libs`"
10429		for i in $_full_libnetsnmp_libs; do
10430			case $i in
10431				-L*)
10432					SNMP_LDFLAGS="${SNMP_LDFLAGS} $i"
10433			;;
10434				-R*)
10435					SNMP_LDFLAGS="${SNMP_LDFLAGS} -Wl,$i"
10436			;;
10437				-l*)
10438					SNMP_LIBS="${SNMP_LIBS} $i"
10439			;;
10440			esac
10441		done
10442
10443		if test "x$enable_static" = "xyes"; then
10444			_full_libnetsnmp_libs="`$_libnetsnmp_config --libs`"
10445			for i in $_full_libnetsnmp_libs; do
10446				case $i in
10447					-lnetsnmp)
10448				;;
10449					-l*)
10450						_lib_name="`echo "$i" | cut -b3-`"
10451						as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
10453$as_echo_n "checking for main in -l$_lib_name... " >&6; }
10454if eval \${$as_ac_Lib+:} false; then :
10455  $as_echo_n "(cached) " >&6
10456else
10457  ac_check_lib_save_LIBS=$LIBS
10458LIBS="-l$_lib_name  $LIBS"
10459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10460/* end confdefs.h.  */
10461
10462
10463int
10464main ()
10465{
10466return main ();
10467  ;
10468  return 0;
10469}
10470_ACEOF
10471if ac_fn_c_try_link "$LINENO"; then :
10472  eval "$as_ac_Lib=yes"
10473else
10474  eval "$as_ac_Lib=no"
10475fi
10476rm -f core conftest.err conftest.$ac_objext \
10477    conftest$ac_exeext conftest.$ac_ext
10478LIBS=$ac_check_lib_save_LIBS
10479fi
10480eval ac_res=\$$as_ac_Lib
10481	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10482$as_echo "$ac_res" >&6; }
10483if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10484
10485								SNMP_LIBS="$SNMP_LIBS $i"
10486
10487else
10488
10489								as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
10490
10491fi
10492
10493
10494				;;
10495				esac
10496			done
10497		elif test "x$want_static_netsnmp" = "xyes"; then
10498			_libsnmp_dir_lib="`$_libnetsnmp_config --libdir | cut -b3-`"
10499
10500			test  "x$static_linking_support" = "xno" -o -z "$static_linking_support"  -a -z "$_libsnmp_dir_lib" && as_fn_error $? "\"Compiler not support statically linked libs from default folders\"" "$LINENO" 5
10501
10502			if test "x$static_linking_support" = "xno" -o -z "$static_linking_support"; then
10503				test -f $_libsnmp_dir_lib/libnetsnmp.a || as_fn_error $? "\"libnetsnmp.a static library was not found in $_libsnmp_dir_lib\"" "$LINENO" 5
10504				SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s|-lnetsnmp|$_libsnmp_dir_lib/libnetsnmp.a|g"`
10505			else
10506				SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s/-lnetsnmp/${static_linking_support}static -lnetsnmp ${static_linking_support}dynamic/g"`
10507			fi
10508		fi
10509
10510		_save_netsnmp_cflags="$CFLAGS"
10511		_save_netsnmp_ldflags="$LDFLAGS"
10512		_save_netsnmp_libs="$LIBS"
10513		CFLAGS="$CFLAGS $SNMP_CFLAGS"
10514		LDFLAGS="$LDFLAGS $SNMP_LDFLAGS"
10515		LIBS="$LIBS $SNMP_LIBS"
10516
10517		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnetsnmp" >&5
10518$as_echo_n "checking for main in -lnetsnmp... " >&6; }
10519if ${ac_cv_lib_netsnmp_main+:} false; then :
10520  $as_echo_n "(cached) " >&6
10521else
10522  ac_check_lib_save_LIBS=$LIBS
10523LIBS="-lnetsnmp  $LIBS"
10524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10525/* end confdefs.h.  */
10526
10527
10528int
10529main ()
10530{
10531return main ();
10532  ;
10533  return 0;
10534}
10535_ACEOF
10536if ac_fn_c_try_link "$LINENO"; then :
10537  ac_cv_lib_netsnmp_main=yes
10538else
10539  ac_cv_lib_netsnmp_main=no
10540fi
10541rm -f core conftest.err conftest.$ac_objext \
10542    conftest$ac_exeext conftest.$ac_ext
10543LIBS=$ac_check_lib_save_LIBS
10544fi
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_main" >&5
10546$as_echo "$ac_cv_lib_netsnmp_main" >&6; }
10547if test "x$ac_cv_lib_netsnmp_main" = xyes; then :
10548  cat >>confdefs.h <<_ACEOF
10549#define HAVE_LIBNETSNMP 1
10550_ACEOF
10551
10552  LIBS="-lnetsnmp $LIBS"
10553
10554else
10555  as_fn_error $? "Not found Net-SNMP library" "$LINENO" 5
10556fi
10557
10558
10559				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strong SHA auth protocol support" >&5
10560$as_echo_n "checking for strong SHA auth protocol support... " >&6; }
10561		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10562/* end confdefs.h.  */
10563
10564#include <net-snmp/net-snmp-config.h>
10565#include <net-snmp/net-snmp-includes.h>
10566
10567int
10568main ()
10569{
10570
10571struct snmp_session session;
10572session.securityAuthProto = usmHMAC384SHA512AuthProtocol;
10573
10574  ;
10575  return 0;
10576}
10577_ACEOF
10578if ac_fn_c_try_link "$LINENO"; then :
10579
10580
10581$as_echo "#define HAVE_NETSNMP_STRONG_AUTH 1" >>confdefs.h
10582
10583		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10584$as_echo "yes" >&6; }
10585
10586else
10587
10588		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10589$as_echo "no" >&6; }
10590
10591fi
10592rm -f core conftest.err conftest.$ac_objext \
10593    conftest$ac_exeext conftest.$ac_ext
10594
10595				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strong AES privacy protocol support" >&5
10596$as_echo_n "checking for strong AES privacy protocol support... " >&6; }
10597		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598/* end confdefs.h.  */
10599
10600#include <net-snmp/net-snmp-config.h>
10601#include <net-snmp/net-snmp-includes.h>
10602
10603int
10604main ()
10605{
10606
10607struct snmp_session session;
10608session.securityPrivProto = usmAES256PrivProtocol;
10609
10610  ;
10611  return 0;
10612}
10613_ACEOF
10614if ac_fn_c_try_link "$LINENO"; then :
10615
10616
10617$as_echo "#define HAVE_NETSNMP_STRONG_PRIV 1" >>confdefs.h
10618
10619		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10620$as_echo "yes" >&6; }
10621
10622else
10623
10624		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
10626
10627fi
10628rm -f core conftest.err conftest.$ac_objext \
10629    conftest$ac_exeext conftest.$ac_ext
10630
10631				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for localname in struct snmp_session" >&5
10632$as_echo_n "checking for localname in struct snmp_session... " >&6; }
10633		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634/* end confdefs.h.  */
10635
10636#include <net-snmp/net-snmp-config.h>
10637#include <net-snmp/net-snmp-includes.h>
10638int
10639main ()
10640{
10641
10642struct snmp_session session;
10643session.localname = "";
10644
10645  ;
10646  return 0;
10647}
10648_ACEOF
10649if ac_fn_c_try_compile "$LINENO"; then :
10650
10651$as_echo "#define HAVE_NETSNMP_SESSION_LOCALNAME 1" >>confdefs.h
10652
10653		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10654$as_echo "yes" >&6; }
10655else
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658fi
10659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10660
10661		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662/* end confdefs.h.  */
10663
10664#include <net-snmp/net-snmp-config.h>
10665#include <net-snmp/net-snmp-includes.h>
10666int
10667main ()
10668{
10669
10670struct snmp_session session;
10671
10672session.securityPrivProto = usmDESPrivProtocol;
10673
10674  ;
10675  return 0;
10676}
10677_ACEOF
10678if ac_fn_c_try_compile "$LINENO"; then :
10679
10680$as_echo "#define HAVE_NETSNMP_SESSION_DES 1" >>confdefs.h
10681
10682		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10683$as_echo "yes" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10689
10690		CFLAGS="$_save_netsnmp_cflags"
10691		LDFLAGS="$_save_netsnmp_ldflags"
10692		LIBS="$_save_netsnmp_libs"
10693		unset _save_netsnmp_cflags
10694		unset _save_netsnmp_ldflags
10695		unset _save_netsnmp_libs
10696
10697
10698$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
10699
10700
10701		found_netsnmp="yes"
10702	else
10703		found_netsnmp="no"
10704	fi
10705  fi
10706
10707
10708
10709
10710
10711
10712	if test "x$want_netsnmp" = "xyes"; then
10713		if test "x$found_netsnmp" != "xyes"; then
10714			as_fn_error $? "Invalid Net-SNMP directory - unable to find net-snmp-config" "$LINENO" 5
10715		else
10716			have_snmp="yes"
10717		fi
10718	fi
10719	SERVER_LDFLAGS="$SNMP_LDFLAGS $SERVER_LDFLAGS"
10720	SERVER_LIBS="$SERVER_LIBS $SNMP_LIBS"
10721
10722	PROXY_LDFLAGS="$SNMP_LDFLAGS $PROXY_LDFLAGS"
10723	PROXY_LIBS="$PROXY_LIBS $SNMP_LIBS"
10724
10725
10726
10727
10728
10729
10730# Check whether --with-ssh2 was given.
10731if test "${with_ssh2+set}" = set; then :
10732  withval=$with_ssh2;
10733	if test "$withval" = "no"; then
10734	    want_ssh2="no"
10735	    _libssh2_dir="no"
10736	elif test "$withval" = "yes"; then
10737	    want_ssh2="yes"
10738	    _libssh2_dir="no"
10739	else
10740	    want_ssh2="yes"
10741	    _libssh2_dir=$withval
10742	fi
10743	accept_ssh2_version="no"
10744
10745else
10746  want_ssh2=no
10747
10748fi
10749
10750
10751  if test "x$want_ssh2" = "xyes"; then
10752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH2 support" >&5
10753$as_echo_n "checking for SSH2 support... " >&6; }
10754     if test "x$_libssh2_dir" = "xno"; then
10755       if test -f /usr/include/libssh2.h; then
10756         SSH2_CFLAGS=-I/usr/include
10757         SSH2_LDFLAGS=-L/usr/lib
10758         SSH2_LIBS="-lssh2"
10759         found_ssh2="yes"
10760
10761	# Zabbix minimal major supported version of libssh2:
10762	minimal_libssh2_major_version=1
10763
10764	# get the major version
10765	found_ssh2_version_major=`cat /usr/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10766
10767	accept_ssh2_version="no"
10768
10769	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10770		accept_ssh2_version="yes"
10771	fi;
10772
10773       elif test -f /usr/local/include/libssh2.h; then
10774         SSH2_CFLAGS=-I/usr/local/include
10775         SSH2_LDFLAGS=-L/usr/local/lib
10776         SSH2_LIBS="-lssh2"
10777         found_ssh2="yes"
10778
10779	# Zabbix minimal major supported version of libssh2:
10780	minimal_libssh2_major_version=1
10781
10782	# get the major version
10783	found_ssh2_version_major=`cat /usr/local/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10784
10785	accept_ssh2_version="no"
10786
10787	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10788		accept_ssh2_version="yes"
10789	fi;
10790
10791       else #libraries are not found in default directories
10792         found_ssh2="no"
10793         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794$as_echo "no" >&6; }
10795       fi # test -f /usr/include/libssh2.h; then
10796     else # test "x$_libssh2_dir" = "xno"; then
10797       if test -f $_libssh2_dir/include/libssh2.h; then
10798	 SSH2_CFLAGS=-I$_libssh2_dir/include
10799         SSH2_LDFLAGS=-L$_libssh2_dir/lib
10800         SSH2_LIBS="-lssh2"
10801         found_ssh2="yes"
10802
10803	# Zabbix minimal major supported version of libssh2:
10804	minimal_libssh2_major_version=1
10805
10806	# get the major version
10807	found_ssh2_version_major=`cat $_libssh2_dir/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10808
10809	accept_ssh2_version="no"
10810
10811	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10812		accept_ssh2_version="yes"
10813	fi;
10814
10815       else #if test -f $_libssh2_dir/include/libssh2.h; then
10816         found_ssh2="no"
10817         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818$as_echo "no" >&6; }
10819       fi #test -f $_libssh2_dir/include/libssh2.h; then
10820     fi #if test "x$_libssh2_dir" = "xno"; then
10821  fi # if test "x$want_ssh2" != "xno"; then
10822
10823  if test "x$found_ssh2" = "xyes"; then
10824    am_save_cflags="$CFLAGS"
10825    am_save_ldflags="$LDFLAGS"
10826    am_save_libs="$LIBS"
10827
10828    CFLAGS="$CFLAGS $SSH2_CFLAGS"
10829    LDFLAGS="$LDFLAGS $SSH2_LDFLAGS"
10830    LIBS="$LIBS $SSH2_LIBS"
10831
10832    found_ssh2="no"
10833
10834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10835/* end confdefs.h.  */
10836
10837#include <libssh2.h>
10838
10839int
10840main ()
10841{
10842
10843	LIBSSH2_SESSION	*session;
10844	session = libssh2_session_init();
10845
10846  ;
10847  return 0;
10848}
10849_ACEOF
10850if ac_fn_c_try_link "$LINENO"; then :
10851  found_ssh2="yes"
10852fi
10853rm -f core conftest.err conftest.$ac_objext \
10854    conftest$ac_exeext conftest.$ac_ext
10855
10856
10857    CFLAGS="$am_save_cflags"
10858    LDFLAGS="$am_save_ldflags"
10859    LIBS="$am_save_libs"
10860
10861    if test "x$found_ssh2" = "xyes"; then
10862
10863$as_echo "#define HAVE_SSH2 1" >>confdefs.h
10864
10865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10866$as_echo "yes" >&6; }
10867    else
10868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869$as_echo "no" >&6; }
10870      SSH2_CFLAGS=""
10871      SSH2_LDFLAGS=""
10872      SSH2_LIBS=""
10873    fi
10874  fi
10875
10876
10877
10878
10879
10880
10881
10882
10883# Check whether --with-ssh was given.
10884if test "${with_ssh+set}" = set; then :
10885  withval=$with_ssh;
10886	if test "$withval" = "no"; then
10887	    want_ssh="no"
10888	    _libssh_dir="no"
10889	elif test "$withval" = "yes"; then
10890	    want_ssh="yes"
10891	    _libssh_dir="no"
10892	else
10893	    want_ssh="yes"
10894	    _libssh_dir=$withval
10895	fi
10896	accept_ssh_version="no"
10897
10898else
10899  want_ssh=no
10900
10901fi
10902
10903
10904  if test "x$want_ssh" = "xyes"; then
10905     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH support" >&5
10906$as_echo_n "checking for SSH support... " >&6; }
10907     if test "x$_libssh_dir" = "xno"; then
10908       if test -f /usr/include/libssh/libssh_version.h; then
10909         SSH_CFLAGS=-I/usr/include
10910         SSH_LDFLAGS=-L/usr/lib
10911         SSH_LIBS="-lssh"
10912         found_ssh="yes"
10913
10914	# Zabbix minimal major supported version of libssh:
10915	minimal_libssh_major_version=0
10916	minimal_libssh_minor_version=6
10917
10918	# get the major version
10919	found_ssh_version_major=`cat /usr/include/libssh/libssh_version.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10920	found_ssh_version_minor=`cat /usr/include/libssh/libssh_version.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10921
10922	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10923		accept_ssh_version="yes"
10924	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10925		accept_ssh_version="no"
10926	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10927		accept_ssh_version="yes"
10928	else
10929		accept_ssh_version="no"
10930	fi;
10931
10932       elif test -f /usr/include/libssh/libssh.h; then
10933         SSH_CFLAGS=-I/usr/include
10934         SSH_LDFLAGS=-L/usr/lib
10935         SSH_LIBS="-lssh"
10936         found_ssh="yes"
10937
10938	# Zabbix minimal major supported version of libssh:
10939	minimal_libssh_major_version=0
10940	minimal_libssh_minor_version=6
10941
10942	# get the major version
10943	found_ssh_version_major=`cat /usr/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10944	found_ssh_version_minor=`cat /usr/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10945
10946	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10947		accept_ssh_version="yes"
10948	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10949		accept_ssh_version="no"
10950	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10951		accept_ssh_version="yes"
10952	else
10953		accept_ssh_version="no"
10954	fi;
10955
10956       elif test -f /usr/local/include/libssh/libssh.h; then
10957         SSH_CFLAGS=-I/usr/local/include
10958         SSH_LDFLAGS=-L/usr/local/lib
10959         SSH_LIBS="-lssh"
10960         found_ssh="yes"
10961
10962	# Zabbix minimal major supported version of libssh:
10963	minimal_libssh_major_version=0
10964	minimal_libssh_minor_version=6
10965
10966	# get the major version
10967	found_ssh_version_major=`cat /usr/local/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10968	found_ssh_version_minor=`cat /usr/local/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10969
10970	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10971		accept_ssh_version="yes"
10972	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10973		accept_ssh_version="no"
10974	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10975		accept_ssh_version="yes"
10976	else
10977		accept_ssh_version="no"
10978	fi;
10979
10980       else #libraries are not found in default directories
10981         found_ssh="no"
10982         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10983$as_echo "no" >&6; }
10984       fi # test -f /usr/include/libssh/libssh.h; then
10985     else # test "x$_libssh_dir" = "xno"; then
10986       if test -f $_libssh_dir/include/libssh/libssh.h; then
10987	 SSH_CFLAGS=-I$_libssh_dir/include
10988         SSH_LDFLAGS=-L$_libssh_dir/lib
10989         SSH_LIBS="-lssh"
10990         found_ssh="yes"
10991
10992	# Zabbix minimal major supported version of libssh:
10993	minimal_libssh_major_version=0
10994	minimal_libssh_minor_version=6
10995
10996	# get the major version
10997	found_ssh_version_major=`cat $_libssh_dir/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10998	found_ssh_version_minor=`cat $_libssh_dir/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10999
11000	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
11001		accept_ssh_version="yes"
11002	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
11003		accept_ssh_version="no"
11004	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
11005		accept_ssh_version="yes"
11006	else
11007		accept_ssh_version="no"
11008	fi;
11009
11010       else #if test -f $_libssh_dir/include/libssh/libssh.h; then
11011         found_ssh="no"
11012         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11013$as_echo "no" >&6; }
11014       fi #test -f $_libssh_dir/include/libssh/libssh.h; then
11015     fi #if test "x$_libssh_dir" = "xno"; then
11016  fi # if test "x$want_ssh" != "xno"; then
11017
11018  if test "x$found_ssh" = "xyes"; then
11019    am_save_cflags="$CFLAGS"
11020    am_save_ldflags="$LDFLAGS"
11021    am_save_libs="$LIBS"
11022
11023    CFLAGS="$CFLAGS $SSH_CFLAGS"
11024    LDFLAGS="$LDFLAGS $SSH_LDFLAGS"
11025    LIBS="$LIBS $SSH_LIBS"
11026
11027    found_ssh="no"
11028
11029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11030/* end confdefs.h.  */
11031
11032#include <libssh/libssh.h>
11033
11034int
11035main ()
11036{
11037
11038	ssh_session my_ssh_session;
11039	my_ssh_session = ssh_new();
11040
11041  ;
11042  return 0;
11043}
11044_ACEOF
11045if ac_fn_c_try_link "$LINENO"; then :
11046  found_ssh="yes"
11047fi
11048rm -f core conftest.err conftest.$ac_objext \
11049    conftest$ac_exeext conftest.$ac_ext
11050
11051
11052    CFLAGS="$am_save_cflags"
11053    LDFLAGS="$am_save_ldflags"
11054    LIBS="$am_save_libs"
11055
11056    if test "x$found_ssh" = "xyes"; then
11057
11058$as_echo "#define HAVE_SSH 1" >>confdefs.h
11059
11060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11061$as_echo "yes" >&6; }
11062    else
11063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11064$as_echo "no" >&6; }
11065      SSH_CFLAGS=""
11066      SSH_LDFLAGS=""
11067      SSH_LIBS=""
11068    fi
11069  fi
11070
11071
11072
11073
11074
11075
11076	if test "x$want_ssh2" = "xyes"; then
11077		if test "x$want_ssh" != "xno"; then
11078			as_fn_error $? "You can configure for only one SSH library (--with-ssh or --with-ssh2)." "$LINENO" 5
11079		fi
11080
11081		if test "x$found_ssh2" != "xyes"; then
11082			as_fn_error $? "SSH2 library not found" "$LINENO" 5
11083		elif test "x$accept_ssh2_version" != "xyes"; then
11084			as_fn_error $? "SSH2 library version requirement not met (>= 1.0.0)" "$LINENO" 5
11085		else
11086			have_ssh="yes (libssh2)"
11087		fi
11088	fi
11089	SERVER_LDFLAGS="$SERVER_LDFLAGS $SSH2_LDFLAGS"
11090	SERVER_LIBS="$SERVER_LIBS $SSH2_LIBS"
11091
11092	PROXY_LDFLAGS="$PROXY_LDFLAGS $SSH2_LDFLAGS"
11093	PROXY_LIBS="$PROXY_LIBS $SSH2_LIBS"
11094
11095
11096
11097		if test "x$want_ssh" = "xyes"; then
11098		if test "x$found_ssh" != "xyes"; then
11099			as_fn_error $? "SSH library not found" "$LINENO" 5
11100		elif test "x$accept_ssh_version" != "xyes"; then
11101			as_fn_error $? "SSH library version requirement not met (>= 0.6.0)" "$LINENO" 5
11102		else
11103			have_ssh="yes (libssh)"
11104		fi
11105	fi
11106	SERVER_LDFLAGS="$SERVER_LDFLAGS $SSH_LDFLAGS"
11107	SERVER_LIBS="$SERVER_LIBS $SSH_LIBS"
11108
11109	PROXY_LDFLAGS="$PROXY_LDFLAGS $SSH_LDFLAGS"
11110	PROXY_LIBS="$PROXY_LIBS $SSH_LIBS"
11111
11112
11113
11114	found_openipmi="no"
11115
11116
11117# Check whether --with-openipmi was given.
11118if test "${with_openipmi+set}" = set; then :
11119  withval=$with_openipmi;  if test "$withval" = "no"; then
11120            want_openipmi="no"
11121            _libopenipmi_with="no"
11122        elif test "$withval" = "yes"; then
11123            want_openipmi="yes"
11124            _libopenipmi_with="yes"
11125        else
11126            want_openipmi="yes"
11127            _libopenipmi_with=$withval
11128        fi
11129
11130else
11131  _libopenipmi_with=no
11132fi
11133
11134
11135  if test "x$_libopenipmi_with" != x"no"; then
11136       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENIPMI support" >&5
11137$as_echo_n "checking for OPENIPMI support... " >&6; }
11138
11139       if test "$_libopenipmi_with" = "yes"; then
11140               if test -f /usr/local/include/OpenIPMI/ipmiif.h; then
11141                       OPENIPMI_INCDIR=/usr/local/include
11142                       OPENIPMI_LIBDIR=/usr/local/lib
11143		       found_openipmi="yes"
11144               elif test -f /usr/include/OpenIPMI/ipmiif.h; then
11145                       OPENIPMI_INCDIR=/usr/include
11146                       OPENIPMI_LIBDIR=/usr/lib
11147		       found_openipmi="yes"
11148               else
11149                       found_openipmi="no"
11150                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
11152               fi
11153       else
11154               if test -f $_libopenipmi_with/include/OpenIPMI/ipmiif.h; then
11155                       OPENIPMI_INCDIR=$_libopenipmi_with/include
11156                       OPENIPMI_LIBDIR=$_libopenipmi_with/lib
11157		       found_openipmi="yes"
11158               else
11159                       found_openipmi="no"
11160                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11161$as_echo "no" >&6; }
11162               fi
11163       fi
11164
11165       if test "x$found_openipmi" != "xno" ; then
11166               OPENIPMI_CFLAGS="-I$OPENIPMI_INCDIR"
11167               OPENIPMI_LDFLAGS="-L$OPENIPMI_LIBDIR"
11168               OPENIPMI_LIBS="-lOpenIPMI -lOpenIPMIposix"
11169
11170               found_openipmi="yes"
11171
11172$as_echo "#define HAVE_OPENIPMI 1" >>confdefs.h
11173
11174
11175$as_echo "#define OPENIPMI_DEPRECATED 1" >>confdefs.h
11176
11177               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11178$as_echo "yes" >&6; }
11179	fi
11180  fi
11181
11182
11183
11184
11185
11186  unset _libopenipmi_with
11187
11188	if test "x$want_openipmi" = "xyes"; then
11189		if test "x$found_openipmi" != "xyes"; then
11190			as_fn_error $? "Invalid OPENIPMI directory - unable to find ipmiif.h" "$LINENO" 5
11191		else
11192			have_ipmi="yes"
11193		fi
11194	fi
11195
11196	SERVER_LDFLAGS="$SERVER_LDFLAGS $OPENIPMI_LDFLAGS"
11197	SERVER_LIBS="$SERVER_LIBS $OPENIPMI_LIBS"
11198
11199	PROXY_LDFLAGS="$PROXY_LDFLAGS $OPENIPMI_LDFLAGS"
11200	PROXY_LIBS="$PROXY_LIBS $OPENIPMI_LIBS"
11201
11202
11203
11204
11205
11206# Check whether --with-zlib was given.
11207if test "${with_zlib+set}" = set; then :
11208  withval=$with_zlib;
11209			test "x$withval" = "xyes" && withval=/usr
11210			ZLIB_CFLAGS="-I$withval/include"
11211			ZLIB_LDFLAGS="-L$withval/lib"
11212			_zlib_dir_set="yes"
11213
11214
11215fi
11216
11217
11218
11219# Check whether --with-zlib-include was given.
11220if test "${with_zlib_include+set}" = set; then :
11221  withval=$with_zlib_include;
11222			ZLIB_CFLAGS="-I$withval"
11223			_zlib_dir_set="yes"
11224
11225
11226fi
11227
11228
11229
11230# Check whether --with-zlib-lib was given.
11231if test "${with_zlib_lib+set}" = set; then :
11232  withval=$with_zlib_lib;
11233			ZLIB_LDFLAGS="-L$withval"
11234			_zlib_dir_set="yes"
11235
11236
11237fi
11238
11239
11240	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib support" >&5
11241$as_echo_n "checking for zlib support... " >&6; }
11242
11243	ZLIB_LIBS="-lz"
11244
11245	if test -n "$_zlib_dir_set" -o -f /usr/include/zlib.h; then
11246		found_zlib="yes"
11247	elif test -f /usr/local/include/zlib.h; then
11248		ZLIB_CFLAGS="-I/usr/local/include"
11249		ZLIB_LDFLAGS="-L/usr/local/lib"
11250		found_zlib="yes"
11251	elif test -f /usr/pkg/include/zlib.h; then
11252		ZLIB_CFLAGS="-I/usr/pkg/include"
11253		ZLIB_LDFLAGS="-L/usr/pkg/lib"
11254		found_zlib="yes"
11255	else
11256		found_zlib="no"
11257		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
11259	fi
11260
11261	if test "x$found_zlib" = "xyes"; then
11262		am_save_CFLAGS="$CFLAGS"
11263		am_save_LDFLAGS="$LDFLAGS"
11264		am_save_LIBS="$LIBS"
11265
11266		CFLAGS="$CFLAGS $ZLIB_CFLAGS"
11267		LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
11268		LIBS="$LIBS $ZLIB_LIBS"
11269
11270
11271found_zlib=no
11272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11273/* end confdefs.h.  */
11274
11275#include <zlib.h>
11276
11277int
11278main ()
11279{
11280
11281	z_stream	defstream;
11282	deflateInit(&defstream, Z_BEST_COMPRESSION);
11283
11284  ;
11285  return 0;
11286}
11287_ACEOF
11288if ac_fn_c_try_link "$LINENO"; then :
11289  found_zlib="yes"
11290fi
11291rm -f core conftest.err conftest.$ac_objext \
11292    conftest$ac_exeext conftest.$ac_ext
11293
11294
11295		CFLAGS="$am_save_CFLAGS"
11296		LDFLAGS="$am_save_LDFLAGS"
11297		LIBS="$am_save_LIBS"
11298	fi
11299
11300	if test "x$found_zlib" = "xyes"; then
11301
11302$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
11303
11304		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11305$as_echo "yes" >&6; }
11306	else
11307		ZLIB_CFLAGS=""
11308		ZLIB_LDFLAGS=""
11309		ZLIB_LIBS=""
11310	fi
11311
11312
11313
11314
11315
11316	if test "x$found_zlib" != "xyes"; then
11317		as_fn_error $? "Unable to use zlib (zlib check failed)" "$LINENO" 5
11318	fi
11319
11320
11321
11322
11323
11324# Check whether --with-libpthread was given.
11325if test "${with_libpthread+set}" = set; then :
11326  withval=$with_libpthread;
11327			test "x$withval" = "xyes" && withval=/usr
11328			LIBPTHREAD_CFLAGS="-I$withval/include"
11329			LIBPTHREAD_LDFLAGS="-L$withval/lib"
11330			_libpthread_dir_set="yes"
11331
11332
11333fi
11334
11335
11336
11337# Check whether --with-libpthread-include was given.
11338if test "${with_libpthread_include+set}" = set; then :
11339  withval=$with_libpthread_include;
11340			LIBPTHREAD_CFLAGS="-I$withval"
11341			_libpthread_dir_set="yes"
11342
11343
11344fi
11345
11346
11347
11348# Check whether --with-libpthread-lib was given.
11349if test "${with_libpthread_lib+set}" = set; then :
11350  withval=$with_libpthread_lib;
11351			LIBPTHREAD_LDFLAGS="-L$withval"
11352			_libpthread_dir_set="yes"
11353
11354
11355fi
11356
11357
11358	ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11359if test "x$ac_cv_header_pthread_h" = xyes; then :
11360  found_libpthread=yes
11361fi
11362
11363
11364	LIBPTHREAD_LIBS="-lpthread"
11365	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for process shared libpthread support" >&5
11366$as_echo_n "checking for process shared libpthread support... " >&6; }
11367
11368	if test -n "$_libpthread_dir_set" -o "x$found_libpthread" = xyes; then
11369		found_libpthread="yes"
11370	elif test -f /usr/local/include/pthread.h; then
11371		LIBPTHREAD_CFLAGS="-I/usr/local/include"
11372		LIBPTHREAD_LDFLAGS="-L/usr/local/lib"
11373		found_libpthread="yes"
11374	elif test -f /usr/pkg/include/pthread.h; then
11375		LIBPTHREAD_CFLAGS="-I/usr/pkg/include"
11376		LIBPTHREAD_LDFLAGS="-L/usr/pkg/lib"
11377		LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/usr/pkg/lib"
11378		found_libpthread="yes"
11379	elif test -f /opt/csw/include/pthread.h; then
11380		LIBPTHREAD_CFLAGS="-I/opt/csw/include"
11381		LIBPTHREAD_LDFLAGS="-L/opt/csw/lib"
11382		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
11383			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
11384		else
11385			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/opt/csw/lib"
11386		fi
11387		found_libpthread="yes"
11388	else
11389		found_libpthread="no"
11390		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
11392	fi
11393
11394	if test "x$found_libpthread" = "xyes"; then
11395		am_save_CFLAGS="$CFLAGS"
11396		am_save_LDFLAGS="$LDFLAGS"
11397		am_save_LIBS="$LIBS"
11398
11399		CFLAGS="$CFLAGS $LIBPTHREAD_CFLAGS"
11400		LDFLAGS="$LDFLAGS $LIBPTHREAD_LDFLAGS"
11401		LIBS="$LIBS $LIBPTHREAD_LIBS"
11402
11403		found_libpthread="no"
11404		found_libpthread_process_shared="no"
11405
11406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11407/* end confdefs.h.  */
11408
11409#include <pthread.h>
11410
11411int
11412main ()
11413{
11414
11415	pthread_mutexattr_t	mta;
11416	pthread_mutex_t		mutex;
11417
11418	pthread_mutexattr_init(&mta);
11419	pthread_mutex_init(&mutex, &mta);
11420
11421  ;
11422  return 0;
11423}
11424_ACEOF
11425if ac_fn_c_try_link "$LINENO"; then :
11426  found_libpthread="yes"
11427fi
11428rm -f core conftest.err conftest.$ac_objext \
11429    conftest$ac_exeext conftest.$ac_ext
11430
11431
11432	if test "$cross_compiling" = yes; then :
11433  found_libpthread_process_shared="no"
11434else
11435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11436/* end confdefs.h.  */
11437
11438		#include <pthread.h>
11439
11440		int	main()
11441		{
11442			pthread_mutexattr_t	mta;
11443			pthread_rwlockattr_t	rwa;
11444			pthread_mutex_t		mutex;
11445			pthread_rwlock_t	rwlock;
11446
11447			if (0 != pthread_mutexattr_init(&mta))
11448				return 1;
11449
11450			if (0 != pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED))
11451				return 2;
11452
11453			if (0 != pthread_mutex_init(&mutex, &mta))
11454				return 3;
11455
11456			if (0 != pthread_rwlockattr_init(&rwa))
11457				return 4;
11458
11459			if (0 != pthread_rwlockattr_setpshared(&rwa, PTHREAD_PROCESS_SHARED))
11460				return 5;
11461
11462			if (0 != pthread_rwlock_init(&rwlock, &rwa))
11463				return 6;
11464
11465			return 0;
11466		}
11467
11468
11469
11470_ACEOF
11471if ac_fn_c_try_run "$LINENO"; then :
11472  found_libpthread_process_shared="yes"
11473else
11474  found_libpthread_process_shared="no"
11475fi
11476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11477  conftest.$ac_objext conftest.beam conftest.$ac_ext
11478fi
11479
11480
11481
11482		CFLAGS="$am_save_CFLAGS"
11483		LDFLAGS="$am_save_LDFLAGS"
11484		LIBS="$am_save_LIBS"
11485	fi
11486
11487	if test "x$found_libpthread" = "xyes"; then
11488		if test "x$found_libpthread_process_shared" = "xyes"; then
11489
11490$as_echo "#define HAVE_PTHREAD_PROCESS_SHARED 1" >>confdefs.h
11491
11492		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493$as_echo "yes" >&6; }
11494		else
11495		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
11497		fi
11498	else
11499		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
11501		LIBPTHREAD_CFLAGS=""
11502		LIBPTHREAD_LDFLAGS=""
11503		LIBPTHREAD_LIBS=""
11504	fi
11505
11506
11507
11508
11509
11510	if test "x$found_libpthread" != "xyes"; then
11511		as_fn_error $? "Unable to use libpthread (libpthread check failed)" "$LINENO" 5
11512	fi
11513fi
11514
11515SERVER_LDFLAGS="$SERVER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11516SERVER_LIBS="$SERVER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11517
11518PROXY_LDFLAGS="$PROXY_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11519PROXY_LIBS="$PROXY_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11520
11521AGENT_LDFLAGS="$AGENT_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11522AGENT_LIBS="$AGENT_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11523
11524AGENT2_LDFLAGS="$AGENT2_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11525AGENT2_LIBS="$AGENT2_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11526
11527ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11528ZBXGET_LIBS="$ZBXGET_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11529
11530SENDER_LDFLAGS="$SENDER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11531SENDER_LIBS="$SENDER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11532
11533ZBXJS_LDFLAGS="$ZBXJS_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11534ZBXJS_LIBS="$ZBXJS_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11535
11536 if test "x$have_ipmi" = "xyes"; then
11537  HAVE_IPMI_TRUE=
11538  HAVE_IPMI_FALSE='#'
11539else
11540  HAVE_IPMI_TRUE='#'
11541  HAVE_IPMI_FALSE=
11542fi
11543
11544 if test "x$have_libxml2" = "xyes"; then
11545  HAVE_LIBXML2_TRUE=
11546  HAVE_LIBXML2_FALSE='#'
11547else
11548  HAVE_LIBXML2_TRUE='#'
11549  HAVE_LIBXML2_FALSE=
11550fi
11551
11552
11553have_ipcservice="no"
11554if test "x$have_ipmi" = "xyes"; then
11555	have_ipcservice="yes"
11556fi
11557
11558if test "x$server" = "xyes"; then
11559	have_ipcservice="yes"
11560fi
11561
11562if test "x$proxy" = "xyes"; then
11563	have_ipcservice="yes"
11564fi
11565
11566 if test "x$have_ipmi" = "xyes"; then
11567  PROXY_IPCSERVICE_TRUE=
11568  PROXY_IPCSERVICE_FALSE='#'
11569else
11570  PROXY_IPCSERVICE_TRUE='#'
11571  PROXY_IPCSERVICE_FALSE=
11572fi
11573
11574
11575if test "x$have_ipcservice" = "xyes"; then
11576
11577$as_echo "#define HAVE_IPCSERVICE 1" >>confdefs.h
11578
11579
11580
11581
11582# Check whether --with-libevent was given.
11583if test "${with_libevent+set}" = set; then :
11584  withval=$with_libevent;
11585			test "x$withval" = "xyes" && withval=/usr
11586			LIBEVENT_CFLAGS="-I$withval/include"
11587			LIBEVENT_LDFLAGS="-L$withval/lib"
11588			_libevent_dir_set="yes"
11589
11590
11591fi
11592
11593
11594
11595# Check whether --with-libevent-include was given.
11596if test "${with_libevent_include+set}" = set; then :
11597  withval=$with_libevent_include;
11598			LIBEVENT_CFLAGS="-I$withval"
11599			_libevent_dir_set="yes"
11600
11601
11602fi
11603
11604
11605
11606# Check whether --with-libevent-lib was given.
11607if test "${with_libevent_lib+set}" = set; then :
11608  withval=$with_libevent_lib;
11609			LIBEVENT_LDFLAGS="-L$withval"
11610			_libevent_dir_set="yes"
11611
11612
11613fi
11614
11615
11616	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent support" >&5
11617$as_echo_n "checking for libevent support... " >&6; }
11618
11619	LIBEVENT_LIBS="-levent"
11620
11621	if test -n "$_libevent_dir_set" -o -f /usr/include/event.h; then
11622		found_libevent="yes"
11623	elif test -f /usr/local/include/event.h; then
11624		LIBEVENT_CFLAGS="-I/usr/local/include"
11625		LIBEVENT_LDFLAGS="-L/usr/local/lib"
11626		found_libevent="yes"
11627	else
11628		found_libevent="no"
11629		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
11631	fi
11632
11633	if test "x$found_libevent" = "xyes"; then
11634		am_save_CFLAGS="$CFLAGS"
11635		am_save_LDFLAGS="$LDFLAGS"
11636		am_save_LIBS="$LIBS"
11637
11638		CFLAGS="$CFLAGS $LIBEVENT_CFLAGS"
11639		LDFLAGS="$LDFLAGS $LIBEVENT_LDFLAGS"
11640		LIBS="$LIBS $LIBEVENT_LIBS"
11641
11642		found_libevent="no"
11643
11644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645/* end confdefs.h.  */
11646
11647#include <stdlib.h>
11648#include <event.h>
11649
11650int
11651main ()
11652{
11653
11654	event_init();
11655
11656  ;
11657  return 0;
11658}
11659_ACEOF
11660if ac_fn_c_try_link "$LINENO"; then :
11661  found_libevent="yes"
11662fi
11663rm -f core conftest.err conftest.$ac_objext \
11664    conftest$ac_exeext conftest.$ac_ext
11665
11666
11667		CFLAGS="$am_save_CFLAGS"
11668		LDFLAGS="$am_save_LDFLAGS"
11669		LIBS="$am_save_LIBS"
11670	fi
11671
11672	if test "x$found_libevent" = "xyes"; then
11673
11674$as_echo "#define HAVE_LIBEVENT 1" >>confdefs.h
11675
11676		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11677$as_echo "yes" >&6; }
11678	else
11679		LIBEVENT_CFLAGS=""
11680		LIBEVENT_LDFLAGS=""
11681		LIBEVENT_LIBS=""
11682	fi
11683
11684
11685
11686
11687
11688	if test "x$found_libevent" != "xyes"; then
11689		as_fn_error $? "Unable to use libevent (libevent check failed)" "$LINENO" 5
11690	fi
11691
11692	SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBEVENT_LDFLAGS"
11693	SERVER_LIBS="$SERVER_LIBS $LIBEVENT_LIBS"
11694
11695	PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBEVENT_LDFLAGS"
11696	PROXY_LIBS="$PROXY_LIBS $LIBEVENT_LIBS"
11697fi
11698
11699
11700
11701# Check whether --with-gnutls was given.
11702if test "${with_gnutls+set}" = set; then :
11703  withval=$with_gnutls;
11704	if test "$withval" = "no"; then
11705	    want_gnutls="no"
11706	    _libgnutls_dir="no"
11707	elif test "$withval" = "yes"; then
11708	    want_gnutls="yes"
11709	    _libgnutls_dir="no"
11710	else
11711	    want_gnutls="yes"
11712	    _libgnutls_dir=$withval
11713	fi
11714	accept_gnutls_version="no"
11715
11716else
11717  want_gnutls=no
11718
11719fi
11720
11721
11722  if test "x$want_gnutls" = "xyes"; then
11723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GnuTLS support" >&5
11724$as_echo_n "checking for GnuTLS support... " >&6; }
11725     if test "x$_libgnutls_dir" = "xno"; then
11726       if test -f /usr/local/include/gnutls/gnutls.h; then
11727         GNUTLS_CFLAGS=-I/usr/local/include
11728         GNUTLS_LDFLAGS=-L/usr/local/lib
11729         GNUTLS_LIBS="-lgnutls"
11730         found_gnutls="yes"
11731
11732	# Zabbix minimal supported version of libgnutls:
11733	minimal_gnutls_version_major=3
11734	minimal_gnutls_version_minor=1
11735	minimal_gnutls_version_patch=18
11736
11737	# get version
11738	found_gnutls_version_major=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11739	found_gnutls_version_minor=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11740	found_gnutls_version_patch=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11741
11742	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11743		accept_gnutls_version="yes"
11744	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11745		accept_gnutls_version="no"
11746	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11747		accept_gnutls_version="yes"
11748	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11749		accept_gnutls_version="no"
11750	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11751		accept_gnutls_version="yes"
11752	else
11753		accept_gnutls_version="no"
11754	fi;
11755
11756       elif test -f /usr/include/gnutls/gnutls.h; then
11757         GNUTLS_CFLAGS=-I/usr/include
11758         GNUTLS_LDFLAGS=-L/usr/lib
11759         GNUTLS_LIBS="-lgnutls"
11760         found_gnutls="yes"
11761
11762	# Zabbix minimal supported version of libgnutls:
11763	minimal_gnutls_version_major=3
11764	minimal_gnutls_version_minor=1
11765	minimal_gnutls_version_patch=18
11766
11767	# get version
11768	found_gnutls_version_major=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11769	found_gnutls_version_minor=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11770	found_gnutls_version_patch=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11771
11772	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11773		accept_gnutls_version="yes"
11774	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11775		accept_gnutls_version="no"
11776	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11777		accept_gnutls_version="yes"
11778	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11779		accept_gnutls_version="no"
11780	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11781		accept_gnutls_version="yes"
11782	else
11783		accept_gnutls_version="no"
11784	fi;
11785
11786       else #libraries are not found in default directories
11787         found_gnutls="no"
11788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11789$as_echo "no" >&6; }
11790       fi
11791     else
11792       if test -f $_libgnutls_dir/include/gnutls/gnutls.h; then
11793         GNUTLS_CFLAGS=-I$_libgnutls_dir/include
11794         GNUTLS_LDFLAGS=-L$_libgnutls_dir/lib
11795         GNUTLS_LIBS="-lgnutls"
11796         found_gnutls="yes"
11797
11798	# Zabbix minimal supported version of libgnutls:
11799	minimal_gnutls_version_major=3
11800	minimal_gnutls_version_minor=1
11801	minimal_gnutls_version_patch=18
11802
11803	# get version
11804	found_gnutls_version_major=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11805	found_gnutls_version_minor=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11806	found_gnutls_version_patch=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11807
11808	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11809		accept_gnutls_version="yes"
11810	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11811		accept_gnutls_version="no"
11812	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11813		accept_gnutls_version="yes"
11814	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11815		accept_gnutls_version="no"
11816	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11817		accept_gnutls_version="yes"
11818	else
11819		accept_gnutls_version="no"
11820	fi;
11821
11822       else
11823         found_gnutls="no"
11824         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11825$as_echo "no" >&6; }
11826       fi
11827     fi
11828  fi
11829
11830  if test "x$found_gnutls" = "xyes"; then
11831    am_save_cflags="$CFLAGS"
11832    am_save_ldflags="$LDFLAGS"
11833    am_save_libs="$LIBS"
11834
11835    CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
11836    LDFLAGS="$LDFLAGS $GNUTLS_LDFLAGS"
11837    LIBS="$LIBS $GNUTLS_LIBS"
11838
11839    found_gnutls="no"
11840
11841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11842/* end confdefs.h.  */
11843
11844#include <gnutls/gnutls.h>
11845
11846int
11847main ()
11848{
11849
11850	gnutls_global_init();
11851
11852  ;
11853  return 0;
11854}
11855_ACEOF
11856if ac_fn_c_try_link "$LINENO"; then :
11857  found_gnutls="yes"
11858fi
11859rm -f core conftest.err conftest.$ac_objext \
11860    conftest$ac_exeext conftest.$ac_ext
11861
11862
11863    CFLAGS="$am_save_cflags"
11864    LDFLAGS="$am_save_ldflags"
11865    LIBS="$am_save_libs"
11866
11867    if test "x$found_gnutls" = "xyes"; then
11868
11869$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11870
11871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11872$as_echo "yes" >&6; }
11873    else
11874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11875$as_echo "no" >&6; }
11876      GNUTLS_CFLAGS=""
11877      GNUTLS_LDFLAGS=""
11878      GNUTLS_LIBS=""
11879    fi
11880  fi
11881
11882
11883
11884
11885
11886
11887if test "x$want_gnutls" = "xyes"; then
11888	if test "x$have_tls" != "xno"; then
11889		as_fn_error $? "You can configure for only one TLS library (--with-gnutls or --with-openssl)." "$LINENO" 5
11890	fi
11891
11892	if test "x$found_gnutls" != "xyes"; then
11893		as_fn_error $? "GnuTLS library libgnutls not found" "$LINENO" 5
11894	elif test "x$accept_gnutls_version" != "xyes"; then
11895		as_fn_error $? "GnuTLS library version requirement not met (>= 3.1.18)" "$LINENO" 5
11896	else
11897		have_tls="GnuTLS"
11898	fi
11899	TLS_CFLAGS="$GNUTLS_CFLAGS"
11900	TLS_LDFLAGS="$GNUTLS_LDFLAGS"
11901	TLS_LIBS="$GNUTLS_LIBS"
11902fi
11903
11904
11905
11906# Check whether --with-openssl was given.
11907if test "${with_openssl+set}" = set; then :
11908  withval=$with_openssl;
11909	if test "$withval" = "no"; then
11910	    want_openssl="no"
11911	    _libopenssl_dir="no"
11912	elif test "$withval" = "yes"; then
11913	    want_openssl="yes"
11914	    _libopenssl_dir="no"
11915	else
11916	    want_openssl="yes"
11917	    _libopenssl_dir=$withval
11918	    _libopenssl_dir_lib="$withval/lib"
11919	fi
11920	accept_openssl_version="no"
11921
11922else
11923  want_openssl=no
11924
11925fi
11926
11927
11928  if test "x$want_openssl" = "xyes"; then
11929
11930    if test "x$enable_static_libs" = "xyes"; then
11931        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
11932
11933
11934
11935
11936
11937
11938
11939
11940if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11941	if test -n "$ac_tool_prefix"; then
11942  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11943set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11945$as_echo_n "checking for $ac_word... " >&6; }
11946if ${ac_cv_path_PKG_CONFIG+:} false; then :
11947  $as_echo_n "(cached) " >&6
11948else
11949  case $PKG_CONFIG in
11950  [\\/]* | ?:[\\/]*)
11951  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11952  ;;
11953  *)
11954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11955for as_dir in $PATH
11956do
11957  IFS=$as_save_IFS
11958  test -z "$as_dir" && as_dir=.
11959    for ac_exec_ext in '' $ac_executable_extensions; do
11960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11961    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11963    break 2
11964  fi
11965done
11966  done
11967IFS=$as_save_IFS
11968
11969  ;;
11970esac
11971fi
11972PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11973if test -n "$PKG_CONFIG"; then
11974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11975$as_echo "$PKG_CONFIG" >&6; }
11976else
11977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
11979fi
11980
11981
11982fi
11983if test -z "$ac_cv_path_PKG_CONFIG"; then
11984  ac_pt_PKG_CONFIG=$PKG_CONFIG
11985  # Extract the first word of "pkg-config", so it can be a program name with args.
11986set dummy pkg-config; ac_word=$2
11987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11988$as_echo_n "checking for $ac_word... " >&6; }
11989if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
11990  $as_echo_n "(cached) " >&6
11991else
11992  case $ac_pt_PKG_CONFIG in
11993  [\\/]* | ?:[\\/]*)
11994  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11995  ;;
11996  *)
11997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11998for as_dir in $PATH
11999do
12000  IFS=$as_save_IFS
12001  test -z "$as_dir" && as_dir=.
12002    for ac_exec_ext in '' $ac_executable_extensions; do
12003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12004    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12006    break 2
12007  fi
12008done
12009  done
12010IFS=$as_save_IFS
12011
12012  ;;
12013esac
12014fi
12015ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12016if test -n "$ac_pt_PKG_CONFIG"; then
12017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12018$as_echo "$ac_pt_PKG_CONFIG" >&6; }
12019else
12020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12021$as_echo "no" >&6; }
12022fi
12023
12024  if test "x$ac_pt_PKG_CONFIG" = x; then
12025    PKG_CONFIG=""
12026  else
12027    case $cross_compiling:$ac_tool_warned in
12028yes:)
12029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12031ac_tool_warned=yes ;;
12032esac
12033    PKG_CONFIG=$ac_pt_PKG_CONFIG
12034  fi
12035else
12036  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12037fi
12038
12039fi
12040if test -n "$PKG_CONFIG"; then
12041	_pkg_min_version=0.9.0
12042	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12043$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12044	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12045		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12046$as_echo "yes" >&6; }
12047	else
12048		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12049$as_echo "no" >&6; }
12050		PKG_CONFIG=""
12051	fi
12052fi
12053        test -z "$PKG_CONFIG" -a -z "$_libopenssl_dir_lib" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
12054
12055    fi
12056
12057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL support" >&5
12058$as_echo_n "checking for OpenSSL support... " >&6; }
12059     if test "x$_libopenssl_dir" = "xno"; then		# if OpenSSL directory is not specified
12060       if test -f /usr/local/include/openssl/ssl.h -a -f /usr/local/include/openssl/crypto.h; then
12061         OPENSSL_CFLAGS=-I/usr/local/include
12062         OPENSSL_LDFLAGS=-L/usr/local/lib
12063         OPENSSL_LIBS="-lssl -lcrypto"
12064         found_openssl="yes"
12065
12066	# Zabbix minimal supported version of OpenSSL.
12067	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
12068	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
12069	minimal_openssl_version=0x1000100
12070
12071	# get version
12072	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "/usr/local/include/openssl/opensslv.h"`
12073	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
12074
12075	# compare versions lexicographically
12076	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
12077	if test "$openssl_version_check" = "1"; then
12078		accept_openssl_version="yes"
12079	else
12080		accept_openssl_version="no"
12081	fi;
12082
12083       elif test -f /usr/include/openssl/ssl.h -a -f /usr/include/openssl/crypto.h; then
12084         OPENSSL_CFLAGS=-I/usr/include
12085         OPENSSL_LDFLAGS=-L/usr/lib
12086         OPENSSL_LIBS="-lssl -lcrypto"
12087         found_openssl="yes"
12088
12089	# Zabbix minimal supported version of OpenSSL.
12090	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
12091	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
12092	minimal_openssl_version=0x1000100
12093
12094	# get version
12095	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "/usr/include/openssl/opensslv.h"`
12096	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
12097
12098	# compare versions lexicographically
12099	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
12100	if test "$openssl_version_check" = "1"; then
12101		accept_openssl_version="yes"
12102	else
12103		accept_openssl_version="no"
12104	fi;
12105
12106       else						# libraries are not found in default directories
12107         found_openssl="no"
12108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12109$as_echo "no" >&6; }
12110       fi
12111     else						# search in the specified OpenSSL directory
12112       if test -f $_libopenssl_dir/include/openssl/ssl.h -a -f $_libopenssl_dir/include/openssl/crypto.h; then
12113         OPENSSL_CFLAGS=-I$_libopenssl_dir/include
12114         OPENSSL_LDFLAGS=-L$_libopenssl_dir/lib
12115         OPENSSL_LIBS="-lssl -lcrypto"
12116         found_openssl="yes"
12117
12118	# Zabbix minimal supported version of OpenSSL.
12119	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
12120	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
12121	minimal_openssl_version=0x1000100
12122
12123	# get version
12124	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "$_libopenssl_dir/include/openssl/opensslv.h"`
12125	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
12126
12127	# compare versions lexicographically
12128	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
12129	if test "$openssl_version_check" = "1"; then
12130		accept_openssl_version="yes"
12131	else
12132		accept_openssl_version="no"
12133	fi;
12134
12135       else						# libraries are not found in specified directories
12136         found_openssl="no"
12137         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138$as_echo "no" >&6; }
12139       fi
12140     fi
12141  fi
12142
12143  if test "x$found_openssl" = "xyes"; then
12144    am_save_cflags="$CFLAGS"
12145    am_save_ldflags="$LDFLAGS"
12146    am_save_libs="$LIBS"
12147
12148    if test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
12149      OPENSSL_LIBS="$_libopenssl_dir_lib/libssl.a $_libopenssl_dir_lib/libcrypto.a"
12150    elif test "x$enable_static_libs" = "xyes"; then
12151      if test -z "$_libopenssl_dir_lib"; then
12152        if test -n "$PKG_CONFIG" && \
12153    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
12154  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
12155  ac_status=$?
12156  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12157  test $ac_status = 0; }; then
12158
12159          OPENSSL_LIBS=`$PKG_CONFIG --static --libs openssl`
12160
12161else
12162
12163          as_fn_error $? "Not found openssl package" "$LINENO" 5
12164
12165fi
12166      else
12167        { { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libopenssl_dir_lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors openssl"; } >&5
12168  (PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors openssl) 2>&5
12169  ac_status=$?
12170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12171  test $ac_status = 0; } || as_fn_error $? "\"Not found openssl package in $_libopenssl_dir/lib/pkgconfig\"" "$LINENO" 5
12172        OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --static --libs openssl`
12173        test -z "$OPENSSL_LIBS" && OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --libs openssl`
12174      fi
12175
12176      if test "x$static_linking_support" = "xno"; then
12177        OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s|-lssl|$_libopenssl_dir_lib/libssl.a|g"|sed "s|-lcrypto|$_libopenssl_dir_lib/libcrypto.a|g"`
12178      else
12179        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"`
12180      fi
12181    fi
12182
12183    CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
12184    LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
12185    LIBS="$OPENSSL_LIBS $LIBS"
12186
12187    found_openssl="no"
12188
12189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190/* end confdefs.h.  */
12191
12192#include <openssl/ssl.h>
12193#include <openssl/bio.h>
12194
12195int
12196main ()
12197{
12198
12199	/* check that both libssl and libcrypto are available */
12200
12201	SSL	*ssl = NULL;
12202
12203	SSL_connect(ssl);	/* a function from libssl, present in both OpenSSL 1.0.1 and 1.1.0 */
12204	BIO_new(BIO_s_mem());	/* a function from libcrypto */
12205
12206  ;
12207  return 0;
12208}
12209_ACEOF
12210if ac_fn_c_try_link "$LINENO"; then :
12211  found_openssl="yes"
12212fi
12213rm -f core conftest.err conftest.$ac_objext \
12214    conftest$ac_exeext conftest.$ac_ext
12215
12216
12217    if test "x$found_openssl" = "xyes"; then
12218
12219$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
12220
12221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12222$as_echo "yes" >&6; }
12223
12224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL supports PSK" >&5
12225$as_echo_n "checking if OpenSSL supports PSK... " >&6; }
12226      found_openssl_with_psk="no"
12227
12228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229/* end confdefs.h.  */
12230
12231#include <openssl/ssl.h>
12232
12233int
12234main ()
12235{
12236
12237	/* check if OPENSSL_NO_PSK is defined */
12238#ifdef OPENSSL_NO_PSK
12239#	error "OPENSSL_NO_PSK is defined. PSK support will not be available."
12240#endif
12241
12242  ;
12243  return 0;
12244}
12245_ACEOF
12246if ac_fn_c_try_link "$LINENO"; then :
12247  found_openssl_with_psk="yes"
12248fi
12249rm -f core conftest.err conftest.$ac_objext \
12250    conftest$ac_exeext conftest.$ac_ext
12251
12252      if test "x$found_openssl_with_psk" = "xyes"; then
12253
12254$as_echo "#define HAVE_OPENSSL_WITH_PSK 1" >>confdefs.h
12255
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12257$as_echo "yes" >&6; }
12258        found_openssl="OpenSSL"
12259      else
12260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261$as_echo "no" >&6; }
12262        found_openssl="OpenSSL (PSK not supported)"
12263      fi
12264
12265    else
12266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12267$as_echo "no" >&6; }
12268      OPENSSL_CFLAGS=""
12269      OPENSSL_LDFLAGS=""
12270      OPENSSL_LIBS=""
12271    fi
12272
12273    CFLAGS="$am_save_cflags"
12274    LDFLAGS="$am_save_ldflags"
12275    LIBS="$am_save_libs"
12276  fi
12277
12278
12279
12280
12281
12282
12283if test "x$want_openssl" = "xyes"; then
12284	if test "x$have_tls" != "xno"; then
12285		as_fn_error $? "You can configure for only one TLS library (--with-gnutls or --with-openssl)." "$LINENO" 5
12286	fi
12287
12288	if test "x$found_openssl" != "xOpenSSL" -a "x$found_openssl" != "xOpenSSL (PSK not supported)"; then
12289		as_fn_error $? "OpenSSL library libssl or libcrypto not found" "$LINENO" 5
12290	elif test "x$accept_openssl_version" != "xyes"; then
12291		as_fn_error $? "OpenSSL library version requirement not met (>= 1.0.1)" "$LINENO" 5
12292	else
12293		have_tls=$found_openssl
12294	fi
12295	TLS_CFLAGS="$OPENSSL_CFLAGS"
12296	TLS_LDFLAGS="$OPENSSL_LDFLAGS"
12297	TLS_LIBS="$OPENSSL_LIBS"
12298fi
12299
12300
12301SERVER_LDFLAGS="$SERVER_LDFLAGS $TLS_LDFLAGS"
12302SERVER_LIBS="$SERVER_LIBS $TLS_LIBS"
12303
12304PROXY_LDFLAGS="$PROXY_LDFLAGS $TLS_LDFLAGS"
12305PROXY_LIBS="$PROXY_LIBS $TLS_LIBS"
12306
12307AGENT_LDFLAGS="$AGENT_LDFLAGS $TLS_LDFLAGS"
12308AGENT_LIBS="$AGENT_LIBS $TLS_LIBS"
12309
12310AGENT2_LDFLAGS="$AGENT2_LDFLAGS $TLS_LDFLAGS"
12311AGENT2_LIBS="$AGENT2_LIBS $TLS_LIBS"
12312
12313ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $TLS_LDFLAGS"
12314ZBXGET_LIBS="$ZBXGET_LIBS $TLS_LIBS"
12315
12316SENDER_LDFLAGS="$SENDER_LDFLAGS $TLS_LDFLAGS"
12317SENDER_LIBS="$SENDER_LIBS $TLS_LIBS"
12318
12319ZBXJS_LDFLAGS="$ZLIB_LDFLAGS $TLS_LDFLAGS"
12320ZBXJS_LIBS="$ZBXJS_LIBS $TLS_LIBS"
12321
12322if test "x$agent" = "xyes"; then
12323
12324
12325# Check whether --with-libmodbus was given.
12326if test "${with_libmodbus+set}" = set; then :
12327  withval=$with_libmodbus;
12328      if test "$withval" = "no"; then
12329        want_libmodbus="no"
12330        _libmodbus_dir="no"
12331      elif test "$withval" = "yes"; then
12332        want_libmodbus="yes"
12333        _libmodbus_dir="no"
12334      else
12335        want_libmodbus="yes"
12336        _libmodbus_dir=$withval
12337      fi
12338      _libmodbus_version_wanted=3.0.0
12339
12340else
12341
12342      want_libmodbus="no"
12343
12344
12345fi
12346
12347
12348  if test "x$want_libmodbus" = "xyes"; then
12349
12350
12351
12352
12353
12354
12355
12356
12357if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12358	if test -n "$ac_tool_prefix"; then
12359  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12360set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12362$as_echo_n "checking for $ac_word... " >&6; }
12363if ${ac_cv_path_PKG_CONFIG+:} false; then :
12364  $as_echo_n "(cached) " >&6
12365else
12366  case $PKG_CONFIG in
12367  [\\/]* | ?:[\\/]*)
12368  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12369  ;;
12370  *)
12371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12372for as_dir in $PATH
12373do
12374  IFS=$as_save_IFS
12375  test -z "$as_dir" && as_dir=.
12376    for ac_exec_ext in '' $ac_executable_extensions; do
12377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12378    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12380    break 2
12381  fi
12382done
12383  done
12384IFS=$as_save_IFS
12385
12386  ;;
12387esac
12388fi
12389PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12390if test -n "$PKG_CONFIG"; then
12391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12392$as_echo "$PKG_CONFIG" >&6; }
12393else
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
12396fi
12397
12398
12399fi
12400if test -z "$ac_cv_path_PKG_CONFIG"; then
12401  ac_pt_PKG_CONFIG=$PKG_CONFIG
12402  # Extract the first word of "pkg-config", so it can be a program name with args.
12403set dummy pkg-config; ac_word=$2
12404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12405$as_echo_n "checking for $ac_word... " >&6; }
12406if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
12407  $as_echo_n "(cached) " >&6
12408else
12409  case $ac_pt_PKG_CONFIG in
12410  [\\/]* | ?:[\\/]*)
12411  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12412  ;;
12413  *)
12414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12415for as_dir in $PATH
12416do
12417  IFS=$as_save_IFS
12418  test -z "$as_dir" && as_dir=.
12419    for ac_exec_ext in '' $ac_executable_extensions; do
12420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12421    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12423    break 2
12424  fi
12425done
12426  done
12427IFS=$as_save_IFS
12428
12429  ;;
12430esac
12431fi
12432ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12433if test -n "$ac_pt_PKG_CONFIG"; then
12434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12435$as_echo "$ac_pt_PKG_CONFIG" >&6; }
12436else
12437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12438$as_echo "no" >&6; }
12439fi
12440
12441  if test "x$ac_pt_PKG_CONFIG" = x; then
12442    PKG_CONFIG=""
12443  else
12444    case $cross_compiling:$ac_tool_warned in
12445yes:)
12446{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12447$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12448ac_tool_warned=yes ;;
12449esac
12450    PKG_CONFIG=$ac_pt_PKG_CONFIG
12451  fi
12452else
12453  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12454fi
12455
12456fi
12457if test -n "$PKG_CONFIG"; then
12458	_pkg_min_version=0.9.0
12459	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12460$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12461	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12462		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12463$as_echo "yes" >&6; }
12464	else
12465		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467		PKG_CONFIG=""
12468	fi
12469fi
12470    test -z "$PKG_CONFIG" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
12471
12472
12473    if test "x$_libmodbus_dir" = "xno"; then
12474      if test -n "$PKG_CONFIG" && \
12475    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmodbus\""; } >&5
12476  ($PKG_CONFIG --exists --print-errors "libmodbus") 2>&5
12477  ac_status=$?
12478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12479  test $ac_status = 0; }; then
12480
12481        LIBMODBUS_LIBS=`$PKG_CONFIG --libs libmodbus`
12482
12483else
12484
12485        as_fn_error $? "Not found libmodbus package" "$LINENO" 5
12486
12487fi
12488      LIBMODBUS_CFLAGS=`$PKG_CONFIG --cflags libmodbus`
12489      LIBMODBUS_LDFLAGS=""
12490      _libmodbus_version=`$PKG_CONFIG --modversion libmodbus`
12491    else
12492      { { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libmodbus_dir/lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors libmodbus"; } >&5
12493  (PKG_CONFIG_LIBDIR="$_libmodbus_dir/lib/pkgconfig" $PKG_CONFIG --exists --print-errors libmodbus) 2>&5
12494  ac_status=$?
12495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12496  test $ac_status = 0; } || as_fn_error $? "\"Not found libmodbus package in $_libmodbus_dir/lib/pkgconfig\"" "$LINENO" 5
12497      LIBMODBUS_LDFLAGS="-L$_libmodbus_dir/lib"
12498      LIBMODBUS_LIBS=`PKG_CONFIG_LIBDIR="$_libmodbus_dir/lib/pkgconfig" $PKG_CONFIG --libs libmodbus`
12499      LIBMODBUS_CFLAGS=`PKG_CONFIG_LIBDIR="$_libmodbus_dir/lib/pkgconfig" $PKG_CONFIG --cflags libmodbus`
12500      _libmodbus_version=`PKG_CONFIG_LIBDIR="$_libmodbus_dir/lib/pkgconfig" $PKG_CONFIG --modversion libmodbus`
12501    fi
12502
12503
12504    for ac_prog in gawk mawk nawk awk
12505do
12506  # Extract the first word of "$ac_prog", so it can be a program name with args.
12507set dummy $ac_prog; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_prog_AWK+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  if test -n "$AWK"; then
12514  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12515else
12516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12517for as_dir in $PATH
12518do
12519  IFS=$as_save_IFS
12520  test -z "$as_dir" && as_dir=.
12521    for ac_exec_ext in '' $ac_executable_extensions; do
12522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12523    ac_cv_prog_AWK="$ac_prog"
12524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12525    break 2
12526  fi
12527done
12528  done
12529IFS=$as_save_IFS
12530
12531fi
12532fi
12533AWK=$ac_cv_prog_AWK
12534if test -n "$AWK"; then
12535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12536$as_echo "$AWK" >&6; }
12537else
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
12540fi
12541
12542
12543  test -n "$AWK" && break
12544done
12545
12546
12547  _lib_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
12548  _lib_version=`echo $_libmodbus_version | $_lib_version_parse`
12549  _lib_wanted=`echo $_libmodbus_version_wanted | $_lib_version_parse`
12550
12551  if test $_lib_wanted -gt 0; then
12552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmodbus $_libmodbus_version >= version $_libmodbus_version_wanted" >&5
12553$as_echo_n "checking for libmodbus $_libmodbus_version >= version $_libmodbus_version_wanted... " >&6; }
12554if ${libmodbus_cv_version_ok+:} false; then :
12555  $as_echo_n "(cached) " >&6
12556else
12557
12558        if test $_lib_version -lt $_lib_wanted; then
12559          as_fn_error $? "libmodbus version mismatch" "$LINENO" 5
12560        else
12561          libmodbus_cv_version_ok="yes"
12562        fi
12563
12564
12565fi
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libmodbus_cv_version_ok" >&5
12567$as_echo "$libmodbus_cv_version_ok" >&6; }
12568  fi
12569
12570    if test "x$enable_static_libs" = "xyes"; then
12571      if test "x$static_linking_support" = "xno"; then
12572        LIBMODBUS_LIBS=`echo "$LIBMODBUS_LIBS"|sed "s|-lmodbus|$_libmodbus_dir/lib/libmodbus.a|g"`
12573      else
12574        LIBMODBUS_LIBS=`echo "$LIBMODBUS_LIBS"|sed "s/-lmodbus/${static_linking_support}static -lmodbus ${static_linking_support}dynamic/g"`
12575      fi
12576    fi
12577    am_save_cflags="$CFLAGS"
12578    am_save_ldflags="$LDFLAGS"
12579    am_save_libs="$LIBS"
12580
12581    CFLAGS="$CFLAGS $LIBMODBUS_CFLAGS"
12582    LDFLAGS="$LDFLAGS $LIBMODBUS_LDFLAGS"
12583    LIBS="$LIBS $LIBMODBUS_LIBS"
12584
12585    found_libmodbus="no"
12586
12587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12588/* end confdefs.h.  */
12589
12590#include "modbus.h"
12591
12592int
12593main ()
12594{
12595
12596  modbus_t  *mdb_ctx;
12597  mdb_ctx = modbus_new_tcp("127.0.0.1", 502);
12598  modbus_set_response_timeout(mdb_ctx, 1, 0)
12599
12600  ;
12601  return 0;
12602}
12603_ACEOF
12604if ac_fn_c_try_link "$LINENO"; then :
12605  found_libmodbus="31"
12606fi
12607rm -f core conftest.err conftest.$ac_objext \
12608    conftest$ac_exeext conftest.$ac_ext
12609
12610    if test "x$found_libmodbus" = "xno"; then
12611
12612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12613/* end confdefs.h.  */
12614
12615#include "modbus.h"
12616
12617int
12618main ()
12619{
12620
12621  modbus_t  *mdb_ctx;
12622  mdb_ctx = modbus_new_tcp("127.0.0.1", 502);
12623  modbus_set_response_timeout(mdb_ctx, NULL);
12624
12625  ;
12626  return 0;
12627}
12628_ACEOF
12629if ac_fn_c_try_link "$LINENO"; then :
12630  found_libmodbus="30"
12631fi
12632rm -f core conftest.err conftest.$ac_objext \
12633    conftest$ac_exeext conftest.$ac_ext
12634
12635    fi
12636    CFLAGS="$am_save_cflags"
12637    LDFLAGS="$am_save_ldflags"
12638    LIBS="$am_save_libs"
12639
12640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmodbus support" >&5
12641$as_echo_n "checking for libmodbus support... " >&6; }
12642    if test "x$found_libmodbus" != "xno"; then
12643
12644$as_echo "#define HAVE_LIBMODBUS 1" >>confdefs.h
12645
12646      if test "x$found_libmodbus" = "x30"; then
12647
12648$as_echo "#define HAVE_LIBMODBUS_3_0 1" >>confdefs.h
12649
12650      elif test "x$found_libmodbus" = "x31"; then
12651
12652$as_echo "#define HAVE_LIBMODBUS_3_1 1" >>confdefs.h
12653
12654      fi
12655      found_libmodbus="yes"
12656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12657$as_echo "yes" >&6; }
12658    else
12659      as_fn_error $? "Not compatible libmodbus library" "$LINENO" 5
12660    fi
12661  fi
12662
12663
12664
12665
12666
12667
12668	if test "x$want_libmodbus" = "xyes"; then
12669		if test "x$found_libmodbus" = "xyes"; then
12670			have_libmodbus="yes"
12671		fi
12672	fi
12673	LDFLAGS="$LDFLAGS $LIBMODBUS_LDFLAGS"
12674	CFLAGS="$CFLAGS $LIBMODBUS_CFLAGS"
12675	LIBS="$LIBS $LIBMODBUS_LIBS"
12676fi
12677 if test "x$have_libmodbus" = "xyes"; then
12678  HAVE_LIBMODBUS_TRUE=
12679  HAVE_LIBMODBUS_FALSE='#'
12680else
12681  HAVE_LIBMODBUS_TRUE='#'
12682  HAVE_LIBMODBUS_FALSE=
12683fi
12684
12685
12686if test "x$agent2" = "xyes"; then
12687	for ac_prog in go
12688do
12689  # Extract the first word of "$ac_prog", so it can be a program name with args.
12690set dummy $ac_prog; ac_word=$2
12691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12692$as_echo_n "checking for $ac_word... " >&6; }
12693if ${ac_cv_prog_GO+:} false; then :
12694  $as_echo_n "(cached) " >&6
12695else
12696  if test -n "$GO"; then
12697  ac_cv_prog_GO="$GO" # Let the user override the test.
12698else
12699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12700for as_dir in $PATH
12701do
12702  IFS=$as_save_IFS
12703  test -z "$as_dir" && as_dir=.
12704    for ac_exec_ext in '' $ac_executable_extensions; do
12705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12706    ac_cv_prog_GO="$ac_prog"
12707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12708    break 2
12709  fi
12710done
12711  done
12712IFS=$as_save_IFS
12713
12714fi
12715fi
12716GO=$ac_cv_prog_GO
12717if test -n "$GO"; then
12718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GO" >&5
12719$as_echo "$GO" >&6; }
12720else
12721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12722$as_echo "no" >&6; }
12723fi
12724
12725
12726  test -n "$GO" && break
12727done
12728test -n "$GO" || GO="no"
12729
12730	if test "x$GO" = "xno"; then
12731		as_fn_error $? "Unable to find \"go\" executable in path" "$LINENO" 5
12732	fi
12733
12734$as_echo "#define ZBX_BUILD_AGENT2 1" >>confdefs.h
12735
12736fi
12737
12738if test "x$webservice" = "xyes"; then
12739	for ac_prog in go
12740do
12741  # Extract the first word of "$ac_prog", so it can be a program name with args.
12742set dummy $ac_prog; ac_word=$2
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12744$as_echo_n "checking for $ac_word... " >&6; }
12745if ${ac_cv_prog_GO+:} false; then :
12746  $as_echo_n "(cached) " >&6
12747else
12748  if test -n "$GO"; then
12749  ac_cv_prog_GO="$GO" # Let the user override the test.
12750else
12751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12752for as_dir in $PATH
12753do
12754  IFS=$as_save_IFS
12755  test -z "$as_dir" && as_dir=.
12756    for ac_exec_ext in '' $ac_executable_extensions; do
12757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12758    ac_cv_prog_GO="$ac_prog"
12759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12760    break 2
12761  fi
12762done
12763  done
12764IFS=$as_save_IFS
12765
12766fi
12767fi
12768GO=$ac_cv_prog_GO
12769if test -n "$GO"; then
12770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GO" >&5
12771$as_echo "$GO" >&6; }
12772else
12773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12774$as_echo "no" >&6; }
12775fi
12776
12777
12778  test -n "$GO" && break
12779done
12780test -n "$GO" || GO="no"
12781
12782	if test "x$GO" = "xno"; then
12783		as_fn_error $? "Unable to find \"go\" executable in path" "$LINENO" 5
12784	fi
12785
12786$as_echo "#define ZBX_BUILD_WEBSERVICE 1" >>confdefs.h
12787
12788fi
12789
12790if test "x$java" = "xyes"; then
12791	for ac_prog in javac
12792do
12793  # Extract the first word of "$ac_prog", so it can be a program name with args.
12794set dummy $ac_prog; ac_word=$2
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12796$as_echo_n "checking for $ac_word... " >&6; }
12797if ${ac_cv_prog_JAVAC+:} false; then :
12798  $as_echo_n "(cached) " >&6
12799else
12800  if test -n "$JAVAC"; then
12801  ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
12802else
12803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12804for as_dir in $PATH
12805do
12806  IFS=$as_save_IFS
12807  test -z "$as_dir" && as_dir=.
12808    for ac_exec_ext in '' $ac_executable_extensions; do
12809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12810    ac_cv_prog_JAVAC="$ac_prog"
12811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12812    break 2
12813  fi
12814done
12815  done
12816IFS=$as_save_IFS
12817
12818fi
12819fi
12820JAVAC=$ac_cv_prog_JAVAC
12821if test -n "$JAVAC"; then
12822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
12823$as_echo "$JAVAC" >&6; }
12824else
12825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12826$as_echo "no" >&6; }
12827fi
12828
12829
12830  test -n "$JAVAC" && break
12831done
12832test -n "$JAVAC" || JAVAC="no"
12833
12834	if test "x$JAVAC" = "xno"; then
12835		as_fn_error $? "Unable to find \"javac\" executable in path" "$LINENO" 5
12836	fi
12837	for ac_prog in jar
12838do
12839  # Extract the first word of "$ac_prog", so it can be a program name with args.
12840set dummy $ac_prog; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_prog_JAR+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  if test -n "$JAR"; then
12847  ac_cv_prog_JAR="$JAR" # Let the user override the test.
12848else
12849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_prog_JAR="$ac_prog"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864fi
12865fi
12866JAR=$ac_cv_prog_JAR
12867if test -n "$JAR"; then
12868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
12869$as_echo "$JAR" >&6; }
12870else
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12872$as_echo "no" >&6; }
12873fi
12874
12875
12876  test -n "$JAR" && break
12877done
12878test -n "$JAR" || JAR="no"
12879
12880	if test "x$JAR" = "xno"; then
12881		as_fn_error $? "Unable to find \"jar\" executable in path" "$LINENO" 5
12882	fi
12883fi
12884
12885found_ldap="no"
12886
12887
12888# Check whether --with-ldap was given.
12889if test "${with_ldap+set}" = set; then :
12890  withval=$with_ldap;  if test "$withval" = "no"; then
12891            want_ldap="no"
12892            _libldap_with="no"
12893        elif test "$withval" = "yes"; then
12894            want_ldap="yes"
12895            _libldap_with="yes"
12896        else
12897            want_ldap="yes"
12898            _libldap_with=$withval
12899        fi
12900
12901else
12902  _libldap_with=no
12903fi
12904
12905
12906  if test "x$_libldap_with" != x"no"; then
12907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support of ldap.h" >&5
12908$as_echo_n "checking for LDAP support of ldap.h... " >&6; }
12909
12910        if test "$_libldap_with" = "yes"; then
12911                if test -f /usr/local/openldap/include/ldap.h; then
12912                        LDAP_INCDIR=/usr/local/openldap/include/
12913                        LDAP_LIBDIR=/usr/local/openldap/lib/
12914                        found_ldap="yes"
12915                elif test -f /usr/include/ldap.h; then
12916                        LDAP_INCDIR=/usr/include
12917                        LDAP_LIBDIR=/usr/lib
12918                        found_ldap="yes"
12919                elif test -f /usr/local/include/ldap.h; then
12920                        LDAP_INCDIR=/usr/local/include
12921                        LDAP_LIBDIR=/usr/local/lib
12922                        found_ldap="yes"
12923                else
12924                        found_ldap="no"
12925                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12926$as_echo "no" >&6; }
12927                fi
12928        else
12929                if test -f $_libldap_with/include/ldap.h; then
12930                        LDAP_INCDIR=$_libldap_with/include
12931                        LDAP_LIBDIR=$_libldap_with/lib
12932                        _ldap_dir_lib="$LDAP_LIBDIR"
12933
12934                        found_ldap="yes"
12935                else
12936                        found_ldap="no"
12937                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12938$as_echo "no" >&6; }
12939                fi
12940        fi
12941
12942        if test "x$found_ldap" != "xno"; then
12943
12944                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12945$as_echo "yes" >&6; }
12946                LDAP_CPPFLAGS="-I$LDAP_INCDIR"
12947                LDAP_LDFLAGS="-L$LDAP_LIBDIR"
12948                LDAP_LIBS="-lldap -llber $LDAP_LIBS"
12949
12950                if test "x$enable_static" = "xyes"; then
12951                        LDAP_LIBS="$LDAP_LIBS -lgnutls -lpthread -lsasl2"
12952                elif test "x$enable_static_libs" = "xyes"; then
12953                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking compatibility of static LDAP libs" >&5
12954$as_echo_n "checking compatibility of static LDAP libs... " >&6; }
12955                        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
12956
12957                        if test "x$static_linking_support" = "xno"; then
12958                                LDAP_LIBS=`echo "$LDAP_LIBS"|sed "s|-lldap|$_ldap_dir_lib/libldap.a|g"|sed "s|-llber|$_ldap_dir_lib/liblber.a|g"`
12959                        fi
12960
12961                        # without SSL and SASL
12962                        if test "x$static_linking_support" = "xno"; then
12963                                TRY_LDAP_LIBS="$LDAP_LIBS -lpthread"
12964                        else
12965                                TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread"
12966                        fi
12967
12968_save_ldap_cppflags="$CPPFLAGS"
12969_save_ldap_cflags="$CFLAGS"
12970_save_ldap_ldflags="$LDFLAGS"
12971_save_ldap_libs="$LIBS"
12972
12973LIBS="$LIBS $TRY_LDAP_LIBS"
12974LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12975CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12976CFLAGS="$CFLAGS "
12977ldap_link="no"
12978
12979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980/* end confdefs.h.  */
12981
12982#include <stdio.h>
12983#include <ldap.h>
12984#include <lber.h>
12985#include <ldap_schema.h>
12986
12987int
12988main ()
12989{
12990
12991printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12992printf("%p", ber_free);
12993return 0;
12994
12995  ;
12996  return 0;
12997}
12998_ACEOF
12999if ac_fn_c_try_link "$LINENO"; then :
13000
13001ldap_link="yes"
13002
13003fi
13004rm -f core conftest.err conftest.$ac_objext \
13005    conftest$ac_exeext conftest.$ac_ext
13006
13007CPPFLAGS="$_save_ldap_cppflags"
13008CFLAGS="$_save_ldap_cflags"
13009LDFLAGS="$_save_ldap_ldflags"
13010LIBS="$_save_ldap_libs"
13011unset _save_ldap_cppflags
13012unset _save_ldap_cflags
13013unset _save_ldap_ldflags
13014unset _save_ldap_libs
13015if test "x$ldap_link" = "xyes"; then :
13016
13017                                LDAP_LIBS=$TRY_LDAP_LIBS
13018                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL" >&5
13019$as_echo "without SSL" >&6; }
13020
13021fi
13022
13023                        # without SSL
13024                        if test "x$ldap_link" = "xno"; then
13025                                if test "x$static_linking_support" = "xno"; then
13026                                        TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl2"
13027                                else
13028                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl2"
13029                                fi
13030
13031_save_ldap_cppflags="$CPPFLAGS"
13032_save_ldap_cflags="$CFLAGS"
13033_save_ldap_ldflags="$LDFLAGS"
13034_save_ldap_libs="$LIBS"
13035
13036LIBS="$LIBS $TRY_LDAP_LIBS"
13037LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13038CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13039CFLAGS="$CFLAGS "
13040ldap_link="no"
13041
13042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13043/* end confdefs.h.  */
13044
13045#include <stdio.h>
13046#include <ldap.h>
13047#include <lber.h>
13048#include <ldap_schema.h>
13049
13050int
13051main ()
13052{
13053
13054printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13055printf("%p", ber_free);
13056return 0;
13057
13058  ;
13059  return 0;
13060}
13061_ACEOF
13062if ac_fn_c_try_link "$LINENO"; then :
13063
13064ldap_link="yes"
13065
13066fi
13067rm -f core conftest.err conftest.$ac_objext \
13068    conftest$ac_exeext conftest.$ac_ext
13069
13070CPPFLAGS="$_save_ldap_cppflags"
13071CFLAGS="$_save_ldap_cflags"
13072LDFLAGS="$_save_ldap_ldflags"
13073LIBS="$_save_ldap_libs"
13074unset _save_ldap_cppflags
13075unset _save_ldap_cflags
13076unset _save_ldap_ldflags
13077unset _save_ldap_libs
13078if test "x$ldap_link" = "xyes"; then :
13079
13080                                        LDAP_LIBS=$TRY_LDAP_LIBS
13081                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL" >&5
13082$as_echo "without SSL" >&6; }
13083
13084fi
13085                        fi
13086
13087                        # without SSL for Solaris
13088                        if test "x$ldap_link" = "xno"; then
13089                                if test "x$static_linking_support" = "xno"; then
13090                                        TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl"
13091                                else
13092                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl"
13093                                fi
13094
13095_save_ldap_cppflags="$CPPFLAGS"
13096_save_ldap_cflags="$CFLAGS"
13097_save_ldap_ldflags="$LDFLAGS"
13098_save_ldap_libs="$LIBS"
13099
13100LIBS="$LIBS $TRY_LDAP_LIBS"
13101LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13102CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13103CFLAGS="$CFLAGS "
13104ldap_link="no"
13105
13106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107/* end confdefs.h.  */
13108
13109#include <stdio.h>
13110#include <ldap.h>
13111#include <lber.h>
13112#include <ldap_schema.h>
13113
13114int
13115main ()
13116{
13117
13118printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13119printf("%p", ber_free);
13120return 0;
13121
13122  ;
13123  return 0;
13124}
13125_ACEOF
13126if ac_fn_c_try_link "$LINENO"; then :
13127
13128ldap_link="yes"
13129
13130fi
13131rm -f core conftest.err conftest.$ac_objext \
13132    conftest$ac_exeext conftest.$ac_ext
13133
13134CPPFLAGS="$_save_ldap_cppflags"
13135CFLAGS="$_save_ldap_cflags"
13136LDFLAGS="$_save_ldap_ldflags"
13137LIBS="$_save_ldap_libs"
13138unset _save_ldap_cppflags
13139unset _save_ldap_cflags
13140unset _save_ldap_ldflags
13141unset _save_ldap_libs
13142if test "x$ldap_link" = "xyes"; then :
13143
13144                                        LDAP_LIBS=$TRY_LDAP_LIBS
13145                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL and with sasl" >&5
13146$as_echo "without SSL and with sasl" >&6; }
13147
13148fi
13149                        fi
13150
13151                        # with system GnuTLS
13152                        if test "x$ldap_link" = "xno"; then
13153                                if test "x$static_linking_support" = "xno"; then
13154                                        TRY_LDAP_LIBS="$LDAP_LIBS -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
13155                                else
13156                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
13157                                fi
13158
13159_save_ldap_cppflags="$CPPFLAGS"
13160_save_ldap_cflags="$CFLAGS"
13161_save_ldap_ldflags="$LDFLAGS"
13162_save_ldap_libs="$LIBS"
13163
13164LIBS="$LIBS $TRY_LDAP_LIBS"
13165LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13166CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13167CFLAGS="$CFLAGS "
13168ldap_link="no"
13169
13170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13171/* end confdefs.h.  */
13172
13173#include <stdio.h>
13174#include <ldap.h>
13175#include <lber.h>
13176#include <ldap_schema.h>
13177
13178int
13179main ()
13180{
13181
13182printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13183printf("%p", ber_free);
13184return 0;
13185
13186  ;
13187  return 0;
13188}
13189_ACEOF
13190if ac_fn_c_try_link "$LINENO"; then :
13191
13192ldap_link="yes"
13193
13194fi
13195rm -f core conftest.err conftest.$ac_objext \
13196    conftest$ac_exeext conftest.$ac_ext
13197
13198CPPFLAGS="$_save_ldap_cppflags"
13199CFLAGS="$_save_ldap_cflags"
13200LDFLAGS="$_save_ldap_ldflags"
13201LIBS="$_save_ldap_libs"
13202unset _save_ldap_cppflags
13203unset _save_ldap_cflags
13204unset _save_ldap_ldflags
13205unset _save_ldap_libs
13206if test "x$ldap_link" = "xyes"; then :
13207
13208                                        LDAP_LIBS=$TRY_LDAP_LIBS
13209                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system GnuTLS linking" >&5
13210$as_echo "with system GnuTLS linking" >&6; }
13211
13212fi
13213                        fi
13214
13215                        # with static OpenSSL and SASL2
13216                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
13217                                if test "x$static_linking_support" = "xno"; then
13218                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
13219                                else
13220                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic $OPENSSL_LIBS"
13221                                fi
13222                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
13223                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
13224                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
13225
13226_save_ldap_cppflags="$CPPFLAGS"
13227_save_ldap_cflags="$CFLAGS"
13228_save_ldap_ldflags="$LDFLAGS"
13229_save_ldap_libs="$LIBS"
13230
13231LIBS="$LIBS $OSSL_LDAP_LIBS"
13232LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
13233CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
13234CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
13235ldap_link="no"
13236
13237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238/* end confdefs.h.  */
13239
13240#include <stdio.h>
13241#include <ldap.h>
13242#include <lber.h>
13243#include <ldap_schema.h>
13244
13245int
13246main ()
13247{
13248
13249printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13250printf("%p", ber_free);
13251return 0;
13252
13253  ;
13254  return 0;
13255}
13256_ACEOF
13257if ac_fn_c_try_link "$LINENO"; then :
13258
13259ldap_link="yes"
13260
13261fi
13262rm -f core conftest.err conftest.$ac_objext \
13263    conftest$ac_exeext conftest.$ac_ext
13264
13265CPPFLAGS="$_save_ldap_cppflags"
13266CFLAGS="$_save_ldap_cflags"
13267LDFLAGS="$_save_ldap_ldflags"
13268LIBS="$_save_ldap_libs"
13269unset _save_ldap_cppflags
13270unset _save_ldap_cflags
13271unset _save_ldap_ldflags
13272unset _save_ldap_libs
13273if test "x$ldap_link" = "xyes"; then :
13274
13275                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
13276                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL and static sasl2" >&5
13277$as_echo "with static OpenSSL and static sasl2" >&6; }
13278
13279fi
13280                        fi
13281
13282                        # with static OpenSSL
13283                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
13284                                if test "x$static_linking_support" = "xno"; then
13285                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
13286                                else
13287                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl2"
13288                                fi
13289                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
13290                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
13291                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
13292
13293_save_ldap_cppflags="$CPPFLAGS"
13294_save_ldap_cflags="$CFLAGS"
13295_save_ldap_ldflags="$LDFLAGS"
13296_save_ldap_libs="$LIBS"
13297
13298LIBS="$LIBS $OSSL_LDAP_LIBS"
13299LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
13300CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
13301CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
13302ldap_link="no"
13303
13304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305/* end confdefs.h.  */
13306
13307#include <stdio.h>
13308#include <ldap.h>
13309#include <lber.h>
13310#include <ldap_schema.h>
13311
13312int
13313main ()
13314{
13315
13316printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13317printf("%p", ber_free);
13318return 0;
13319
13320  ;
13321  return 0;
13322}
13323_ACEOF
13324if ac_fn_c_try_link "$LINENO"; then :
13325
13326ldap_link="yes"
13327
13328fi
13329rm -f core conftest.err conftest.$ac_objext \
13330    conftest$ac_exeext conftest.$ac_ext
13331
13332CPPFLAGS="$_save_ldap_cppflags"
13333CFLAGS="$_save_ldap_cflags"
13334LDFLAGS="$_save_ldap_ldflags"
13335LIBS="$_save_ldap_libs"
13336unset _save_ldap_cppflags
13337unset _save_ldap_cflags
13338unset _save_ldap_ldflags
13339unset _save_ldap_libs
13340if test "x$ldap_link" = "xyes"; then :
13341
13342                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
13343                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL" >&5
13344$as_echo "with static OpenSSL" >&6; }
13345
13346fi
13347                        fi
13348
13349                        # with static OpenSSL for Solaris
13350                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
13351                                if test "x$static_linking_support" = "xno"; then
13352                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl"
13353                                else
13354                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl"
13355                                fi
13356                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
13357                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
13358                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
13359
13360_save_ldap_cppflags="$CPPFLAGS"
13361_save_ldap_cflags="$CFLAGS"
13362_save_ldap_ldflags="$LDFLAGS"
13363_save_ldap_libs="$LIBS"
13364
13365LIBS="$LIBS $OSSL_LDAP_LIBS"
13366LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
13367CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
13368CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
13369ldap_link="no"
13370
13371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372/* end confdefs.h.  */
13373
13374#include <stdio.h>
13375#include <ldap.h>
13376#include <lber.h>
13377#include <ldap_schema.h>
13378
13379int
13380main ()
13381{
13382
13383printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13384printf("%p", ber_free);
13385return 0;
13386
13387  ;
13388  return 0;
13389}
13390_ACEOF
13391if ac_fn_c_try_link "$LINENO"; then :
13392
13393ldap_link="yes"
13394
13395fi
13396rm -f core conftest.err conftest.$ac_objext \
13397    conftest$ac_exeext conftest.$ac_ext
13398
13399CPPFLAGS="$_save_ldap_cppflags"
13400CFLAGS="$_save_ldap_cflags"
13401LDFLAGS="$_save_ldap_ldflags"
13402LIBS="$_save_ldap_libs"
13403unset _save_ldap_cppflags
13404unset _save_ldap_cflags
13405unset _save_ldap_ldflags
13406unset _save_ldap_libs
13407if test "x$ldap_link" = "xyes"; then :
13408
13409                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
13410                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL and sasl" >&5
13411$as_echo "with static OpenSSL and sasl" >&6; }
13412
13413else
13414
13415                                        as_fn_error $? "Not compatible with static OpenLDAP libs version of static OpenSSL: \"$OPENSSL_LDFLAGS\"" "$LINENO" 5
13416
13417fi
13418                        fi
13419
13420                        # with system OpenSSL and SASL2
13421                        if test "x$ldap_link" = "xno"; then
13422                                if test "x$static_linking_support" = "xno"; then
13423                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
13424                                else
13425                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic -lssl -lcrypto"
13426                                fi
13427
13428_save_ldap_cppflags="$CPPFLAGS"
13429_save_ldap_cflags="$CFLAGS"
13430_save_ldap_ldflags="$LDFLAGS"
13431_save_ldap_libs="$LIBS"
13432
13433LIBS="$LIBS $TRY_LDAP_LIBS"
13434LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13435CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13436CFLAGS="$CFLAGS "
13437ldap_link="no"
13438
13439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440/* end confdefs.h.  */
13441
13442#include <stdio.h>
13443#include <ldap.h>
13444#include <lber.h>
13445#include <ldap_schema.h>
13446
13447int
13448main ()
13449{
13450
13451printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13452printf("%p", ber_free);
13453return 0;
13454
13455  ;
13456  return 0;
13457}
13458_ACEOF
13459if ac_fn_c_try_link "$LINENO"; then :
13460
13461ldap_link="yes"
13462
13463fi
13464rm -f core conftest.err conftest.$ac_objext \
13465    conftest$ac_exeext conftest.$ac_ext
13466
13467CPPFLAGS="$_save_ldap_cppflags"
13468CFLAGS="$_save_ldap_cflags"
13469LDFLAGS="$_save_ldap_ldflags"
13470LIBS="$_save_ldap_libs"
13471unset _save_ldap_cppflags
13472unset _save_ldap_cflags
13473unset _save_ldap_ldflags
13474unset _save_ldap_libs
13475if test "x$ldap_link" = "xyes"; then :
13476
13477                                        LDAP_LIBS=$TRY_LDAP_LIBS
13478                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL and static sasl2 linking" >&5
13479$as_echo "with system OpenSSL and static sasl2 linking" >&6; }
13480
13481fi
13482                        fi
13483
13484                        # with system OpenSSL
13485                        if test "x$ldap_link" = "xno"; then
13486                                if test "x$static_linking_support" = "xno"; then
13487                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
13488                                else
13489                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl2 -lcrypto"
13490                                fi
13491
13492_save_ldap_cppflags="$CPPFLAGS"
13493_save_ldap_cflags="$CFLAGS"
13494_save_ldap_ldflags="$LDFLAGS"
13495_save_ldap_libs="$LIBS"
13496
13497LIBS="$LIBS $TRY_LDAP_LIBS"
13498LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13499CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13500CFLAGS="$CFLAGS "
13501ldap_link="no"
13502
13503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13504/* end confdefs.h.  */
13505
13506#include <stdio.h>
13507#include <ldap.h>
13508#include <lber.h>
13509#include <ldap_schema.h>
13510
13511int
13512main ()
13513{
13514
13515printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13516printf("%p", ber_free);
13517return 0;
13518
13519  ;
13520  return 0;
13521}
13522_ACEOF
13523if ac_fn_c_try_link "$LINENO"; then :
13524
13525ldap_link="yes"
13526
13527fi
13528rm -f core conftest.err conftest.$ac_objext \
13529    conftest$ac_exeext conftest.$ac_ext
13530
13531CPPFLAGS="$_save_ldap_cppflags"
13532CFLAGS="$_save_ldap_cflags"
13533LDFLAGS="$_save_ldap_ldflags"
13534LIBS="$_save_ldap_libs"
13535unset _save_ldap_cppflags
13536unset _save_ldap_cflags
13537unset _save_ldap_ldflags
13538unset _save_ldap_libs
13539if test "x$ldap_link" = "xyes"; then :
13540
13541                                        LDAP_LIBS=$TRY_LDAP_LIBS
13542                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL linking" >&5
13543$as_echo "with system OpenSSL linking" >&6; }
13544
13545fi
13546                        fi
13547
13548                        # with system OpenSSL for Solaris
13549                        if test "x$ldap_link" = "xno"; then
13550                                if test "x$static_linking_support" = "xno"; then
13551                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl -lcrypto"
13552                                else
13553                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl -lcrypto"
13554                                fi
13555
13556_save_ldap_cppflags="$CPPFLAGS"
13557_save_ldap_cflags="$CFLAGS"
13558_save_ldap_ldflags="$LDFLAGS"
13559_save_ldap_libs="$LIBS"
13560
13561LIBS="$LIBS $TRY_LDAP_LIBS"
13562LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13563CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13564CFLAGS="$CFLAGS "
13565ldap_link="no"
13566
13567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568/* end confdefs.h.  */
13569
13570#include <stdio.h>
13571#include <ldap.h>
13572#include <lber.h>
13573#include <ldap_schema.h>
13574
13575int
13576main ()
13577{
13578
13579printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13580printf("%p", ber_free);
13581return 0;
13582
13583  ;
13584  return 0;
13585}
13586_ACEOF
13587if ac_fn_c_try_link "$LINENO"; then :
13588
13589ldap_link="yes"
13590
13591fi
13592rm -f core conftest.err conftest.$ac_objext \
13593    conftest$ac_exeext conftest.$ac_ext
13594
13595CPPFLAGS="$_save_ldap_cppflags"
13596CFLAGS="$_save_ldap_cflags"
13597LDFLAGS="$_save_ldap_ldflags"
13598LIBS="$_save_ldap_libs"
13599unset _save_ldap_cppflags
13600unset _save_ldap_cflags
13601unset _save_ldap_ldflags
13602unset _save_ldap_libs
13603if test "x$ldap_link" = "xyes"; then :
13604
13605                                        LDAP_LIBS=$TRY_LDAP_LIBS
13606                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL and sasl linking" >&5
13607$as_echo "with system OpenSSL and sasl linking" >&6; }
13608
13609fi
13610                        fi
13611
13612                        if test "x$ldap_link" = "xno"; then
13613                                as_fn_error $? "Not found compatible version of OpenLDAP static libs" "$LINENO" 5
13614                        fi
13615                fi
13616
13617                found_ldap="yes"
13618
13619$as_echo "#define HAVE_LDAP 1" >>confdefs.h
13620
13621
13622$as_echo "#define LDAP_DEPRECATED 1" >>confdefs.h
13623
13624
13625                if test "x$enable_static" = "xyes"; then
13626                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgnutls" >&5
13627$as_echo_n "checking for main in -lgnutls... " >&6; }
13628if ${ac_cv_lib_gnutls_main+:} false; then :
13629  $as_echo_n "(cached) " >&6
13630else
13631  ac_check_lib_save_LIBS=$LIBS
13632LIBS="-lgnutls  $LIBS"
13633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13634/* end confdefs.h.  */
13635
13636
13637int
13638main ()
13639{
13640return main ();
13641  ;
13642  return 0;
13643}
13644_ACEOF
13645if ac_fn_c_try_link "$LINENO"; then :
13646  ac_cv_lib_gnutls_main=yes
13647else
13648  ac_cv_lib_gnutls_main=no
13649fi
13650rm -f core conftest.err conftest.$ac_objext \
13651    conftest$ac_exeext conftest.$ac_ext
13652LIBS=$ac_check_lib_save_LIBS
13653fi
13654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_main" >&5
13655$as_echo "$ac_cv_lib_gnutls_main" >&6; }
13656if test "x$ac_cv_lib_gnutls_main" = xyes; then :
13657  cat >>confdefs.h <<_ACEOF
13658#define HAVE_LIBGNUTLS 1
13659_ACEOF
13660
13661  LIBS="-lgnutls $LIBS"
13662
13663else
13664  as_fn_error $? "Not found GnuTLS library" "$LINENO" 5
13665fi
13666
13667                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
13668$as_echo_n "checking for main in -lpthread... " >&6; }
13669if ${ac_cv_lib_pthread_main+:} false; then :
13670  $as_echo_n "(cached) " >&6
13671else
13672  ac_check_lib_save_LIBS=$LIBS
13673LIBS="-lpthread  $LIBS"
13674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675/* end confdefs.h.  */
13676
13677
13678int
13679main ()
13680{
13681return main ();
13682  ;
13683  return 0;
13684}
13685_ACEOF
13686if ac_fn_c_try_link "$LINENO"; then :
13687  ac_cv_lib_pthread_main=yes
13688else
13689  ac_cv_lib_pthread_main=no
13690fi
13691rm -f core conftest.err conftest.$ac_objext \
13692    conftest$ac_exeext conftest.$ac_ext
13693LIBS=$ac_check_lib_save_LIBS
13694fi
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
13696$as_echo "$ac_cv_lib_pthread_main" >&6; }
13697if test "x$ac_cv_lib_pthread_main" = xyes; then :
13698  cat >>confdefs.h <<_ACEOF
13699#define HAVE_LIBPTHREAD 1
13700_ACEOF
13701
13702  LIBS="-lpthread $LIBS"
13703
13704else
13705  as_fn_error $? "Not found Pthread library" "$LINENO" 5
13706fi
13707
13708                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsasl2" >&5
13709$as_echo_n "checking for main in -lsasl2... " >&6; }
13710if ${ac_cv_lib_sasl2_main+:} false; then :
13711  $as_echo_n "(cached) " >&6
13712else
13713  ac_check_lib_save_LIBS=$LIBS
13714LIBS="-lsasl2  $LIBS"
13715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13716/* end confdefs.h.  */
13717
13718
13719int
13720main ()
13721{
13722return main ();
13723  ;
13724  return 0;
13725}
13726_ACEOF
13727if ac_fn_c_try_link "$LINENO"; then :
13728  ac_cv_lib_sasl2_main=yes
13729else
13730  ac_cv_lib_sasl2_main=no
13731fi
13732rm -f core conftest.err conftest.$ac_objext \
13733    conftest$ac_exeext conftest.$ac_ext
13734LIBS=$ac_check_lib_save_LIBS
13735fi
13736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_main" >&5
13737$as_echo "$ac_cv_lib_sasl2_main" >&6; }
13738if test "x$ac_cv_lib_sasl2_main" = xyes; then :
13739  cat >>confdefs.h <<_ACEOF
13740#define HAVE_LIBSASL2 1
13741_ACEOF
13742
13743  LIBS="-lsasl2 $LIBS"
13744
13745else
13746  as_fn_error $? "Not found SASL2 library" "$LINENO" 5
13747fi
13748
13749                fi
13750        fi
13751  fi
13752
13753
13754
13755
13756
13757  unset _libldap_with
13758
13759if test "x$want_ldap" = "xyes"; then
13760	if test "x$found_ldap" != "xyes"; then
13761		as_fn_error $? "Invalid LDAP directory - unable to find ldap.h" "$LINENO" 5
13762	fi
13763fi
13764SERVER_LDFLAGS="$SERVER_LDFLAGS $LDAP_LDFLAGS"
13765SERVER_LIBS="$SERVER_LIBS $LDAP_LIBS"
13766
13767PROXY_LDFLAGS="$PROXY_LDFLAGS $LDAP_LDFLAGS"
13768PROXY_LIBS="$PROXY_LIBS $LDAP_LIBS"
13769
13770AGENT_LDFLAGS="$AGENT_LDFLAGS $LDAP_LDFLAGS"
13771AGENT_LIBS="$AGENT_LIBS $LDAP_LIBS"
13772
13773
13774
13775found_curl="no"
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796  _libcurl_config="no"
13797
13798
13799# Check whether --with-libcurl was given.
13800if test "${with_libcurl+set}" = set; then :
13801  withval=$with_libcurl;
13802        if test "x$withval" = "xno"; then
13803            want_curl="no"
13804        elif test "x$withval" = "xyes"; then
13805            want_curl="yes"
13806        else
13807            want_curl="yes"
13808            _libcurl_config=$withval
13809        fi
13810
13811else
13812  want_curl=no
13813fi
13814
13815
13816	if test "x$want_curl" != "xno"; then
13817
13818		for ac_prog in gawk mawk nawk awk
13819do
13820  # Extract the first word of "$ac_prog", so it can be a program name with args.
13821set dummy $ac_prog; ac_word=$2
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13823$as_echo_n "checking for $ac_word... " >&6; }
13824if ${ac_cv_prog_AWK+:} false; then :
13825  $as_echo_n "(cached) " >&6
13826else
13827  if test -n "$AWK"; then
13828  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13829else
13830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13831for as_dir in $PATH
13832do
13833  IFS=$as_save_IFS
13834  test -z "$as_dir" && as_dir=.
13835    for ac_exec_ext in '' $ac_executable_extensions; do
13836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13837    ac_cv_prog_AWK="$ac_prog"
13838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13839    break 2
13840  fi
13841done
13842  done
13843IFS=$as_save_IFS
13844
13845fi
13846fi
13847AWK=$ac_cv_prog_AWK
13848if test -n "$AWK"; then
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13850$as_echo "$AWK" >&6; }
13851else
13852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13853$as_echo "no" >&6; }
13854fi
13855
13856
13857  test -n "$AWK" && break
13858done
13859
13860
13861		_libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
13862
13863		_libcurl_try_link=no
13864
13865		# Extract the first word of "curl-config", so it can be a program name with args.
13866set dummy curl-config; ac_word=$2
13867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13868$as_echo_n "checking for $ac_word... " >&6; }
13869if ${ac_cv_path__libcurl_config+:} false; then :
13870  $as_echo_n "(cached) " >&6
13871else
13872  case $_libcurl_config in
13873  [\\/]* | ?:[\\/]*)
13874  ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path.
13875  ;;
13876  *)
13877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13878for as_dir in $PATH
13879do
13880  IFS=$as_save_IFS
13881  test -z "$as_dir" && as_dir=.
13882    for ac_exec_ext in '' $ac_executable_extensions; do
13883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13884    ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
13885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13886    break 2
13887  fi
13888done
13889  done
13890IFS=$as_save_IFS
13891
13892  ;;
13893esac
13894fi
13895_libcurl_config=$ac_cv_path__libcurl_config
13896if test -n "$_libcurl_config"; then
13897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libcurl_config" >&5
13898$as_echo "$_libcurl_config" >&6; }
13899else
13900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13901$as_echo "no" >&6; }
13902fi
13903
13904
13905
13906		if test -x "$_libcurl_config"; then
13907			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of libcurl" >&5
13908$as_echo_n "checking for the version of libcurl... " >&6; }
13909if ${libcurl_cv_lib_curl_version+:} false; then :
13910  $as_echo_n "(cached) " >&6
13911else
13912  libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'`
13913
13914fi
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_version" >&5
13916$as_echo "$libcurl_cv_lib_curl_version" >&6; }
13917
13918			_libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
13919			_libcurl_wanted=`echo 7.13.1 | $_libcurl_version_parse`
13920
13921			if test $_libcurl_wanted -gt 0; then
13922				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= version 7.13.1" >&5
13923$as_echo_n "checking for libcurl >= version 7.13.1... " >&6; }
13924if ${libcurl_cv_lib_version_ok+:} false; then :
13925  $as_echo_n "(cached) " >&6
13926else
13927
13928						if test $_libcurl_version -ge $_libcurl_wanted; then
13929							libcurl_cv_lib_version_ok=yes
13930							else
13931							libcurl_cv_lib_version_ok=no
13932						fi
13933
13934
13935fi
13936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_version_ok" >&5
13937$as_echo "$libcurl_cv_lib_version_ok" >&6; }
13938			fi
13939
13940			if test $_libcurl_wanted -eq 0 || test "x$libcurl_cv_lib_version_ok" = "xyes"; then
13941				if test "x$LIBCURL_CFLAGS" = "x"; then
13942					LIBCURL_CFLAGS=`$_libcurl_config --cflags`
13943				fi
13944
13945				if test "x$LIBCURL_LIBS" = "x"; then
13946					_curl_dir_lib=`$_libcurl_config --prefix`
13947					_curl_dir_lib="$_curl_dir_lib/lib"
13948					_full_libcurl_libs=`$_libcurl_config --libs`
13949					for i in $_full_libcurl_libs; do
13950						case $i in
13951							-L*)
13952								LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS $i"
13953						;;
13954							-R*)
13955								LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS -Wl,$i"
13956						;;
13957							-lcurl)
13958								if test "x$enable_static_libs" = "xyes" -a "x$static_linking_support" = "xno"; then
13959									i="$_curl_dir_lib/libcurl.a"
13960								elif test "x$enable_static_libs" = "xyes"; then
13961									i="${static_linking_support}static $i ${static_linking_support}dynamic"
13962								fi
13963								LIBCURL_LIBS="$LIBCURL_LIBS $i"
13964						;;
13965							-l*)
13966								if test "x$enable_static_libs" = "xyes"; then
13967									_lib_name=`echo "$i" | cut -b3-`
13968									test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
13969								fi
13970								LIBCURL_LIBS="$LIBCURL_LIBS $i"
13971						;;
13972						esac
13973					done
13974
13975					_save_curl_cflags="$CFLAGS"
13976					_save_curl_ldflags="$LDFLAGS"
13977					_save_curl_libs="$LIBS"
13978					CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
13979					LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
13980					if test "x$enable_static_libs" = "xyes"; then
13981						test "x$want_openssl" = "xyes" && CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
13982						test "x$want_openssl" = "xyes" && LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
13983						test "x$want_ldap" = "xyes" && CFLAGS="$LDAP_CPPFLAGS $CFLAGS"
13984						test "x$want_ldap" = "xyes" && LDFLAGS="$LDAP_LDFLAGS $LDFLAGS"
13985					fi
13986
13987					if test "x$enable_static" = "xyes" -o "x$enable_static_libs" = "xyes"; then
13988						_full_libcurl_libs=`$_libcurl_config --static-libs`
13989
13990						if test "x$enable_static_libs" = "xyes" -a -z "$LIBPTHREAD_LIBS"; then
13991
13992
13993# Check whether --with-libpthread was given.
13994if test "${with_libpthread+set}" = set; then :
13995  withval=$with_libpthread;
13996			test "x$withval" = "xyes" && withval=/usr
13997			LIBPTHREAD_CFLAGS="-I$withval/include"
13998			LIBPTHREAD_LDFLAGS="-L$withval/lib"
13999			_libpthread_dir_set="yes"
14000
14001
14002fi
14003
14004
14005
14006# Check whether --with-libpthread-include was given.
14007if test "${with_libpthread_include+set}" = set; then :
14008  withval=$with_libpthread_include;
14009			LIBPTHREAD_CFLAGS="-I$withval"
14010			_libpthread_dir_set="yes"
14011
14012
14013fi
14014
14015
14016
14017# Check whether --with-libpthread-lib was given.
14018if test "${with_libpthread_lib+set}" = set; then :
14019  withval=$with_libpthread_lib;
14020			LIBPTHREAD_LDFLAGS="-L$withval"
14021			_libpthread_dir_set="yes"
14022
14023
14024fi
14025
14026
14027	ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14028if test "x$ac_cv_header_pthread_h" = xyes; then :
14029  found_libpthread=yes
14030fi
14031
14032
14033	LIBPTHREAD_LIBS="-lpthread"
14034	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for process shared libpthread support" >&5
14035$as_echo_n "checking for process shared libpthread support... " >&6; }
14036
14037	if test -n "$_libpthread_dir_set" -o "x$found_libpthread" = xyes; then
14038		found_libpthread="yes"
14039	elif test -f /usr/local/include/pthread.h; then
14040		LIBPTHREAD_CFLAGS="-I/usr/local/include"
14041		LIBPTHREAD_LDFLAGS="-L/usr/local/lib"
14042		found_libpthread="yes"
14043	elif test -f /usr/pkg/include/pthread.h; then
14044		LIBPTHREAD_CFLAGS="-I/usr/pkg/include"
14045		LIBPTHREAD_LDFLAGS="-L/usr/pkg/lib"
14046		LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/usr/pkg/lib"
14047		found_libpthread="yes"
14048	elif test -f /opt/csw/include/pthread.h; then
14049		LIBPTHREAD_CFLAGS="-I/opt/csw/include"
14050		LIBPTHREAD_LDFLAGS="-L/opt/csw/lib"
14051		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
14052			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
14053		else
14054			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/opt/csw/lib"
14055		fi
14056		found_libpthread="yes"
14057	else
14058		found_libpthread="no"
14059		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14060$as_echo "no" >&6; }
14061	fi
14062
14063	if test "x$found_libpthread" = "xyes"; then
14064		am_save_CFLAGS="$CFLAGS"
14065		am_save_LDFLAGS="$LDFLAGS"
14066		am_save_LIBS="$LIBS"
14067
14068		CFLAGS="$CFLAGS $LIBPTHREAD_CFLAGS"
14069		LDFLAGS="$LDFLAGS $LIBPTHREAD_LDFLAGS"
14070		LIBS="$LIBS $LIBPTHREAD_LIBS"
14071
14072		found_libpthread="no"
14073		found_libpthread_process_shared="no"
14074
14075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14076/* end confdefs.h.  */
14077
14078#include <pthread.h>
14079
14080int
14081main ()
14082{
14083
14084	pthread_mutexattr_t	mta;
14085	pthread_mutex_t		mutex;
14086
14087	pthread_mutexattr_init(&mta);
14088	pthread_mutex_init(&mutex, &mta);
14089
14090  ;
14091  return 0;
14092}
14093_ACEOF
14094if ac_fn_c_try_link "$LINENO"; then :
14095  found_libpthread="yes"
14096fi
14097rm -f core conftest.err conftest.$ac_objext \
14098    conftest$ac_exeext conftest.$ac_ext
14099
14100
14101	if test "$cross_compiling" = yes; then :
14102  found_libpthread_process_shared="no"
14103else
14104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14105/* end confdefs.h.  */
14106
14107		#include <pthread.h>
14108
14109		int	main()
14110		{
14111			pthread_mutexattr_t	mta;
14112			pthread_rwlockattr_t	rwa;
14113			pthread_mutex_t		mutex;
14114			pthread_rwlock_t	rwlock;
14115
14116			if (0 != pthread_mutexattr_init(&mta))
14117				return 1;
14118
14119			if (0 != pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED))
14120				return 2;
14121
14122			if (0 != pthread_mutex_init(&mutex, &mta))
14123				return 3;
14124
14125			if (0 != pthread_rwlockattr_init(&rwa))
14126				return 4;
14127
14128			if (0 != pthread_rwlockattr_setpshared(&rwa, PTHREAD_PROCESS_SHARED))
14129				return 5;
14130
14131			if (0 != pthread_rwlock_init(&rwlock, &rwa))
14132				return 6;
14133
14134			return 0;
14135		}
14136
14137
14138
14139_ACEOF
14140if ac_fn_c_try_run "$LINENO"; then :
14141  found_libpthread_process_shared="yes"
14142else
14143  found_libpthread_process_shared="no"
14144fi
14145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14146  conftest.$ac_objext conftest.beam conftest.$ac_ext
14147fi
14148
14149
14150
14151		CFLAGS="$am_save_CFLAGS"
14152		LDFLAGS="$am_save_LDFLAGS"
14153		LIBS="$am_save_LIBS"
14154	fi
14155
14156	if test "x$found_libpthread" = "xyes"; then
14157		if test "x$found_libpthread_process_shared" = "xyes"; then
14158
14159$as_echo "#define HAVE_PTHREAD_PROCESS_SHARED 1" >>confdefs.h
14160
14161		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14162$as_echo "yes" >&6; }
14163		else
14164		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14165$as_echo "no" >&6; }
14166		fi
14167	else
14168		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14169$as_echo "no" >&6; }
14170		LIBPTHREAD_CFLAGS=""
14171		LIBPTHREAD_LDFLAGS=""
14172		LIBPTHREAD_LIBS=""
14173	fi
14174
14175
14176
14177
14178
14179							if test "x$found_libpthread" != "xyes"; then
14180								as_fn_error $? "Unable to use libpthread (libpthread check failed)" "$LINENO" 5
14181							fi
14182							_full_libcurl_libs="$LIBPTHREAD_LIBS $_full_libcurl_libs"
14183						fi
14184
14185						for i in $_full_libcurl_libs; do
14186							case $i in
14187								-lcurl)
14188							;;
14189								-l*)
14190									_lib_i=$i
14191									_lib_name=`echo "$i" | cut -b3-`
14192									as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name ''_main" | $as_tr_sh`
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name " >&5
14194$as_echo_n "checking for main in -l$_lib_name ... " >&6; }
14195if eval \${$as_ac_Lib+:} false; then :
14196  $as_echo_n "(cached) " >&6
14197else
14198  ac_check_lib_save_LIBS=$LIBS
14199LIBS="-l$_lib_name   $LIBS"
14200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14201/* end confdefs.h.  */
14202
14203
14204int
14205main ()
14206{
14207return main ();
14208  ;
14209  return 0;
14210}
14211_ACEOF
14212if ac_fn_c_try_link "$LINENO"; then :
14213  eval "$as_ac_Lib=yes"
14214else
14215  eval "$as_ac_Lib=no"
14216fi
14217rm -f core conftest.err conftest.$ac_objext \
14218    conftest$ac_exeext conftest.$ac_ext
14219LIBS=$ac_check_lib_save_LIBS
14220fi
14221eval ac_res=\$$as_ac_Lib
14222	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14223$as_echo "$ac_res" >&6; }
14224if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14225
14226										if test "x$enable_static_libs" = "xyes"; then
14227											case $i in
14228												-lssl|-lcrypto)
14229													test "x$want_openssl" = "xyes" && i="$OPENSSL_LIBS"
14230											;;
14231												-lldap|-lldap_r|-llber)
14232													test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
14233											;;
14234												-l*)
14235													test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
14236											;;
14237											esac
14238										fi
14239										test -z "${LIBCURL_LIBS##*$_lib_i*}" && LIBCURL_LIBS=`echo "$LIBCURL_LIBS"|sed "s|$_lib_i||g"`
14240										test -z "${LIBCURL_LIBS##*$i*}" || LIBCURL_LIBS="$LIBCURL_LIBS $i"
14241
14242else
14243
14244										as_fn_error $? "static library $_lib_name required for linking libcurl not found" "$LINENO" 5
14245
14246fi
14247
14248							;;
14249								-framework|CoreFoundation|Security)
14250									LIBCURL_LIBS="$LIBCURL_LIBS $i"
14251							;;
14252							esac
14253						done
14254					fi # "x$enable_static" or "x$enable_static_libs"
14255
14256					LIBS="$LIBS $LIBCURL_LIBS"
14257
14258					{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5
14259$as_echo_n "checking for main in -lcurl... " >&6; }
14260if ${ac_cv_lib_curl_main+:} false; then :
14261  $as_echo_n "(cached) " >&6
14262else
14263  ac_check_lib_save_LIBS=$LIBS
14264LIBS="-lcurl  $LIBS"
14265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14266/* end confdefs.h.  */
14267
14268
14269int
14270main ()
14271{
14272return main ();
14273  ;
14274  return 0;
14275}
14276_ACEOF
14277if ac_fn_c_try_link "$LINENO"; then :
14278  ac_cv_lib_curl_main=yes
14279else
14280  ac_cv_lib_curl_main=no
14281fi
14282rm -f core conftest.err conftest.$ac_objext \
14283    conftest$ac_exeext conftest.$ac_ext
14284LIBS=$ac_check_lib_save_LIBS
14285fi
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5
14287$as_echo "$ac_cv_lib_curl_main" >&6; }
14288if test "x$ac_cv_lib_curl_main" = xyes; then :
14289  cat >>confdefs.h <<_ACEOF
14290#define HAVE_LIBCURL 1
14291_ACEOF
14292
14293  LIBS="-lcurl $LIBS"
14294
14295else
14296  as_fn_error $? "libcurl library not found" "$LINENO" 5
14297fi
14298
14299
14300					CFLAGS="$_save_curl_cflags"
14301					LDFLAGS="$_save_curl_ldflags"
14302					LIBS="$_save_curl_libs"
14303					unset _save_curl_cflags
14304					unset _save_curl_ldflags
14305					unset _save_curl_libs
14306
14307					# This is so silly, but Apple actually has a bug in their
14308					# curl-config script.  Fixed in Tiger, but there are still
14309					# lots of Panther installs around.
14310					case "${host}" in
14311						powerpc-apple-darwin7*)
14312							LIBCURL_LIBS=`echo $LIBCURL_LIBS | sed -e 's|-arch i386||g'`
14313						;;
14314					esac
14315				fi # "x$LIBCURL_LIBS" = "x"
14316
14317				# All curl-config scripts support --feature
14318				_libcurl_features=`$_libcurl_config --feature`
14319
14320				# Is it modern enough to have --protocols? (7.12.4)
14321				if test $_libcurl_version -ge 461828; then
14322					_libcurl_protocols=`$_libcurl_config --protocols`
14323				fi
14324
14325				_libcurl_try_link=yes
14326			fi # $_libcurl_wanted -eq 0 || "x$libcurl_cv_lib_version_ok" = "xyes"
14327
14328			unset _libcurl_wanted
14329		fi # -x "$_libcurl_config"
14330
14331		if test "x$_libcurl_try_link" = "xyes"; then
14332			# we didn't find curl-config, so let's see if the user-supplied
14333			# link line (or failing that, "-lcurl") is enough.
14334
14335			LIBCURL_LIBS=${LIBCURL_LIBS-"$_libcurl_libs -lcurl"}
14336
14337			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcurl is usable" >&5
14338$as_echo_n "checking whether libcurl is usable... " >&6; }
14339if ${libcurl_cv_lib_curl_usable+:} false; then :
14340  $as_echo_n "(cached) " >&6
14341else
14342
14343				_save_curl_libs="${LIBS}"
14344				_save_curl_ldflags="${LDFLAGS}"
14345				_save_curl_cflags="${CFLAGS}"
14346				LIBS="${LIBS} ${LIBCURL_LIBS}"
14347				LDFLAGS="${LDFLAGS} ${LIBCURL_LDFLAGS}"
14348				CFLAGS="${CFLAGS} ${LIBCURL_CFLAGS}"
14349				if test "x$enable_static_libs" = "xyes"; then
14350					test "x$want_openssl" = "xyes" && CFLAGS=" $OPENSSL_CFLAGS $CFLAGS"
14351					test "x$want_openssl" = "xyes" && LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
14352					test "x$want_ldap" = "xyes" && CFLAGS="$LDAP_CPPFLAGS $CFLAGS"
14353					test "x$want_ldap" = "xyes" && LDFLAGS="$LDAP_LDFLAGS $LDFLAGS"
14354				fi
14355
14356				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14357/* end confdefs.h.  */
14358#include <curl/curl.h>
14359#ifndef NULL
14360#define NULL (void *)0
14361#endif
14362int
14363main ()
14364{
14365
14366/* Try and use a few common options to force a failure if we are
14367   missing symbols or can't link. */
14368int x;
14369curl_easy_setopt(NULL,CURLOPT_URL,NULL);
14370x=CURL_ERROR_SIZE;
14371x=CURLOPT_WRITEFUNCTION;
14372x=CURLOPT_FILE;
14373x=CURLOPT_ERRORBUFFER;
14374x=CURLOPT_STDERR;
14375x=CURLOPT_VERBOSE;
14376
14377  ;
14378  return 0;
14379}
14380_ACEOF
14381if ac_fn_c_try_link "$LINENO"; then :
14382  libcurl_cv_lib_curl_usable=yes
14383else
14384  libcurl_cv_lib_curl_usable=no
14385fi
14386rm -f core conftest.err conftest.$ac_objext \
14387    conftest$ac_exeext conftest.$ac_ext
14388
14389				LIBS="${_save_curl_libs}"
14390				LDFLAGS="${_save_curl_ldflags}"
14391				CFLAGS="${_save_curl_cflags}"
14392				unset _save_curl_libs
14393				unset _save_curl_ldflags
14394				unset _save_curl_cflags
14395
14396fi
14397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_usable" >&5
14398$as_echo "$libcurl_cv_lib_curl_usable" >&6; }
14399
14400			if test "x$libcurl_cv_lib_curl_usable" = "xno"; then
14401				link_mode="dynamic"
14402				if test "x$enable_static" = "xyes"; then
14403					link_mode="static"
14404				fi
14405				as_fn_error $? "libcurl is not available for ${link_mode} linking" "$LINENO" 5
14406			fi
14407
14408			# Does curl_free() exist in this version of libcurl?
14409			# If not, fake it with free()
14410
14411			_save_curl_libs="${LIBS}"
14412			_save_curl_ldflags="${LDFLAGS}"
14413			_save_curl_cflags="${CFLAGS}"
14414			LIBS="${LIBS} ${LIBCURL_LIBS}"
14415			LDFLAGS="${LDFLAGS} ${LIBCURL_LDFLAGS}"
14416			CFLAGS="${CFLAGS} ${LIBCURL_CFLAGS}"
14417
14418			ac_fn_c_check_func "$LINENO" "curl_free" "ac_cv_func_curl_free"
14419if test "x$ac_cv_func_curl_free" = xyes; then :
14420
14421else
14422
14423$as_echo "#define curl_free free" >>confdefs.h
14424
14425fi
14426
14427
14428			ac_fn_c_check_func "$LINENO" "curl_easy_escape" "ac_cv_func_curl_easy_escape"
14429if test "x$ac_cv_func_curl_easy_escape" = xyes; then :
14430
14431$as_echo "#define HAVE_FUNCTION_CURL_EASY_ESCAPE 1" >>confdefs.h
14432
14433fi
14434
14435
14436			LIBS="${_save_curl_libs}"
14437			LDFLAGS="${_save_curl_ldflags}"
14438			CFLAGS="${_save_curl_cflags}"
14439			unset _save_curl_libs
14440			unset _save_curl_ldflags
14441			unset _save_curl_cflags
14442
14443
14444$as_echo "#define HAVE_LIBCURL 1" >>confdefs.h
14445
14446
14447
14448
14449			found_curl="yes"
14450
14451			for _libcurl_feature in $_libcurl_features ; do
14452				cat >>confdefs.h <<_ACEOF
14453#define `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_cpp` 1
14454_ACEOF
14455
14456				eval `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_sh`=yes
14457			done
14458
14459			if test "x$_libcurl_protocols" = "x"; then
14460				# We don't have --protocols, so just assume that all
14461				# protocols are available
14462				_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
14463
14464				if test "x$libcurl_feature_SSL" = "xyes"; then
14465					_libcurl_protocols="$_libcurl_protocols HTTPS"
14466
14467					# FTPS wasn't standards-compliant until version
14468					# 7.11.0
14469					if test $_libcurl_version -ge 461568; then
14470						_libcurl_protocols="$_libcurl_protocols FTPS"
14471					fi
14472				fi
14473			fi
14474
14475			for _libcurl_protocol in $_libcurl_protocols ; do
14476				cat >>confdefs.h <<_ACEOF
14477#define `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_cpp` 1
14478_ACEOF
14479
14480				eval `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_sh`=yes
14481			done
14482		else
14483			unset LIBCURL_LIBS
14484			unset LIBCURL_CFLAGS
14485		fi # "x$_libcurl_try_link" = "xyes"
14486
14487		unset _libcurl_try_link
14488		unset _libcurl_version_parse
14489		unset _libcurl_config
14490		unset _libcurl_feature
14491		unset _libcurl_features
14492		unset _libcurl_protocol
14493		unset _libcurl_protocols
14494		unset _libcurl_version
14495		unset _libcurl_libs
14496	fi # "x$want_curl" != "xno"
14497
14498  if test "x$want_curl" = "xno" || test "x$libcurl_cv_lib_curl_usable" != "xyes"; then
14499     # This is the IF-NO path
14500     :
14501  else
14502     # This is the IF-YES path
14503     :
14504  fi
14505
14506
14507if test "x$want_curl" = "xyes"; then
14508	if test "x$found_curl" != "xyes"; then
14509		as_fn_error $? "Curl library not found" "$LINENO" 5
14510	fi
14511fi
14512if test "x$found_curl" = "xyes"; then
14513	have_web_monitoring="cURL"
14514fi
14515CFLAGS="$LIBCURL_CFLAGS $CFLAGS"
14516
14517SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBCURL_LDFLAGS"
14518SERVER_LIBS="$SERVER_LIBS $LIBCURL_LIBS"
14519
14520PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBCURL_LDFLAGS"
14521PROXY_LIBS="$PROXY_LIBS $LIBCURL_LIBS"
14522
14523 if test "x$found_curl" = "xyes"; then
14524  HAVE_LIBCURL_TRUE=
14525  HAVE_LIBCURL_FALSE='#'
14526else
14527  HAVE_LIBCURL_TRUE='#'
14528  HAVE_LIBCURL_FALSE=
14529fi
14530
14531
14532AGENT_LDFLAGS="$AGENT_LDFLAGS $LIBCURL_LDFLAGS"
14533AGENT_LIBS="$AGENT_LIBS $LIBCURL_LIBS"
14534
14535ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
14536ZBXGET_LIBS="$ZBXGET_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
14537
14538SENDER_LDFLAGS="$SENDER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
14539SENDER_LIBS="$SENDER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
14540
14541ZBXJS_LDFLAGS="$ZBXJS_LDFLAGS $LIBCURL_LDFLAGS"
14542ZBXJS_LIBS="$ZBXJS_LIBS $LIBCURL_LIBS"
14543
14544if test "x$server" = "xyes" || test "x$proxy" = "xyes" || test "x$agent" = "xyes" || test "x$agent2" = "xyes"; then
14545
14546
14547# Check whether --with-libpcre was given.
14548if test "${with_libpcre+set}" = set; then :
14549  withval=$with_libpcre;
14550			if test "$withval" = "yes"; then
14551				if test -f /usr/local/include/pcre.h; then
14552					withval="/usr/local"
14553				else
14554					withval="/usr"
14555				fi
14556			else
14557				_libpcre_dir_lib="$withval/lib"
14558			fi
14559			_libpcre_dir="$withval"
14560			test "x$withval" = "xyes" && withval=/usr
14561			LIBPCRE_CFLAGS="-I$withval/include"
14562			LIBPCRE_LDFLAGS="-L$withval/lib"
14563			_libpcre_dir_set="yes"
14564
14565
14566fi
14567
14568
14569
14570# Check whether --with-libpcre-include was given.
14571if test "${with_libpcre_include+set}" = set; then :
14572  withval=$with_libpcre_include;
14573			LIBPCRE_CFLAGS="-I$withval"
14574			_libpcre_dir_set="yes"
14575
14576
14577fi
14578
14579
14580
14581# Check whether --with-libpcre-lib was given.
14582if test "${with_libpcre_lib+set}" = set; then :
14583  withval=$with_libpcre_lib;
14584			_libpcre_dir="$withval"
14585			_libpcre_dir_lib="$withval"
14586			LIBPCRE_LDFLAGS="-L$withval"
14587			_libpcre_dir_set="yes"
14588
14589
14590fi
14591
14592
14593	if test "x$enable_static_libs" = "xyes"; then
14594
14595
14596
14597
14598
14599
14600
14601
14602if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14603	if test -n "$ac_tool_prefix"; then
14604  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14605set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14607$as_echo_n "checking for $ac_word... " >&6; }
14608if ${ac_cv_path_PKG_CONFIG+:} false; then :
14609  $as_echo_n "(cached) " >&6
14610else
14611  case $PKG_CONFIG in
14612  [\\/]* | ?:[\\/]*)
14613  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14614  ;;
14615  *)
14616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14617for as_dir in $PATH
14618do
14619  IFS=$as_save_IFS
14620  test -z "$as_dir" && as_dir=.
14621    for ac_exec_ext in '' $ac_executable_extensions; do
14622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14623    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14625    break 2
14626  fi
14627done
14628  done
14629IFS=$as_save_IFS
14630
14631  ;;
14632esac
14633fi
14634PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14635if test -n "$PKG_CONFIG"; then
14636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14637$as_echo "$PKG_CONFIG" >&6; }
14638else
14639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14640$as_echo "no" >&6; }
14641fi
14642
14643
14644fi
14645if test -z "$ac_cv_path_PKG_CONFIG"; then
14646  ac_pt_PKG_CONFIG=$PKG_CONFIG
14647  # Extract the first word of "pkg-config", so it can be a program name with args.
14648set dummy pkg-config; ac_word=$2
14649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14650$as_echo_n "checking for $ac_word... " >&6; }
14651if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14652  $as_echo_n "(cached) " >&6
14653else
14654  case $ac_pt_PKG_CONFIG in
14655  [\\/]* | ?:[\\/]*)
14656  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14657  ;;
14658  *)
14659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14660for as_dir in $PATH
14661do
14662  IFS=$as_save_IFS
14663  test -z "$as_dir" && as_dir=.
14664    for ac_exec_ext in '' $ac_executable_extensions; do
14665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14666    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14668    break 2
14669  fi
14670done
14671  done
14672IFS=$as_save_IFS
14673
14674  ;;
14675esac
14676fi
14677ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14678if test -n "$ac_pt_PKG_CONFIG"; then
14679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14680$as_echo "$ac_pt_PKG_CONFIG" >&6; }
14681else
14682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14683$as_echo "no" >&6; }
14684fi
14685
14686  if test "x$ac_pt_PKG_CONFIG" = x; then
14687    PKG_CONFIG=""
14688  else
14689    case $cross_compiling:$ac_tool_warned in
14690yes:)
14691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14693ac_tool_warned=yes ;;
14694esac
14695    PKG_CONFIG=$ac_pt_PKG_CONFIG
14696  fi
14697else
14698  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14699fi
14700
14701fi
14702if test -n "$PKG_CONFIG"; then
14703	_pkg_min_version=0.9.0
14704	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14705$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14706	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14707		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14708$as_echo "yes" >&6; }
14709	else
14710		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14711$as_echo "no" >&6; }
14712		PKG_CONFIG=""
14713	fi
14714fi
14715		test -z "$PKG_CONFIG" -a -z "$_libpcre_dir_lib" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
14716
14717	fi
14718
14719	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcre support" >&5
14720$as_echo_n "checking for libpcre support... " >&6; }
14721
14722	LIBPCRE_LIBS="-lpcre"
14723
14724	if test "x$enable_static" = "xyes"; then
14725		LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
14726	elif test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
14727		LIBPCRE_LIBS="$_libpcre_dir_lib/libpcre.a"
14728	elif test "x$enable_static_libs" = "xyes"; then
14729
14730		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
14731
14732		if test -z "$_libpcre_dir_lib"; then
14733			if test -n "$PKG_CONFIG" && \
14734    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
14735  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
14736  ac_status=$?
14737  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14738  test $ac_status = 0; }; then
14739
14740				LIBPCRE_LIBS=`$PKG_CONFIG --static --libs libpcre`
14741
14742else
14743
14744				as_fn_error $? "Not found libpcre package" "$LINENO" 5
14745
14746fi
14747		else
14748			{ { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libpcre_dir_lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors libpcre"; } >&5
14749  (PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors libpcre) 2>&5
14750  ac_status=$?
14751  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14752  test $ac_status = 0; } || as_fn_error $? "\"Not found libpcre package in $_libpcre_dir/lib/pkgconfig\"" "$LINENO" 5
14753			LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --static --libs libpcre`
14754			test -z "$LIBPCRE_LIBS" && LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --libs libpcre`
14755		fi
14756
14757		if test "x$static_linking_support" = "xno"; then
14758			LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s|-lpcre|$_libpcre_dir_lib/libpcre.a|g"`
14759		else
14760			LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s/-lpcre/${static_linking_support}static -lpcre ${static_linking_support}dynamic/g"`
14761		fi
14762	fi
14763
14764	if test -n "$_libpcre_dir_set" -o -f /usr/include/pcre.h; then
14765		found_libpcre="yes"
14766	elif test -f /usr/local/include/pcre.h; then
14767		LIBPCRE_CFLAGS="-I/usr/local/include"
14768		LIBPCRE_LDFLAGS="-L/usr/local/lib"
14769		found_libpcre="yes"
14770	elif test -f /usr/pkg/include/pcre.h; then
14771		LIBPCRE_CFLAGS="-I/usr/pkg/include"
14772		LIBPCRE_LDFLAGS="-L/usr/pkg/lib"
14773		LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS -Wl,-R/usr/pkg/lib"
14774		found_libpcre="yes"
14775	elif test -f /opt/csw/include/pcre.h; then
14776		LIBPCRE_CFLAGS="-I/opt/csw/include"
14777		LIBPCRE_LDFLAGS="-L/opt/csw/lib"
14778		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
14779			LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
14780		else
14781			LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS -Wl,-R/opt/csw/lib"
14782		fi
14783		found_libpcre="yes"
14784	else
14785		found_libpcre="no"
14786		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14787$as_echo "no" >&6; }
14788	fi
14789
14790	if test "x$found_libpcre" = "xyes"; then
14791		am_save_CFLAGS="$CFLAGS"
14792		am_save_LDFLAGS="$LDFLAGS"
14793		am_save_LIBS="$LIBS"
14794
14795		CFLAGS="$CFLAGS $LIBPCRE_CFLAGS"
14796		LDFLAGS="$LDFLAGS $LIBPCRE_LDFLAGS"
14797		LIBS="$LIBS $LIBPCRE_LIBS"
14798
14799		found_libpcre="no"
14800
14801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14802/* end confdefs.h.  */
14803
14804#include <pcre.h>
14805
14806int
14807main ()
14808{
14809
14810	const char* error = NULL;
14811	int error_offset = -1;
14812	pcre *regexp = pcre_compile("test", PCRE_UTF8, &error, &error_offset, NULL);
14813	pcre_free(regexp);
14814
14815  ;
14816  return 0;
14817}
14818_ACEOF
14819if ac_fn_c_try_link "$LINENO"; then :
14820  found_libpcre="yes"
14821fi
14822rm -f core conftest.err conftest.$ac_objext \
14823    conftest$ac_exeext conftest.$ac_ext
14824
14825
14826		CFLAGS="$am_save_CFLAGS"
14827		LDFLAGS="$am_save_LDFLAGS"
14828		LIBS="$am_save_LIBS"
14829	fi
14830
14831	if test "x$found_libpcre" = "xyes"; then
14832
14833$as_echo "#define HAVE_PCRE_H 1" >>confdefs.h
14834
14835		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14836$as_echo "yes" >&6; }
14837	else
14838		LIBPCRE_CFLAGS=""
14839		LIBPCRE_LDFLAGS=""
14840		LIBPCRE_LIBS=""
14841	fi
14842
14843
14844
14845
14846
14847	if test "x$found_libpcre" != "xyes"; then
14848		as_fn_error $? "Unable to use libpcre (libpcre check failed)" "$LINENO" 5
14849	fi
14850fi
14851
14852CFLAGS="$CFLAGS $LIBPCRE_CFLAGS"
14853LDFLAGS="$LDFLAGS $LIBPCRE_LDFLAGS"
14854if test "x$ARCH" = "xosx"; then
14855	LIBS="$LIBPCRE_LIBS $LIBS"
14856else
14857	LIBS="$LIBS $LIBPCRE_LIBS"
14858fi
14859
14860found_iconv="no"
14861
14862
14863# Check whether --with-iconv was given.
14864if test "${with_iconv+set}" = set; then :
14865  withval=$with_iconv;
14866			if test "$withval" = "yes"; then
14867				ICONV_CFLAGS="-I/usr/include"
14868				ICONV_LDFLAGS="-L/usr/lib"
14869				_iconv_dir_set=$withval
14870			elif test "$withval" != "no"; then
14871				_iconv_dir_lib="$withval/lib"
14872				ICONV_CFLAGS="-I$withval/include"
14873				ICONV_LDFLAGS="-L$_iconv_dir_lib"
14874				_iconv_dir_set="yes"
14875			fi
14876
14877
14878fi
14879
14880
14881
14882# Check whether --with-iconv-include was given.
14883if test "${with_iconv_include+set}" = set; then :
14884  withval=$with_iconv_include;
14885			ICONV_CFLAGS="-I$withval"
14886			_iconv_dir_set="yes"
14887
14888
14889fi
14890
14891
14892
14893# Check whether --with-iconv-lib was given.
14894if test "${with_iconv_lib+set}" = set; then :
14895  withval=$with_iconv_lib;
14896			ICONV_LDFLAGS="-L$withval"
14897			_iconv_dir_lib="-L$withval"
14898			_iconv_dir_set="yes"
14899
14900
14901fi
14902
14903
14904	ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
14905if test "x$ac_cv_header_iconv_h" = xyes; then :
14906  found_iconv=yes
14907fi
14908
14909
14910	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICONV support" >&5
14911$as_echo_n "checking for ICONV support... " >&6; }
14912	if test -n "$_iconv_dir_set" -o "x$found_iconv" = xyes; then
14913		found_iconv="yes"
14914	elif test -f /usr/local/include/iconv.h; then
14915		ICONV_CFLAGS="-I/usr/local/include"
14916		ICONV_LDFLAGS="-L/usr/local/lib"
14917		found_iconv="yes"
14918	else
14919		found_iconv="no"
14920		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14921$as_echo "no" >&6; }
14922	fi
14923
14924	if test "x$found_iconv" = "xyes"; then
14925		am_save_CFLAGS="$CFLAGS"
14926		am_save_LDFLAGS="$LDFLAGS"
14927		am_save_LIBS="$LIBS"
14928
14929		CFLAGS="$CFLAGS $ICONV_CFLAGS"
14930		LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
14931
14932
14933found_iconv=no
14934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14935/* end confdefs.h.  */
14936
14937#include <stdlib.h>
14938#include <iconv.h>
14939
14940int
14941main ()
14942{
14943
14944	iconv_t cd = iconv_open("","");
14945	iconv(cd, NULL, NULL, NULL, NULL);
14946	iconv_close(cd);
14947
14948  ;
14949  return 0;
14950}
14951_ACEOF
14952if ac_fn_c_try_link "$LINENO"; then :
14953  found_iconv="yes"
14954fi
14955rm -f core conftest.err conftest.$ac_objext \
14956    conftest$ac_exeext conftest.$ac_ext
14957
14958
14959		if test "x$found_iconv" = "xno"; then
14960			ICONV_LIBS="-liconv"
14961			if test "x$enable_static_libs" = "xyes"; then
14962				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
14963
14964				if test "x$static_linking_support" = "xno"; then
14965					ICONV_LIBS="$_iconv_dir_lib/libiconv.a"
14966				else
14967					ICONV_LIBS="${static_linking_support}static $ICONV_LIBS ${static_linking_support}dynamic"
14968				fi
14969			fi
14970			LIBS="$LIBS $ICONV_LIBS"
14971
14972found_iconv=no
14973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14974/* end confdefs.h.  */
14975
14976#include <stdlib.h>
14977#include <iconv.h>
14978
14979int
14980main ()
14981{
14982
14983	iconv_t cd = iconv_open("","");
14984	iconv(cd, NULL, NULL, NULL, NULL);
14985	iconv_close(cd);
14986
14987  ;
14988  return 0;
14989}
14990_ACEOF
14991if ac_fn_c_try_link "$LINENO"; then :
14992  found_iconv="yes"
14993fi
14994rm -f core conftest.err conftest.$ac_objext \
14995    conftest$ac_exeext conftest.$ac_ext
14996
14997		fi
14998
14999		LIBS="$am_save_LIBS"
15000		CFLAGS="$am_save_CFLAGS"
15001		LDFLAGS="$am_save_LDFLAGS"
15002	fi
15003
15004	if test "x$found_iconv" = "xyes"; then
15005
15006$as_echo "#define HAVE_ICONV 1" >>confdefs.h
15007
15008		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15009$as_echo "yes" >&6; }
15010	else
15011		ICONV_LIBS=""
15012		ICONV_CFLAGS=""
15013		ICONV_LDFLAGS=""
15014	fi
15015
15016
15017
15018
15019
15020if test "x$found_iconv" != "xyes"; then
15021	as_fn_error $? "Unable to use iconv (libiconv check failed)" "$LINENO" 5
15022fi
15023LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
15024LIBS="$LIBS $ICONV_LIBS"
15025
15026RANLIB="ranlib"
15027
15028
15029SERVER_CONFIG_FILE="${sysconfdir}/zabbix_server.conf"
15030PROXY_CONFIG_FILE="${sysconfdir}/zabbix_proxy.conf"
15031AGENT_CONFIG_FILE="${sysconfdir}/zabbix_agentd.conf"
15032AGENT2_CONFIG_FILE="${sysconfdir}/zabbix_agent2.conf"
15033WEBSERVICE_CONFIG_FILE="${sysconfdir}/zabbix_web_service.conf"
15034
15035EXTERNAL_SCRIPTS_PATH="${datadir}/zabbix/externalscripts"
15036ALERT_SCRIPTS_PATH="${datadir}/zabbix/alertscripts"
15037
15038CURL_SSL_CERT_LOCATION="${datadir}/zabbix/ssl/certs"
15039CURL_SSL_KEY_LOCATION="${datadir}/zabbix/ssl/keys"
15040
15041LOAD_MODULE_PATH="${libdir}/modules"
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055if test "x$HAVE_START_GROUP" = "xyes"; then
15056	LD_START_GROUP=-Wl,--start-group
15057	LD_END_GROUP=-Wl,--end-group
15058fi
15059
15060if test "x$agent2" = "xyes"; then
15061	CGO_CFLAGS=$TLS_CFLAGS
15062	CGO_LDFLAGS="$AGENT2_LDFLAGS $LD_START_GROUP \
15063		\${abs_top_builddir}/src/zabbix_agent/logfiles/libzbxlogfiles.a \
15064		\${abs_top_builddir}/src/libs/zbxcomms/libzbxcomms.a \
15065		\${abs_top_builddir}/src/libs/zbxcommon/libzbxcommon.a \
15066		\${abs_top_builddir}/src/libs/zbxcrypto/libzbxcrypto.a \
15067		\${abs_top_builddir}/src/libs/zbxsys/libzbxsys.a \
15068		\${abs_top_builddir}/src/libs/zbxnix/libzbxnix.a \
15069		\${abs_top_builddir}/src/libs/zbxconf/libzbxconf.a \
15070		\${abs_top_builddir}/src/libs/zbxhttp/libzbxhttp.a \
15071		\${abs_top_builddir}/src/libs/zbxcompress/libzbxcompress.a \
15072		\${abs_top_builddir}/src/libs/zbxregexp/libzbxregexp.a \
15073		\${abs_top_builddir}/src/libs/zbxsysinfo/libzbxagent2sysinfo.a \
15074		\${abs_top_builddir}/src/libs/zbxsysinfo/common/libcommonsysinfo.a \
15075		\${abs_top_builddir}/src/libs/zbxsysinfo/simple/libsimplesysinfo.a \
15076		\${abs_top_builddir}/src/libs/zbxsysinfo/"$ARCH"/libspechostnamesysinfo.a \
15077		\${abs_top_builddir}/src/libs/zbxsysinfo/"$ARCH"/libspecsysinfo.a \
15078		\${abs_top_builddir}/src/libs/zbxexec/libzbxexec.a \
15079		\${abs_top_builddir}/src/libs/zbxalgo/libzbxalgo.a \
15080		\${abs_top_builddir}/src/libs/zbxjson/libzbxjson.a \
15081		$LIBS $AGENT2_LIBS $LD_END_GROUP"
15082
15083
15084
15085fi
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110GOBIN=${sbindir}
15111GOCMD=go
15112GOWORKDIR=$ac_abs_confdir/go/src/zabbix
15113
15114export GOBIN=${GOBIN}
15115
15116
15117
15118
15119
15120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mkdir -p candidate" >&5
15121$as_echo_n "checking for mkdir -p candidate... " >&6; }
15122if test "x${MKDIR_P}" = "x"; then
15123        if test "x${mkdir_p}" = "x"; then
15124                as_fn_error $? "No suitable \"mkdir -p\" candidate found." "$LINENO" 5
15125        fi
15126        MKDIR_P=${mkdir_p}
15127
15128fi
15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${MKDIR_P})" >&5
15130$as_echo "ok (${MKDIR_P})" >&6; }
15131
15132case "x$ARCH" in
15133	xlinux|xsolaris)
15134
15135$as_echo "#define ZBX_PROCSTAT_COLLECTOR 1 " >>confdefs.h
15136
15137		;;
15138esac
15139
15140
15141
15142
15143ac_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/zbxeval/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/zbxvault/Makefile src/libs/zbxdiag/Makefile src/libs/zbxtrends/Makefile src/libs/zbxavailability/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/availability/Makefile src/zabbix_server/lld/Makefile src/zabbix_server/reporter/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"
15144
15145cat >confcache <<\_ACEOF
15146# This file is a shell script that caches the results of configure
15147# tests run on this system so they can be shared between configure
15148# scripts and configure runs, see configure's option --config-cache.
15149# It is not useful on other systems.  If it contains results you don't
15150# want to keep, you may remove or edit it.
15151#
15152# config.status only pays attention to the cache file if you give it
15153# the --recheck option to rerun configure.
15154#
15155# `ac_cv_env_foo' variables (set or unset) will be overridden when
15156# loading this file, other *unset* `ac_cv_foo' will be assigned the
15157# following values.
15158
15159_ACEOF
15160
15161# The following way of writing the cache mishandles newlines in values,
15162# but we know of no workaround that is simple, portable, and efficient.
15163# So, we kill variables containing newlines.
15164# Ultrix sh set writes to stderr and can't be redirected directly,
15165# and sets the high bit in the cache file unless we assign to the vars.
15166(
15167  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15168    eval ac_val=\$$ac_var
15169    case $ac_val in #(
15170    *${as_nl}*)
15171      case $ac_var in #(
15172      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15173$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15174      esac
15175      case $ac_var in #(
15176      _ | IFS | as_nl) ;; #(
15177      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15178      *) { eval $ac_var=; unset $ac_var;} ;;
15179      esac ;;
15180    esac
15181  done
15182
15183  (set) 2>&1 |
15184    case $as_nl`(ac_space=' '; set) 2>&1` in #(
15185    *${as_nl}ac_space=\ *)
15186      # `set' does not quote correctly, so add quotes: double-quote
15187      # substitution turns \\\\ into \\, and sed turns \\ into \.
15188      sed -n \
15189	"s/'/'\\\\''/g;
15190	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15191      ;; #(
15192    *)
15193      # `set' quotes correctly as required by POSIX, so do not add quotes.
15194      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15195      ;;
15196    esac |
15197    sort
15198) |
15199  sed '
15200     /^ac_cv_env_/b end
15201     t clear
15202     :clear
15203     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15204     t end
15205     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15206     :end' >>confcache
15207if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15208  if test -w "$cache_file"; then
15209    if test "x$cache_file" != "x/dev/null"; then
15210      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15211$as_echo "$as_me: updating cache $cache_file" >&6;}
15212      if test ! -f "$cache_file" || test -h "$cache_file"; then
15213	cat confcache >"$cache_file"
15214      else
15215        case $cache_file in #(
15216        */* | ?:*)
15217	  mv -f confcache "$cache_file"$$ &&
15218	  mv -f "$cache_file"$$ "$cache_file" ;; #(
15219        *)
15220	  mv -f confcache "$cache_file" ;;
15221	esac
15222      fi
15223    fi
15224  else
15225    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15226$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15227  fi
15228fi
15229rm -f confcache
15230
15231test "x$prefix" = xNONE && prefix=$ac_default_prefix
15232# Let make expand exec_prefix.
15233test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15234
15235DEFS=-DHAVE_CONFIG_H
15236
15237ac_libobjs=
15238ac_ltlibobjs=
15239for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15240  # 1. Remove the extension, and $U if already installed.
15241  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15242  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15243  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15244  #    will be set to the directory where LIBOBJS objects are built.
15245  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15246  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15247done
15248LIBOBJS=$ac_libobjs
15249
15250LTLIBOBJS=$ac_ltlibobjs
15251
15252
15253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
15254$as_echo_n "checking that generated files are newer than configure... " >&6; }
15255   if test -n "$am_sleep_pid"; then
15256     # Hide warnings about reused PIDs.
15257     wait $am_sleep_pid 2>/dev/null
15258   fi
15259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15260$as_echo "done" >&6; }
15261 if test -n "$EXEEXT"; then
15262  am__EXEEXT_TRUE=
15263  am__EXEEXT_FALSE='#'
15264else
15265  am__EXEEXT_TRUE='#'
15266  am__EXEEXT_FALSE=
15267fi
15268
15269if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
15270  as_fn_error $? "conditional \"AMDEP\" was never defined.
15271Usually this means the macro was only invoked conditionally." "$LINENO" 5
15272fi
15273if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
15274  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
15275Usually this means the macro was only invoked conditionally." "$LINENO" 5
15276fi
15277if test -z "${SERVER_TRUE}" && test -z "${SERVER_FALSE}"; then
15278  as_fn_error $? "conditional \"SERVER\" was never defined.
15279Usually this means the macro was only invoked conditionally." "$LINENO" 5
15280fi
15281if test -z "${PROXY_TRUE}" && test -z "${PROXY_FALSE}"; then
15282  as_fn_error $? "conditional \"PROXY\" was never defined.
15283Usually this means the macro was only invoked conditionally." "$LINENO" 5
15284fi
15285if test -z "${AGENT_TRUE}" && test -z "${AGENT_FALSE}"; then
15286  as_fn_error $? "conditional \"AGENT\" was never defined.
15287Usually this means the macro was only invoked conditionally." "$LINENO" 5
15288fi
15289if test -z "${AGENT2_TRUE}" && test -z "${AGENT2_FALSE}"; then
15290  as_fn_error $? "conditional \"AGENT2\" was never defined.
15291Usually this means the macro was only invoked conditionally." "$LINENO" 5
15292fi
15293if test -z "${WEBSERVICE_TRUE}" && test -z "${WEBSERVICE_FALSE}"; then
15294  as_fn_error $? "conditional \"WEBSERVICE\" was never defined.
15295Usually this means the macro was only invoked conditionally." "$LINENO" 5
15296fi
15297if test -z "${JAVA_TRUE}" && test -z "${JAVA_FALSE}"; then
15298  as_fn_error $? "conditional \"JAVA\" was never defined.
15299Usually this means the macro was only invoked conditionally." "$LINENO" 5
15300fi
15301if test -z "${IPV6_TRUE}" && test -z "${IPV6_FALSE}"; then
15302  as_fn_error $? "conditional \"IPV6\" was never defined.
15303Usually this means the macro was only invoked conditionally." "$LINENO" 5
15304fi
15305if test -z "${DBSCHEMA_TRUE}" && test -z "${DBSCHEMA_FALSE}"; then
15306  as_fn_error $? "conditional \"DBSCHEMA\" was never defined.
15307Usually this means the macro was only invoked conditionally." "$LINENO" 5
15308fi
15309if test -z "${ZBXCMOCKA_TRUE}" && test -z "${ZBXCMOCKA_FALSE}"; then
15310  as_fn_error $? "conditional \"ZBXCMOCKA\" was never defined.
15311Usually this means the macro was only invoked conditionally." "$LINENO" 5
15312fi
15313if test -z "${HAVE_IPMI_TRUE}" && test -z "${HAVE_IPMI_FALSE}"; then
15314  as_fn_error $? "conditional \"HAVE_IPMI\" was never defined.
15315Usually this means the macro was only invoked conditionally." "$LINENO" 5
15316fi
15317if test -z "${HAVE_LIBXML2_TRUE}" && test -z "${HAVE_LIBXML2_FALSE}"; then
15318  as_fn_error $? "conditional \"HAVE_LIBXML2\" was never defined.
15319Usually this means the macro was only invoked conditionally." "$LINENO" 5
15320fi
15321if test -z "${PROXY_IPCSERVICE_TRUE}" && test -z "${PROXY_IPCSERVICE_FALSE}"; then
15322  as_fn_error $? "conditional \"PROXY_IPCSERVICE\" was never defined.
15323Usually this means the macro was only invoked conditionally." "$LINENO" 5
15324fi
15325if test -z "${HAVE_LIBMODBUS_TRUE}" && test -z "${HAVE_LIBMODBUS_FALSE}"; then
15326  as_fn_error $? "conditional \"HAVE_LIBMODBUS\" was never defined.
15327Usually this means the macro was only invoked conditionally." "$LINENO" 5
15328fi
15329if test -z "${HAVE_LIBCURL_TRUE}" && test -z "${HAVE_LIBCURL_FALSE}"; then
15330  as_fn_error $? "conditional \"HAVE_LIBCURL\" was never defined.
15331Usually this means the macro was only invoked conditionally." "$LINENO" 5
15332fi
15333
15334: "${CONFIG_STATUS=./config.status}"
15335ac_write_fail=0
15336ac_clean_files_save=$ac_clean_files
15337ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15339$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15340as_write_fail=0
15341cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15342#! $SHELL
15343# Generated by $as_me.
15344# Run this file to recreate the current configuration.
15345# Compiler output produced by configure, useful for debugging
15346# configure, is in config.log if it exists.
15347
15348debug=false
15349ac_cs_recheck=false
15350ac_cs_silent=false
15351
15352SHELL=\${CONFIG_SHELL-$SHELL}
15353export SHELL
15354_ASEOF
15355cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15356## -------------------- ##
15357## M4sh Initialization. ##
15358## -------------------- ##
15359
15360# Be more Bourne compatible
15361DUALCASE=1; export DUALCASE # for MKS sh
15362if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15363  emulate sh
15364  NULLCMD=:
15365  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15366  # is contrary to our usage.  Disable this feature.
15367  alias -g '${1+"$@"}'='"$@"'
15368  setopt NO_GLOB_SUBST
15369else
15370  case `(set -o) 2>/dev/null` in #(
15371  *posix*) :
15372    set -o posix ;; #(
15373  *) :
15374     ;;
15375esac
15376fi
15377
15378
15379as_nl='
15380'
15381export as_nl
15382# Printing a long string crashes Solaris 7 /usr/bin/printf.
15383as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15384as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15385as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15386# Prefer a ksh shell builtin over an external printf program on Solaris,
15387# but without wasting forks for bash or zsh.
15388if test -z "$BASH_VERSION$ZSH_VERSION" \
15389    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15390  as_echo='print -r --'
15391  as_echo_n='print -rn --'
15392elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15393  as_echo='printf %s\n'
15394  as_echo_n='printf %s'
15395else
15396  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15397    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15398    as_echo_n='/usr/ucb/echo -n'
15399  else
15400    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15401    as_echo_n_body='eval
15402      arg=$1;
15403      case $arg in #(
15404      *"$as_nl"*)
15405	expr "X$arg" : "X\\(.*\\)$as_nl";
15406	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15407      esac;
15408      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15409    '
15410    export as_echo_n_body
15411    as_echo_n='sh -c $as_echo_n_body as_echo'
15412  fi
15413  export as_echo_body
15414  as_echo='sh -c $as_echo_body as_echo'
15415fi
15416
15417# The user is always right.
15418if test "${PATH_SEPARATOR+set}" != set; then
15419  PATH_SEPARATOR=:
15420  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15421    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15422      PATH_SEPARATOR=';'
15423  }
15424fi
15425
15426
15427# IFS
15428# We need space, tab and new line, in precisely that order.  Quoting is
15429# there to prevent editors from complaining about space-tab.
15430# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15431# splitting by setting IFS to empty value.)
15432IFS=" ""	$as_nl"
15433
15434# Find who we are.  Look in the path if we contain no directory separator.
15435as_myself=
15436case $0 in #((
15437  *[\\/]* ) as_myself=$0 ;;
15438  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15439for as_dir in $PATH
15440do
15441  IFS=$as_save_IFS
15442  test -z "$as_dir" && as_dir=.
15443    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15444  done
15445IFS=$as_save_IFS
15446
15447     ;;
15448esac
15449# We did not find ourselves, most probably we were run as `sh COMMAND'
15450# in which case we are not to be found in the path.
15451if test "x$as_myself" = x; then
15452  as_myself=$0
15453fi
15454if test ! -f "$as_myself"; then
15455  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15456  exit 1
15457fi
15458
15459# Unset variables that we do not need and which cause bugs (e.g. in
15460# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15461# suppresses any "Segmentation fault" message there.  '((' could
15462# trigger a bug in pdksh 5.2.14.
15463for as_var in BASH_ENV ENV MAIL MAILPATH
15464do eval test x\${$as_var+set} = xset \
15465  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15466done
15467PS1='$ '
15468PS2='> '
15469PS4='+ '
15470
15471# NLS nuisances.
15472LC_ALL=C
15473export LC_ALL
15474LANGUAGE=C
15475export LANGUAGE
15476
15477# CDPATH.
15478(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15479
15480
15481# as_fn_error STATUS ERROR [LINENO LOG_FD]
15482# ----------------------------------------
15483# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15484# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15485# script with STATUS, using 1 if that was 0.
15486as_fn_error ()
15487{
15488  as_status=$1; test $as_status -eq 0 && as_status=1
15489  if test "$4"; then
15490    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15491    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15492  fi
15493  $as_echo "$as_me: error: $2" >&2
15494  as_fn_exit $as_status
15495} # as_fn_error
15496
15497
15498# as_fn_set_status STATUS
15499# -----------------------
15500# Set $? to STATUS, without forking.
15501as_fn_set_status ()
15502{
15503  return $1
15504} # as_fn_set_status
15505
15506# as_fn_exit STATUS
15507# -----------------
15508# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15509as_fn_exit ()
15510{
15511  set +e
15512  as_fn_set_status $1
15513  exit $1
15514} # as_fn_exit
15515
15516# as_fn_unset VAR
15517# ---------------
15518# Portably unset VAR.
15519as_fn_unset ()
15520{
15521  { eval $1=; unset $1;}
15522}
15523as_unset=as_fn_unset
15524# as_fn_append VAR VALUE
15525# ----------------------
15526# Append the text in VALUE to the end of the definition contained in VAR. Take
15527# advantage of any shell optimizations that allow amortized linear growth over
15528# repeated appends, instead of the typical quadratic growth present in naive
15529# implementations.
15530if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15531  eval 'as_fn_append ()
15532  {
15533    eval $1+=\$2
15534  }'
15535else
15536  as_fn_append ()
15537  {
15538    eval $1=\$$1\$2
15539  }
15540fi # as_fn_append
15541
15542# as_fn_arith ARG...
15543# ------------------
15544# Perform arithmetic evaluation on the ARGs, and store the result in the
15545# global $as_val. Take advantage of shells that can avoid forks. The arguments
15546# must be portable across $(()) and expr.
15547if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15548  eval 'as_fn_arith ()
15549  {
15550    as_val=$(( $* ))
15551  }'
15552else
15553  as_fn_arith ()
15554  {
15555    as_val=`expr "$@" || test $? -eq 1`
15556  }
15557fi # as_fn_arith
15558
15559
15560if expr a : '\(a\)' >/dev/null 2>&1 &&
15561   test "X`expr 00001 : '.*\(...\)'`" = X001; then
15562  as_expr=expr
15563else
15564  as_expr=false
15565fi
15566
15567if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15568  as_basename=basename
15569else
15570  as_basename=false
15571fi
15572
15573if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15574  as_dirname=dirname
15575else
15576  as_dirname=false
15577fi
15578
15579as_me=`$as_basename -- "$0" ||
15580$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15581	 X"$0" : 'X\(//\)$' \| \
15582	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15583$as_echo X/"$0" |
15584    sed '/^.*\/\([^/][^/]*\)\/*$/{
15585	    s//\1/
15586	    q
15587	  }
15588	  /^X\/\(\/\/\)$/{
15589	    s//\1/
15590	    q
15591	  }
15592	  /^X\/\(\/\).*/{
15593	    s//\1/
15594	    q
15595	  }
15596	  s/.*/./; q'`
15597
15598# Avoid depending upon Character Ranges.
15599as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15600as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15601as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15602as_cr_digits='0123456789'
15603as_cr_alnum=$as_cr_Letters$as_cr_digits
15604
15605ECHO_C= ECHO_N= ECHO_T=
15606case `echo -n x` in #(((((
15607-n*)
15608  case `echo 'xy\c'` in
15609  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
15610  xy)  ECHO_C='\c';;
15611  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15612       ECHO_T='	';;
15613  esac;;
15614*)
15615  ECHO_N='-n';;
15616esac
15617
15618rm -f conf$$ conf$$.exe conf$$.file
15619if test -d conf$$.dir; then
15620  rm -f conf$$.dir/conf$$.file
15621else
15622  rm -f conf$$.dir
15623  mkdir conf$$.dir 2>/dev/null
15624fi
15625if (echo >conf$$.file) 2>/dev/null; then
15626  if ln -s conf$$.file conf$$ 2>/dev/null; then
15627    as_ln_s='ln -s'
15628    # ... but there are two gotchas:
15629    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15630    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15631    # In both cases, we have to default to `cp -pR'.
15632    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15633      as_ln_s='cp -pR'
15634  elif ln conf$$.file conf$$ 2>/dev/null; then
15635    as_ln_s=ln
15636  else
15637    as_ln_s='cp -pR'
15638  fi
15639else
15640  as_ln_s='cp -pR'
15641fi
15642rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15643rmdir conf$$.dir 2>/dev/null
15644
15645
15646# as_fn_mkdir_p
15647# -------------
15648# Create "$as_dir" as a directory, including parents if necessary.
15649as_fn_mkdir_p ()
15650{
15651
15652  case $as_dir in #(
15653  -*) as_dir=./$as_dir;;
15654  esac
15655  test -d "$as_dir" || eval $as_mkdir_p || {
15656    as_dirs=
15657    while :; do
15658      case $as_dir in #(
15659      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15660      *) as_qdir=$as_dir;;
15661      esac
15662      as_dirs="'$as_qdir' $as_dirs"
15663      as_dir=`$as_dirname -- "$as_dir" ||
15664$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15665	 X"$as_dir" : 'X\(//\)[^/]' \| \
15666	 X"$as_dir" : 'X\(//\)$' \| \
15667	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15668$as_echo X"$as_dir" |
15669    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15670	    s//\1/
15671	    q
15672	  }
15673	  /^X\(\/\/\)[^/].*/{
15674	    s//\1/
15675	    q
15676	  }
15677	  /^X\(\/\/\)$/{
15678	    s//\1/
15679	    q
15680	  }
15681	  /^X\(\/\).*/{
15682	    s//\1/
15683	    q
15684	  }
15685	  s/.*/./; q'`
15686      test -d "$as_dir" && break
15687    done
15688    test -z "$as_dirs" || eval "mkdir $as_dirs"
15689  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15690
15691
15692} # as_fn_mkdir_p
15693if mkdir -p . 2>/dev/null; then
15694  as_mkdir_p='mkdir -p "$as_dir"'
15695else
15696  test -d ./-p && rmdir ./-p
15697  as_mkdir_p=false
15698fi
15699
15700
15701# as_fn_executable_p FILE
15702# -----------------------
15703# Test if FILE is an executable regular file.
15704as_fn_executable_p ()
15705{
15706  test -f "$1" && test -x "$1"
15707} # as_fn_executable_p
15708as_test_x='test -x'
15709as_executable_p=as_fn_executable_p
15710
15711# Sed expression to map a string onto a valid CPP name.
15712as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15713
15714# Sed expression to map a string onto a valid variable name.
15715as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15716
15717
15718exec 6>&1
15719## ----------------------------------- ##
15720## Main body of $CONFIG_STATUS script. ##
15721## ----------------------------------- ##
15722_ASEOF
15723test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15724
15725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15726# Save the log message, to keep $0 and so on meaningful, and to
15727# report actual input values of CONFIG_FILES etc. instead of their
15728# values after options handling.
15729ac_log="
15730This file was extended by Zabbix $as_me 5.4.9, which was
15731generated by GNU Autoconf 2.69.  Invocation command line was
15732
15733  CONFIG_FILES    = $CONFIG_FILES
15734  CONFIG_HEADERS  = $CONFIG_HEADERS
15735  CONFIG_LINKS    = $CONFIG_LINKS
15736  CONFIG_COMMANDS = $CONFIG_COMMANDS
15737  $ $0 $@
15738
15739on `(hostname || uname -n) 2>/dev/null | sed 1q`
15740"
15741
15742_ACEOF
15743
15744case $ac_config_files in *"
15745"*) set x $ac_config_files; shift; ac_config_files=$*;;
15746esac
15747
15748case $ac_config_headers in *"
15749"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15750esac
15751
15752
15753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15754# Files that config.status was made for.
15755config_files="$ac_config_files"
15756config_headers="$ac_config_headers"
15757config_commands="$ac_config_commands"
15758
15759_ACEOF
15760
15761cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15762ac_cs_usage="\
15763\`$as_me' instantiates files and other configuration actions
15764from templates according to the current configuration.  Unless the files
15765and actions are specified as TAGs, all are instantiated by default.
15766
15767Usage: $0 [OPTION]... [TAG]...
15768
15769  -h, --help       print this help, then exit
15770  -V, --version    print version number and configuration settings, then exit
15771      --config     print configuration, then exit
15772  -q, --quiet, --silent
15773                   do not print progress messages
15774  -d, --debug      don't remove temporary files
15775      --recheck    update $as_me by reconfiguring in the same conditions
15776      --file=FILE[:TEMPLATE]
15777                   instantiate the configuration file FILE
15778      --header=FILE[:TEMPLATE]
15779                   instantiate the configuration header FILE
15780
15781Configuration files:
15782$config_files
15783
15784Configuration headers:
15785$config_headers
15786
15787Configuration commands:
15788$config_commands
15789
15790Report bugs to the package provider."
15791
15792_ACEOF
15793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15794ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15795ac_cs_version="\\
15796Zabbix config.status 5.4.9
15797configured by $0, generated by GNU Autoconf 2.69,
15798  with options \\"\$ac_cs_config\\"
15799
15800Copyright (C) 2012 Free Software Foundation, Inc.
15801This config.status script is free software; the Free Software Foundation
15802gives unlimited permission to copy, distribute and modify it."
15803
15804ac_pwd='$ac_pwd'
15805srcdir='$srcdir'
15806INSTALL='$INSTALL'
15807MKDIR_P='$MKDIR_P'
15808AWK='$AWK'
15809test -n "\$AWK" || AWK=awk
15810_ACEOF
15811
15812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15813# The default lists apply if the user does not specify any file.
15814ac_need_defaults=:
15815while test $# != 0
15816do
15817  case $1 in
15818  --*=?*)
15819    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15820    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15821    ac_shift=:
15822    ;;
15823  --*=)
15824    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15825    ac_optarg=
15826    ac_shift=:
15827    ;;
15828  *)
15829    ac_option=$1
15830    ac_optarg=$2
15831    ac_shift=shift
15832    ;;
15833  esac
15834
15835  case $ac_option in
15836  # Handling of the options.
15837  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15838    ac_cs_recheck=: ;;
15839  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15840    $as_echo "$ac_cs_version"; exit ;;
15841  --config | --confi | --conf | --con | --co | --c )
15842    $as_echo "$ac_cs_config"; exit ;;
15843  --debug | --debu | --deb | --de | --d | -d )
15844    debug=: ;;
15845  --file | --fil | --fi | --f )
15846    $ac_shift
15847    case $ac_optarg in
15848    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15849    '') as_fn_error $? "missing file argument" ;;
15850    esac
15851    as_fn_append CONFIG_FILES " '$ac_optarg'"
15852    ac_need_defaults=false;;
15853  --header | --heade | --head | --hea )
15854    $ac_shift
15855    case $ac_optarg in
15856    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15857    esac
15858    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15859    ac_need_defaults=false;;
15860  --he | --h)
15861    # Conflict between --help and --header
15862    as_fn_error $? "ambiguous option: \`$1'
15863Try \`$0 --help' for more information.";;
15864  --help | --hel | -h )
15865    $as_echo "$ac_cs_usage"; exit ;;
15866  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15867  | -silent | --silent | --silen | --sile | --sil | --si | --s)
15868    ac_cs_silent=: ;;
15869
15870  # This is an error.
15871  -*) as_fn_error $? "unrecognized option: \`$1'
15872Try \`$0 --help' for more information." ;;
15873
15874  *) as_fn_append ac_config_targets " $1"
15875     ac_need_defaults=false ;;
15876
15877  esac
15878  shift
15879done
15880
15881ac_configure_extra_args=
15882
15883if $ac_cs_silent; then
15884  exec 6>/dev/null
15885  ac_configure_extra_args="$ac_configure_extra_args --silent"
15886fi
15887
15888_ACEOF
15889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15890if \$ac_cs_recheck; then
15891  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15892  shift
15893  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15894  CONFIG_SHELL='$SHELL'
15895  export CONFIG_SHELL
15896  exec "\$@"
15897fi
15898
15899_ACEOF
15900cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15901exec 5>>config.log
15902{
15903  echo
15904  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15905## Running $as_me. ##
15906_ASBOX
15907  $as_echo "$ac_log"
15908} >&5
15909
15910_ACEOF
15911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15912#
15913# INIT-COMMANDS
15914#
15915AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
15916
15917_ACEOF
15918
15919cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15920
15921# Handling of arguments.
15922for ac_config_target in $ac_config_targets
15923do
15924  case $ac_config_target in
15925    "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
15926    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15927    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15928    "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
15929    "database/mysql/Makefile") CONFIG_FILES="$CONFIG_FILES database/mysql/Makefile" ;;
15930    "database/oracle/Makefile") CONFIG_FILES="$CONFIG_FILES database/oracle/Makefile" ;;
15931    "database/postgresql/Makefile") CONFIG_FILES="$CONFIG_FILES database/postgresql/Makefile" ;;
15932    "database/sqlite3/Makefile") CONFIG_FILES="$CONFIG_FILES database/sqlite3/Makefile" ;;
15933    "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;;
15934    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
15935    "src/go/Makefile") CONFIG_FILES="$CONFIG_FILES src/go/Makefile" ;;
15936    "src/libs/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/Makefile" ;;
15937    "src/libs/zbxlog/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxlog/Makefile" ;;
15938    "src/libs/zbxalgo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxalgo/Makefile" ;;
15939    "src/libs/zbxmemory/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmemory/Makefile" ;;
15940    "src/libs/zbxcrypto/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcrypto/Makefile" ;;
15941    "src/libs/zbxconf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxconf/Makefile" ;;
15942    "src/libs/zbxdbcache/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbcache/Makefile" ;;
15943    "src/libs/zbxdbhigh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbhigh/Makefile" ;;
15944    "src/libs/zbxmedia/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmedia/Makefile" ;;
15945    "src/libs/zbxsysinfo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/Makefile" ;;
15946    "src/libs/zbxcommon/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcommon/Makefile" ;;
15947    "src/libs/zbxsysinfo/agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/agent/Makefile" ;;
15948    "src/libs/zbxsysinfo/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/common/Makefile" ;;
15949    "src/libs/zbxsysinfo/simple/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/simple/Makefile" ;;
15950    "src/libs/zbxsysinfo/linux/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/linux/Makefile" ;;
15951    "src/libs/zbxsysinfo/aix/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/aix/Makefile" ;;
15952    "src/libs/zbxsysinfo/freebsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/freebsd/Makefile" ;;
15953    "src/libs/zbxsysinfo/hpux/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/hpux/Makefile" ;;
15954    "src/libs/zbxsysinfo/openbsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/openbsd/Makefile" ;;
15955    "src/libs/zbxsysinfo/osx/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/osx/Makefile" ;;
15956    "src/libs/zbxsysinfo/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/solaris/Makefile" ;;
15957    "src/libs/zbxsysinfo/osf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/osf/Makefile" ;;
15958    "src/libs/zbxsysinfo/netbsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/netbsd/Makefile" ;;
15959    "src/libs/zbxsysinfo/unknown/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/unknown/Makefile" ;;
15960    "src/libs/zbxnix/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxnix/Makefile" ;;
15961    "src/libs/zbxsys/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsys/Makefile" ;;
15962    "src/libs/zbxcomms/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcomms/Makefile" ;;
15963    "src/libs/zbxcommshigh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcommshigh/Makefile" ;;
15964    "src/libs/zbxdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdb/Makefile" ;;
15965    "src/libs/zbxdbupgrade/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbupgrade/Makefile" ;;
15966    "src/libs/zbxjson/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxjson/Makefile" ;;
15967    "src/libs/zbxhttp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxhttp/Makefile" ;;
15968    "src/libs/zbxserver/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxserver/Makefile" ;;
15969    "src/libs/zbxicmpping/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxicmpping/Makefile" ;;
15970    "src/libs/zbxeval/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxeval/Makefile" ;;
15971    "src/libs/zbxexec/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxexec/Makefile" ;;
15972    "src/libs/zbxself/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxself/Makefile" ;;
15973    "src/libs/zbxmodules/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmodules/Makefile" ;;
15974    "src/libs/zbxregexp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxregexp/Makefile" ;;
15975    "src/libs/zbxtasks/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxtasks/Makefile" ;;
15976    "src/libs/zbxipcservice/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxipcservice/Makefile" ;;
15977    "src/libs/zbxhistory/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxhistory/Makefile" ;;
15978    "src/libs/zbxcompress/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcompress/Makefile" ;;
15979    "src/libs/zbxembed/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxembed/Makefile" ;;
15980    "src/libs/zbxprometheus/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxprometheus/Makefile" ;;
15981    "src/libs/zbxvault/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxvault/Makefile" ;;
15982    "src/libs/zbxdiag/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdiag/Makefile" ;;
15983    "src/libs/zbxtrends/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxtrends/Makefile" ;;
15984    "src/libs/zbxavailability/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxavailability/Makefile" ;;
15985    "src/libs/zbxxml/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxxml/Makefile" ;;
15986    "src/zabbix_agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_agent/Makefile" ;;
15987    "src/zabbix_agent/logfiles/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_agent/logfiles/Makefile" ;;
15988    "src/zabbix_get/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_get/Makefile" ;;
15989    "src/zabbix_js/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_js/Makefile" ;;
15990    "src/zabbix_sender/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_sender/Makefile" ;;
15991    "src/zabbix_server/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/Makefile" ;;
15992    "src/zabbix_server/alerter/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/alerter/Makefile" ;;
15993    "src/zabbix_server/dbsyncer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/dbsyncer/Makefile" ;;
15994    "src/zabbix_server/dbconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/dbconfig/Makefile" ;;
15995    "src/zabbix_server/discoverer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/discoverer/Makefile" ;;
15996    "src/zabbix_server/housekeeper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/housekeeper/Makefile" ;;
15997    "src/zabbix_server/httppoller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/httppoller/Makefile" ;;
15998    "src/zabbix_server/pinger/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/pinger/Makefile" ;;
15999    "src/zabbix_server/poller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/poller/Makefile" ;;
16000    "src/zabbix_server/snmptrapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/snmptrapper/Makefile" ;;
16001    "src/zabbix_server/timer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/timer/Makefile" ;;
16002    "src/zabbix_server/trapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/trapper/Makefile" ;;
16003    "src/zabbix_server/escalator/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/escalator/Makefile" ;;
16004    "src/zabbix_server/proxypoller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/proxypoller/Makefile" ;;
16005    "src/zabbix_server/selfmon/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/selfmon/Makefile" ;;
16006    "src/zabbix_server/vmware/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/vmware/Makefile" ;;
16007    "src/zabbix_server/taskmanager/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/taskmanager/Makefile" ;;
16008    "src/zabbix_server/ipmi/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/ipmi/Makefile" ;;
16009    "src/zabbix_server/odbc/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/odbc/Makefile" ;;
16010    "src/zabbix_server/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/scripts/Makefile" ;;
16011    "src/zabbix_server/preprocessor/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/preprocessor/Makefile" ;;
16012    "src/zabbix_server/availability/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/availability/Makefile" ;;
16013    "src/zabbix_server/lld/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/lld/Makefile" ;;
16014    "src/zabbix_server/reporter/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/reporter/Makefile" ;;
16015    "src/zabbix_proxy/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/Makefile" ;;
16016    "src/zabbix_proxy/heart/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/heart/Makefile" ;;
16017    "src/zabbix_proxy/housekeeper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/housekeeper/Makefile" ;;
16018    "src/zabbix_proxy/proxyconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/proxyconfig/Makefile" ;;
16019    "src/zabbix_proxy/datasender/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/datasender/Makefile" ;;
16020    "src/zabbix_proxy/taskmanager/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/taskmanager/Makefile" ;;
16021    "src/zabbix_java/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_java/Makefile" ;;
16022    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
16023
16024  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16025  esac
16026done
16027
16028
16029# If the user did not use the arguments to specify the items to instantiate,
16030# then the envvar interface is used.  Set only those that are not.
16031# We use the long form for the default assignment because of an extremely
16032# bizarre bug on SunOS 4.1.3.
16033if $ac_need_defaults; then
16034  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16035  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16036  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16037fi
16038
16039# Have a temporary directory for convenience.  Make it in the build tree
16040# simply because there is no reason against having it here, and in addition,
16041# creating and moving files from /tmp can sometimes cause problems.
16042# Hook for its removal unless debugging.
16043# Note that there is a small window in which the directory will not be cleaned:
16044# after its creation but before its name has been assigned to `$tmp'.
16045$debug ||
16046{
16047  tmp= ac_tmp=
16048  trap 'exit_status=$?
16049  : "${ac_tmp:=$tmp}"
16050  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16051' 0
16052  trap 'as_fn_exit 1' 1 2 13 15
16053}
16054# Create a (secure) tmp directory for tmp files.
16055
16056{
16057  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16058  test -d "$tmp"
16059}  ||
16060{
16061  tmp=./conf$$-$RANDOM
16062  (umask 077 && mkdir "$tmp")
16063} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16064ac_tmp=$tmp
16065
16066# Set up the scripts for CONFIG_FILES section.
16067# No need to generate them if there are no CONFIG_FILES.
16068# This happens for instance with `./config.status config.h'.
16069if test -n "$CONFIG_FILES"; then
16070
16071
16072ac_cr=`echo X | tr X '\015'`
16073# On cygwin, bash can eat \r inside `` if the user requested igncr.
16074# But we know of no other shell where ac_cr would be empty at this
16075# point, so we can use a bashism as a fallback.
16076if test "x$ac_cr" = x; then
16077  eval ac_cr=\$\'\\r\'
16078fi
16079ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16080if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16081  ac_cs_awk_cr='\\r'
16082else
16083  ac_cs_awk_cr=$ac_cr
16084fi
16085
16086echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16087_ACEOF
16088
16089
16090{
16091  echo "cat >conf$$subs.awk <<_ACEOF" &&
16092  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16093  echo "_ACEOF"
16094} >conf$$subs.sh ||
16095  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16096ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16097ac_delim='%!_!# '
16098for ac_last_try in false false false false false :; do
16099  . ./conf$$subs.sh ||
16100    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16101
16102  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16103  if test $ac_delim_n = $ac_delim_num; then
16104    break
16105  elif $ac_last_try; then
16106    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16107  else
16108    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16109  fi
16110done
16111rm -f conf$$subs.sh
16112
16113cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16114cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16115_ACEOF
16116sed -n '
16117h
16118s/^/S["/; s/!.*/"]=/
16119p
16120g
16121s/^[^!]*!//
16122:repl
16123t repl
16124s/'"$ac_delim"'$//
16125t delim
16126:nl
16127h
16128s/\(.\{148\}\)..*/\1/
16129t more1
16130s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16131p
16132n
16133b repl
16134:more1
16135s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16136p
16137g
16138s/.\{148\}//
16139t nl
16140:delim
16141h
16142s/\(.\{148\}\)..*/\1/
16143t more2
16144s/["\\]/\\&/g; s/^/"/; s/$/"/
16145p
16146b
16147:more2
16148s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16149p
16150g
16151s/.\{148\}//
16152t delim
16153' <conf$$subs.awk | sed '
16154/^[^""]/{
16155  N
16156  s/\n//
16157}
16158' >>$CONFIG_STATUS || ac_write_fail=1
16159rm -f conf$$subs.awk
16160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16161_ACAWK
16162cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16163  for (key in S) S_is_set[key] = 1
16164  FS = ""
16165
16166}
16167{
16168  line = $ 0
16169  nfields = split(line, field, "@")
16170  substed = 0
16171  len = length(field[1])
16172  for (i = 2; i < nfields; i++) {
16173    key = field[i]
16174    keylen = length(key)
16175    if (S_is_set[key]) {
16176      value = S[key]
16177      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16178      len += length(value) + length(field[++i])
16179      substed = 1
16180    } else
16181      len += 1 + keylen
16182  }
16183
16184  print line
16185}
16186
16187_ACAWK
16188_ACEOF
16189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16190if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16191  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16192else
16193  cat
16194fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16195  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16196_ACEOF
16197
16198# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16199# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16200# trailing colons and then remove the whole line if VPATH becomes empty
16201# (actually we leave an empty line to preserve line numbers).
16202if test "x$srcdir" = x.; then
16203  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
16204h
16205s///
16206s/^/:/
16207s/[	 ]*$/:/
16208s/:\$(srcdir):/:/g
16209s/:\${srcdir}:/:/g
16210s/:@srcdir@:/:/g
16211s/^:*//
16212s/:*$//
16213x
16214s/\(=[	 ]*\).*/\1/
16215G
16216s/\n//
16217s/^[^=]*=[	 ]*$//
16218}'
16219fi
16220
16221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16222fi # test -n "$CONFIG_FILES"
16223
16224# Set up the scripts for CONFIG_HEADERS section.
16225# No need to generate them if there are no CONFIG_HEADERS.
16226# This happens for instance with `./config.status Makefile'.
16227if test -n "$CONFIG_HEADERS"; then
16228cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16229BEGIN {
16230_ACEOF
16231
16232# Transform confdefs.h into an awk script `defines.awk', embedded as
16233# here-document in config.status, that substitutes the proper values into
16234# config.h.in to produce config.h.
16235
16236# Create a delimiter string that does not exist in confdefs.h, to ease
16237# handling of long lines.
16238ac_delim='%!_!# '
16239for ac_last_try in false false :; do
16240  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16241  if test -z "$ac_tt"; then
16242    break
16243  elif $ac_last_try; then
16244    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16245  else
16246    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16247  fi
16248done
16249
16250# For the awk script, D is an array of macro values keyed by name,
16251# likewise P contains macro parameters if any.  Preserve backslash
16252# newline sequences.
16253
16254ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16255sed -n '
16256s/.\{148\}/&'"$ac_delim"'/g
16257t rset
16258:rset
16259s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
16260t def
16261d
16262:def
16263s/\\$//
16264t bsnl
16265s/["\\]/\\&/g
16266s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
16267D["\1"]=" \3"/p
16268s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
16269d
16270:bsnl
16271s/["\\]/\\&/g
16272s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
16273D["\1"]=" \3\\\\\\n"\\/p
16274t cont
16275s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16276t cont
16277d
16278:cont
16279n
16280s/.\{148\}/&'"$ac_delim"'/g
16281t clear
16282:clear
16283s/\\$//
16284t bsnlc
16285s/["\\]/\\&/g; s/^/"/; s/$/"/p
16286d
16287:bsnlc
16288s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16289b cont
16290' <confdefs.h | sed '
16291s/'"$ac_delim"'/"\\\
16292"/g' >>$CONFIG_STATUS || ac_write_fail=1
16293
16294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16295  for (key in D) D_is_set[key] = 1
16296  FS = ""
16297}
16298/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16299  line = \$ 0
16300  split(line, arg, " ")
16301  if (arg[1] == "#") {
16302    defundef = arg[2]
16303    mac1 = arg[3]
16304  } else {
16305    defundef = substr(arg[1], 2)
16306    mac1 = arg[2]
16307  }
16308  split(mac1, mac2, "(") #)
16309  macro = mac2[1]
16310  prefix = substr(line, 1, index(line, defundef) - 1)
16311  if (D_is_set[macro]) {
16312    # Preserve the white space surrounding the "#".
16313    print prefix "define", macro P[macro] D[macro]
16314    next
16315  } else {
16316    # Replace #undef with comments.  This is necessary, for example,
16317    # in the case of _POSIX_SOURCE, which is predefined and required
16318    # on some systems where configure will not decide to define it.
16319    if (defundef == "undef") {
16320      print "/*", prefix defundef, macro, "*/"
16321      next
16322    }
16323  }
16324}
16325{ print }
16326_ACAWK
16327_ACEOF
16328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16329  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16330fi # test -n "$CONFIG_HEADERS"
16331
16332
16333eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
16334shift
16335for ac_tag
16336do
16337  case $ac_tag in
16338  :[FHLC]) ac_mode=$ac_tag; continue;;
16339  esac
16340  case $ac_mode$ac_tag in
16341  :[FHL]*:*);;
16342  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16343  :[FH]-) ac_tag=-:-;;
16344  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16345  esac
16346  ac_save_IFS=$IFS
16347  IFS=:
16348  set x $ac_tag
16349  IFS=$ac_save_IFS
16350  shift
16351  ac_file=$1
16352  shift
16353
16354  case $ac_mode in
16355  :L) ac_source=$1;;
16356  :[FH])
16357    ac_file_inputs=
16358    for ac_f
16359    do
16360      case $ac_f in
16361      -) ac_f="$ac_tmp/stdin";;
16362      *) # Look for the file first in the build tree, then in the source tree
16363	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
16364	 # because $ac_f cannot contain `:'.
16365	 test -f "$ac_f" ||
16366	   case $ac_f in
16367	   [\\/$]*) false;;
16368	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16369	   esac ||
16370	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16371      esac
16372      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16373      as_fn_append ac_file_inputs " '$ac_f'"
16374    done
16375
16376    # Let's still pretend it is `configure' which instantiates (i.e., don't
16377    # use $as_me), people would be surprised to read:
16378    #    /* config.h.  Generated by config.status.  */
16379    configure_input='Generated from '`
16380	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16381	`' by configure.'
16382    if test x"$ac_file" != x-; then
16383      configure_input="$ac_file.  $configure_input"
16384      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16385$as_echo "$as_me: creating $ac_file" >&6;}
16386    fi
16387    # Neutralize special characters interpreted by sed in replacement strings.
16388    case $configure_input in #(
16389    *\&* | *\|* | *\\* )
16390       ac_sed_conf_input=`$as_echo "$configure_input" |
16391       sed 's/[\\\\&|]/\\\\&/g'`;; #(
16392    *) ac_sed_conf_input=$configure_input;;
16393    esac
16394
16395    case $ac_tag in
16396    *:-:* | *:-) cat >"$ac_tmp/stdin" \
16397      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16398    esac
16399    ;;
16400  esac
16401
16402  ac_dir=`$as_dirname -- "$ac_file" ||
16403$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16404	 X"$ac_file" : 'X\(//\)[^/]' \| \
16405	 X"$ac_file" : 'X\(//\)$' \| \
16406	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16407$as_echo X"$ac_file" |
16408    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16409	    s//\1/
16410	    q
16411	  }
16412	  /^X\(\/\/\)[^/].*/{
16413	    s//\1/
16414	    q
16415	  }
16416	  /^X\(\/\/\)$/{
16417	    s//\1/
16418	    q
16419	  }
16420	  /^X\(\/\).*/{
16421	    s//\1/
16422	    q
16423	  }
16424	  s/.*/./; q'`
16425  as_dir="$ac_dir"; as_fn_mkdir_p
16426  ac_builddir=.
16427
16428case "$ac_dir" in
16429.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16430*)
16431  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16432  # A ".." for each directory in $ac_dir_suffix.
16433  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16434  case $ac_top_builddir_sub in
16435  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16436  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16437  esac ;;
16438esac
16439ac_abs_top_builddir=$ac_pwd
16440ac_abs_builddir=$ac_pwd$ac_dir_suffix
16441# for backward compatibility:
16442ac_top_builddir=$ac_top_build_prefix
16443
16444case $srcdir in
16445  .)  # We are building in place.
16446    ac_srcdir=.
16447    ac_top_srcdir=$ac_top_builddir_sub
16448    ac_abs_top_srcdir=$ac_pwd ;;
16449  [\\/]* | ?:[\\/]* )  # Absolute name.
16450    ac_srcdir=$srcdir$ac_dir_suffix;
16451    ac_top_srcdir=$srcdir
16452    ac_abs_top_srcdir=$srcdir ;;
16453  *) # Relative name.
16454    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16455    ac_top_srcdir=$ac_top_build_prefix$srcdir
16456    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16457esac
16458ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16459
16460
16461  case $ac_mode in
16462  :F)
16463  #
16464  # CONFIG_FILE
16465  #
16466
16467  case $INSTALL in
16468  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16469  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16470  esac
16471  ac_MKDIR_P=$MKDIR_P
16472  case $MKDIR_P in
16473  [\\/$]* | ?:[\\/]* ) ;;
16474  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16475  esac
16476_ACEOF
16477
16478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16479# If the template does not know about datarootdir, expand it.
16480# FIXME: This hack should be removed a few years after 2.60.
16481ac_datarootdir_hack=; ac_datarootdir_seen=
16482ac_sed_dataroot='
16483/datarootdir/ {
16484  p
16485  q
16486}
16487/@datadir@/p
16488/@docdir@/p
16489/@infodir@/p
16490/@localedir@/p
16491/@mandir@/p'
16492case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16493*datarootdir*) ac_datarootdir_seen=yes;;
16494*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16495  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16496$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16497_ACEOF
16498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16499  ac_datarootdir_hack='
16500  s&@datadir@&$datadir&g
16501  s&@docdir@&$docdir&g
16502  s&@infodir@&$infodir&g
16503  s&@localedir@&$localedir&g
16504  s&@mandir@&$mandir&g
16505  s&\\\${datarootdir}&$datarootdir&g' ;;
16506esac
16507_ACEOF
16508
16509# Neutralize VPATH when `$srcdir' = `.'.
16510# Shell code in configure.ac might set extrasub.
16511# FIXME: do we really want to maintain this feature?
16512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16513ac_sed_extra="$ac_vpsub
16514$extrasub
16515_ACEOF
16516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16517:t
16518/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16519s|@configure_input@|$ac_sed_conf_input|;t t
16520s&@top_builddir@&$ac_top_builddir_sub&;t t
16521s&@top_build_prefix@&$ac_top_build_prefix&;t t
16522s&@srcdir@&$ac_srcdir&;t t
16523s&@abs_srcdir@&$ac_abs_srcdir&;t t
16524s&@top_srcdir@&$ac_top_srcdir&;t t
16525s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16526s&@builddir@&$ac_builddir&;t t
16527s&@abs_builddir@&$ac_abs_builddir&;t t
16528s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16529s&@INSTALL@&$ac_INSTALL&;t t
16530s&@MKDIR_P@&$ac_MKDIR_P&;t t
16531$ac_datarootdir_hack
16532"
16533eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16534  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16535
16536test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16537  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16538  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
16539      "$ac_tmp/out"`; test -z "$ac_out"; } &&
16540  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16541which seems to be undefined.  Please make sure it is defined" >&5
16542$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16543which seems to be undefined.  Please make sure it is defined" >&2;}
16544
16545  rm -f "$ac_tmp/stdin"
16546  case $ac_file in
16547  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16548  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16549  esac \
16550  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16551 ;;
16552  :H)
16553  #
16554  # CONFIG_HEADER
16555  #
16556  if test x"$ac_file" != x-; then
16557    {
16558      $as_echo "/* $configure_input  */" \
16559      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16560    } >"$ac_tmp/config.h" \
16561      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16562    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16563      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16564$as_echo "$as_me: $ac_file is unchanged" >&6;}
16565    else
16566      rm -f "$ac_file"
16567      mv "$ac_tmp/config.h" "$ac_file" \
16568	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
16569    fi
16570  else
16571    $as_echo "/* $configure_input  */" \
16572      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16573      || as_fn_error $? "could not create -" "$LINENO" 5
16574  fi
16575# Compute "$ac_file"'s index in $config_headers.
16576_am_arg="$ac_file"
16577_am_stamp_count=1
16578for _am_header in $config_headers :; do
16579  case $_am_header in
16580    $_am_arg | $_am_arg:* )
16581      break ;;
16582    * )
16583      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
16584  esac
16585done
16586echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
16587$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16588	 X"$_am_arg" : 'X\(//\)[^/]' \| \
16589	 X"$_am_arg" : 'X\(//\)$' \| \
16590	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
16591$as_echo X"$_am_arg" |
16592    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16593	    s//\1/
16594	    q
16595	  }
16596	  /^X\(\/\/\)[^/].*/{
16597	    s//\1/
16598	    q
16599	  }
16600	  /^X\(\/\/\)$/{
16601	    s//\1/
16602	    q
16603	  }
16604	  /^X\(\/\).*/{
16605	    s//\1/
16606	    q
16607	  }
16608	  s/.*/./; q'`/stamp-h$_am_stamp_count
16609 ;;
16610
16611  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16612$as_echo "$as_me: executing $ac_file commands" >&6;}
16613 ;;
16614  esac
16615
16616
16617  case $ac_file$ac_mode in
16618    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
16619  # Older Autoconf quotes --file arguments for eval, but not when files
16620  # are listed without --file.  Let's play safe and only enable the eval
16621  # if we detect the quoting.
16622  # TODO: see whether this extra hack can be removed once we start
16623  # requiring Autoconf 2.70 or later.
16624  case $CONFIG_FILES in #(
16625  *\'*) :
16626    eval set x "$CONFIG_FILES" ;; #(
16627  *) :
16628    set x $CONFIG_FILES ;; #(
16629  *) :
16630     ;;
16631esac
16632  shift
16633  # Used to flag and report bootstrapping failures.
16634  am_rc=0
16635  for am_mf
16636  do
16637    # Strip MF so we end up with the name of the file.
16638    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
16639    # Check whether this is an Automake generated Makefile which includes
16640    # dependency-tracking related rules and includes.
16641    # Grep'ing the whole file directly is not great: AIX grep has a line
16642    # limit of 2048, but all sed's we know have understand at least 4000.
16643    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
16644      || continue
16645    am_dirpart=`$as_dirname -- "$am_mf" ||
16646$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16647	 X"$am_mf" : 'X\(//\)[^/]' \| \
16648	 X"$am_mf" : 'X\(//\)$' \| \
16649	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
16650$as_echo X"$am_mf" |
16651    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16652	    s//\1/
16653	    q
16654	  }
16655	  /^X\(\/\/\)[^/].*/{
16656	    s//\1/
16657	    q
16658	  }
16659	  /^X\(\/\/\)$/{
16660	    s//\1/
16661	    q
16662	  }
16663	  /^X\(\/\).*/{
16664	    s//\1/
16665	    q
16666	  }
16667	  s/.*/./; q'`
16668    am_filepart=`$as_basename -- "$am_mf" ||
16669$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
16670	 X"$am_mf" : 'X\(//\)$' \| \
16671	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
16672$as_echo X/"$am_mf" |
16673    sed '/^.*\/\([^/][^/]*\)\/*$/{
16674	    s//\1/
16675	    q
16676	  }
16677	  /^X\/\(\/\/\)$/{
16678	    s//\1/
16679	    q
16680	  }
16681	  /^X\/\(\/\).*/{
16682	    s//\1/
16683	    q
16684	  }
16685	  s/.*/./; q'`
16686    { echo "$as_me:$LINENO: cd "$am_dirpart" \
16687      && sed -e '/# am--include-marker/d' "$am_filepart" \
16688        | $MAKE -f - am--depfiles" >&5
16689   (cd "$am_dirpart" \
16690      && sed -e '/# am--include-marker/d' "$am_filepart" \
16691        | $MAKE -f - am--depfiles) >&5 2>&5
16692   ac_status=$?
16693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694   (exit $ac_status); } || am_rc=$?
16695  done
16696  if test $am_rc -ne 0; then
16697    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16699as_fn_error $? "Something went wrong bootstrapping makefile fragments
16700    for automatic dependency tracking.  If GNU make was not used, consider
16701    re-running the configure script with MAKE=\"gmake\" (or whatever is
16702    necessary).  You can also try re-running configure with the
16703    '--disable-dependency-tracking' option to at least be able to build
16704    the package (albeit without support for automatic dependency tracking).
16705See \`config.log' for more details" "$LINENO" 5; }
16706  fi
16707  { am_dirpart=; unset am_dirpart;}
16708  { am_filepart=; unset am_filepart;}
16709  { am_mf=; unset am_mf;}
16710  { am_rc=; unset am_rc;}
16711  rm -f conftest-deps.mk
16712}
16713 ;;
16714
16715  esac
16716done # for ac_tag
16717
16718
16719as_fn_exit 0
16720_ACEOF
16721ac_clean_files=$ac_clean_files_save
16722
16723test $ac_write_fail = 0 ||
16724  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16725
16726
16727# configure is writing to config.log, and then calls config.status.
16728# config.status does its own redirection, appending to config.log.
16729# Unfortunately, on DOS this fails, as config.log is still kept open
16730# by configure, so config.status won't be able to write to it; its
16731# output is simply discarded.  So we exec the FD to /dev/null,
16732# effectively closing config.log, so it can be properly (re)opened and
16733# appended to by config.status.  When coming back to configure, we
16734# need to make the FD available again.
16735if test "$no_create" != yes; then
16736  ac_cs_success=:
16737  ac_config_status_args=
16738  test "$silent" = yes &&
16739    ac_config_status_args="$ac_config_status_args --quiet"
16740  exec 5>/dev/null
16741  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16742  exec 5>>config.log
16743  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16744  # would make configure fail if this is the last instruction.
16745  $ac_cs_success || as_fn_exit 1
16746fi
16747if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16748  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16749$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16750fi
16751
16752
16753
16754SERVER_CONFIG_FILE=`eval echo "${SERVER_CONFIG_FILE}"`
16755SERVER_CONFIG_FILE=`eval echo "${SERVER_CONFIG_FILE}"`
16756
16757PROXY_CONFIG_FILE=`eval echo "${PROXY_CONFIG_FILE}"`
16758PROXY_CONFIG_FILE=`eval echo "${PROXY_CONFIG_FILE}"`
16759
16760AGENT_CONFIG_FILE=`eval echo "${AGENT_CONFIG_FILE}"`
16761AGENT_CONFIG_FILE=`eval echo "${AGENT_CONFIG_FILE}"`
16762
16763AGENT2_CONFIG_FILE=`eval echo "${AGENT2_CONFIG_FILE}"`
16764AGENT2_CONFIG_FILE=`eval echo "${AGENT2_CONFIG_FILE}"`
16765
16766WEBSERVICE_CONFIG_FILE=`eval echo "${WEBSERVICE_CONFIG_FILE}"`
16767WEBSERVICE_CONFIG_FILE=`eval echo "${WEBSERVICE_CONFIG_FILE}"`
16768
16769EXTERNAL_SCRIPTS_PATH=`eval echo "${EXTERNAL_SCRIPTS_PATH}"`
16770EXTERNAL_SCRIPTS_PATH=`eval echo "${EXTERNAL_SCRIPTS_PATH}"`
16771
16772ALERT_SCRIPTS_PATH=`eval echo "${ALERT_SCRIPTS_PATH}"`
16773ALERT_SCRIPTS_PATH=`eval echo "${ALERT_SCRIPTS_PATH}"`
16774
16775CURL_SSL_CERT_LOCATION=`eval echo "${CURL_SSL_CERT_LOCATION}"`
16776CURL_SSL_CERT_LOCATION=`eval echo "${CURL_SSL_CERT_LOCATION}"`
16777
16778CURL_SSL_KEY_LOCATION=`eval echo "${CURL_SSL_KEY_LOCATION}"`
16779CURL_SSL_KEY_LOCATION=`eval echo "${CURL_SSL_KEY_LOCATION}"`
16780
16781LOAD_MODULE_PATH=`eval echo "${LOAD_MODULE_PATH}"`
16782LOAD_MODULE_PATH=`eval echo "${LOAD_MODULE_PATH}"`
16783
16784echo "
16785
16786Configuration:
16787
16788  Detected OS:           ${host_os}
16789  Install path:          ${prefix}
16790  Compilation arch:      ${ARCH}
16791
16792  Compiler:              ${CC}
16793  Compiler flags:        ${CFLAGS}
16794
16795  Library-specific flags:"
16796
16797if test "x$DB_CFLAGS" != "x"; then
16798	echo "    database:              ${DB_CFLAGS}"
16799fi
16800
16801if test "x$LIBXML2_CFLAGS" != "x"; then
16802	echo "    libXML2:               ${LIBXML2_CFLAGS}"
16803fi
16804
16805if test "x$UNIXODBC_CFLAGS" != "x"; then
16806	echo "    unixODBC:              ${UNIXODBC_CFLAGS}"
16807fi
16808
16809if test "x$SNMP_CFLAGS" != "x"; then
16810	echo "    Net-SNMP:              ${SNMP_CFLAGS}"
16811fi
16812
16813if test "x$OPENIPMI_CFLAGS" != "x"; then
16814	echo "    OpenIPMI:              ${OPENIPMI_CFLAGS}"
16815fi
16816
16817if test "x$SSH2_CFLAGS" != "x"; then
16818	echo "    libssh2:               ${SSH2_CFLAGS}"
16819fi
16820
16821if test "x$SSH_CFLAGS" != "x"; then
16822	echo "    libssh:                ${SSH_CFLAGS}"
16823fi
16824
16825if test "x$LIBMODBUS_CFLAGS" != "x"; then
16826	echo "    libmodbus:                ${LIBMODBUS_CFLAGS}"
16827fi
16828
16829if test "x$TLS_CFLAGS" != "x"; then
16830	echo "    TLS:                   ${TLS_CFLAGS}"
16831fi
16832
16833if test "x$LDAP_CPPFLAGS" != "x"; then
16834	echo "    LDAP:                  ${LDAP_CPPFLAGS}"
16835fi
16836
16837if test "x$ICONV_CFLAGS" != "x"; then
16838	echo "    iconv:                 ${ICONV_CFLAGS}"
16839fi
16840
16841if test "x$LIBEVENT_CFLAGS" != "x"; then
16842	echo "    libevent:              ${LIBEVENT_CFLAGS}"
16843fi
16844
16845echo "
16846  Enable server:         ${server}"
16847
16848if test "x$server" != "xno"; then
16849
16850echo "  Server details:
16851    With database:         ${have_db}
16852    WEB Monitoring:        ${have_web_monitoring}"
16853
16854if test "x$have_web_monitoring" = "xcURL"; then
16855echo "      SSL certificates:      ${CURL_SSL_CERT_LOCATION}
16856      SSL keys:              ${CURL_SSL_KEY_LOCATION}"
16857fi
16858
16859echo "    SNMP:                  ${have_snmp}
16860    IPMI:                  ${have_ipmi}
16861    SSH:                   ${have_ssh}
16862    TLS:                   ${have_tls}
16863    ODBC:                  ${have_unixodbc}
16864    Linker flags:          ${SERVER_LDFLAGS} ${LDFLAGS}
16865    Libraries:             ${SERVER_LIBS} ${LIBS}
16866    Configuration file:    ${SERVER_CONFIG_FILE}
16867    External scripts:      ${EXTERNAL_SCRIPTS_PATH}
16868    Alert scripts:         ${ALERT_SCRIPTS_PATH}
16869    Modules:               ${LOAD_MODULE_PATH}"
16870
16871fi
16872
16873echo "
16874  Enable proxy:          ${proxy}"
16875
16876if test "x$proxy" != "xno"; then
16877
16878echo "  Proxy details:
16879    With database:         ${have_db}
16880    WEB Monitoring:        ${have_web_monitoring}"
16881
16882if test "x$have_web_monitoring" = "xcURL"; then
16883echo "      SSL certificates:      ${CURL_SSL_CERT_LOCATION}
16884      SSL keys:              ${CURL_SSL_KEY_LOCATION}"
16885fi
16886
16887echo "    SNMP:                  ${have_snmp}
16888    IPMI:                  ${have_ipmi}
16889    SSH:                   ${have_ssh}
16890    TLS:                   ${have_tls}
16891    ODBC:                  ${have_unixodbc}
16892    Linker flags:          ${PROXY_LDFLAGS} ${LDFLAGS}
16893    Libraries:             ${PROXY_LIBS} ${LIBS}
16894    Configuration file:    ${PROXY_CONFIG_FILE}
16895    External scripts:      ${EXTERNAL_SCRIPTS_PATH}
16896    Modules:               ${LOAD_MODULE_PATH}"
16897
16898fi
16899
16900echo "
16901  Enable agent:          ${agent}"
16902
16903if test "x$agent" != "xno"; then
16904
16905echo "  Agent details:
16906    TLS:                   ${have_tls}
16907    Modbus:                ${have_libmodbus}
16908    Linker flags:          ${AGENT_LDFLAGS} ${LDFLAGS}
16909    Libraries:             ${AGENT_LIBS} ${LIBS}
16910    Configuration file:    ${AGENT_CONFIG_FILE}
16911    Modules:               ${LOAD_MODULE_PATH}"
16912
16913fi
16914
16915echo "
16916  Enable agent 2:        ${agent2}"
16917
16918echo "
16919  Enable web service:    ${webservice}"
16920
16921echo "
16922  Enable Java gateway:   ${java}"
16923
16924if test "x$java" != "xno"; then
16925
16926echo "  Java gateway details:
16927    Java compiler:         ${JAVAC}
16928    Java archiver:         ${JAR}"
16929
16930fi
16931
16932echo "
16933  LDAP support:          ${found_ldap}
16934  IPv6 support:          ${have_ipv6}"
16935
16936echo
16937echo "***********************************************************"
16938echo "*            Now run '${am_make} install'                       *"
16939echo "*                                                         *"
16940echo "*            Thank you for using Zabbix!                  *"
16941echo "*              <http://www.zabbix.com>                    *"
16942echo "***********************************************************"
16943echo
16944