1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for Zabbix 4.0.30.
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='4.0.30'
581PACKAGE_STRING='Zabbix 4.0.30'
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
625LOAD_MODULE_PATH
626CURL_SSL_KEY_LOCATION
627CURL_SSL_CERT_LOCATION
628ALERT_SCRIPTS_PATH
629EXTERNAL_SCRIPTS_PATH
630AGENT_CONFIG_FILE
631PROXY_CONFIG_FILE
632SERVER_CONFIG_FILE
633SENDER_LIBS
634SENDER_LDFLAGS
635ZBXGET_LIBS
636ZBXGET_LDFLAGS
637AGENT_LIBS
638AGENT_LDFLAGS
639PROXY_LIBS
640PROXY_LDFLAGS
641SERVER_LIBS
642SERVER_LDFLAGS
643RANLIB
644ICONV_LDFLAGS
645ICONV_CFLAGS
646ICONV_LIBS
647LIBPCRE_LIBS
648LIBPCRE_LDFLAGS
649LIBPCRE_CFLAGS
650HAVE_LIBCURL_FALSE
651HAVE_LIBCURL_TRUE
652LIBCURL_LIBS
653LIBCURL_LDFLAGS
654LIBCURL_CFLAGS
655_libcurl_config
656LDAP_LIBS
657LDAP_LDFLAGS
658LDAP_CPPFLAGS
659JAR
660JAVAC
661TLS_CFLAGS
662OPENSSL_LIBS
663OPENSSL_LDFLAGS
664OPENSSL_CFLAGS
665GNUTLS_LIBS
666GNUTLS_LDFLAGS
667GNUTLS_CFLAGS
668MBEDTLS_LIBS
669MBEDTLS_LDFLAGS
670MBEDTLS_CFLAGS
671LIBEVENT_LIBS
672LIBEVENT_LDFLAGS
673LIBEVENT_CFLAGS
674PROXY_IPCSERVICE_FALSE
675PROXY_IPCSERVICE_TRUE
676HAVE_LIBXML2_FALSE
677HAVE_LIBXML2_TRUE
678HAVE_IPMI_FALSE
679HAVE_IPMI_TRUE
680LIBPTHREAD_LIBS
681LIBPTHREAD_LDFLAGS
682LIBPTHREAD_CFLAGS
683ZLIB_LIBS
684ZLIB_LDFLAGS
685ZLIB_CFLAGS
686OPENIPMI_LIBS
687OPENIPMI_LDFLAGS
688OPENIPMI_CFLAGS
689SSH_LIBS
690SSH_LDFLAGS
691SSH_CFLAGS
692SSH2_LIBS
693SSH2_LDFLAGS
694SSH2_CFLAGS
695SNMP_LIBS
696SNMP_LDFLAGS
697SNMP_CFLAGS
698_libnetsnmp_config
699UNIXODBC_LIBS
700UNIXODBC_CFLAGS
701UNIXODBC_LDFLAGS
702ODBC_CONFIG
703LIBXML2_LIBS
704LIBXML2_LDFLAGS
705LIBXML2_CFLAGS
706LIBXML2_VERSION
707JABBER_LIBS
708JABBER_LDFLAGS
709JABBER_CPPFLAGS
710IKSEMEL_LIBS
711IKSEMEL_CFLAGS
712PKG_CONFIG_LIBDIR
713PKG_CONFIG_PATH
714PKG_CONFIG
715DB_LIBS
716DB_LDFLAGS
717DB_CFLAGS
718SQLITE3_VERSION
719SQLITE3_LIBS
720SQLITE3_LDFLAGS
721SQLITE3_CPPFLAGS
722POSTGRESQL_VERSION
723POSTGRESQL_LIBS
724POSTGRESQL_LDFLAGS
725POSTGRESQL_CFLAGS
726PG_CONFIG
727ORACLE_OCI_LIBS
728ORACLE_OCI_LDFLAGS
729ORACLE_OCI_CFLAGS
730ORACLE_OCI_VERSION
731MYSQL_LIBS
732MYSQL_LDFLAGS
733MYSQL_CFLAGS
734MYSQL_VERSION
735MYSQL_CONFIG
736ZBXCMOCKA_FALSE
737ZBXCMOCKA_TRUE
738DBSCHEMA_FALSE
739DBSCHEMA_TRUE
740IPV6_FALSE
741IPV6_TRUE
742JAVA_FALSE
743JAVA_TRUE
744AGENT_FALSE
745AGENT_TRUE
746PROXY_FALSE
747PROXY_TRUE
748SERVER_FALSE
749SERVER_TRUE
750ARCH
751LIBOBJS
752RESOLV_LIBS
753EGREP
754GREP
755CPP
756am__fastdepCC_FALSE
757am__fastdepCC_TRUE
758CCDEPMODE
759am__nodep
760AMDEPBACKSLASH
761AMDEP_FALSE
762AMDEP_TRUE
763am__include
764DEPDIR
765OBJEXT
766EXEEXT
767ac_ct_CC
768CPPFLAGS
769LDFLAGS
770CFLAGS
771CC
772host_os
773host_vendor
774host_cpu
775host
776build_os
777build_vendor
778build_cpu
779build
780AM_BACKSLASH
781AM_DEFAULT_VERBOSITY
782AM_DEFAULT_V
783AM_V
784am__untar
785am__tar
786AMTAR
787am__leading_dot
788SET_MAKE
789AWK
790mkdir_p
791MKDIR_P
792INSTALL_STRIP_PROGRAM
793STRIP
794install_sh
795MAKEINFO
796AUTOHEADER
797AUTOMAKE
798AUTOCONF
799ACLOCAL
800VERSION
801PACKAGE
802CYGPATH_W
803am__isrc
804INSTALL_DATA
805INSTALL_SCRIPT
806INSTALL_PROGRAM
807target_alias
808host_alias
809build_alias
810LIBS
811ECHO_T
812ECHO_N
813ECHO_C
814DEFS
815mandir
816localedir
817libdir
818psdir
819pdfdir
820dvidir
821htmldir
822infodir
823docdir
824oldincludedir
825includedir
826runstatedir
827localstatedir
828sharedstatedir
829sysconfdir
830datadir
831datarootdir
832libexecdir
833sbindir
834bindir
835program_transform_name
836prefix
837exec_prefix
838PACKAGE_URL
839PACKAGE_BUGREPORT
840PACKAGE_STRING
841PACKAGE_VERSION
842PACKAGE_TARNAME
843PACKAGE_NAME
844PATH_SEPARATOR
845SHELL
846am__quote'
847ac_subst_files=''
848ac_user_opts='
849enable_option_checking
850enable_silent_rules
851enable_dependency_tracking
852enable_largefile
853enable_static
854enable_static_libs
855enable_server
856enable_proxy
857enable_agent
858enable_java
859enable_ipv6
860with_ibm_db2
861with_ibm_db2_include
862with_ibm_db2_lib
863with_mysql
864with_oracle
865with_oracle_include
866with_oracle_lib
867with_postgresql
868with_sqlite3
869with_jabber
870with_libxml2
871with_unixodbc
872with_net_snmp
873with_ssh2
874with_ssh
875with_openipmi
876with_zlib
877with_zlib_include
878with_zlib_lib
879with_libpthread
880with_libpthread_include
881with_libpthread_lib
882with_libevent
883with_libevent_include
884with_libevent_lib
885with_mbedtls
886with_gnutls
887with_openssl
888with_ldap
889with_libcurl
890with_libpcre
891with_libpcre_include
892with_libpcre_lib
893with_iconv
894with_iconv_include
895with_iconv_lib
896'
897      ac_precious_vars='build_alias
898host_alias
899target_alias
900CC
901CFLAGS
902LDFLAGS
903LIBS
904CPPFLAGS
905CPP
906PKG_CONFIG
907PKG_CONFIG_PATH
908PKG_CONFIG_LIBDIR
909IKSEMEL_CFLAGS
910IKSEMEL_LIBS'
911
912
913# Initialize some variables set by options.
914ac_init_help=
915ac_init_version=false
916ac_unrecognized_opts=
917ac_unrecognized_sep=
918# The variables have the same names as the options, with
919# dashes changed to underlines.
920cache_file=/dev/null
921exec_prefix=NONE
922no_create=
923no_recursion=
924prefix=NONE
925program_prefix=NONE
926program_suffix=NONE
927program_transform_name=s,x,x,
928silent=
929site=
930srcdir=
931verbose=
932x_includes=NONE
933x_libraries=NONE
934
935# Installation directory options.
936# These are left unexpanded so users can "make install exec_prefix=/foo"
937# and all the variables that are supposed to be based on exec_prefix
938# by default will actually change.
939# Use braces instead of parens because sh, perl, etc. also accept them.
940# (The list follows the same order as the GNU Coding Standards.)
941bindir='${exec_prefix}/bin'
942sbindir='${exec_prefix}/sbin'
943libexecdir='${exec_prefix}/libexec'
944datarootdir='${prefix}/share'
945datadir='${datarootdir}'
946sysconfdir='${prefix}/etc'
947sharedstatedir='${prefix}/com'
948localstatedir='${prefix}/var'
949runstatedir='${localstatedir}/run'
950includedir='${prefix}/include'
951oldincludedir='/usr/include'
952docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
953infodir='${datarootdir}/info'
954htmldir='${docdir}'
955dvidir='${docdir}'
956pdfdir='${docdir}'
957psdir='${docdir}'
958libdir='${exec_prefix}/lib'
959localedir='${datarootdir}/locale'
960mandir='${datarootdir}/man'
961
962ac_prev=
963ac_dashdash=
964for ac_option
965do
966  # If the previous option needs an argument, assign it.
967  if test -n "$ac_prev"; then
968    eval $ac_prev=\$ac_option
969    ac_prev=
970    continue
971  fi
972
973  case $ac_option in
974  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
975  *=)   ac_optarg= ;;
976  *)    ac_optarg=yes ;;
977  esac
978
979  # Accept the important Cygnus configure options, so we can diagnose typos.
980
981  case $ac_dashdash$ac_option in
982  --)
983    ac_dashdash=yes ;;
984
985  -bindir | --bindir | --bindi | --bind | --bin | --bi)
986    ac_prev=bindir ;;
987  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
988    bindir=$ac_optarg ;;
989
990  -build | --build | --buil | --bui | --bu)
991    ac_prev=build_alias ;;
992  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
993    build_alias=$ac_optarg ;;
994
995  -cache-file | --cache-file | --cache-fil | --cache-fi \
996  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
997    ac_prev=cache_file ;;
998  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
999  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1000    cache_file=$ac_optarg ;;
1001
1002  --config-cache | -C)
1003    cache_file=config.cache ;;
1004
1005  -datadir | --datadir | --datadi | --datad)
1006    ac_prev=datadir ;;
1007  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1008    datadir=$ac_optarg ;;
1009
1010  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1011  | --dataroo | --dataro | --datar)
1012    ac_prev=datarootdir ;;
1013  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1014  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1015    datarootdir=$ac_optarg ;;
1016
1017  -disable-* | --disable-*)
1018    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1019    # Reject names that are not valid shell variable names.
1020    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1021      as_fn_error $? "invalid feature name: $ac_useropt"
1022    ac_useropt_orig=$ac_useropt
1023    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1024    case $ac_user_opts in
1025      *"
1026"enable_$ac_useropt"
1027"*) ;;
1028      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1029	 ac_unrecognized_sep=', ';;
1030    esac
1031    eval enable_$ac_useropt=no ;;
1032
1033  -docdir | --docdir | --docdi | --doc | --do)
1034    ac_prev=docdir ;;
1035  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1036    docdir=$ac_optarg ;;
1037
1038  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1039    ac_prev=dvidir ;;
1040  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1041    dvidir=$ac_optarg ;;
1042
1043  -enable-* | --enable-*)
1044    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1045    # Reject names that are not valid shell variable names.
1046    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1047      as_fn_error $? "invalid feature name: $ac_useropt"
1048    ac_useropt_orig=$ac_useropt
1049    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1050    case $ac_user_opts in
1051      *"
1052"enable_$ac_useropt"
1053"*) ;;
1054      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1055	 ac_unrecognized_sep=', ';;
1056    esac
1057    eval enable_$ac_useropt=\$ac_optarg ;;
1058
1059  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1060  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1061  | --exec | --exe | --ex)
1062    ac_prev=exec_prefix ;;
1063  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1064  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1065  | --exec=* | --exe=* | --ex=*)
1066    exec_prefix=$ac_optarg ;;
1067
1068  -gas | --gas | --ga | --g)
1069    # Obsolete; use --with-gas.
1070    with_gas=yes ;;
1071
1072  -help | --help | --hel | --he | -h)
1073    ac_init_help=long ;;
1074  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1075    ac_init_help=recursive ;;
1076  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1077    ac_init_help=short ;;
1078
1079  -host | --host | --hos | --ho)
1080    ac_prev=host_alias ;;
1081  -host=* | --host=* | --hos=* | --ho=*)
1082    host_alias=$ac_optarg ;;
1083
1084  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1085    ac_prev=htmldir ;;
1086  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1087  | --ht=*)
1088    htmldir=$ac_optarg ;;
1089
1090  -includedir | --includedir | --includedi | --included | --include \
1091  | --includ | --inclu | --incl | --inc)
1092    ac_prev=includedir ;;
1093  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1094  | --includ=* | --inclu=* | --incl=* | --inc=*)
1095    includedir=$ac_optarg ;;
1096
1097  -infodir | --infodir | --infodi | --infod | --info | --inf)
1098    ac_prev=infodir ;;
1099  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1100    infodir=$ac_optarg ;;
1101
1102  -libdir | --libdir | --libdi | --libd)
1103    ac_prev=libdir ;;
1104  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1105    libdir=$ac_optarg ;;
1106
1107  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1108  | --libexe | --libex | --libe)
1109    ac_prev=libexecdir ;;
1110  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1111  | --libexe=* | --libex=* | --libe=*)
1112    libexecdir=$ac_optarg ;;
1113
1114  -localedir | --localedir | --localedi | --localed | --locale)
1115    ac_prev=localedir ;;
1116  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1117    localedir=$ac_optarg ;;
1118
1119  -localstatedir | --localstatedir | --localstatedi | --localstated \
1120  | --localstate | --localstat | --localsta | --localst | --locals)
1121    ac_prev=localstatedir ;;
1122  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1123  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1124    localstatedir=$ac_optarg ;;
1125
1126  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1127    ac_prev=mandir ;;
1128  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1129    mandir=$ac_optarg ;;
1130
1131  -nfp | --nfp | --nf)
1132    # Obsolete; use --without-fp.
1133    with_fp=no ;;
1134
1135  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1136  | --no-cr | --no-c | -n)
1137    no_create=yes ;;
1138
1139  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1140  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1141    no_recursion=yes ;;
1142
1143  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1144  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1145  | --oldin | --oldi | --old | --ol | --o)
1146    ac_prev=oldincludedir ;;
1147  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1148  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1149  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1150    oldincludedir=$ac_optarg ;;
1151
1152  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1153    ac_prev=prefix ;;
1154  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1155    prefix=$ac_optarg ;;
1156
1157  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1158  | --program-pre | --program-pr | --program-p)
1159    ac_prev=program_prefix ;;
1160  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1161  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1162    program_prefix=$ac_optarg ;;
1163
1164  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1165  | --program-suf | --program-su | --program-s)
1166    ac_prev=program_suffix ;;
1167  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1168  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1169    program_suffix=$ac_optarg ;;
1170
1171  -program-transform-name | --program-transform-name \
1172  | --program-transform-nam | --program-transform-na \
1173  | --program-transform-n | --program-transform- \
1174  | --program-transform | --program-transfor \
1175  | --program-transfo | --program-transf \
1176  | --program-trans | --program-tran \
1177  | --progr-tra | --program-tr | --program-t)
1178    ac_prev=program_transform_name ;;
1179  -program-transform-name=* | --program-transform-name=* \
1180  | --program-transform-nam=* | --program-transform-na=* \
1181  | --program-transform-n=* | --program-transform-=* \
1182  | --program-transform=* | --program-transfor=* \
1183  | --program-transfo=* | --program-transf=* \
1184  | --program-trans=* | --program-tran=* \
1185  | --progr-tra=* | --program-tr=* | --program-t=*)
1186    program_transform_name=$ac_optarg ;;
1187
1188  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1189    ac_prev=pdfdir ;;
1190  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1191    pdfdir=$ac_optarg ;;
1192
1193  -psdir | --psdir | --psdi | --psd | --ps)
1194    ac_prev=psdir ;;
1195  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1196    psdir=$ac_optarg ;;
1197
1198  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1199  | -silent | --silent | --silen | --sile | --sil)
1200    silent=yes ;;
1201
1202  -runstatedir | --runstatedir | --runstatedi | --runstated \
1203  | --runstate | --runstat | --runsta | --runst | --runs \
1204  | --run | --ru | --r)
1205    ac_prev=runstatedir ;;
1206  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1207  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1208  | --run=* | --ru=* | --r=*)
1209    runstatedir=$ac_optarg ;;
1210
1211  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1212    ac_prev=sbindir ;;
1213  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1214  | --sbi=* | --sb=*)
1215    sbindir=$ac_optarg ;;
1216
1217  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1218  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1219  | --sharedst | --shareds | --shared | --share | --shar \
1220  | --sha | --sh)
1221    ac_prev=sharedstatedir ;;
1222  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1223  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1224  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1225  | --sha=* | --sh=*)
1226    sharedstatedir=$ac_optarg ;;
1227
1228  -site | --site | --sit)
1229    ac_prev=site ;;
1230  -site=* | --site=* | --sit=*)
1231    site=$ac_optarg ;;
1232
1233  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1234    ac_prev=srcdir ;;
1235  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1236    srcdir=$ac_optarg ;;
1237
1238  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1239  | --syscon | --sysco | --sysc | --sys | --sy)
1240    ac_prev=sysconfdir ;;
1241  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1242  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1243    sysconfdir=$ac_optarg ;;
1244
1245  -target | --target | --targe | --targ | --tar | --ta | --t)
1246    ac_prev=target_alias ;;
1247  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1248    target_alias=$ac_optarg ;;
1249
1250  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1251    verbose=yes ;;
1252
1253  -version | --version | --versio | --versi | --vers | -V)
1254    ac_init_version=: ;;
1255
1256  -with-* | --with-*)
1257    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1258    # Reject names that are not valid shell variable names.
1259    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1260      as_fn_error $? "invalid package name: $ac_useropt"
1261    ac_useropt_orig=$ac_useropt
1262    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1263    case $ac_user_opts in
1264      *"
1265"with_$ac_useropt"
1266"*) ;;
1267      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1268	 ac_unrecognized_sep=', ';;
1269    esac
1270    eval with_$ac_useropt=\$ac_optarg ;;
1271
1272  -without-* | --without-*)
1273    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1274    # Reject names that are not valid shell variable names.
1275    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1276      as_fn_error $? "invalid package name: $ac_useropt"
1277    ac_useropt_orig=$ac_useropt
1278    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279    case $ac_user_opts in
1280      *"
1281"with_$ac_useropt"
1282"*) ;;
1283      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1284	 ac_unrecognized_sep=', ';;
1285    esac
1286    eval with_$ac_useropt=no ;;
1287
1288  --x)
1289    # Obsolete; use --with-x.
1290    with_x=yes ;;
1291
1292  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1293  | --x-incl | --x-inc | --x-in | --x-i)
1294    ac_prev=x_includes ;;
1295  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1296  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1297    x_includes=$ac_optarg ;;
1298
1299  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1300  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1301    ac_prev=x_libraries ;;
1302  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1303  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1304    x_libraries=$ac_optarg ;;
1305
1306  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1307Try \`$0 --help' for more information"
1308    ;;
1309
1310  *=*)
1311    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1312    # Reject names that are not valid shell variable names.
1313    case $ac_envvar in #(
1314      '' | [0-9]* | *[!_$as_cr_alnum]* )
1315      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1316    esac
1317    eval $ac_envvar=\$ac_optarg
1318    export $ac_envvar ;;
1319
1320  *)
1321    # FIXME: should be removed in autoconf 3.0.
1322    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1323    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1324      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1325    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1326    ;;
1327
1328  esac
1329done
1330
1331if test -n "$ac_prev"; then
1332  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1333  as_fn_error $? "missing argument to $ac_option"
1334fi
1335
1336if test -n "$ac_unrecognized_opts"; then
1337  case $enable_option_checking in
1338    no) ;;
1339    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1340    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1341  esac
1342fi
1343
1344# Check all directory arguments for consistency.
1345for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1346		datadir sysconfdir sharedstatedir localstatedir includedir \
1347		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1348		libdir localedir mandir runstatedir
1349do
1350  eval ac_val=\$$ac_var
1351  # Remove trailing slashes.
1352  case $ac_val in
1353    */ )
1354      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1355      eval $ac_var=\$ac_val;;
1356  esac
1357  # Be sure to have absolute directory names.
1358  case $ac_val in
1359    [\\/$]* | ?:[\\/]* )  continue;;
1360    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1361  esac
1362  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1363done
1364
1365# There might be people who depend on the old broken behavior: `$host'
1366# used to hold the argument of --host etc.
1367# FIXME: To remove some day.
1368build=$build_alias
1369host=$host_alias
1370target=$target_alias
1371
1372# FIXME: To remove some day.
1373if test "x$host_alias" != x; then
1374  if test "x$build_alias" = x; then
1375    cross_compiling=maybe
1376  elif test "x$build_alias" != "x$host_alias"; then
1377    cross_compiling=yes
1378  fi
1379fi
1380
1381ac_tool_prefix=
1382test -n "$host_alias" && ac_tool_prefix=$host_alias-
1383
1384test "$silent" = yes && exec 6>/dev/null
1385
1386
1387ac_pwd=`pwd` && test -n "$ac_pwd" &&
1388ac_ls_di=`ls -di .` &&
1389ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1390  as_fn_error $? "working directory cannot be determined"
1391test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1392  as_fn_error $? "pwd does not report name of working directory"
1393
1394
1395# Find the source files, if location was not specified.
1396if test -z "$srcdir"; then
1397  ac_srcdir_defaulted=yes
1398  # Try the directory containing this script, then the parent directory.
1399  ac_confdir=`$as_dirname -- "$as_myself" ||
1400$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1401	 X"$as_myself" : 'X\(//\)[^/]' \| \
1402	 X"$as_myself" : 'X\(//\)$' \| \
1403	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1404$as_echo X"$as_myself" |
1405    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1406	    s//\1/
1407	    q
1408	  }
1409	  /^X\(\/\/\)[^/].*/{
1410	    s//\1/
1411	    q
1412	  }
1413	  /^X\(\/\/\)$/{
1414	    s//\1/
1415	    q
1416	  }
1417	  /^X\(\/\).*/{
1418	    s//\1/
1419	    q
1420	  }
1421	  s/.*/./; q'`
1422  srcdir=$ac_confdir
1423  if test ! -r "$srcdir/$ac_unique_file"; then
1424    srcdir=..
1425  fi
1426else
1427  ac_srcdir_defaulted=no
1428fi
1429if test ! -r "$srcdir/$ac_unique_file"; then
1430  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1431  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1432fi
1433ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1434ac_abs_confdir=`(
1435	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1436	pwd)`
1437# When building in place, set srcdir=.
1438if test "$ac_abs_confdir" = "$ac_pwd"; then
1439  srcdir=.
1440fi
1441# Remove unnecessary trailing slashes from srcdir.
1442# Double slashes in file names in object file debugging info
1443# mess up M-x gdb in Emacs.
1444case $srcdir in
1445*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1446esac
1447for ac_var in $ac_precious_vars; do
1448  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1449  eval ac_env_${ac_var}_value=\$${ac_var}
1450  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1451  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1452done
1453
1454#
1455# Report the --help message.
1456#
1457if test "$ac_init_help" = "long"; then
1458  # Omit some internal or obsolete options to make the list less imposing.
1459  # This message is too long to be a string in the A/UX 3.1 sh.
1460  cat <<_ACEOF
1461\`configure' configures Zabbix 4.0.30 to adapt to many kinds of systems.
1462
1463Usage: $0 [OPTION]... [VAR=VALUE]...
1464
1465To assign environment variables (e.g., CC, CFLAGS...), specify them as
1466VAR=VALUE.  See below for descriptions of some of the useful variables.
1467
1468Defaults for the options are specified in brackets.
1469
1470Configuration:
1471  -h, --help              display this help and exit
1472      --help=short        display options specific to this package
1473      --help=recursive    display the short help of all the included packages
1474  -V, --version           display version information and exit
1475  -q, --quiet, --silent   do not print \`checking ...' messages
1476      --cache-file=FILE   cache test results in FILE [disabled]
1477  -C, --config-cache      alias for \`--cache-file=config.cache'
1478  -n, --no-create         do not create output files
1479      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1480
1481Installation directories:
1482  --prefix=PREFIX         install architecture-independent files in PREFIX
1483                          [$ac_default_prefix]
1484  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1485                          [PREFIX]
1486
1487By default, \`make install' will install all the files in
1488\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1489an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1490for instance \`--prefix=\$HOME'.
1491
1492For better control, use the options below.
1493
1494Fine tuning of the installation directories:
1495  --bindir=DIR            user executables [EPREFIX/bin]
1496  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1497  --libexecdir=DIR        program executables [EPREFIX/libexec]
1498  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1499  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1500  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1501  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1502  --libdir=DIR            object code libraries [EPREFIX/lib]
1503  --includedir=DIR        C header files [PREFIX/include]
1504  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1505  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1506  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1507  --infodir=DIR           info documentation [DATAROOTDIR/info]
1508  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1509  --mandir=DIR            man documentation [DATAROOTDIR/man]
1510  --docdir=DIR            documentation root [DATAROOTDIR/doc/zabbix]
1511  --htmldir=DIR           html documentation [DOCDIR]
1512  --dvidir=DIR            dvi documentation [DOCDIR]
1513  --pdfdir=DIR            pdf documentation [DOCDIR]
1514  --psdir=DIR             ps documentation [DOCDIR]
1515_ACEOF
1516
1517  cat <<\_ACEOF
1518
1519Program names:
1520  --program-prefix=PREFIX            prepend PREFIX to installed program names
1521  --program-suffix=SUFFIX            append SUFFIX to installed program names
1522  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1523
1524System types:
1525  --build=BUILD     configure for building on BUILD [guessed]
1526  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1527_ACEOF
1528fi
1529
1530if test -n "$ac_init_help"; then
1531  case $ac_init_help in
1532     short | recursive ) echo "Configuration of Zabbix 4.0.30:";;
1533   esac
1534  cat <<\_ACEOF
1535
1536Optional Features:
1537  --disable-option-checking  ignore unrecognized --enable/--with options
1538  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1539  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1540  --enable-silent-rules   less verbose build output (undo: "make V=1")
1541  --disable-silent-rules  verbose build output (undo: "make V=0")
1542  --enable-dependency-tracking
1543                          do not reject slow dependency extractors
1544  --disable-dependency-tracking
1545                          speeds up one-time build
1546  --disable-largefile     omit support for large files
1547  --enable-static         Build statically linked binaries
1548  --enable-static-libs    Build statically linked binaries with selected libs from default folders
1549  --enable-server         Turn on build of Zabbix server
1550  --enable-proxy          Turn on build of Zabbix proxy
1551  --enable-agent          Turn on build of Zabbix agent and client utilities
1552  --enable-java           Turn on build of Zabbix Java gateway
1553  --enable-ipv6           Turn on support of IPv6
1554
1555Optional Packages:
1556  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1557  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1558  --with-ibm-db2[=ARG]    use IBM DB2 CLI from given sqllib directory
1559                          (ARG=path); use /home/db2inst1/sqllib (ARG=yes);
1560                          disable IBM DB2 support (ARG=no)
1561  --with-ibm-db2-include[=DIR]
1562                          use IBM DB2 CLI headers from given path
1563  --with-ibm-db2-lib[=DIR]
1564                          use IBM DB2 CLI libraries from given path
1565  --with-mysql[=ARG]      use MySQL client library [default=no], optionally
1566                          specify path to mysql_config
1567  --with-oracle[=ARG]     use Oracle OCI API from given Oracle home
1568                          (ARG=path); use existing ORACLE_HOME (ARG=yes);
1569                          disable Oracle OCI support (ARG=no)
1570  --with-oracle-include[=DIR]
1571                          use Oracle OCI API headers from given path
1572  --with-oracle-lib[=DIR] use Oracle OCI API libraries from given path
1573  --with-postgresql[=ARG] use PostgreSQL library [default=no], optionally
1574                          specify path to pg_config
1575  --with-sqlite3[=ARG]    use SQLite 3 library [default=no], optionally
1576                          specify the prefix for sqlite3 library
1577
1578If you want to use Jabber protocol for messaging:
1579  --with-jabber[=DIR]     Include Jabber support [default=no]. DIR is the
1580                          iksemel library install directory.
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 mbed TLS (PolarSSL) library:
1636  --with-mbedtls[=DIR]    use mbed TLS (PolarSSL) package [default=no], DIR is
1637                          the libpolarssl install directory.
1638
1639If you want to use encryption provided by GnuTLS library:
1640  --with-gnutls[=DIR]     use GnuTLS package [default=no], DIR is the
1641                          libgnutls install directory.
1642
1643If you want to use encryption provided by OpenSSL library:
1644  --with-openssl[=DIR]    use OpenSSL package [default=no], DIR is the libssl
1645                          and libcrypto 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  IKSEMEL_CFLAGS
1688              C compiler flags for IKSEMEL, overriding pkg-config
1689  IKSEMEL_LIBS
1690              linker flags for IKSEMEL, overriding pkg-config
1691
1692Use these variables to override the choices made by `configure' or to help
1693it to find libraries and programs with nonstandard names/locations.
1694
1695Report bugs to the package provider.
1696_ACEOF
1697ac_status=$?
1698fi
1699
1700if test "$ac_init_help" = "recursive"; then
1701  # If there are subdirs, report their specific --help.
1702  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1703    test -d "$ac_dir" ||
1704      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1705      continue
1706    ac_builddir=.
1707
1708case "$ac_dir" in
1709.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1710*)
1711  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1712  # A ".." for each directory in $ac_dir_suffix.
1713  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1714  case $ac_top_builddir_sub in
1715  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1716  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1717  esac ;;
1718esac
1719ac_abs_top_builddir=$ac_pwd
1720ac_abs_builddir=$ac_pwd$ac_dir_suffix
1721# for backward compatibility:
1722ac_top_builddir=$ac_top_build_prefix
1723
1724case $srcdir in
1725  .)  # We are building in place.
1726    ac_srcdir=.
1727    ac_top_srcdir=$ac_top_builddir_sub
1728    ac_abs_top_srcdir=$ac_pwd ;;
1729  [\\/]* | ?:[\\/]* )  # Absolute name.
1730    ac_srcdir=$srcdir$ac_dir_suffix;
1731    ac_top_srcdir=$srcdir
1732    ac_abs_top_srcdir=$srcdir ;;
1733  *) # Relative name.
1734    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1735    ac_top_srcdir=$ac_top_build_prefix$srcdir
1736    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1737esac
1738ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1739
1740    cd "$ac_dir" || { ac_status=$?; continue; }
1741    # Check for guested configure.
1742    if test -f "$ac_srcdir/configure.gnu"; then
1743      echo &&
1744      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1745    elif test -f "$ac_srcdir/configure"; then
1746      echo &&
1747      $SHELL "$ac_srcdir/configure" --help=recursive
1748    else
1749      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1750    fi || ac_status=$?
1751    cd "$ac_pwd" || { ac_status=$?; break; }
1752  done
1753fi
1754
1755test -n "$ac_init_help" && exit $ac_status
1756if $ac_init_version; then
1757  cat <<\_ACEOF
1758Zabbix configure 4.0.30
1759generated by GNU Autoconf 2.69
1760
1761Copyright (C) 2012 Free Software Foundation, Inc.
1762This configure script is free software; the Free Software Foundation
1763gives unlimited permission to copy, distribute and modify it.
1764_ACEOF
1765  exit
1766fi
1767
1768## ------------------------ ##
1769## Autoconf initialization. ##
1770## ------------------------ ##
1771
1772# ac_fn_c_try_compile LINENO
1773# --------------------------
1774# Try to compile conftest.$ac_ext, and return whether this succeeded.
1775ac_fn_c_try_compile ()
1776{
1777  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778  rm -f conftest.$ac_objext
1779  if { { ac_try="$ac_compile"
1780case "(($ac_try" in
1781  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782  *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786  (eval "$ac_compile") 2>conftest.err
1787  ac_status=$?
1788  if test -s conftest.err; then
1789    grep -v '^ *+' conftest.err >conftest.er1
1790    cat conftest.er1 >&5
1791    mv -f conftest.er1 conftest.err
1792  fi
1793  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794  test $ac_status = 0; } && {
1795	 test -z "$ac_c_werror_flag" ||
1796	 test ! -s conftest.err
1797       } && test -s conftest.$ac_objext; then :
1798  ac_retval=0
1799else
1800  $as_echo "$as_me: failed program was:" >&5
1801sed 's/^/| /' conftest.$ac_ext >&5
1802
1803	ac_retval=1
1804fi
1805  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806  as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_compile
1809
1810# ac_fn_c_try_cpp LINENO
1811# ----------------------
1812# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1813ac_fn_c_try_cpp ()
1814{
1815  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816  if { { ac_try="$ac_cpp conftest.$ac_ext"
1817case "(($ac_try" in
1818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819  *) ac_try_echo=$ac_try;;
1820esac
1821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1822$as_echo "$ac_try_echo"; } >&5
1823  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1824  ac_status=$?
1825  if test -s conftest.err; then
1826    grep -v '^ *+' conftest.err >conftest.er1
1827    cat conftest.er1 >&5
1828    mv -f conftest.er1 conftest.err
1829  fi
1830  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831  test $ac_status = 0; } > conftest.i && {
1832	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1833	 test ! -s conftest.err
1834       }; then :
1835  ac_retval=0
1836else
1837  $as_echo "$as_me: failed program was:" >&5
1838sed 's/^/| /' conftest.$ac_ext >&5
1839
1840    ac_retval=1
1841fi
1842  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1843  as_fn_set_status $ac_retval
1844
1845} # ac_fn_c_try_cpp
1846
1847# ac_fn_c_try_run LINENO
1848# ----------------------
1849# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1850# that executables *can* be run.
1851ac_fn_c_try_run ()
1852{
1853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854  if { { ac_try="$ac_link"
1855case "(($ac_try" in
1856  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857  *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860$as_echo "$ac_try_echo"; } >&5
1861  (eval "$ac_link") 2>&5
1862  ac_status=$?
1863  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1865  { { case "(($ac_try" in
1866  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867  *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871  (eval "$ac_try") 2>&5
1872  ac_status=$?
1873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874  test $ac_status = 0; }; }; then :
1875  ac_retval=0
1876else
1877  $as_echo "$as_me: program exited with status $ac_status" >&5
1878       $as_echo "$as_me: failed program was:" >&5
1879sed 's/^/| /' conftest.$ac_ext >&5
1880
1881       ac_retval=$ac_status
1882fi
1883  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1884  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1885  as_fn_set_status $ac_retval
1886
1887} # ac_fn_c_try_run
1888
1889# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1890# -------------------------------------------------------
1891# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1892# the include files in INCLUDES and setting the cache variable VAR
1893# accordingly.
1894ac_fn_c_check_header_mongrel ()
1895{
1896  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897  if eval \${$3+:} false; then :
1898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
1900if eval \${$3+:} false; then :
1901  $as_echo_n "(cached) " >&6
1902fi
1903eval ac_res=\$$3
1904	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1905$as_echo "$ac_res" >&6; }
1906else
1907  # Is the header compilable?
1908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1909$as_echo_n "checking $2 usability... " >&6; }
1910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h.  */
1912$4
1913#include <$2>
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916  ac_header_compiler=yes
1917else
1918  ac_header_compiler=no
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1922$as_echo "$ac_header_compiler" >&6; }
1923
1924# Is the header present?
1925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1926$as_echo_n "checking $2 presence... " >&6; }
1927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1928/* end confdefs.h.  */
1929#include <$2>
1930_ACEOF
1931if ac_fn_c_try_cpp "$LINENO"; then :
1932  ac_header_preproc=yes
1933else
1934  ac_header_preproc=no
1935fi
1936rm -f conftest.err conftest.i conftest.$ac_ext
1937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1938$as_echo "$ac_header_preproc" >&6; }
1939
1940# So?  What about this header?
1941case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1942  yes:no: )
1943    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1944$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1946$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1947    ;;
1948  no:yes:* )
1949    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1950$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1951    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1952$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1953    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1954$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1955    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1956$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1957    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1958$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1959    ;;
1960esac
1961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1962$as_echo_n "checking for $2... " >&6; }
1963if eval \${$3+:} false; then :
1964  $as_echo_n "(cached) " >&6
1965else
1966  eval "$3=\$ac_header_compiler"
1967fi
1968eval ac_res=\$$3
1969	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970$as_echo "$ac_res" >&6; }
1971fi
1972  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973
1974} # ac_fn_c_check_header_mongrel
1975
1976# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1977# -------------------------------------------------------
1978# Tests whether HEADER exists and can be compiled using the include files in
1979# INCLUDES, setting the cache variable VAR accordingly.
1980ac_fn_c_check_header_compile ()
1981{
1982  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1984$as_echo_n "checking for $2... " >&6; }
1985if eval \${$3+:} false; then :
1986  $as_echo_n "(cached) " >&6
1987else
1988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h.  */
1990$4
1991#include <$2>
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994  eval "$3=yes"
1995else
1996  eval "$3=no"
1997fi
1998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999fi
2000eval ac_res=\$$3
2001	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
2003  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004
2005} # ac_fn_c_check_header_compile
2006
2007# ac_fn_c_try_link LINENO
2008# -----------------------
2009# Try to link conftest.$ac_ext, and return whether this succeeded.
2010ac_fn_c_try_link ()
2011{
2012  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013  rm -f conftest.$ac_objext conftest$ac_exeext
2014  if { { ac_try="$ac_link"
2015case "(($ac_try" in
2016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017  *) ac_try_echo=$ac_try;;
2018esac
2019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020$as_echo "$ac_try_echo"; } >&5
2021  (eval "$ac_link") 2>conftest.err
2022  ac_status=$?
2023  if test -s conftest.err; then
2024    grep -v '^ *+' conftest.err >conftest.er1
2025    cat conftest.er1 >&5
2026    mv -f conftest.er1 conftest.err
2027  fi
2028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029  test $ac_status = 0; } && {
2030	 test -z "$ac_c_werror_flag" ||
2031	 test ! -s conftest.err
2032       } && test -s conftest$ac_exeext && {
2033	 test "$cross_compiling" = yes ||
2034	 test -x conftest$ac_exeext
2035       }; then :
2036  ac_retval=0
2037else
2038  $as_echo "$as_me: failed program was:" >&5
2039sed 's/^/| /' conftest.$ac_ext >&5
2040
2041	ac_retval=1
2042fi
2043  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2044  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2045  # interfere with the next link command; also delete a directory that is
2046  # left behind by Apple's compiler.  We do this before executing the actions.
2047  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2048  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2049  as_fn_set_status $ac_retval
2050
2051} # ac_fn_c_try_link
2052
2053# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2054# -------------------------------------------
2055# Tests whether TYPE exists after having included INCLUDES, setting cache
2056# variable VAR accordingly.
2057ac_fn_c_check_type ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2061$as_echo_n "checking for $2... " >&6; }
2062if eval \${$3+:} false; then :
2063  $as_echo_n "(cached) " >&6
2064else
2065  eval "$3=no"
2066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h.  */
2068$4
2069int
2070main ()
2071{
2072if (sizeof ($2))
2073	 return 0;
2074  ;
2075  return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h.  */
2081$4
2082int
2083main ()
2084{
2085if (sizeof (($2)))
2086	    return 0;
2087  ;
2088  return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092
2093else
2094  eval "$3=yes"
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100eval ac_res=\$$3
2101	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102$as_echo "$ac_res" >&6; }
2103  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2104
2105} # ac_fn_c_check_type
2106
2107# ac_fn_c_check_func LINENO FUNC VAR
2108# ----------------------------------
2109# Tests whether FUNC exists, setting the cache variable VAR accordingly
2110ac_fn_c_check_func ()
2111{
2112  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2114$as_echo_n "checking for $2... " >&6; }
2115if eval \${$3+:} false; then :
2116  $as_echo_n "(cached) " >&6
2117else
2118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h.  */
2120/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2121   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2122#define $2 innocuous_$2
2123
2124/* System header to define __stub macros and hopefully few prototypes,
2125    which can conflict with char $2 (); below.
2126    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2127    <limits.h> exists even on freestanding compilers.  */
2128
2129#ifdef __STDC__
2130# include <limits.h>
2131#else
2132# include <assert.h>
2133#endif
2134
2135#undef $2
2136
2137/* Override any GCC internal prototype to avoid an error.
2138   Use char because int might match the return type of a GCC
2139   builtin and then its argument prototype would still apply.  */
2140#ifdef __cplusplus
2141extern "C"
2142#endif
2143char $2 ();
2144/* The GNU C library defines this for functions which it implements
2145    to always fail with ENOSYS.  Some functions are actually named
2146    something starting with __ and the normal name is an alias.  */
2147#if defined __stub_$2 || defined __stub___$2
2148choke me
2149#endif
2150
2151int
2152main ()
2153{
2154return $2 ();
2155  ;
2156  return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_link "$LINENO"; then :
2160  eval "$3=yes"
2161else
2162  eval "$3=no"
2163fi
2164rm -f core conftest.err conftest.$ac_objext \
2165    conftest$ac_exeext conftest.$ac_ext
2166fi
2167eval ac_res=\$$3
2168	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2169$as_echo "$ac_res" >&6; }
2170  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2171
2172} # ac_fn_c_check_func
2173
2174# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2175# --------------------------------------------
2176# Tries to find the compile-time value of EXPR in a program that includes
2177# INCLUDES, setting VAR accordingly. Returns whether the value could be
2178# computed
2179ac_fn_c_compute_int ()
2180{
2181  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182  if test "$cross_compiling" = yes; then
2183    # Depending upon the size, compute the lo and hi bounds.
2184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h.  */
2186$4
2187int
2188main ()
2189{
2190static int test_array [1 - 2 * !(($2) >= 0)];
2191test_array [0] = 0;
2192return test_array [0];
2193
2194  ;
2195  return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_compile "$LINENO"; then :
2199  ac_lo=0 ac_mid=0
2200  while :; do
2201    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h.  */
2203$4
2204int
2205main ()
2206{
2207static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2208test_array [0] = 0;
2209return test_array [0];
2210
2211  ;
2212  return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_compile "$LINENO"; then :
2216  ac_hi=$ac_mid; break
2217else
2218  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2219			if test $ac_lo -le $ac_mid; then
2220			  ac_lo= ac_hi=
2221			  break
2222			fi
2223			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2224fi
2225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2226  done
2227else
2228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h.  */
2230$4
2231int
2232main ()
2233{
2234static int test_array [1 - 2 * !(($2) < 0)];
2235test_array [0] = 0;
2236return test_array [0];
2237
2238  ;
2239  return 0;
2240}
2241_ACEOF
2242if ac_fn_c_try_compile "$LINENO"; then :
2243  ac_hi=-1 ac_mid=-1
2244  while :; do
2245    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248int
2249main ()
2250{
2251static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2252test_array [0] = 0;
2253return test_array [0];
2254
2255  ;
2256  return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260  ac_lo=$ac_mid; break
2261else
2262  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2263			if test $ac_mid -le $ac_hi; then
2264			  ac_lo= ac_hi=
2265			  break
2266			fi
2267			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270  done
2271else
2272  ac_lo= ac_hi=
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277# Binary search between lo and hi bounds.
2278while test "x$ac_lo" != "x$ac_hi"; do
2279  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h.  */
2282$4
2283int
2284main ()
2285{
2286static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2287test_array [0] = 0;
2288return test_array [0];
2289
2290  ;
2291  return 0;
2292}
2293_ACEOF
2294if ac_fn_c_try_compile "$LINENO"; then :
2295  ac_hi=$ac_mid
2296else
2297  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2298fi
2299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300done
2301case $ac_lo in #((
2302?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2303'') ac_retval=1 ;;
2304esac
2305  else
2306    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h.  */
2308$4
2309static long int longval () { return $2; }
2310static unsigned long int ulongval () { return $2; }
2311#include <stdio.h>
2312#include <stdlib.h>
2313int
2314main ()
2315{
2316
2317  FILE *f = fopen ("conftest.val", "w");
2318  if (! f)
2319    return 1;
2320  if (($2) < 0)
2321    {
2322      long int i = longval ();
2323      if (i != ($2))
2324	return 1;
2325      fprintf (f, "%ld", i);
2326    }
2327  else
2328    {
2329      unsigned long int i = ulongval ();
2330      if (i != ($2))
2331	return 1;
2332      fprintf (f, "%lu", i);
2333    }
2334  /* Do not output a trailing newline, as this causes \r\n confusion
2335     on some platforms.  */
2336  return ferror (f) || fclose (f) != 0;
2337
2338  ;
2339  return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_run "$LINENO"; then :
2343  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2344else
2345  ac_retval=1
2346fi
2347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2348  conftest.$ac_objext conftest.beam conftest.$ac_ext
2349rm -f conftest.val
2350
2351  fi
2352  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2353  as_fn_set_status $ac_retval
2354
2355} # ac_fn_c_compute_int
2356cat >config.log <<_ACEOF
2357This file contains any messages produced by compilers while
2358running configure, to aid debugging if configure makes a mistake.
2359
2360It was created by Zabbix $as_me 4.0.30, which was
2361generated by GNU Autoconf 2.69.  Invocation command line was
2362
2363  $ $0 $@
2364
2365_ACEOF
2366exec 5>>config.log
2367{
2368cat <<_ASUNAME
2369## --------- ##
2370## Platform. ##
2371## --------- ##
2372
2373hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2374uname -m = `(uname -m) 2>/dev/null || echo unknown`
2375uname -r = `(uname -r) 2>/dev/null || echo unknown`
2376uname -s = `(uname -s) 2>/dev/null || echo unknown`
2377uname -v = `(uname -v) 2>/dev/null || echo unknown`
2378
2379/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2380/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2381
2382/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2383/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2384/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2385/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2386/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2387/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2388/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2389
2390_ASUNAME
2391
2392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2393for as_dir in $PATH
2394do
2395  IFS=$as_save_IFS
2396  test -z "$as_dir" && as_dir=.
2397    $as_echo "PATH: $as_dir"
2398  done
2399IFS=$as_save_IFS
2400
2401} >&5
2402
2403cat >&5 <<_ACEOF
2404
2405
2406## ----------- ##
2407## Core tests. ##
2408## ----------- ##
2409
2410_ACEOF
2411
2412
2413# Keep a trace of the command line.
2414# Strip out --no-create and --no-recursion so they do not pile up.
2415# Strip out --silent because we don't want to record it for future runs.
2416# Also quote any args containing shell meta-characters.
2417# Make two passes to allow for proper duplicate-argument suppression.
2418ac_configure_args=
2419ac_configure_args0=
2420ac_configure_args1=
2421ac_must_keep_next=false
2422for ac_pass in 1 2
2423do
2424  for ac_arg
2425  do
2426    case $ac_arg in
2427    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2428    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2429    | -silent | --silent | --silen | --sile | --sil)
2430      continue ;;
2431    *\'*)
2432      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2433    esac
2434    case $ac_pass in
2435    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2436    2)
2437      as_fn_append ac_configure_args1 " '$ac_arg'"
2438      if test $ac_must_keep_next = true; then
2439	ac_must_keep_next=false # Got value, back to normal.
2440      else
2441	case $ac_arg in
2442	  *=* | --config-cache | -C | -disable-* | --disable-* \
2443	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2444	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2445	  | -with-* | --with-* | -without-* | --without-* | --x)
2446	    case "$ac_configure_args0 " in
2447	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2448	    esac
2449	    ;;
2450	  -* ) ac_must_keep_next=true ;;
2451	esac
2452      fi
2453      as_fn_append ac_configure_args " '$ac_arg'"
2454      ;;
2455    esac
2456  done
2457done
2458{ ac_configure_args0=; unset ac_configure_args0;}
2459{ ac_configure_args1=; unset ac_configure_args1;}
2460
2461# When interrupted or exit'd, cleanup temporary files, and complete
2462# config.log.  We remove comments because anyway the quotes in there
2463# would cause problems or look ugly.
2464# WARNING: Use '\'' to represent an apostrophe within the trap.
2465# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2466trap 'exit_status=$?
2467  # Save into config.log some information that might help in debugging.
2468  {
2469    echo
2470
2471    $as_echo "## ---------------- ##
2472## Cache variables. ##
2473## ---------------- ##"
2474    echo
2475    # The following way of writing the cache mishandles newlines in values,
2476(
2477  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2478    eval ac_val=\$$ac_var
2479    case $ac_val in #(
2480    *${as_nl}*)
2481      case $ac_var in #(
2482      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2483$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2484      esac
2485      case $ac_var in #(
2486      _ | IFS | as_nl) ;; #(
2487      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2488      *) { eval $ac_var=; unset $ac_var;} ;;
2489      esac ;;
2490    esac
2491  done
2492  (set) 2>&1 |
2493    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2494    *${as_nl}ac_space=\ *)
2495      sed -n \
2496	"s/'\''/'\''\\\\'\'''\''/g;
2497	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2498      ;; #(
2499    *)
2500      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2501      ;;
2502    esac |
2503    sort
2504)
2505    echo
2506
2507    $as_echo "## ----------------- ##
2508## Output variables. ##
2509## ----------------- ##"
2510    echo
2511    for ac_var in $ac_subst_vars
2512    do
2513      eval ac_val=\$$ac_var
2514      case $ac_val in
2515      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2516      esac
2517      $as_echo "$ac_var='\''$ac_val'\''"
2518    done | sort
2519    echo
2520
2521    if test -n "$ac_subst_files"; then
2522      $as_echo "## ------------------- ##
2523## File substitutions. ##
2524## ------------------- ##"
2525      echo
2526      for ac_var in $ac_subst_files
2527      do
2528	eval ac_val=\$$ac_var
2529	case $ac_val in
2530	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2531	esac
2532	$as_echo "$ac_var='\''$ac_val'\''"
2533      done | sort
2534      echo
2535    fi
2536
2537    if test -s confdefs.h; then
2538      $as_echo "## ----------- ##
2539## confdefs.h. ##
2540## ----------- ##"
2541      echo
2542      cat confdefs.h
2543      echo
2544    fi
2545    test "$ac_signal" != 0 &&
2546      $as_echo "$as_me: caught signal $ac_signal"
2547    $as_echo "$as_me: exit $exit_status"
2548  } >&5
2549  rm -f core *.core core.conftest.* &&
2550    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2551    exit $exit_status
2552' 0
2553for ac_signal in 1 2 13 15; do
2554  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2555done
2556ac_signal=0
2557
2558# confdefs.h avoids OS command line length limits that DEFS can exceed.
2559rm -f -r conftest* confdefs.h
2560
2561$as_echo "/* confdefs.h */" > confdefs.h
2562
2563# Predefined preprocessor variables.
2564
2565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_NAME "$PACKAGE_NAME"
2567_ACEOF
2568
2569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2571_ACEOF
2572
2573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_VERSION "$PACKAGE_VERSION"
2575_ACEOF
2576
2577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_STRING "$PACKAGE_STRING"
2579_ACEOF
2580
2581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2583_ACEOF
2584
2585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_URL "$PACKAGE_URL"
2587_ACEOF
2588
2589
2590# Let the site file select an alternate cache file if it wants to.
2591# Prefer an explicitly selected file to automatically selected ones.
2592ac_site_file1=NONE
2593ac_site_file2=NONE
2594if test -n "$CONFIG_SITE"; then
2595  # We do not want a PATH search for config.site.
2596  case $CONFIG_SITE in #((
2597    -*)  ac_site_file1=./$CONFIG_SITE;;
2598    */*) ac_site_file1=$CONFIG_SITE;;
2599    *)   ac_site_file1=./$CONFIG_SITE;;
2600  esac
2601elif test "x$prefix" != xNONE; then
2602  ac_site_file1=$prefix/share/config.site
2603  ac_site_file2=$prefix/etc/config.site
2604else
2605  ac_site_file1=$ac_default_prefix/share/config.site
2606  ac_site_file2=$ac_default_prefix/etc/config.site
2607fi
2608for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2609do
2610  test "x$ac_site_file" = xNONE && continue
2611  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2612    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2613$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2614    sed 's/^/| /' "$ac_site_file" >&5
2615    . "$ac_site_file" \
2616      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2618as_fn_error $? "failed to load site script $ac_site_file
2619See \`config.log' for more details" "$LINENO" 5; }
2620  fi
2621done
2622
2623if test -r "$cache_file"; then
2624  # Some versions of bash will fail to source /dev/null (special files
2625  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2626  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2627    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2628$as_echo "$as_me: loading cache $cache_file" >&6;}
2629    case $cache_file in
2630      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2631      *)                      . "./$cache_file";;
2632    esac
2633  fi
2634else
2635  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2636$as_echo "$as_me: creating cache $cache_file" >&6;}
2637  >$cache_file
2638fi
2639
2640# Check that the precious variables saved in the cache have kept the same
2641# value.
2642ac_cache_corrupted=false
2643for ac_var in $ac_precious_vars; do
2644  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2645  eval ac_new_set=\$ac_env_${ac_var}_set
2646  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2647  eval ac_new_val=\$ac_env_${ac_var}_value
2648  case $ac_old_set,$ac_new_set in
2649    set,)
2650      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2651$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2652      ac_cache_corrupted=: ;;
2653    ,set)
2654      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2655$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2656      ac_cache_corrupted=: ;;
2657    ,);;
2658    *)
2659      if test "x$ac_old_val" != "x$ac_new_val"; then
2660	# differences in whitespace do not lead to failure.
2661	ac_old_val_w=`echo x $ac_old_val`
2662	ac_new_val_w=`echo x $ac_new_val`
2663	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2664	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2665$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2666	  ac_cache_corrupted=:
2667	else
2668	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2669$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2670	  eval $ac_var=\$ac_old_val
2671	fi
2672	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2673$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2674	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2675$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2676      fi;;
2677  esac
2678  # Pass precious variables to config.status.
2679  if test "$ac_new_set" = set; then
2680    case $ac_new_val in
2681    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2682    *) ac_arg=$ac_var=$ac_new_val ;;
2683    esac
2684    case " $ac_configure_args " in
2685      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2686      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2687    esac
2688  fi
2689done
2690if $ac_cache_corrupted; then
2691  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2693  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2694$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2695  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2696fi
2697## -------------------- ##
2698## Main body of script. ##
2699## -------------------- ##
2700
2701ac_ext=c
2702ac_cpp='$CPP $CPPFLAGS'
2703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2705ac_compiler_gnu=$ac_cv_c_compiler_gnu
2706
2707
2708
2709am__api_version='1.16'
2710
2711ac_aux_dir=
2712for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2713  if 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/install.sh"; then
2718    ac_aux_dir=$ac_dir
2719    ac_install_sh="$ac_aux_dir/install.sh -c"
2720    break
2721  elif test -f "$ac_dir/shtool"; then
2722    ac_aux_dir=$ac_dir
2723    ac_install_sh="$ac_aux_dir/shtool install -c"
2724    break
2725  fi
2726done
2727if test -z "$ac_aux_dir"; then
2728  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2729fi
2730
2731# These three variables are undocumented and unsupported,
2732# and are intended to be withdrawn in a future Autoconf release.
2733# They can cause serious problems if a builder's source tree is in a directory
2734# whose full name contains unusual characters.
2735ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2736ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2737ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2738
2739
2740# Find a good install program.  We prefer a C program (faster),
2741# so one script is as good as another.  But avoid the broken or
2742# incompatible versions:
2743# SysV /etc/install, /usr/sbin/install
2744# SunOS /usr/etc/install
2745# IRIX /sbin/install
2746# AIX /bin/install
2747# AmigaOS /C/install, which installs bootblocks on floppy discs
2748# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2749# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2750# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2751# OS/2's system install, which has a completely different semantic
2752# ./install, which can be erroneously created by make from ./install.sh.
2753# Reject install programs that cannot install multiple files.
2754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2755$as_echo_n "checking for a BSD-compatible install... " >&6; }
2756if test -z "$INSTALL"; then
2757if ${ac_cv_path_install+:} false; then :
2758  $as_echo_n "(cached) " >&6
2759else
2760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2761for as_dir in $PATH
2762do
2763  IFS=$as_save_IFS
2764  test -z "$as_dir" && as_dir=.
2765    # Account for people who put trailing slashes in PATH elements.
2766case $as_dir/ in #((
2767  ./ | .// | /[cC]/* | \
2768  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2769  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2770  /usr/ucb/* ) ;;
2771  *)
2772    # OSF1 and SCO ODT 3.0 have their own names for install.
2773    # Don't use installbsd from OSF since it installs stuff as root
2774    # by default.
2775    for ac_prog in ginstall scoinst install; do
2776      for ac_exec_ext in '' $ac_executable_extensions; do
2777	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2778	  if test $ac_prog = install &&
2779	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2780	    # AIX install.  It has an incompatible calling convention.
2781	    :
2782	  elif test $ac_prog = install &&
2783	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2784	    # program-specific install script used by HP pwplus--don't use.
2785	    :
2786	  else
2787	    rm -rf conftest.one conftest.two conftest.dir
2788	    echo one > conftest.one
2789	    echo two > conftest.two
2790	    mkdir conftest.dir
2791	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2792	      test -s conftest.one && test -s conftest.two &&
2793	      test -s conftest.dir/conftest.one &&
2794	      test -s conftest.dir/conftest.two
2795	    then
2796	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2797	      break 3
2798	    fi
2799	  fi
2800	fi
2801      done
2802    done
2803    ;;
2804esac
2805
2806  done
2807IFS=$as_save_IFS
2808
2809rm -rf conftest.one conftest.two conftest.dir
2810
2811fi
2812  if test "${ac_cv_path_install+set}" = set; then
2813    INSTALL=$ac_cv_path_install
2814  else
2815    # As a last resort, use the slow shell script.  Don't cache a
2816    # value for INSTALL within a source directory, because that will
2817    # break other packages using the cache if that directory is
2818    # removed, or if the value is a relative name.
2819    INSTALL=$ac_install_sh
2820  fi
2821fi
2822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2823$as_echo "$INSTALL" >&6; }
2824
2825# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2826# It thinks the first close brace ends the variable substitution.
2827test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2828
2829test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2830
2831test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2832
2833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2834$as_echo_n "checking whether build environment is sane... " >&6; }
2835# Reject unsafe characters in $srcdir or the absolute working directory
2836# name.  Accept space and tab only in the latter.
2837am_lf='
2838'
2839case `pwd` in
2840  *[\\\"\#\$\&\'\`$am_lf]*)
2841    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2842esac
2843case $srcdir in
2844  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
2845    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2846esac
2847
2848# Do 'set' in a subshell so we don't clobber the current shell's
2849# arguments.  Must try -L first in case configure is actually a
2850# symlink; some systems play weird games with the mod time of symlinks
2851# (eg FreeBSD returns the mod time of the symlink's containing
2852# directory).
2853if (
2854   am_has_slept=no
2855   for am_try in 1 2; do
2856     echo "timestamp, slept: $am_has_slept" > conftest.file
2857     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2858     if test "$*" = "X"; then
2859	# -L didn't work.
2860	set X `ls -t "$srcdir/configure" conftest.file`
2861     fi
2862     if test "$*" != "X $srcdir/configure conftest.file" \
2863	&& test "$*" != "X conftest.file $srcdir/configure"; then
2864
2865	# If neither matched, then we have a broken ls.  This can happen
2866	# if, for instance, CONFIG_SHELL is bash and it inherits a
2867	# broken ls alias from the environment.  This has actually
2868	# happened.  Such a system could not be considered "sane".
2869	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
2870  alias in your environment" "$LINENO" 5
2871     fi
2872     if test "$2" = conftest.file || test $am_try -eq 2; then
2873       break
2874     fi
2875     # Just in case.
2876     sleep 1
2877     am_has_slept=yes
2878   done
2879   test "$2" = conftest.file
2880   )
2881then
2882   # Ok.
2883   :
2884else
2885   as_fn_error $? "newly created file is older than distributed files!
2886Check your system clock" "$LINENO" 5
2887fi
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2889$as_echo "yes" >&6; }
2890# If we didn't sleep, we still need to ensure time stamps of config.status and
2891# generated files are strictly newer.
2892am_sleep_pid=
2893if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2894  ( sleep 1 ) &
2895  am_sleep_pid=$!
2896fi
2897
2898rm -f conftest.file
2899
2900test "$program_prefix" != NONE &&
2901  program_transform_name="s&^&$program_prefix&;$program_transform_name"
2902# Use a double $ so make ignores it.
2903test "$program_suffix" != NONE &&
2904  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2905# Double any \ or $.
2906# By default was `s,x,x', remove it if useless.
2907ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2908program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2909
2910# Expand $ac_aux_dir to an absolute path.
2911am_aux_dir=`cd "$ac_aux_dir" && pwd`
2912
2913if test x"${MISSING+set}" != xset; then
2914  case $am_aux_dir in
2915  *\ * | *\	*)
2916    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2917  *)
2918    MISSING="\${SHELL} $am_aux_dir/missing" ;;
2919  esac
2920fi
2921# Use eval to expand $SHELL
2922if eval "$MISSING --is-lightweight"; then
2923  am_missing_run="$MISSING "
2924else
2925  am_missing_run=
2926  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2927$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2928fi
2929
2930if test x"${install_sh+set}" != xset; then
2931  case $am_aux_dir in
2932  *\ * | *\	*)
2933    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2934  *)
2935    install_sh="\${SHELL} $am_aux_dir/install-sh"
2936  esac
2937fi
2938
2939# Installed binaries are usually stripped using 'strip' when the user
2940# run "make install-strip".  However 'strip' might not be the right
2941# tool to use in cross-compilation environments, therefore Automake
2942# will honor the 'STRIP' environment variable to overrule this program.
2943if test "$cross_compiling" != no; then
2944  if test -n "$ac_tool_prefix"; then
2945  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2946set dummy ${ac_tool_prefix}strip; ac_word=$2
2947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2948$as_echo_n "checking for $ac_word... " >&6; }
2949if ${ac_cv_prog_STRIP+:} false; then :
2950  $as_echo_n "(cached) " >&6
2951else
2952  if test -n "$STRIP"; then
2953  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2954else
2955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2956for as_dir in $PATH
2957do
2958  IFS=$as_save_IFS
2959  test -z "$as_dir" && as_dir=.
2960    for ac_exec_ext in '' $ac_executable_extensions; do
2961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2962    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2964    break 2
2965  fi
2966done
2967  done
2968IFS=$as_save_IFS
2969
2970fi
2971fi
2972STRIP=$ac_cv_prog_STRIP
2973if test -n "$STRIP"; then
2974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2975$as_echo "$STRIP" >&6; }
2976else
2977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978$as_echo "no" >&6; }
2979fi
2980
2981
2982fi
2983if test -z "$ac_cv_prog_STRIP"; then
2984  ac_ct_STRIP=$STRIP
2985  # Extract the first word of "strip", so it can be a program name with args.
2986set dummy strip; ac_word=$2
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988$as_echo_n "checking for $ac_word... " >&6; }
2989if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2990  $as_echo_n "(cached) " >&6
2991else
2992  if test -n "$ac_ct_STRIP"; then
2993  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2994else
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998  IFS=$as_save_IFS
2999  test -z "$as_dir" && as_dir=.
3000    for ac_exec_ext in '' $ac_executable_extensions; do
3001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3002    ac_cv_prog_ac_ct_STRIP="strip"
3003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3004    break 2
3005  fi
3006done
3007  done
3008IFS=$as_save_IFS
3009
3010fi
3011fi
3012ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3013if test -n "$ac_ct_STRIP"; then
3014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3015$as_echo "$ac_ct_STRIP" >&6; }
3016else
3017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018$as_echo "no" >&6; }
3019fi
3020
3021  if test "x$ac_ct_STRIP" = x; then
3022    STRIP=":"
3023  else
3024    case $cross_compiling:$ac_tool_warned in
3025yes:)
3026{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3027$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3028ac_tool_warned=yes ;;
3029esac
3030    STRIP=$ac_ct_STRIP
3031  fi
3032else
3033  STRIP="$ac_cv_prog_STRIP"
3034fi
3035
3036fi
3037INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3038
3039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3040$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3041if test -z "$MKDIR_P"; then
3042  if ${ac_cv_path_mkdir+:} false; then :
3043  $as_echo_n "(cached) " >&6
3044else
3045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3046for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3047do
3048  IFS=$as_save_IFS
3049  test -z "$as_dir" && as_dir=.
3050    for ac_prog in mkdir gmkdir; do
3051	 for ac_exec_ext in '' $ac_executable_extensions; do
3052	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3053	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3054	     'mkdir (GNU coreutils) '* | \
3055	     'mkdir (coreutils) '* | \
3056	     'mkdir (fileutils) '4.1*)
3057	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3058	       break 3;;
3059	   esac
3060	 done
3061       done
3062  done
3063IFS=$as_save_IFS
3064
3065fi
3066
3067  test -d ./--version && rmdir ./--version
3068  if test "${ac_cv_path_mkdir+set}" = set; then
3069    MKDIR_P="$ac_cv_path_mkdir -p"
3070  else
3071    # As a last resort, use the slow shell script.  Don't cache a
3072    # value for MKDIR_P within a source directory, because that will
3073    # break other packages using the cache if that directory is
3074    # removed, or if the value is a relative name.
3075    MKDIR_P="$ac_install_sh -d"
3076  fi
3077fi
3078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3079$as_echo "$MKDIR_P" >&6; }
3080
3081for ac_prog in gawk mawk nawk awk
3082do
3083  # Extract the first word of "$ac_prog", so it can be a program name with args.
3084set dummy $ac_prog; ac_word=$2
3085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3086$as_echo_n "checking for $ac_word... " >&6; }
3087if ${ac_cv_prog_AWK+:} false; then :
3088  $as_echo_n "(cached) " >&6
3089else
3090  if test -n "$AWK"; then
3091  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3092else
3093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3094for as_dir in $PATH
3095do
3096  IFS=$as_save_IFS
3097  test -z "$as_dir" && as_dir=.
3098    for ac_exec_ext in '' $ac_executable_extensions; do
3099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3100    ac_cv_prog_AWK="$ac_prog"
3101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3102    break 2
3103  fi
3104done
3105  done
3106IFS=$as_save_IFS
3107
3108fi
3109fi
3110AWK=$ac_cv_prog_AWK
3111if test -n "$AWK"; then
3112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3113$as_echo "$AWK" >&6; }
3114else
3115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3116$as_echo "no" >&6; }
3117fi
3118
3119
3120  test -n "$AWK" && break
3121done
3122
3123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3124$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3125set x ${MAKE-make}
3126ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3127if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3128  $as_echo_n "(cached) " >&6
3129else
3130  cat >conftest.make <<\_ACEOF
3131SHELL = /bin/sh
3132all:
3133	@echo '@@@%%%=$(MAKE)=@@@%%%'
3134_ACEOF
3135# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3136case `${MAKE-make} -f conftest.make 2>/dev/null` in
3137  *@@@%%%=?*=@@@%%%*)
3138    eval ac_cv_prog_make_${ac_make}_set=yes;;
3139  *)
3140    eval ac_cv_prog_make_${ac_make}_set=no;;
3141esac
3142rm -f conftest.make
3143fi
3144if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3146$as_echo "yes" >&6; }
3147  SET_MAKE=
3148else
3149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3150$as_echo "no" >&6; }
3151  SET_MAKE="MAKE=${MAKE-make}"
3152fi
3153
3154rm -rf .tst 2>/dev/null
3155mkdir .tst 2>/dev/null
3156if test -d .tst; then
3157  am__leading_dot=.
3158else
3159  am__leading_dot=_
3160fi
3161rmdir .tst 2>/dev/null
3162
3163# Check whether --enable-silent-rules was given.
3164if test "${enable_silent_rules+set}" = set; then :
3165  enableval=$enable_silent_rules;
3166fi
3167
3168case $enable_silent_rules in # (((
3169  yes) AM_DEFAULT_VERBOSITY=0;;
3170   no) AM_DEFAULT_VERBOSITY=1;;
3171    *) AM_DEFAULT_VERBOSITY=1;;
3172esac
3173am_make=${MAKE-make}
3174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3175$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3176if ${am_cv_make_support_nested_variables+:} false; then :
3177  $as_echo_n "(cached) " >&6
3178else
3179  if $as_echo 'TRUE=$(BAR$(V))
3180BAR0=false
3181BAR1=true
3182V=1
3183am__doit:
3184	@$(TRUE)
3185.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3186  am_cv_make_support_nested_variables=yes
3187else
3188  am_cv_make_support_nested_variables=no
3189fi
3190fi
3191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3192$as_echo "$am_cv_make_support_nested_variables" >&6; }
3193if test $am_cv_make_support_nested_variables = yes; then
3194    AM_V='$(V)'
3195  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3196else
3197  AM_V=$AM_DEFAULT_VERBOSITY
3198  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3199fi
3200AM_BACKSLASH='\'
3201
3202if test "`cd $srcdir && pwd`" != "`pwd`"; then
3203  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3204  # is not polluted with repeated "-I."
3205  am__isrc=' -I$(srcdir)'
3206  # test to see if srcdir already configured
3207  if test -f $srcdir/config.status; then
3208    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3209  fi
3210fi
3211
3212# test whether we have cygpath
3213if test -z "$CYGPATH_W"; then
3214  if (cygpath --version) >/dev/null 2>/dev/null; then
3215    CYGPATH_W='cygpath -w'
3216  else
3217    CYGPATH_W=echo
3218  fi
3219fi
3220
3221
3222# Define the identity of the package.
3223 PACKAGE='zabbix'
3224 VERSION='4.0.30'
3225
3226
3227cat >>confdefs.h <<_ACEOF
3228#define PACKAGE "$PACKAGE"
3229_ACEOF
3230
3231
3232cat >>confdefs.h <<_ACEOF
3233#define VERSION "$VERSION"
3234_ACEOF
3235
3236# Some tools Automake needs.
3237
3238ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3239
3240
3241AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3242
3243
3244AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3245
3246
3247AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3248
3249
3250MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3251
3252# For better backward compatibility.  To be removed once Automake 1.9.x
3253# dies out for good.  For more background, see:
3254# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3255# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3256mkdir_p='$(MKDIR_P)'
3257
3258# We need awk for the "check" target (and possibly the TAP driver).  The
3259# system "awk" is bad on some platforms.
3260# Always define AMTAR for backward compatibility.  Yes, it's still used
3261# in the wild :-(  We should find a proper way to deprecate it ...
3262AMTAR='$${TAR-tar}'
3263
3264
3265# We'll loop over all known methods to create a tar archive until one works.
3266_am_tools='gnutar  pax cpio none'
3267
3268am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3269
3270
3271
3272
3273
3274
3275# POSIX will say in a future version that running "rm -f" with no argument
3276# is OK; and we want to be able to make that assumption in our Makefile
3277# recipes.  So use an aggressive probe to check that the usage we want is
3278# actually supported "in the wild" to an acceptable degree.
3279# See automake bug#10828.
3280# To make any issue more visible, cause the running configure to be aborted
3281# by default if the 'rm' program in use doesn't match our expectations; the
3282# user can still override this though.
3283if rm -f && rm -fr && rm -rf; then : OK; else
3284  cat >&2 <<'END'
3285Oops!
3286
3287Your 'rm' program seems unable to run without file operands specified
3288on the command line, even when the '-f' option is present.  This is contrary
3289to the behaviour of most rm programs out there, and not conforming with
3290the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3291
3292Please tell bug-automake@gnu.org about your system, including the value
3293of your $PATH and any error possibly output before this message.  This
3294can help us improve future automake versions.
3295
3296END
3297  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3298    echo 'Configuration will proceed anyway, since you have set the' >&2
3299    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3300    echo >&2
3301  else
3302    cat >&2 <<'END'
3303Aborting the configuration process, to ensure you take notice of the issue.
3304
3305You can download and install GNU coreutils to get an 'rm' implementation
3306that behaves properly: <https://www.gnu.org/software/coreutils/>.
3307
3308If you want to complete the configuration process using your problematic
3309'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3310to "yes", and re-run configure.
3311
3312END
3313    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3314  fi
3315fi
3316
3317
3318{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&5
3319$as_echo "$as_me: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&6;}
3320
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3322$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3323set x ${MAKE-make}
3324ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3325if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3326  $as_echo_n "(cached) " >&6
3327else
3328  cat >conftest.make <<\_ACEOF
3329SHELL = /bin/sh
3330all:
3331	@echo '@@@%%%=$(MAKE)=@@@%%%'
3332_ACEOF
3333# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3334case `${MAKE-make} -f conftest.make 2>/dev/null` in
3335  *@@@%%%=?*=@@@%%%*)
3336    eval ac_cv_prog_make_${ac_make}_set=yes;;
3337  *)
3338    eval ac_cv_prog_make_${ac_make}_set=no;;
3339esac
3340rm -f conftest.make
3341fi
3342if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3344$as_echo "yes" >&6; }
3345  SET_MAKE=
3346else
3347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3348$as_echo "no" >&6; }
3349  SET_MAKE="MAKE=${MAKE-make}"
3350fi
3351
3352
3353ac_config_headers="$ac_config_headers include/config.h"
3354
3355
3356# Make sure we can run config.sub.
3357$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3358  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3359
3360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3361$as_echo_n "checking build system type... " >&6; }
3362if ${ac_cv_build+:} false; then :
3363  $as_echo_n "(cached) " >&6
3364else
3365  ac_build_alias=$build_alias
3366test "x$ac_build_alias" = x &&
3367  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3368test "x$ac_build_alias" = x &&
3369  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3370ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3371  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3372
3373fi
3374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3375$as_echo "$ac_cv_build" >&6; }
3376case $ac_cv_build in
3377*-*-*) ;;
3378*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3379esac
3380build=$ac_cv_build
3381ac_save_IFS=$IFS; IFS='-'
3382set x $ac_cv_build
3383shift
3384build_cpu=$1
3385build_vendor=$2
3386shift; shift
3387# Remember, the first character of IFS is used to create $*,
3388# except with old shells:
3389build_os=$*
3390IFS=$ac_save_IFS
3391case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3392
3393
3394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3395$as_echo_n "checking host system type... " >&6; }
3396if ${ac_cv_host+:} false; then :
3397  $as_echo_n "(cached) " >&6
3398else
3399  if test "x$host_alias" = x; then
3400  ac_cv_host=$ac_cv_build
3401else
3402  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3403    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3404fi
3405
3406fi
3407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3408$as_echo "$ac_cv_host" >&6; }
3409case $ac_cv_host in
3410*-*-*) ;;
3411*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3412esac
3413host=$ac_cv_host
3414ac_save_IFS=$IFS; IFS='-'
3415set x $ac_cv_host
3416shift
3417host_cpu=$1
3418host_vendor=$2
3419shift; shift
3420# Remember, the first character of IFS is used to create $*,
3421# except with old shells:
3422host_os=$*
3423IFS=$ac_save_IFS
3424case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3425
3426
3427
3428
3429ac_ext=c
3430ac_cpp='$CPP $CPPFLAGS'
3431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3433ac_compiler_gnu=$ac_cv_c_compiler_gnu
3434if test -n "$ac_tool_prefix"; then
3435  for ac_prog in cc c99 gcc clang
3436  do
3437    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3438set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3440$as_echo_n "checking for $ac_word... " >&6; }
3441if ${ac_cv_prog_CC+:} false; then :
3442  $as_echo_n "(cached) " >&6
3443else
3444  if test -n "$CC"; then
3445  ac_cv_prog_CC="$CC" # Let the user override the test.
3446else
3447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3448for as_dir in $PATH
3449do
3450  IFS=$as_save_IFS
3451  test -z "$as_dir" && as_dir=.
3452    for ac_exec_ext in '' $ac_executable_extensions; do
3453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3454    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3456    break 2
3457  fi
3458done
3459  done
3460IFS=$as_save_IFS
3461
3462fi
3463fi
3464CC=$ac_cv_prog_CC
3465if test -n "$CC"; then
3466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3467$as_echo "$CC" >&6; }
3468else
3469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3470$as_echo "no" >&6; }
3471fi
3472
3473
3474    test -n "$CC" && break
3475  done
3476fi
3477if test -z "$CC"; then
3478  ac_ct_CC=$CC
3479  for ac_prog in cc c99 gcc clang
3480do
3481  # Extract the first word of "$ac_prog", so it can be a program name with args.
3482set dummy $ac_prog; ac_word=$2
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3484$as_echo_n "checking for $ac_word... " >&6; }
3485if ${ac_cv_prog_ac_ct_CC+:} false; then :
3486  $as_echo_n "(cached) " >&6
3487else
3488  if test -n "$ac_ct_CC"; then
3489  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3490else
3491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492for as_dir in $PATH
3493do
3494  IFS=$as_save_IFS
3495  test -z "$as_dir" && as_dir=.
3496    for ac_exec_ext in '' $ac_executable_extensions; do
3497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3498    ac_cv_prog_ac_ct_CC="$ac_prog"
3499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3500    break 2
3501  fi
3502done
3503  done
3504IFS=$as_save_IFS
3505
3506fi
3507fi
3508ac_ct_CC=$ac_cv_prog_ac_ct_CC
3509if test -n "$ac_ct_CC"; then
3510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3511$as_echo "$ac_ct_CC" >&6; }
3512else
3513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3514$as_echo "no" >&6; }
3515fi
3516
3517
3518  test -n "$ac_ct_CC" && break
3519done
3520
3521  if test "x$ac_ct_CC" = x; then
3522    CC=""
3523  else
3524    case $cross_compiling:$ac_tool_warned in
3525yes:)
3526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3528ac_tool_warned=yes ;;
3529esac
3530    CC=$ac_ct_CC
3531  fi
3532fi
3533
3534
3535test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3537as_fn_error $? "no acceptable C compiler found in \$PATH
3538See \`config.log' for more details" "$LINENO" 5; }
3539
3540# Provide some information about the compiler.
3541$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3542set X $ac_compile
3543ac_compiler=$2
3544for ac_option in --version -v -V -qversion; do
3545  { { ac_try="$ac_compiler $ac_option >&5"
3546case "(($ac_try" in
3547  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3548  *) ac_try_echo=$ac_try;;
3549esac
3550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3551$as_echo "$ac_try_echo"; } >&5
3552  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3553  ac_status=$?
3554  if test -s conftest.err; then
3555    sed '10a\
3556... rest of stderr output deleted ...
3557         10q' conftest.err >conftest.er1
3558    cat conftest.er1 >&5
3559  fi
3560  rm -f conftest.er1 conftest.err
3561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3562  test $ac_status = 0; }
3563done
3564
3565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3566/* end confdefs.h.  */
3567
3568int
3569main ()
3570{
3571
3572  ;
3573  return 0;
3574}
3575_ACEOF
3576ac_clean_files_save=$ac_clean_files
3577ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3578# Try to create an executable without -o first, disregard a.out.
3579# It will help us diagnose broken compilers, and finding out an intuition
3580# of exeext.
3581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3582$as_echo_n "checking whether the C compiler works... " >&6; }
3583ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3584
3585# The possible output files:
3586ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3587
3588ac_rmfiles=
3589for ac_file in $ac_files
3590do
3591  case $ac_file in
3592    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3593    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3594  esac
3595done
3596rm -f $ac_rmfiles
3597
3598if { { ac_try="$ac_link_default"
3599case "(($ac_try" in
3600  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601  *) ac_try_echo=$ac_try;;
3602esac
3603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604$as_echo "$ac_try_echo"; } >&5
3605  (eval "$ac_link_default") 2>&5
3606  ac_status=$?
3607  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608  test $ac_status = 0; }; then :
3609  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3610# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3611# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3612# so that the user can short-circuit this test for compilers unknown to
3613# Autoconf.
3614for ac_file in $ac_files ''
3615do
3616  test -f "$ac_file" || continue
3617  case $ac_file in
3618    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3619	;;
3620    [ab].out )
3621	# We found the default executable, but exeext='' is most
3622	# certainly right.
3623	break;;
3624    *.* )
3625	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3626	then :; else
3627	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3628	fi
3629	# We set ac_cv_exeext here because the later test for it is not
3630	# safe: cross compilers may not add the suffix if given an `-o'
3631	# argument, so we may need to know it at that point already.
3632	# Even if this section looks crufty: it has the advantage of
3633	# actually working.
3634	break;;
3635    * )
3636	break;;
3637  esac
3638done
3639test "$ac_cv_exeext" = no && ac_cv_exeext=
3640
3641else
3642  ac_file=''
3643fi
3644if test -z "$ac_file"; then :
3645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
3647$as_echo "$as_me: failed program was:" >&5
3648sed 's/^/| /' conftest.$ac_ext >&5
3649
3650{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3652as_fn_error 77 "C compiler cannot create executables
3653See \`config.log' for more details" "$LINENO" 5; }
3654else
3655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3656$as_echo "yes" >&6; }
3657fi
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3659$as_echo_n "checking for C compiler default output file name... " >&6; }
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3661$as_echo "$ac_file" >&6; }
3662ac_exeext=$ac_cv_exeext
3663
3664rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3665ac_clean_files=$ac_clean_files_save
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3667$as_echo_n "checking for suffix of executables... " >&6; }
3668if { { ac_try="$ac_link"
3669case "(($ac_try" in
3670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671  *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675  (eval "$ac_link") 2>&5
3676  ac_status=$?
3677  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678  test $ac_status = 0; }; then :
3679  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3680# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3681# work properly (i.e., refer to `conftest.exe'), while it won't with
3682# `rm'.
3683for ac_file in conftest.exe conftest conftest.*; do
3684  test -f "$ac_file" || continue
3685  case $ac_file in
3686    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3687    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3688	  break;;
3689    * ) break;;
3690  esac
3691done
3692else
3693  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3695as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3696See \`config.log' for more details" "$LINENO" 5; }
3697fi
3698rm -f conftest conftest$ac_cv_exeext
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3700$as_echo "$ac_cv_exeext" >&6; }
3701
3702rm -f conftest.$ac_ext
3703EXEEXT=$ac_cv_exeext
3704ac_exeext=$EXEEXT
3705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3706/* end confdefs.h.  */
3707#include <stdio.h>
3708int
3709main ()
3710{
3711FILE *f = fopen ("conftest.out", "w");
3712 return ferror (f) || fclose (f) != 0;
3713
3714  ;
3715  return 0;
3716}
3717_ACEOF
3718ac_clean_files="$ac_clean_files conftest.out"
3719# Check that the compiler produces executables we can run.  If not, either
3720# the compiler is broken, or we cross compile.
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3722$as_echo_n "checking whether we are cross compiling... " >&6; }
3723if test "$cross_compiling" != yes; then
3724  { { ac_try="$ac_link"
3725case "(($ac_try" in
3726  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727  *) ac_try_echo=$ac_try;;
3728esac
3729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
3731  (eval "$ac_link") 2>&5
3732  ac_status=$?
3733  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734  test $ac_status = 0; }
3735  if { ac_try='./conftest$ac_cv_exeext'
3736  { { case "(($ac_try" in
3737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3738  *) ac_try_echo=$ac_try;;
3739esac
3740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3741$as_echo "$ac_try_echo"; } >&5
3742  (eval "$ac_try") 2>&5
3743  ac_status=$?
3744  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3745  test $ac_status = 0; }; }; then
3746    cross_compiling=no
3747  else
3748    if test "$cross_compiling" = maybe; then
3749	cross_compiling=yes
3750    else
3751	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3753as_fn_error $? "cannot run C compiled programs.
3754If you meant to cross compile, use \`--host'.
3755See \`config.log' for more details" "$LINENO" 5; }
3756    fi
3757  fi
3758fi
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3760$as_echo "$cross_compiling" >&6; }
3761
3762rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3763ac_clean_files=$ac_clean_files_save
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3765$as_echo_n "checking for suffix of object files... " >&6; }
3766if ${ac_cv_objext+:} false; then :
3767  $as_echo_n "(cached) " >&6
3768else
3769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3770/* end confdefs.h.  */
3771
3772int
3773main ()
3774{
3775
3776  ;
3777  return 0;
3778}
3779_ACEOF
3780rm -f conftest.o conftest.obj
3781if { { ac_try="$ac_compile"
3782case "(($ac_try" in
3783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3784  *) ac_try_echo=$ac_try;;
3785esac
3786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3787$as_echo "$ac_try_echo"; } >&5
3788  (eval "$ac_compile") 2>&5
3789  ac_status=$?
3790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3791  test $ac_status = 0; }; then :
3792  for ac_file in conftest.o conftest.obj conftest.*; do
3793  test -f "$ac_file" || continue;
3794  case $ac_file in
3795    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3796    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3797       break;;
3798  esac
3799done
3800else
3801  $as_echo "$as_me: failed program was:" >&5
3802sed 's/^/| /' conftest.$ac_ext >&5
3803
3804{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3806as_fn_error $? "cannot compute suffix of object files: cannot compile
3807See \`config.log' for more details" "$LINENO" 5; }
3808fi
3809rm -f conftest.$ac_cv_objext conftest.$ac_ext
3810fi
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3812$as_echo "$ac_cv_objext" >&6; }
3813OBJEXT=$ac_cv_objext
3814ac_objext=$OBJEXT
3815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3816$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3817if ${ac_cv_c_compiler_gnu+:} false; then :
3818  $as_echo_n "(cached) " >&6
3819else
3820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3821/* end confdefs.h.  */
3822
3823int
3824main ()
3825{
3826#ifndef __GNUC__
3827       choke me
3828#endif
3829
3830  ;
3831  return 0;
3832}
3833_ACEOF
3834if ac_fn_c_try_compile "$LINENO"; then :
3835  ac_compiler_gnu=yes
3836else
3837  ac_compiler_gnu=no
3838fi
3839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3840ac_cv_c_compiler_gnu=$ac_compiler_gnu
3841
3842fi
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3844$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3845if test $ac_compiler_gnu = yes; then
3846  GCC=yes
3847else
3848  GCC=
3849fi
3850ac_test_CFLAGS=${CFLAGS+set}
3851ac_save_CFLAGS=$CFLAGS
3852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3853$as_echo_n "checking whether $CC accepts -g... " >&6; }
3854if ${ac_cv_prog_cc_g+:} false; then :
3855  $as_echo_n "(cached) " >&6
3856else
3857  ac_save_c_werror_flag=$ac_c_werror_flag
3858   ac_c_werror_flag=yes
3859   ac_cv_prog_cc_g=no
3860   CFLAGS="-g"
3861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3862/* end confdefs.h.  */
3863
3864int
3865main ()
3866{
3867
3868  ;
3869  return 0;
3870}
3871_ACEOF
3872if ac_fn_c_try_compile "$LINENO"; then :
3873  ac_cv_prog_cc_g=yes
3874else
3875  CFLAGS=""
3876      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3877/* end confdefs.h.  */
3878
3879int
3880main ()
3881{
3882
3883  ;
3884  return 0;
3885}
3886_ACEOF
3887if ac_fn_c_try_compile "$LINENO"; then :
3888
3889else
3890  ac_c_werror_flag=$ac_save_c_werror_flag
3891	 CFLAGS="-g"
3892	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3893/* end confdefs.h.  */
3894
3895int
3896main ()
3897{
3898
3899  ;
3900  return 0;
3901}
3902_ACEOF
3903if ac_fn_c_try_compile "$LINENO"; then :
3904  ac_cv_prog_cc_g=yes
3905fi
3906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3907fi
3908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3909fi
3910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3911   ac_c_werror_flag=$ac_save_c_werror_flag
3912fi
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3914$as_echo "$ac_cv_prog_cc_g" >&6; }
3915if test "$ac_test_CFLAGS" = set; then
3916  CFLAGS=$ac_save_CFLAGS
3917elif test $ac_cv_prog_cc_g = yes; then
3918  if test "$GCC" = yes; then
3919    CFLAGS="-g -O2"
3920  else
3921    CFLAGS="-g"
3922  fi
3923else
3924  if test "$GCC" = yes; then
3925    CFLAGS="-O2"
3926  else
3927    CFLAGS=
3928  fi
3929fi
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3931$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3932if ${ac_cv_prog_cc_c89+:} false; then :
3933  $as_echo_n "(cached) " >&6
3934else
3935  ac_cv_prog_cc_c89=no
3936ac_save_CC=$CC
3937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3938/* end confdefs.h.  */
3939#include <stdarg.h>
3940#include <stdio.h>
3941struct stat;
3942/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3943struct buf { int x; };
3944FILE * (*rcsopen) (struct buf *, struct stat *, int);
3945static char *e (p, i)
3946     char **p;
3947     int i;
3948{
3949  return p[i];
3950}
3951static char *f (char * (*g) (char **, int), char **p, ...)
3952{
3953  char *s;
3954  va_list v;
3955  va_start (v,p);
3956  s = g (p, va_arg (v,int));
3957  va_end (v);
3958  return s;
3959}
3960
3961/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3962   function prototypes and stuff, but not '\xHH' hex character constants.
3963   These don't provoke an error unfortunately, instead are silently treated
3964   as 'x'.  The following induces an error, until -std is added to get
3965   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3966   array size at least.  It's necessary to write '\x00'==0 to get something
3967   that's true only with -std.  */
3968int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3969
3970/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3971   inside strings and character constants.  */
3972#define FOO(x) 'x'
3973int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3974
3975int test (int i, double x);
3976struct s1 {int (*f) (int a);};
3977struct s2 {int (*f) (double a);};
3978int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3979int argc;
3980char **argv;
3981int
3982main ()
3983{
3984return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3985  ;
3986  return 0;
3987}
3988_ACEOF
3989for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3990	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3991do
3992  CC="$ac_save_CC $ac_arg"
3993  if ac_fn_c_try_compile "$LINENO"; then :
3994  ac_cv_prog_cc_c89=$ac_arg
3995fi
3996rm -f core conftest.err conftest.$ac_objext
3997  test "x$ac_cv_prog_cc_c89" != "xno" && break
3998done
3999rm -f conftest.$ac_ext
4000CC=$ac_save_CC
4001
4002fi
4003# AC_CACHE_VAL
4004case "x$ac_cv_prog_cc_c89" in
4005  x)
4006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4007$as_echo "none needed" >&6; } ;;
4008  xno)
4009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4010$as_echo "unsupported" >&6; } ;;
4011  *)
4012    CC="$CC $ac_cv_prog_cc_c89"
4013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4014$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4015esac
4016if test "x$ac_cv_prog_cc_c89" != xno; then :
4017
4018fi
4019
4020ac_ext=c
4021ac_cpp='$CPP $CPPFLAGS'
4022ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4023ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4024ac_compiler_gnu=$ac_cv_c_compiler_gnu
4025
4026ac_ext=c
4027ac_cpp='$CPP $CPPFLAGS'
4028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4030ac_compiler_gnu=$ac_cv_c_compiler_gnu
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4032$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4033if ${am_cv_prog_cc_c_o+:} false; then :
4034  $as_echo_n "(cached) " >&6
4035else
4036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4037/* end confdefs.h.  */
4038
4039int
4040main ()
4041{
4042
4043  ;
4044  return 0;
4045}
4046_ACEOF
4047  # Make sure it works both with $CC and with simple cc.
4048  # Following AC_PROG_CC_C_O, we do the test twice because some
4049  # compilers refuse to overwrite an existing .o file with -o,
4050  # though they will create one.
4051  am_cv_prog_cc_c_o=yes
4052  for am_i in 1 2; do
4053    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4054   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4055   ac_status=$?
4056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057   (exit $ac_status); } \
4058         && test -f conftest2.$ac_objext; then
4059      : OK
4060    else
4061      am_cv_prog_cc_c_o=no
4062      break
4063    fi
4064  done
4065  rm -f core conftest*
4066  unset am_i
4067fi
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4069$as_echo "$am_cv_prog_cc_c_o" >&6; }
4070if test "$am_cv_prog_cc_c_o" != yes; then
4071   # Losing compiler, so override with the script.
4072   # FIXME: It is wrong to rewrite CC.
4073   # But if we don't then we get into trouble of one sort or another.
4074   # A longer-term fix would be to have automake use am__CC in this case,
4075   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4076   CC="$am_aux_dir/compile $CC"
4077fi
4078ac_ext=c
4079ac_cpp='$CPP $CPPFLAGS'
4080ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4081ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4082ac_compiler_gnu=$ac_cv_c_compiler_gnu
4083
4084DEPDIR="${am__leading_dot}deps"
4085
4086ac_config_commands="$ac_config_commands depfiles"
4087
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4089$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
4090cat > confinc.mk << 'END'
4091am__doit:
4092	@echo this is the am__doit target >confinc.out
4093.PHONY: am__doit
4094END
4095am__include="#"
4096am__quote=
4097# BSD make does it like this.
4098echo '.include "confinc.mk" # ignored' > confmf.BSD
4099# Other make implementations (GNU, Solaris 10, AIX) do it like this.
4100echo 'include confinc.mk # ignored' > confmf.GNU
4101_am_result=no
4102for s in GNU BSD; do
4103  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4104   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4105   ac_status=$?
4106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4107   (exit $ac_status); }
4108  case $?:`cat confinc.out 2>/dev/null` in #(
4109  '0:this is the am__doit target') :
4110    case $s in #(
4111  BSD) :
4112    am__include='.include' am__quote='"' ;; #(
4113  *) :
4114    am__include='include' am__quote='' ;;
4115esac ;; #(
4116  *) :
4117     ;;
4118esac
4119  if test "$am__include" != "#"; then
4120    _am_result="yes ($s style)"
4121    break
4122  fi
4123done
4124rm -f confinc.* confmf.*
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4126$as_echo "${_am_result}" >&6; }
4127
4128# Check whether --enable-dependency-tracking was given.
4129if test "${enable_dependency_tracking+set}" = set; then :
4130  enableval=$enable_dependency_tracking;
4131fi
4132
4133if test "x$enable_dependency_tracking" != xno; then
4134  am_depcomp="$ac_aux_dir/depcomp"
4135  AMDEPBACKSLASH='\'
4136  am__nodep='_no'
4137fi
4138 if test "x$enable_dependency_tracking" != xno; then
4139  AMDEP_TRUE=
4140  AMDEP_FALSE='#'
4141else
4142  AMDEP_TRUE='#'
4143  AMDEP_FALSE=
4144fi
4145
4146
4147
4148depcc="$CC"   am_compiler_list=
4149
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4151$as_echo_n "checking dependency style of $depcc... " >&6; }
4152if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4153  $as_echo_n "(cached) " >&6
4154else
4155  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4156  # We make a subdir and do the tests there.  Otherwise we can end up
4157  # making bogus files that we don't know about and never remove.  For
4158  # instance it was reported that on HP-UX the gcc test will end up
4159  # making a dummy file named 'D' -- because '-MD' means "put the output
4160  # in D".
4161  rm -rf conftest.dir
4162  mkdir conftest.dir
4163  # Copy depcomp to subdir because otherwise we won't find it if we're
4164  # using a relative directory.
4165  cp "$am_depcomp" conftest.dir
4166  cd conftest.dir
4167  # We will build objects and dependencies in a subdirectory because
4168  # it helps to detect inapplicable dependency modes.  For instance
4169  # both Tru64's cc and ICC support -MD to output dependencies as a
4170  # side effect of compilation, but ICC will put the dependencies in
4171  # the current directory while Tru64 will put them in the object
4172  # directory.
4173  mkdir sub
4174
4175  am_cv_CC_dependencies_compiler_type=none
4176  if test "$am_compiler_list" = ""; then
4177     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4178  fi
4179  am__universal=false
4180  case " $depcc " in #(
4181     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4182     esac
4183
4184  for depmode in $am_compiler_list; do
4185    # Setup a source with many dependencies, because some compilers
4186    # like to wrap large dependency lists on column 80 (with \), and
4187    # we should not choose a depcomp mode which is confused by this.
4188    #
4189    # We need to recreate these files for each test, as the compiler may
4190    # overwrite some of them when testing with obscure command lines.
4191    # This happens at least with the AIX C compiler.
4192    : > sub/conftest.c
4193    for i in 1 2 3 4 5 6; do
4194      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4195      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4196      # Solaris 10 /bin/sh.
4197      echo '/* dummy */' > sub/conftst$i.h
4198    done
4199    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4200
4201    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4202    # mode.  It turns out that the SunPro C++ compiler does not properly
4203    # handle '-M -o', and we need to detect this.  Also, some Intel
4204    # versions had trouble with output in subdirs.
4205    am__obj=sub/conftest.${OBJEXT-o}
4206    am__minus_obj="-o $am__obj"
4207    case $depmode in
4208    gcc)
4209      # This depmode causes a compiler race in universal mode.
4210      test "$am__universal" = false || continue
4211      ;;
4212    nosideeffect)
4213      # After this tag, mechanisms are not by side-effect, so they'll
4214      # only be used when explicitly requested.
4215      if test "x$enable_dependency_tracking" = xyes; then
4216	continue
4217      else
4218	break
4219      fi
4220      ;;
4221    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4222      # This compiler won't grok '-c -o', but also, the minuso test has
4223      # not run yet.  These depmodes are late enough in the game, and
4224      # so weak that their functioning should not be impacted.
4225      am__obj=conftest.${OBJEXT-o}
4226      am__minus_obj=
4227      ;;
4228    none) break ;;
4229    esac
4230    if depmode=$depmode \
4231       source=sub/conftest.c object=$am__obj \
4232       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4233       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4234         >/dev/null 2>conftest.err &&
4235       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4236       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4237       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4238       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4239      # icc doesn't choke on unknown options, it will just issue warnings
4240      # or remarks (even with -Werror).  So we grep stderr for any message
4241      # that says an option was ignored or not supported.
4242      # When given -MP, icc 7.0 and 7.1 complain thusly:
4243      #   icc: Command line warning: ignoring option '-M'; no argument required
4244      # The diagnosis changed in icc 8.0:
4245      #   icc: Command line remark: option '-MP' not supported
4246      if (grep 'ignoring option' conftest.err ||
4247          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4248        am_cv_CC_dependencies_compiler_type=$depmode
4249        break
4250      fi
4251    fi
4252  done
4253
4254  cd ..
4255  rm -rf conftest.dir
4256else
4257  am_cv_CC_dependencies_compiler_type=none
4258fi
4259
4260fi
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4262$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4263CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4264
4265 if
4266  test "x$enable_dependency_tracking" != xno \
4267  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4268  am__fastdepCC_TRUE=
4269  am__fastdepCC_FALSE='#'
4270else
4271  am__fastdepCC_TRUE='#'
4272  am__fastdepCC_FALSE=
4273fi
4274
4275
4276
4277
4278
4279
4280ac_ext=c
4281ac_cpp='$CPP $CPPFLAGS'
4282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4284ac_compiler_gnu=$ac_cv_c_compiler_gnu
4285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4286$as_echo_n "checking how to run the C preprocessor... " >&6; }
4287# On Suns, sometimes $CPP names a directory.
4288if test -n "$CPP" && test -d "$CPP"; then
4289  CPP=
4290fi
4291if test -z "$CPP"; then
4292  if ${ac_cv_prog_CPP+:} false; then :
4293  $as_echo_n "(cached) " >&6
4294else
4295      # Double quotes because CPP needs to be expanded
4296    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4297    do
4298      ac_preproc_ok=false
4299for ac_c_preproc_warn_flag in '' yes
4300do
4301  # Use a header file that comes with gcc, so configuring glibc
4302  # with a fresh cross-compiler works.
4303  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4304  # <limits.h> exists even on freestanding compilers.
4305  # On the NeXT, cc -E runs the code through the compiler's parser,
4306  # not just through cpp. "Syntax error" is here to catch this case.
4307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308/* end confdefs.h.  */
4309#ifdef __STDC__
4310# include <limits.h>
4311#else
4312# include <assert.h>
4313#endif
4314		     Syntax error
4315_ACEOF
4316if ac_fn_c_try_cpp "$LINENO"; then :
4317
4318else
4319  # Broken: fails on valid input.
4320continue
4321fi
4322rm -f conftest.err conftest.i conftest.$ac_ext
4323
4324  # OK, works on sane cases.  Now check whether nonexistent headers
4325  # can be detected and how.
4326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327/* end confdefs.h.  */
4328#include <ac_nonexistent.h>
4329_ACEOF
4330if ac_fn_c_try_cpp "$LINENO"; then :
4331  # Broken: success on invalid input.
4332continue
4333else
4334  # Passes both tests.
4335ac_preproc_ok=:
4336break
4337fi
4338rm -f conftest.err conftest.i conftest.$ac_ext
4339
4340done
4341# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4342rm -f conftest.i conftest.err conftest.$ac_ext
4343if $ac_preproc_ok; then :
4344  break
4345fi
4346
4347    done
4348    ac_cv_prog_CPP=$CPP
4349
4350fi
4351  CPP=$ac_cv_prog_CPP
4352else
4353  ac_cv_prog_CPP=$CPP
4354fi
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4356$as_echo "$CPP" >&6; }
4357ac_preproc_ok=false
4358for ac_c_preproc_warn_flag in '' yes
4359do
4360  # Use a header file that comes with gcc, so configuring glibc
4361  # with a fresh cross-compiler works.
4362  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4363  # <limits.h> exists even on freestanding compilers.
4364  # On the NeXT, cc -E runs the code through the compiler's parser,
4365  # not just through cpp. "Syntax error" is here to catch this case.
4366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4367/* end confdefs.h.  */
4368#ifdef __STDC__
4369# include <limits.h>
4370#else
4371# include <assert.h>
4372#endif
4373		     Syntax error
4374_ACEOF
4375if ac_fn_c_try_cpp "$LINENO"; then :
4376
4377else
4378  # Broken: fails on valid input.
4379continue
4380fi
4381rm -f conftest.err conftest.i conftest.$ac_ext
4382
4383  # OK, works on sane cases.  Now check whether nonexistent headers
4384  # can be detected and how.
4385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4386/* end confdefs.h.  */
4387#include <ac_nonexistent.h>
4388_ACEOF
4389if ac_fn_c_try_cpp "$LINENO"; then :
4390  # Broken: success on invalid input.
4391continue
4392else
4393  # Passes both tests.
4394ac_preproc_ok=:
4395break
4396fi
4397rm -f conftest.err conftest.i conftest.$ac_ext
4398
4399done
4400# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4401rm -f conftest.i conftest.err conftest.$ac_ext
4402if $ac_preproc_ok; then :
4403
4404else
4405  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4407as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4408See \`config.log' for more details" "$LINENO" 5; }
4409fi
4410
4411ac_ext=c
4412ac_cpp='$CPP $CPPFLAGS'
4413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4415ac_compiler_gnu=$ac_cv_c_compiler_gnu
4416
4417
4418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4419$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4420if ${ac_cv_path_GREP+:} false; then :
4421  $as_echo_n "(cached) " >&6
4422else
4423  if test -z "$GREP"; then
4424  ac_path_GREP_found=false
4425  # Loop through the user's path and test for each of PROGNAME-LIST
4426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4427for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4428do
4429  IFS=$as_save_IFS
4430  test -z "$as_dir" && as_dir=.
4431    for ac_prog in grep ggrep; do
4432    for ac_exec_ext in '' $ac_executable_extensions; do
4433      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4434      as_fn_executable_p "$ac_path_GREP" || continue
4435# Check for GNU ac_path_GREP and select it if it is found.
4436  # Check for GNU $ac_path_GREP
4437case `"$ac_path_GREP" --version 2>&1` in
4438*GNU*)
4439  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4440*)
4441  ac_count=0
4442  $as_echo_n 0123456789 >"conftest.in"
4443  while :
4444  do
4445    cat "conftest.in" "conftest.in" >"conftest.tmp"
4446    mv "conftest.tmp" "conftest.in"
4447    cp "conftest.in" "conftest.nl"
4448    $as_echo 'GREP' >> "conftest.nl"
4449    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4450    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4451    as_fn_arith $ac_count + 1 && ac_count=$as_val
4452    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4453      # Best one so far, save it but keep looking for a better one
4454      ac_cv_path_GREP="$ac_path_GREP"
4455      ac_path_GREP_max=$ac_count
4456    fi
4457    # 10*(2^10) chars as input seems more than enough
4458    test $ac_count -gt 10 && break
4459  done
4460  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4461esac
4462
4463      $ac_path_GREP_found && break 3
4464    done
4465  done
4466  done
4467IFS=$as_save_IFS
4468  if test -z "$ac_cv_path_GREP"; then
4469    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4470  fi
4471else
4472  ac_cv_path_GREP=$GREP
4473fi
4474
4475fi
4476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4477$as_echo "$ac_cv_path_GREP" >&6; }
4478 GREP="$ac_cv_path_GREP"
4479
4480
4481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4482$as_echo_n "checking for egrep... " >&6; }
4483if ${ac_cv_path_EGREP+:} false; then :
4484  $as_echo_n "(cached) " >&6
4485else
4486  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4487   then ac_cv_path_EGREP="$GREP -E"
4488   else
4489     if test -z "$EGREP"; then
4490  ac_path_EGREP_found=false
4491  # Loop through the user's path and test for each of PROGNAME-LIST
4492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4494do
4495  IFS=$as_save_IFS
4496  test -z "$as_dir" && as_dir=.
4497    for ac_prog in egrep; do
4498    for ac_exec_ext in '' $ac_executable_extensions; do
4499      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4500      as_fn_executable_p "$ac_path_EGREP" || continue
4501# Check for GNU ac_path_EGREP and select it if it is found.
4502  # Check for GNU $ac_path_EGREP
4503case `"$ac_path_EGREP" --version 2>&1` in
4504*GNU*)
4505  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4506*)
4507  ac_count=0
4508  $as_echo_n 0123456789 >"conftest.in"
4509  while :
4510  do
4511    cat "conftest.in" "conftest.in" >"conftest.tmp"
4512    mv "conftest.tmp" "conftest.in"
4513    cp "conftest.in" "conftest.nl"
4514    $as_echo 'EGREP' >> "conftest.nl"
4515    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4516    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4517    as_fn_arith $ac_count + 1 && ac_count=$as_val
4518    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4519      # Best one so far, save it but keep looking for a better one
4520      ac_cv_path_EGREP="$ac_path_EGREP"
4521      ac_path_EGREP_max=$ac_count
4522    fi
4523    # 10*(2^10) chars as input seems more than enough
4524    test $ac_count -gt 10 && break
4525  done
4526  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4527esac
4528
4529      $ac_path_EGREP_found && break 3
4530    done
4531  done
4532  done
4533IFS=$as_save_IFS
4534  if test -z "$ac_cv_path_EGREP"; then
4535    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4536  fi
4537else
4538  ac_cv_path_EGREP=$EGREP
4539fi
4540
4541   fi
4542fi
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4544$as_echo "$ac_cv_path_EGREP" >&6; }
4545 EGREP="$ac_cv_path_EGREP"
4546
4547
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4549$as_echo_n "checking for ANSI C header files... " >&6; }
4550if ${ac_cv_header_stdc+:} false; then :
4551  $as_echo_n "(cached) " >&6
4552else
4553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554/* end confdefs.h.  */
4555#include <stdlib.h>
4556#include <stdarg.h>
4557#include <string.h>
4558#include <float.h>
4559
4560int
4561main ()
4562{
4563
4564  ;
4565  return 0;
4566}
4567_ACEOF
4568if ac_fn_c_try_compile "$LINENO"; then :
4569  ac_cv_header_stdc=yes
4570else
4571  ac_cv_header_stdc=no
4572fi
4573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4574
4575if test $ac_cv_header_stdc = yes; then
4576  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578/* end confdefs.h.  */
4579#include <string.h>
4580
4581_ACEOF
4582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4583  $EGREP "memchr" >/dev/null 2>&1; then :
4584
4585else
4586  ac_cv_header_stdc=no
4587fi
4588rm -f conftest*
4589
4590fi
4591
4592if test $ac_cv_header_stdc = yes; then
4593  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595/* end confdefs.h.  */
4596#include <stdlib.h>
4597
4598_ACEOF
4599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4600  $EGREP "free" >/dev/null 2>&1; then :
4601
4602else
4603  ac_cv_header_stdc=no
4604fi
4605rm -f conftest*
4606
4607fi
4608
4609if test $ac_cv_header_stdc = yes; then
4610  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4611  if test "$cross_compiling" = yes; then :
4612  :
4613else
4614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h.  */
4616#include <ctype.h>
4617#include <stdlib.h>
4618#if ((' ' & 0x0FF) == 0x020)
4619# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4620# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4621#else
4622# define ISLOWER(c) \
4623		   (('a' <= (c) && (c) <= 'i') \
4624		     || ('j' <= (c) && (c) <= 'r') \
4625		     || ('s' <= (c) && (c) <= 'z'))
4626# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4627#endif
4628
4629#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4630int
4631main ()
4632{
4633  int i;
4634  for (i = 0; i < 256; i++)
4635    if (XOR (islower (i), ISLOWER (i))
4636	|| toupper (i) != TOUPPER (i))
4637      return 2;
4638  return 0;
4639}
4640_ACEOF
4641if ac_fn_c_try_run "$LINENO"; then :
4642
4643else
4644  ac_cv_header_stdc=no
4645fi
4646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4647  conftest.$ac_objext conftest.beam conftest.$ac_ext
4648fi
4649
4650fi
4651fi
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4653$as_echo "$ac_cv_header_stdc" >&6; }
4654if test $ac_cv_header_stdc = yes; then
4655
4656$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4657
4658fi
4659
4660# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4661for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4662		  inttypes.h stdint.h unistd.h
4663do :
4664  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4665ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4666"
4667if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4668  cat >>confdefs.h <<_ACEOF
4669#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4670_ACEOF
4671
4672fi
4673
4674done
4675
4676
4677for ac_header in stdio.h stdlib.h string.h unistd.h netdb.h signal.h \
4678  syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \
4679  math.h sys/socket.h dirent.h ctype.h \
4680  mtent.h fcntl.h sys/param.h arpa/inet.h \
4681  sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \
4682  sys/socket.h sys/loadavg.h arpa/inet.h \
4683  sys/vmmeter.h strings.h vm/vm_param.h \
4684  sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
4685  stdint.h mach/host_info.h mach/mach_host.h knlist.h pwd.h \
4686  sys/var.h arpa/nameser.h assert.h sys/dkstat.h sys/disk.h sys/sched.h \
4687  zone.h nlist.h kvm.h linux/kernel.h procinfo.h sys/dk.h \
4688  sys/resource.h pthread.h windows.h process.h conio.h sys/wait.h \
4689  stdarg.h winsock2.h pdh.h psapi.h sys/sem.h sys/ipc.h sys/shm.h Winldap.h \
4690  Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
4691  execinfo.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
4692  dlfcn.h sys/utsname.h sys/un.h sys/protosw.h stddef.h limits.h
4693do :
4694  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4695ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4696if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4697  cat >>confdefs.h <<_ACEOF
4698#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4699_ACEOF
4700
4701fi
4702
4703done
4704
4705for ac_header in resolv.h
4706do :
4707  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
4708#ifdef HAVE_SYS_TYPES_H
4709#  include <sys/types.h>
4710#endif
4711#ifdef HAVE_NETINET_IN_H
4712#  include <netinet/in.h>
4713#endif
4714#ifdef HAVE_ARPA_NAMESER_H
4715#  include <arpa/nameser.h>
4716#endif
4717#ifdef HAVE_NETDB_H
4718#  include <netdb.h>
4719#endif
4720
4721"
4722if test "x$ac_cv_header_resolv_h" = xyes; then :
4723  cat >>confdefs.h <<_ACEOF
4724#define HAVE_RESOLV_H 1
4725_ACEOF
4726
4727fi
4728
4729done
4730
4731for ac_header in net/if.h net/if_mib.h
4732do :
4733  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4734ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4735#include <stdio.h>
4736#ifdef STDC_HEADERS
4737#  include <stdlib.h>
4738#  include <stddef.h>
4739#else
4740#  ifdef HAVE_STDLIB_H
4741#    include <stdlib.h>
4742#  endif
4743#endif
4744#ifdef HAVE_SYS_TYPES_H
4745#  include <sys/types.h>
4746#endif
4747#ifdef HAVE_SYS_SOCKET_H
4748#  include <sys/socket.h>
4749#endif
4750/* for net/if_mib.h */
4751#ifdef HAVE_NET_IF_H
4752#  include <net/if.h>
4753#endif
4754
4755"
4756if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4757  cat >>confdefs.h <<_ACEOF
4758#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4759_ACEOF
4760
4761fi
4762
4763done
4764
4765
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Werror=cpp" >&5
4767$as_echo_n "checking whether compiler supports -Werror=cpp... " >&6; }
4768checked_werror_cpp_CFLAGS=""
4769saved_CFLAGS="$CFLAGS"
4770CFLAGS="$CFLAGS -Werror=cpp"
4771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4772/* end confdefs.h.  */
4773
4774int
4775main ()
4776{
4777
4778  void f() {};
4779
4780  ;
4781  return 0;
4782}
4783_ACEOF
4784if ac_fn_c_try_compile "$LINENO"; then :
4785  checked_werror_cpp_CFLAGS="-Werror=cpp"
4786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4787$as_echo "yes" >&6; }
4788else
4789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790$as_echo "no" >&6; }
4791
4792fi
4793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4794CFLAGS="$saved_CFLAGS"
4795
4796saved_CFLAGS="$CFLAGS"
4797CFLAGS="$checked_werror_cpp_CFLAGS $CFLAGS"
4798for ac_header in sys/mount.h sys/proc.h sys/sysctl.h sys/user.h
4799do :
4800  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4801ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4802#ifdef HAVE_SYS_TYPES_H
4803#  include <sys/types.h>
4804#endif
4805#ifdef HAVE_SYS_PARAM_H
4806#  include <sys/param.h>
4807#endif
4808
4809"
4810if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4811  cat >>confdefs.h <<_ACEOF
4812#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4813_ACEOF
4814
4815fi
4816
4817done
4818
4819CFLAGS="$saved_CFLAGS"
4820
4821for ac_header in sys/swap.h
4822do :
4823  ac_fn_c_check_header_compile "$LINENO" "sys/swap.h" "ac_cv_header_sys_swap_h" "
4824#ifdef HAVE_SYS_PARAM_H
4825#  include <sys/param.h>
4826#endif
4827
4828"
4829if test "x$ac_cv_header_sys_swap_h" = xyes; then :
4830  cat >>confdefs.h <<_ACEOF
4831#define HAVE_SYS_SWAP_H 1
4832_ACEOF
4833
4834fi
4835
4836done
4837
4838for ac_header in sys/ucontext.h
4839do :
4840  ac_fn_c_check_header_compile "$LINENO" "sys/ucontext.h" "ac_cv_header_sys_ucontext_h" "
4841#ifdef HAVE_SIGNAL_H
4842#  include <signal.h>
4843#endif
4844
4845"
4846if test "x$ac_cv_header_sys_ucontext_h" = xyes; then :
4847  cat >>confdefs.h <<_ACEOF
4848#define HAVE_SYS_UCONTEXT_H 1
4849_ACEOF
4850
4851fi
4852
4853done
4854
4855for ac_header in devstat.h
4856do :
4857  ac_fn_c_check_header_compile "$LINENO" "devstat.h" "ac_cv_header_devstat_h" "
4858#ifdef HAVE_SYS_DKSTAT_H
4859#  include <sys/dkstat.h>
4860#endif
4861
4862"
4863if test "x$ac_cv_header_devstat_h" = xyes; then :
4864  cat >>confdefs.h <<_ACEOF
4865#define HAVE_DEVSTAT_H 1
4866_ACEOF
4867
4868fi
4869
4870done
4871
4872for ac_header in linux/netlink.h
4873do :
4874  ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
4875#ifdef HAVE_SYS_SOCKET_H
4876#  include <sys/socket.h>
4877#endif
4878
4879"
4880if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
4881  cat >>confdefs.h <<_ACEOF
4882#define HAVE_LINUX_NETLINK_H 1
4883_ACEOF
4884
4885	for ac_header in linux/inet_diag.h
4886do :
4887  ac_fn_c_check_header_mongrel "$LINENO" "linux/inet_diag.h" "ac_cv_header_linux_inet_diag_h" "$ac_includes_default"
4888if test "x$ac_cv_header_linux_inet_diag_h" = xyes; then :
4889  cat >>confdefs.h <<_ACEOF
4890#define HAVE_LINUX_INET_DIAG_H 1
4891_ACEOF
4892
4893
4894$as_echo "#define HAVE_INET_DIAG 1" >>confdefs.h
4895
4896
4897fi
4898
4899done
4900
4901
4902fi
4903
4904done
4905
4906for ac_header in libperfstat.h
4907do :
4908  ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" "
4909#ifdef HAVE_SYS_PROTOSW_H
4910#  include <sys/protosw.h>
4911#endif
4912
4913"
4914if test "x$ac_cv_header_libperfstat_h" = xyes; then :
4915  cat >>confdefs.h <<_ACEOF
4916#define HAVE_LIBPERFSTAT_H 1
4917_ACEOF
4918
4919fi
4920
4921done
4922
4923
4924
4925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
4926$as_echo_n "checking for library containing socket... " >&6; }
4927if ${ac_cv_search_socket+:} false; then :
4928  $as_echo_n "(cached) " >&6
4929else
4930  ac_func_search_save_LIBS=$LIBS
4931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4932/* end confdefs.h.  */
4933
4934/* Override any GCC internal prototype to avoid an error.
4935   Use char because int might match the return type of a GCC
4936   builtin and then its argument prototype would still apply.  */
4937#ifdef __cplusplus
4938extern "C"
4939#endif
4940char socket ();
4941int
4942main ()
4943{
4944return socket ();
4945  ;
4946  return 0;
4947}
4948_ACEOF
4949for ac_lib in '' socket; do
4950  if test -z "$ac_lib"; then
4951    ac_res="none required"
4952  else
4953    ac_res=-l$ac_lib
4954    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4955  fi
4956  if ac_fn_c_try_link "$LINENO"; then :
4957  ac_cv_search_socket=$ac_res
4958fi
4959rm -f core conftest.err conftest.$ac_objext \
4960    conftest$ac_exeext
4961  if ${ac_cv_search_socket+:} false; then :
4962  break
4963fi
4964done
4965if ${ac_cv_search_socket+:} false; then :
4966
4967else
4968  ac_cv_search_socket=no
4969fi
4970rm conftest.$ac_ext
4971LIBS=$ac_func_search_save_LIBS
4972fi
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
4974$as_echo "$ac_cv_search_socket" >&6; }
4975ac_res=$ac_cv_search_socket
4976if test "$ac_res" != no; then :
4977  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4978
4979fi
4980
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kstat_open" >&5
4982$as_echo_n "checking for library containing kstat_open... " >&6; }
4983if ${ac_cv_search_kstat_open+:} false; then :
4984  $as_echo_n "(cached) " >&6
4985else
4986  ac_func_search_save_LIBS=$LIBS
4987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4988/* end confdefs.h.  */
4989
4990/* Override any GCC internal prototype to avoid an error.
4991   Use char because int might match the return type of a GCC
4992   builtin and then its argument prototype would still apply.  */
4993#ifdef __cplusplus
4994extern "C"
4995#endif
4996char kstat_open ();
4997int
4998main ()
4999{
5000return kstat_open ();
5001  ;
5002  return 0;
5003}
5004_ACEOF
5005for ac_lib in '' kstat; do
5006  if test -z "$ac_lib"; then
5007    ac_res="none required"
5008  else
5009    ac_res=-l$ac_lib
5010    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5011  fi
5012  if ac_fn_c_try_link "$LINENO"; then :
5013  ac_cv_search_kstat_open=$ac_res
5014fi
5015rm -f core conftest.err conftest.$ac_objext \
5016    conftest$ac_exeext
5017  if ${ac_cv_search_kstat_open+:} false; then :
5018  break
5019fi
5020done
5021if ${ac_cv_search_kstat_open+:} false; then :
5022
5023else
5024  ac_cv_search_kstat_open=no
5025fi
5026rm conftest.$ac_ext
5027LIBS=$ac_func_search_save_LIBS
5028fi
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kstat_open" >&5
5030$as_echo "$ac_cv_search_kstat_open" >&6; }
5031ac_res=$ac_cv_search_kstat_open
5032if test "$ac_res" != no; then :
5033  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5034
5035fi
5036
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
5038$as_echo_n "checking for library containing gethostbyname... " >&6; }
5039if ${ac_cv_search_gethostbyname+:} false; then :
5040  $as_echo_n "(cached) " >&6
5041else
5042  ac_func_search_save_LIBS=$LIBS
5043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5044/* end confdefs.h.  */
5045
5046/* Override any GCC internal prototype to avoid an error.
5047   Use char because int might match the return type of a GCC
5048   builtin and then its argument prototype would still apply.  */
5049#ifdef __cplusplus
5050extern "C"
5051#endif
5052char gethostbyname ();
5053int
5054main ()
5055{
5056return gethostbyname ();
5057  ;
5058  return 0;
5059}
5060_ACEOF
5061for ac_lib in '' nsl; do
5062  if test -z "$ac_lib"; then
5063    ac_res="none required"
5064  else
5065    ac_res=-l$ac_lib
5066    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5067  fi
5068  if ac_fn_c_try_link "$LINENO"; then :
5069  ac_cv_search_gethostbyname=$ac_res
5070fi
5071rm -f core conftest.err conftest.$ac_objext \
5072    conftest$ac_exeext
5073  if ${ac_cv_search_gethostbyname+:} false; then :
5074  break
5075fi
5076done
5077if ${ac_cv_search_gethostbyname+:} false; then :
5078
5079else
5080  ac_cv_search_gethostbyname=no
5081fi
5082rm conftest.$ac_ext
5083LIBS=$ac_func_search_save_LIBS
5084fi
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
5086$as_echo "$ac_cv_search_gethostbyname" >&6; }
5087ac_res=$ac_cv_search_gethostbyname
5088if test "$ac_res" != no; then :
5089  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5090
5091fi
5092
5093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
5094$as_echo_n "checking for library containing clock_gettime... " >&6; }
5095if ${ac_cv_search_clock_gettime+:} false; then :
5096  $as_echo_n "(cached) " >&6
5097else
5098  ac_func_search_save_LIBS=$LIBS
5099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5100/* end confdefs.h.  */
5101
5102/* Override any GCC internal prototype to avoid an error.
5103   Use char because int might match the return type of a GCC
5104   builtin and then its argument prototype would still apply.  */
5105#ifdef __cplusplus
5106extern "C"
5107#endif
5108char clock_gettime ();
5109int
5110main ()
5111{
5112return clock_gettime ();
5113  ;
5114  return 0;
5115}
5116_ACEOF
5117for ac_lib in '' rt; do
5118  if test -z "$ac_lib"; then
5119    ac_res="none required"
5120  else
5121    ac_res=-l$ac_lib
5122    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5123  fi
5124  if ac_fn_c_try_link "$LINENO"; then :
5125  ac_cv_search_clock_gettime=$ac_res
5126fi
5127rm -f core conftest.err conftest.$ac_objext \
5128    conftest$ac_exeext
5129  if ${ac_cv_search_clock_gettime+:} false; then :
5130  break
5131fi
5132done
5133if ${ac_cv_search_clock_gettime+:} false; then :
5134
5135else
5136  ac_cv_search_clock_gettime=no
5137fi
5138rm conftest.$ac_ext
5139LIBS=$ac_func_search_save_LIBS
5140fi
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
5142$as_echo "$ac_cv_search_clock_gettime" >&6; }
5143ac_res=$ac_cv_search_clock_gettime
5144if test "$ac_res" != no; then :
5145  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5146
5147fi
5148
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
5150$as_echo_n "checking for library containing dlopen... " >&6; }
5151if ${ac_cv_search_dlopen+:} false; then :
5152  $as_echo_n "(cached) " >&6
5153else
5154  ac_func_search_save_LIBS=$LIBS
5155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156/* end confdefs.h.  */
5157
5158/* Override any GCC internal prototype to avoid an error.
5159   Use char because int might match the return type of a GCC
5160   builtin and then its argument prototype would still apply.  */
5161#ifdef __cplusplus
5162extern "C"
5163#endif
5164char dlopen ();
5165int
5166main ()
5167{
5168return dlopen ();
5169  ;
5170  return 0;
5171}
5172_ACEOF
5173for ac_lib in '' dl; do
5174  if test -z "$ac_lib"; then
5175    ac_res="none required"
5176  else
5177    ac_res=-l$ac_lib
5178    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5179  fi
5180  if ac_fn_c_try_link "$LINENO"; then :
5181  ac_cv_search_dlopen=$ac_res
5182fi
5183rm -f core conftest.err conftest.$ac_objext \
5184    conftest$ac_exeext
5185  if ${ac_cv_search_dlopen+:} false; then :
5186  break
5187fi
5188done
5189if ${ac_cv_search_dlopen+:} false; then :
5190
5191else
5192  ac_cv_search_dlopen=no
5193fi
5194rm conftest.$ac_ext
5195LIBS=$ac_func_search_save_LIBS
5196fi
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
5198$as_echo "$ac_cv_search_dlopen" >&6; }
5199ac_res=$ac_cv_search_dlopen
5200if test "$ac_res" != no; then :
5201  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5202
5203fi
5204
5205
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_memory_total" >&5
5207$as_echo_n "checking for library containing perfstat_memory_total... " >&6; }
5208if ${ac_cv_search_perfstat_memory_total+:} false; then :
5209  $as_echo_n "(cached) " >&6
5210else
5211  ac_func_search_save_LIBS=$LIBS
5212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5213/* end confdefs.h.  */
5214
5215/* Override any GCC internal prototype to avoid an error.
5216   Use char because int might match the return type of a GCC
5217   builtin and then its argument prototype would still apply.  */
5218#ifdef __cplusplus
5219extern "C"
5220#endif
5221char perfstat_memory_total ();
5222int
5223main ()
5224{
5225return perfstat_memory_total ();
5226  ;
5227  return 0;
5228}
5229_ACEOF
5230for ac_lib in '' perfstat; do
5231  if test -z "$ac_lib"; then
5232    ac_res="none required"
5233  else
5234    ac_res=-l$ac_lib
5235    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5236  fi
5237  if ac_fn_c_try_link "$LINENO"; then :
5238  ac_cv_search_perfstat_memory_total=$ac_res
5239fi
5240rm -f core conftest.err conftest.$ac_objext \
5241    conftest$ac_exeext
5242  if ${ac_cv_search_perfstat_memory_total+:} false; then :
5243  break
5244fi
5245done
5246if ${ac_cv_search_perfstat_memory_total+:} false; then :
5247
5248else
5249  ac_cv_search_perfstat_memory_total=no
5250fi
5251rm conftest.$ac_ext
5252LIBS=$ac_func_search_save_LIBS
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_perfstat_memory_total" >&5
5255$as_echo "$ac_cv_search_perfstat_memory_total" >&6; }
5256ac_res=$ac_cv_search_perfstat_memory_total
5257if test "$ac_res" != no; then :
5258  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5259
5260$as_echo "#define HAVE_LIBPERFSTAT 1" >>confdefs.h
5261
5262fi
5263
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing devstat_getdevs" >&5
5265$as_echo_n "checking for library containing devstat_getdevs... " >&6; }
5266if ${ac_cv_search_devstat_getdevs+:} false; then :
5267  $as_echo_n "(cached) " >&6
5268else
5269  ac_func_search_save_LIBS=$LIBS
5270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5271/* end confdefs.h.  */
5272
5273/* Override any GCC internal prototype to avoid an error.
5274   Use char because int might match the return type of a GCC
5275   builtin and then its argument prototype would still apply.  */
5276#ifdef __cplusplus
5277extern "C"
5278#endif
5279char devstat_getdevs ();
5280int
5281main ()
5282{
5283return devstat_getdevs ();
5284  ;
5285  return 0;
5286}
5287_ACEOF
5288for ac_lib in '' devstat; do
5289  if test -z "$ac_lib"; then
5290    ac_res="none required"
5291  else
5292    ac_res=-l$ac_lib
5293    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5294  fi
5295  if ac_fn_c_try_link "$LINENO"; then :
5296  ac_cv_search_devstat_getdevs=$ac_res
5297fi
5298rm -f core conftest.err conftest.$ac_objext \
5299    conftest$ac_exeext
5300  if ${ac_cv_search_devstat_getdevs+:} false; then :
5301  break
5302fi
5303done
5304if ${ac_cv_search_devstat_getdevs+:} false; then :
5305
5306else
5307  ac_cv_search_devstat_getdevs=no
5308fi
5309rm conftest.$ac_ext
5310LIBS=$ac_func_search_save_LIBS
5311fi
5312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_devstat_getdevs" >&5
5313$as_echo "$ac_cv_search_devstat_getdevs" >&6; }
5314ac_res=$ac_cv_search_devstat_getdevs
5315if test "$ac_res" != no; then :
5316  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5317
5318$as_echo "#define HAVE_LIBDEVSTAT 1" >>confdefs.h
5319
5320fi
5321
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getdevs" >&5
5323$as_echo_n "checking for library containing getdevs... " >&6; }
5324if ${ac_cv_search_getdevs+:} false; then :
5325  $as_echo_n "(cached) " >&6
5326else
5327  ac_func_search_save_LIBS=$LIBS
5328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5329/* end confdefs.h.  */
5330
5331/* Override any GCC internal prototype to avoid an error.
5332   Use char because int might match the return type of a GCC
5333   builtin and then its argument prototype would still apply.  */
5334#ifdef __cplusplus
5335extern "C"
5336#endif
5337char getdevs ();
5338int
5339main ()
5340{
5341return getdevs ();
5342  ;
5343  return 0;
5344}
5345_ACEOF
5346for ac_lib in '' devstat; do
5347  if test -z "$ac_lib"; then
5348    ac_res="none required"
5349  else
5350    ac_res=-l$ac_lib
5351    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5352  fi
5353  if ac_fn_c_try_link "$LINENO"; then :
5354  ac_cv_search_getdevs=$ac_res
5355fi
5356rm -f core conftest.err conftest.$ac_objext \
5357    conftest$ac_exeext
5358  if ${ac_cv_search_getdevs+:} false; then :
5359  break
5360fi
5361done
5362if ${ac_cv_search_getdevs+:} false; then :
5363
5364else
5365  ac_cv_search_getdevs=no
5366fi
5367rm conftest.$ac_ext
5368LIBS=$ac_func_search_save_LIBS
5369fi
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getdevs" >&5
5371$as_echo "$ac_cv_search_getdevs" >&6; }
5372ac_res=$ac_cv_search_getdevs
5373if test "$ac_res" != no; then :
5374  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5375
5376$as_echo "#define HAVE_LIBDEVSTAT 1" >>confdefs.h
5377
5378fi
5379
5380
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
5382$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
5383if ${ac_cv_search_backtrace_symbols+:} false; then :
5384  $as_echo_n "(cached) " >&6
5385else
5386  ac_func_search_save_LIBS=$LIBS
5387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5388/* end confdefs.h.  */
5389
5390/* Override any GCC internal prototype to avoid an error.
5391   Use char because int might match the return type of a GCC
5392   builtin and then its argument prototype would still apply.  */
5393#ifdef __cplusplus
5394extern "C"
5395#endif
5396char backtrace_symbols ();
5397int
5398main ()
5399{
5400return backtrace_symbols ();
5401  ;
5402  return 0;
5403}
5404_ACEOF
5405for ac_lib in '' execinfo; do
5406  if test -z "$ac_lib"; then
5407    ac_res="none required"
5408  else
5409    ac_res=-l$ac_lib
5410    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5411  fi
5412  if ac_fn_c_try_link "$LINENO"; then :
5413  ac_cv_search_backtrace_symbols=$ac_res
5414fi
5415rm -f core conftest.err conftest.$ac_objext \
5416    conftest$ac_exeext
5417  if ${ac_cv_search_backtrace_symbols+:} false; then :
5418  break
5419fi
5420done
5421if ${ac_cv_search_backtrace_symbols+:} false; then :
5422
5423else
5424  ac_cv_search_backtrace_symbols=no
5425fi
5426rm conftest.$ac_ext
5427LIBS=$ac_func_search_save_LIBS
5428fi
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
5430$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
5431ac_res=$ac_cv_search_backtrace_symbols
5432if test "$ac_res" != no; then :
5433  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5434
5435$as_echo "#define HAVE_LIBEXECINFO 1" >>confdefs.h
5436
5437fi
5438
5439
5440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
5441$as_echo_n "checking for main in -lm... " >&6; }
5442if ${ac_cv_lib_m_main+:} false; then :
5443  $as_echo_n "(cached) " >&6
5444else
5445  ac_check_lib_save_LIBS=$LIBS
5446LIBS="-lm  $LIBS"
5447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5448/* end confdefs.h.  */
5449
5450
5451int
5452main ()
5453{
5454return main ();
5455  ;
5456  return 0;
5457}
5458_ACEOF
5459if ac_fn_c_try_link "$LINENO"; then :
5460  ac_cv_lib_m_main=yes
5461else
5462  ac_cv_lib_m_main=no
5463fi
5464rm -f core conftest.err conftest.$ac_objext \
5465    conftest$ac_exeext conftest.$ac_ext
5466LIBS=$ac_check_lib_save_LIBS
5467fi
5468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
5469$as_echo "$ac_cv_lib_m_main" >&6; }
5470if test "x$ac_cv_lib_m_main" = xyes; then :
5471  cat >>confdefs.h <<_ACEOF
5472#define HAVE_LIBM 1
5473_ACEOF
5474
5475  LIBS="-lm $LIBS"
5476
5477fi
5478
5479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkvm" >&5
5480$as_echo_n "checking for main in -lkvm... " >&6; }
5481if ${ac_cv_lib_kvm_main+:} false; then :
5482  $as_echo_n "(cached) " >&6
5483else
5484  ac_check_lib_save_LIBS=$LIBS
5485LIBS="-lkvm  $LIBS"
5486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487/* end confdefs.h.  */
5488
5489
5490int
5491main ()
5492{
5493return main ();
5494  ;
5495  return 0;
5496}
5497_ACEOF
5498if ac_fn_c_try_link "$LINENO"; then :
5499  ac_cv_lib_kvm_main=yes
5500else
5501  ac_cv_lib_kvm_main=no
5502fi
5503rm -f core conftest.err conftest.$ac_objext \
5504    conftest$ac_exeext conftest.$ac_ext
5505LIBS=$ac_check_lib_save_LIBS
5506fi
5507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_main" >&5
5508$as_echo "$ac_cv_lib_kvm_main" >&6; }
5509if test "x$ac_cv_lib_kvm_main" = xyes; then :
5510  cat >>confdefs.h <<_ACEOF
5511#define HAVE_LIBKVM 1
5512_ACEOF
5513
5514  LIBS="-lkvm $LIBS"
5515
5516fi
5517
5518
5519found_resolv="no"
5520
5521	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DNS lookup functions" >&5
5522$as_echo_n "checking for DNS lookup functions... " >&6; }
5523
5524
5525am_save_LIBS="$LIBS"
5526LIBS="$LIBS "
5527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h.  */
5529
5530#ifdef HAVE_SYS_TYPES_H
5531#	include <sys/types.h>
5532#endif
5533#ifdef HAVE_NETINET_IN_H
5534#	include <netinet/in.h>
5535#endif
5536#ifdef HAVE_ARPA_NAMESER_H
5537#	include <arpa/nameser.h>
5538#endif
5539#ifdef HAVE_RESOLV_H
5540#	include <resolv.h>
5541#endif
5542#ifndef C_IN
5543#	define C_IN	ns_c_in
5544#endif	/* C_IN */
5545#ifndef T_SOA
5546#	define T_SOA	ns_t_soa
5547#endif	/* T_SOA */
5548
5549int
5550main ()
5551{
5552
5553	char	*buf;
5554
5555	res_init();
5556	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5557
5558  ;
5559  return 0;
5560}
5561_ACEOF
5562if ac_fn_c_try_link "$LINENO"; then :
5563  found_resolv="yes"
5564RESOLV_LIBS=""
5565fi
5566rm -f core conftest.err conftest.$ac_objext \
5567    conftest$ac_exeext conftest.$ac_ext
5568LIBS="$am_save_LIBS"
5569
5570
5571	if test "x$found_resolv" != "xyes"; then
5572
5573am_save_LIBS="$LIBS"
5574LIBS="$LIBS -lresolv"
5575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576/* end confdefs.h.  */
5577
5578#ifdef HAVE_SYS_TYPES_H
5579#	include <sys/types.h>
5580#endif
5581#ifdef HAVE_NETINET_IN_H
5582#	include <netinet/in.h>
5583#endif
5584#ifdef HAVE_ARPA_NAMESER_H
5585#	include <arpa/nameser.h>
5586#endif
5587#ifdef HAVE_RESOLV_H
5588#	include <resolv.h>
5589#endif
5590#ifndef C_IN
5591#	define C_IN	ns_c_in
5592#endif	/* C_IN */
5593#ifndef T_SOA
5594#	define T_SOA	ns_t_soa
5595#endif	/* T_SOA */
5596
5597int
5598main ()
5599{
5600
5601	char	*buf;
5602
5603	res_init();
5604	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5605
5606  ;
5607  return 0;
5608}
5609_ACEOF
5610if ac_fn_c_try_link "$LINENO"; then :
5611  found_resolv="yes"
5612RESOLV_LIBS="-lresolv"
5613fi
5614rm -f core conftest.err conftest.$ac_objext \
5615    conftest$ac_exeext conftest.$ac_ext
5616LIBS="$am_save_LIBS"
5617
5618	fi
5619	if test "x$found_resolv" != "xyes"; then
5620
5621am_save_LIBS="$LIBS"
5622LIBS="$LIBS -lbind"
5623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624/* end confdefs.h.  */
5625
5626#ifdef HAVE_SYS_TYPES_H
5627#	include <sys/types.h>
5628#endif
5629#ifdef HAVE_NETINET_IN_H
5630#	include <netinet/in.h>
5631#endif
5632#ifdef HAVE_ARPA_NAMESER_H
5633#	include <arpa/nameser.h>
5634#endif
5635#ifdef HAVE_RESOLV_H
5636#	include <resolv.h>
5637#endif
5638#ifndef C_IN
5639#	define C_IN	ns_c_in
5640#endif	/* C_IN */
5641#ifndef T_SOA
5642#	define T_SOA	ns_t_soa
5643#endif	/* T_SOA */
5644
5645int
5646main ()
5647{
5648
5649	char	*buf;
5650
5651	res_init();
5652	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5653
5654  ;
5655  return 0;
5656}
5657_ACEOF
5658if ac_fn_c_try_link "$LINENO"; then :
5659  found_resolv="yes"
5660RESOLV_LIBS="-lbind"
5661fi
5662rm -f core conftest.err conftest.$ac_objext \
5663    conftest$ac_exeext conftest.$ac_ext
5664LIBS="$am_save_LIBS"
5665
5666	fi
5667	if test "x$found_resolv" != "xyes"; then
5668
5669am_save_LIBS="$LIBS"
5670LIBS="$LIBS -lsocket"
5671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5672/* end confdefs.h.  */
5673
5674#ifdef HAVE_SYS_TYPES_H
5675#	include <sys/types.h>
5676#endif
5677#ifdef HAVE_NETINET_IN_H
5678#	include <netinet/in.h>
5679#endif
5680#ifdef HAVE_ARPA_NAMESER_H
5681#	include <arpa/nameser.h>
5682#endif
5683#ifdef HAVE_RESOLV_H
5684#	include <resolv.h>
5685#endif
5686#ifndef C_IN
5687#	define C_IN	ns_c_in
5688#endif	/* C_IN */
5689#ifndef T_SOA
5690#	define T_SOA	ns_t_soa
5691#endif	/* T_SOA */
5692
5693int
5694main ()
5695{
5696
5697	char	*buf;
5698
5699	res_init();
5700	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5701
5702  ;
5703  return 0;
5704}
5705_ACEOF
5706if ac_fn_c_try_link "$LINENO"; then :
5707  found_resolv="yes"
5708RESOLV_LIBS="-lsocket"
5709fi
5710rm -f core conftest.err conftest.$ac_objext \
5711    conftest$ac_exeext conftest.$ac_ext
5712LIBS="$am_save_LIBS"
5713
5714	fi
5715
5716	if test "x$found_resolv" = "xyes"; then
5717
5718$as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
5719
5720	else
5721		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
5723	fi
5724
5725	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_resolv" >&5
5726$as_echo "$found_resolv" >&6; }
5727
5728
5729
5730if test "x$found_resolv" != "xyes"; then
5731	as_fn_error $? "Unable to do DNS lookups (libresolv check failed)" "$LINENO" 5
5732fi
5733LIBS="${LIBS} ${RESOLV_LIBS}"
5734
5735
5736largefile=yes
5737
5738case "${host_os}" in
5739	solaris*)
5740		largefile=no
5741		;;
5742esac
5743
5744if test "x$largefile" = "xyes"; then
5745	# Check whether --enable-largefile was given.
5746if test "${enable_largefile+set}" = set; then :
5747  enableval=$enable_largefile;
5748fi
5749
5750if test "$enable_largefile" != no; then
5751
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5753$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5754if ${ac_cv_sys_largefile_CC+:} false; then :
5755  $as_echo_n "(cached) " >&6
5756else
5757  ac_cv_sys_largefile_CC=no
5758     if test "$GCC" != yes; then
5759       ac_save_CC=$CC
5760       while :; do
5761	 # IRIX 6.2 and later do not support large files by default,
5762	 # so use the C compiler's -n32 option if that helps.
5763	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5764/* end confdefs.h.  */
5765#include <sys/types.h>
5766 /* Check that off_t can represent 2**63 - 1 correctly.
5767    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5768    since some C++ compilers masquerading as C compilers
5769    incorrectly reject 9223372036854775807.  */
5770#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5771  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5772		       && LARGE_OFF_T % 2147483647 == 1)
5773		      ? 1 : -1];
5774int
5775main ()
5776{
5777
5778  ;
5779  return 0;
5780}
5781_ACEOF
5782	 if ac_fn_c_try_compile "$LINENO"; then :
5783  break
5784fi
5785rm -f core conftest.err conftest.$ac_objext
5786	 CC="$CC -n32"
5787	 if ac_fn_c_try_compile "$LINENO"; then :
5788  ac_cv_sys_largefile_CC=' -n32'; break
5789fi
5790rm -f core conftest.err conftest.$ac_objext
5791	 break
5792       done
5793       CC=$ac_save_CC
5794       rm -f conftest.$ac_ext
5795    fi
5796fi
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5798$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5799  if test "$ac_cv_sys_largefile_CC" != no; then
5800    CC=$CC$ac_cv_sys_largefile_CC
5801  fi
5802
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5804$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5805if ${ac_cv_sys_file_offset_bits+:} false; then :
5806  $as_echo_n "(cached) " >&6
5807else
5808  while :; do
5809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810/* end confdefs.h.  */
5811#include <sys/types.h>
5812 /* Check that off_t can represent 2**63 - 1 correctly.
5813    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5814    since some C++ compilers masquerading as C compilers
5815    incorrectly reject 9223372036854775807.  */
5816#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5817  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5818		       && LARGE_OFF_T % 2147483647 == 1)
5819		      ? 1 : -1];
5820int
5821main ()
5822{
5823
5824  ;
5825  return 0;
5826}
5827_ACEOF
5828if ac_fn_c_try_compile "$LINENO"; then :
5829  ac_cv_sys_file_offset_bits=no; break
5830fi
5831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5833/* end confdefs.h.  */
5834#define _FILE_OFFSET_BITS 64
5835#include <sys/types.h>
5836 /* Check that off_t can represent 2**63 - 1 correctly.
5837    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5838    since some C++ compilers masquerading as C compilers
5839    incorrectly reject 9223372036854775807.  */
5840#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5841  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5842		       && LARGE_OFF_T % 2147483647 == 1)
5843		      ? 1 : -1];
5844int
5845main ()
5846{
5847
5848  ;
5849  return 0;
5850}
5851_ACEOF
5852if ac_fn_c_try_compile "$LINENO"; then :
5853  ac_cv_sys_file_offset_bits=64; break
5854fi
5855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5856  ac_cv_sys_file_offset_bits=unknown
5857  break
5858done
5859fi
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5861$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5862case $ac_cv_sys_file_offset_bits in #(
5863  no | unknown) ;;
5864  *)
5865cat >>confdefs.h <<_ACEOF
5866#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5867_ACEOF
5868;;
5869esac
5870rm -rf conftest*
5871  if test $ac_cv_sys_file_offset_bits = unknown; then
5872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5873$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5874if ${ac_cv_sys_large_files+:} false; then :
5875  $as_echo_n "(cached) " >&6
5876else
5877  while :; do
5878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5879/* end confdefs.h.  */
5880#include <sys/types.h>
5881 /* Check that off_t can represent 2**63 - 1 correctly.
5882    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5883    since some C++ compilers masquerading as C compilers
5884    incorrectly reject 9223372036854775807.  */
5885#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5886  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5887		       && LARGE_OFF_T % 2147483647 == 1)
5888		      ? 1 : -1];
5889int
5890main ()
5891{
5892
5893  ;
5894  return 0;
5895}
5896_ACEOF
5897if ac_fn_c_try_compile "$LINENO"; then :
5898  ac_cv_sys_large_files=no; break
5899fi
5900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902/* end confdefs.h.  */
5903#define _LARGE_FILES 1
5904#include <sys/types.h>
5905 /* Check that off_t can represent 2**63 - 1 correctly.
5906    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5907    since some C++ compilers masquerading as C compilers
5908    incorrectly reject 9223372036854775807.  */
5909#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5910  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5911		       && LARGE_OFF_T % 2147483647 == 1)
5912		      ? 1 : -1];
5913int
5914main ()
5915{
5916
5917  ;
5918  return 0;
5919}
5920_ACEOF
5921if ac_fn_c_try_compile "$LINENO"; then :
5922  ac_cv_sys_large_files=1; break
5923fi
5924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5925  ac_cv_sys_large_files=unknown
5926  break
5927done
5928fi
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5930$as_echo "$ac_cv_sys_large_files" >&6; }
5931case $ac_cv_sys_large_files in #(
5932  no | unknown) ;;
5933  *)
5934cat >>confdefs.h <<_ACEOF
5935#define _LARGE_FILES $ac_cv_sys_large_files
5936_ACEOF
5937;;
5938esac
5939rm -rf conftest*
5940  fi
5941
5942
5943fi
5944
5945fi
5946
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
5948$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
5949if ${ac_cv_c_const+:} false; then :
5950  $as_echo_n "(cached) " >&6
5951else
5952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5953/* end confdefs.h.  */
5954
5955int
5956main ()
5957{
5958
5959#ifndef __cplusplus
5960  /* Ultrix mips cc rejects this sort of thing.  */
5961  typedef int charset[2];
5962  const charset cs = { 0, 0 };
5963  /* SunOS 4.1.1 cc rejects this.  */
5964  char const *const *pcpcc;
5965  char **ppc;
5966  /* NEC SVR4.0.2 mips cc rejects this.  */
5967  struct point {int x, y;};
5968  static struct point const zero = {0,0};
5969  /* AIX XL C 1.02.0.0 rejects this.
5970     It does not let you subtract one const X* pointer from another in
5971     an arm of an if-expression whose if-part is not a constant
5972     expression */
5973  const char *g = "string";
5974  pcpcc = &g + (g ? g-g : 0);
5975  /* HPUX 7.0 cc rejects these. */
5976  ++pcpcc;
5977  ppc = (char**) pcpcc;
5978  pcpcc = (char const *const *) ppc;
5979  { /* SCO 3.2v4 cc rejects this sort of thing.  */
5980    char tx;
5981    char *t = &tx;
5982    char const *s = 0 ? (char *) 0 : (char const *) 0;
5983
5984    *t++ = 0;
5985    if (s) return 0;
5986  }
5987  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5988    int x[] = {25, 17};
5989    const int *foo = &x[0];
5990    ++foo;
5991  }
5992  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5993    typedef const int *iptr;
5994    iptr p = 0;
5995    ++p;
5996  }
5997  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
5998       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5999    struct s { int j; const int *ap[3]; } bx;
6000    struct s *b = &bx; b->j = 5;
6001  }
6002  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6003    const int foo = 10;
6004    if (!foo) return 0;
6005  }
6006  return !cs[0] && !zero.x;
6007#endif
6008
6009  ;
6010  return 0;
6011}
6012_ACEOF
6013if ac_fn_c_try_compile "$LINENO"; then :
6014  ac_cv_c_const=yes
6015else
6016  ac_cv_c_const=no
6017fi
6018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6019fi
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6021$as_echo "$ac_cv_c_const" >&6; }
6022if test $ac_cv_c_const = no; then
6023
6024$as_echo "#define const /**/" >>confdefs.h
6025
6026fi
6027
6028ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6029if test "x$ac_cv_type_pid_t" = xyes; then :
6030
6031else
6032
6033cat >>confdefs.h <<_ACEOF
6034#define pid_t int
6035_ACEOF
6036
6037fi
6038
6039
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6041$as_echo_n "checking for socklen_t... " >&6; }
6042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6043/* end confdefs.h.  */
6044
6045#include <sys/types.h>
6046#include <unistd.h>
6047#include <sys/socket.h>
6048
6049int
6050main ()
6051{
6052socklen_t s;
6053  ;
6054  return 0;
6055}
6056_ACEOF
6057if ac_fn_c_try_compile "$LINENO"; then :
6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6059$as_echo "yes" >&6; }
6060else
6061
6062$as_echo "#define socklen_t int" >>confdefs.h
6063
6064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6068
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for actual socklen_t parameter type in socket functions" >&5
6070$as_echo_n "checking for actual socklen_t parameter type in socket functions... " >&6; }
6071zbx_socklen_t=
6072for arg2 in "struct sockaddr" void; do
6073  for arg3 in socklen_t size_t int; do
6074    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6075/* end confdefs.h.  */
6076
6077#ifdef HAVE_SYS_TYPES_H
6078#  include <sys/types.h>
6079#endif
6080#ifdef HAVE_SYS_SOCKET_H
6081#  include <sys/socket.h>
6082#endif
6083      extern int getpeername(int sockfd, $arg2 *addr, $arg3 *addrlen);
6084
6085int
6086main ()
6087{
6088
6089      $arg3 addrlen;
6090      getpeername(0, 0, &addrlen);
6091
6092  ;
6093  return 0;
6094}
6095_ACEOF
6096if ac_fn_c_try_compile "$LINENO"; then :
6097
6098      zbx_socklen_t="$arg3"
6099      break 2
6100
6101fi
6102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6103  done
6104done
6105if test "x$zbx_socklen_t" != "x"; then
6106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $zbx_socklen_t" >&5
6107$as_echo "$zbx_socklen_t" >&6; }
6108
6109cat >>confdefs.h <<_ACEOF
6110#define ZBX_SOCKLEN_T $zbx_socklen_t
6111_ACEOF
6112
6113else
6114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: leaving undefined" >&5
6115$as_echo "leaving undefined" >&6; }
6116fi
6117
6118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for integer field name in union sigval of struct siginfo_t" >&5
6119$as_echo_n "checking for integer field name in union sigval of struct siginfo_t... " >&6; }
6120zbx_sival_int=
6121for field in sival_int sigval_int; do
6122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123/* end confdefs.h.  */
6124
6125#ifdef HAVE_SIGNAL_H
6126#  include <signal.h>
6127#endif
6128
6129int
6130main ()
6131{
6132
6133    siginfo_t siginfo;
6134    siginfo.si_value.$field = 0;
6135
6136  ;
6137  return 0;
6138}
6139_ACEOF
6140if ac_fn_c_try_compile "$LINENO"; then :
6141
6142    zbx_sival_int="$field"
6143    break
6144
6145fi
6146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6147done
6148if test "x$zbx_sival_int" != "x"; then
6149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $zbx_sival_int" >&5
6150$as_echo "$zbx_sival_int" >&6; }
6151
6152cat >>confdefs.h <<_ACEOF
6153#define ZBX_SIVAL_INT $zbx_sival_int
6154_ACEOF
6155
6156else
6157  as_fn_error $? "Unable to find integer field name in union sigval of struct siginfo_t" "$LINENO" 5
6158fi
6159
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ninit" >&5
6161$as_echo_n "checking for res_ninit... " >&6; }
6162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6163/* end confdefs.h.  */
6164
6165#ifdef HAVE_SYS_TYPES_H
6166#	include <sys/types.h>
6167#endif
6168#ifdef HAVE_NETINET_IN_H
6169#	include <netinet/in.h>
6170#endif
6171#ifdef HAVE_ARPA_NAMESER_H
6172#	include <arpa/nameser.h>
6173#endif
6174#ifdef HAVE_RESOLV_H
6175#	include <resolv.h>
6176#endif
6177#ifndef C_IN
6178#	define C_IN	ns_c_in
6179#endif	/* C_IN */
6180#ifndef T_SOA
6181#	define T_SOA	ns_t_soa
6182#endif	/* T_SOA */
6183
6184int
6185main ()
6186{
6187
6188	struct __res_state	res_state_local;
6189
6190	res_ninit(&res_state_local);
6191
6192  ;
6193  return 0;
6194}
6195_ACEOF
6196if ac_fn_c_try_link "$LINENO"; then :
6197
6198$as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h
6199
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6201$as_echo "yes" >&6; }
6202else
6203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6204$as_echo "no" >&6; }
6205fi
6206rm -f core conftest.err conftest.$ac_objext \
6207    conftest$ac_exeext conftest.$ac_ext
6208
6209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy" >&5
6210$as_echo_n "checking for res_ndestroy... " >&6; }
6211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6212/* end confdefs.h.  */
6213
6214#ifdef HAVE_SYS_TYPES_H
6215#	include <sys/types.h>
6216#endif
6217#ifdef HAVE_NETINET_IN_H
6218#	include <netinet/in.h>
6219#endif
6220#ifdef HAVE_ARPA_NAMESER_H
6221#	include <arpa/nameser.h>
6222#endif
6223#ifdef HAVE_RESOLV_H
6224#	include <resolv.h>
6225#endif
6226#ifndef C_IN
6227#	define C_IN	ns_c_in
6228#endif	/* C_IN */
6229#ifndef T_SOA
6230#	define T_SOA	ns_t_soa
6231#endif	/* T_SOA */
6232
6233int
6234main ()
6235{
6236
6237	struct __res_state	res_state_local;
6238
6239	res_ninit(&res_state_local);
6240	res_ndestroy(&res_state_local);
6241
6242  ;
6243  return 0;
6244}
6245_ACEOF
6246if ac_fn_c_try_link "$LINENO"; then :
6247
6248$as_echo "#define HAVE_RES_NDESTROY 1" >>confdefs.h
6249
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6251$as_echo "yes" >&6; }
6252else
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256rm -f core conftest.err conftest.$ac_objext \
6257    conftest$ac_exeext conftest.$ac_ext
6258
6259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._u._ext.nsaddrs" >&5
6260$as_echo_n "checking for _res._u._ext.nsaddrs... " >&6; }
6261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6262/* end confdefs.h.  */
6263
6264#ifdef HAVE_SYS_TYPES_H
6265#	include <sys/types.h>
6266#endif
6267#ifdef HAVE_NETINET_IN_H
6268#	include <netinet/in.h>
6269#endif
6270#ifdef HAVE_ARPA_NAMESER_H
6271#	include <arpa/nameser.h>
6272#endif
6273#ifdef HAVE_RESOLV_H
6274#	include <resolv.h>
6275#endif
6276#ifndef C_IN
6277#	define C_IN	ns_c_in
6278#endif	/* C_IN */
6279#ifndef T_SOA
6280#	define T_SOA	ns_t_soa
6281#endif	/* T_SOA */
6282
6283int
6284main ()
6285{
6286
6287	struct sockaddr_in6	*sockaddrin6;
6288
6289	sockaddrin6 = _res._u._ext.nsaddrs[0];
6290
6291  ;
6292  return 0;
6293}
6294_ACEOF
6295if ac_fn_c_try_link "$LINENO"; then :
6296
6297$as_echo "#define HAVE_RES_U_EXT 1" >>confdefs.h
6298
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6300$as_echo "yes" >&6; }
6301else
6302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303$as_echo "no" >&6; }
6304fi
6305rm -f core conftest.err conftest.$ac_objext \
6306    conftest$ac_exeext conftest.$ac_ext
6307
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._u._ext.ext" >&5
6309$as_echo_n "checking for _res._u._ext.ext... " >&6; }
6310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6311/* end confdefs.h.  */
6312
6313#ifdef HAVE_SYS_TYPES_H
6314#	include <sys/types.h>
6315#endif
6316#ifdef HAVE_NETINET_IN_H
6317#	include <netinet/in.h>
6318#endif
6319#ifdef HAVE_ARPA_NAMESER_H
6320#	include <arpa/nameser.h>
6321#endif
6322#ifdef HAVE_RESOLV_H
6323#	include <resolv.h>
6324#endif
6325#ifndef C_IN
6326#	define C_IN	ns_c_in
6327#endif	/* C_IN */
6328#ifndef T_SOA
6329#	define T_SOA	ns_t_soa
6330#endif	/* T_SOA */
6331
6332int
6333main ()
6334{
6335
6336	struct __res_state_ext	*ext;
6337
6338	ext = _res._u._ext.ext;
6339
6340  ;
6341  return 0;
6342}
6343_ACEOF
6344if ac_fn_c_try_link "$LINENO"; then :
6345
6346$as_echo "#define HAVE_RES_U_EXT_EXT 1" >>confdefs.h
6347
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6349$as_echo "yes" >&6; }
6350else
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352$as_echo "no" >&6; }
6353fi
6354rm -f core conftest.err conftest.$ac_objext \
6355    conftest$ac_exeext conftest.$ac_ext
6356
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._ext.ext.nsaddrs" >&5
6358$as_echo_n "checking for _res._ext.ext.nsaddrs... " >&6; }
6359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6360/* end confdefs.h.  */
6361
6362#ifdef HAVE_SYS_TYPES_H
6363#	include <sys/types.h>
6364#endif
6365#ifdef HAVE_NETINET_IN_H
6366#	include <netinet/in.h>
6367#endif
6368#ifdef HAVE_ARPA_NAMESER_H
6369#	include <arpa/nameser.h>
6370#endif
6371#ifdef HAVE_RESOLV_H
6372#	include <resolv.h>
6373#endif
6374#ifndef C_IN
6375#	define C_IN	ns_c_in
6376#endif	/* C_IN */
6377#ifndef T_SOA
6378#	define T_SOA	ns_t_soa
6379#endif	/* T_SOA */
6380
6381int
6382main ()
6383{
6384
6385	union res_sockaddr_union	*na;
6386
6387	na = &_res._ext.ext.nsaddrs[0];
6388
6389  ;
6390  return 0;
6391}
6392_ACEOF
6393if ac_fn_c_try_link "$LINENO"; then :
6394
6395$as_echo "#define HAVE_RES_EXT_EXT 1" >>confdefs.h
6396
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6398$as_echo "yes" >&6; }
6399else
6400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401$as_echo "no" >&6; }
6402fi
6403rm -f core conftest.err conftest.$ac_objext \
6404    conftest$ac_exeext conftest.$ac_ext
6405
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6.sin6_len" >&5
6407$as_echo_n "checking for struct sockaddr_in6.sin6_len... " >&6; }
6408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6409/* end confdefs.h.  */
6410
6411#ifdef HAVE_SYS_TYPES_H
6412#	include <sys/types.h>
6413#endif
6414#ifdef HAVE_NETINET_IN_H
6415#	include <netinet/in.h>
6416#endif
6417#ifdef HAVE_ARPA_NAMESER_H
6418#	include <arpa/nameser.h>
6419#endif
6420#ifdef HAVE_RESOLV_H
6421#	include <resolv.h>
6422#endif
6423#ifndef C_IN
6424#	define C_IN	ns_c_in
6425#endif	/* C_IN */
6426#ifndef T_SOA
6427#	define T_SOA	ns_t_soa
6428#endif	/* T_SOA */
6429
6430int
6431main ()
6432{
6433
6434	struct sockaddr_in6	sin6;
6435	unsigned int		len;
6436
6437	len = sin6.sin6_len;
6438
6439  ;
6440  return 0;
6441}
6442_ACEOF
6443if ac_fn_c_try_link "$LINENO"; then :
6444
6445$as_echo "#define HAVE_RES_SIN6_LEN 1" >>confdefs.h
6446
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6448$as_echo "yes" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453rm -f core conftest.err conftest.$ac_objext \
6454    conftest$ac_exeext conftest.$ac_ext
6455
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for union semun" >&5
6457$as_echo_n "checking for union semun... " >&6; }
6458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6459/* end confdefs.h.  */
6460
6461#include <sys/types.h>
6462#include <sys/ipc.h>
6463#include <sys/sem.h>
6464
6465int
6466main ()
6467{
6468union semun foo;
6469  ;
6470  return 0;
6471}
6472_ACEOF
6473if ac_fn_c_try_compile "$LINENO"; then :
6474
6475$as_echo "#define HAVE_SEMUN 1" >>confdefs.h
6476
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6478$as_echo "yes" >&6; }
6479else
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6484
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct swaptable in sys/swap.h" >&5
6486$as_echo_n "checking for struct swaptable in sys/swap.h... " >&6; }
6487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6488/* end confdefs.h.  */
6489
6490#include <stdlib.h>
6491#include <sys/types.h>
6492#include <sys/syscall.h>
6493#include <sys/swap.h>
6494
6495#ifndef NULL
6496#define NULL (void *)0
6497#endif
6498
6499int
6500main ()
6501{
6502
6503    register int cnt, i;
6504    register int t, f;
6505    struct swaptable *swt;
6506    struct swapent *ste;
6507    static char path[256];
6508
6509    /* get total number of swap entries */
6510    cnt = swapctl(SC_GETNSWP, 0);
6511
6512    /* allocate enough space to hold count + n swapents */
6513    swt = (struct swaptable *)malloc(sizeof(int) +
6514             cnt * sizeof(struct swapent));
6515    if (swt == NULL)
6516    {
6517  return;
6518    }
6519    swt->swt_n = cnt;
6520
6521    /* fill in ste_path pointers: we do not care about the paths, so we
6522point
6523       them all to the same buffer */
6524    ste = &(swt->swt_ent[0]);
6525    i = cnt;
6526    while (--i >= 0)
6527    {
6528  ste++->ste_path = path;
6529    }
6530
6531    /* grab all swap info */
6532    swapctl(SC_LIST, swt);
6533
6534    /* walk through the structs and sum up the fields */
6535    t = f = 0;
6536    ste = &(swt->swt_ent[0]);
6537    i = cnt;
6538    while (--i >= 0)
6539    {
6540  /* do not count slots being deleted */
6541  if (!(ste->ste_flags & ST_INDEL) &&
6542      !(ste->ste_flags & ST_DOINGDEL))
6543  {
6544      t += ste->ste_pages;
6545      f += ste->ste_free;
6546  } ste++;
6547    }
6548
6549    /* fill in the results */
6550    free(swt);
6551
6552
6553  ;
6554  return 0;
6555}
6556_ACEOF
6557if ac_fn_c_try_compile "$LINENO"; then :
6558
6559$as_echo "#define HAVE_SYS_SWAP_SWAPTABLE 1" >>confdefs.h
6560
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6562$as_echo "yes" >&6; }
6563else
6564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6568
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sensordev in sys/sensors.h" >&5
6570$as_echo_n "checking for struct sensordev in sys/sensors.h... " >&6; }
6571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6572/* end confdefs.h.  */
6573
6574#include <stdlib.h>
6575#include <sys/queue.h>
6576#include <sys/sensors.h>
6577int
6578main ()
6579{
6580struct sensordev sensordev;
6581sensordev.xname[0]='\0';
6582sensordev.maxnumt[0]=0;
6583
6584  ;
6585  return 0;
6586}
6587_ACEOF
6588if ac_fn_c_try_compile "$LINENO"; then :
6589
6590$as_echo "#define HAVE_SENSORDEV 1" >>confdefs.h
6591
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6593$as_echo "yes" >&6; }
6594else
6595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596$as_echo "no" >&6; }
6597fi
6598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6599
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statvfs64 in sys/statvfs.h" >&5
6601$as_echo_n "checking for struct statvfs64 in sys/statvfs.h... " >&6; }
6602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6603/* end confdefs.h.  */
6604
6605#ifdef HAVE_SYS_TYPES_H
6606#	include <sys/types.h>
6607#endif
6608#ifdef HAVE_SYS_STATVFS_H
6609#	include <sys/statvfs.h>
6610#endif
6611
6612int
6613main ()
6614{
6615
6616	struct statvfs64	s;
6617	s.f_frsize = s.f_blocks = s.f_bfree = s.f_bavail = 0;
6618	statvfs64("/", &s);
6619
6620  ;
6621  return 0;
6622}
6623_ACEOF
6624if ac_fn_c_try_compile "$LINENO"; then :
6625
6626$as_echo "#define HAVE_SYS_STATVFS64 1" >>confdefs.h
6627
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6629$as_echo "yes" >&6; }
6630else
6631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632$as_echo "no" >&6; }
6633fi
6634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6635
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statfs64 in sys/statfs.h" >&5
6637$as_echo_n "checking for struct statfs64 in sys/statfs.h... " >&6; }
6638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6639/* end confdefs.h.  */
6640
6641#ifdef HAVE_SYS_TYPES_H
6642#	include <sys/types.h>
6643#endif
6644#ifdef HAVE_SYS_STATFS_H
6645#	include <sys/statfs.h>
6646#endif
6647
6648int
6649main ()
6650{
6651
6652	struct statfs64	s;
6653	s.f_bsize = s.f_blocks = s.f_bfree = s.f_bavail = 0;
6654	statfs64("/", &s);
6655
6656  ;
6657  return 0;
6658}
6659_ACEOF
6660if ac_fn_c_try_compile "$LINENO"; then :
6661
6662$as_echo "#define HAVE_SYS_STATFS64 1" >>confdefs.h
6663
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6665$as_echo "yes" >&6; }
6666else
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6668$as_echo "no" >&6; }
6669fi
6670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6671
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field ss_family in struct sockaddr_storage" >&5
6673$as_echo_n "checking for field ss_family in struct sockaddr_storage... " >&6; }
6674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675/* end confdefs.h.  */
6676#include <sys/socket.h>
6677int
6678main ()
6679{
6680struct sockaddr_storage ss;
6681ss.ss_family = 0;
6682
6683  ;
6684  return 0;
6685}
6686_ACEOF
6687if ac_fn_c_try_compile "$LINENO"; then :
6688
6689$as_echo "#define HAVE_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
6690
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6692$as_echo "yes" >&6; }
6693else
6694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6695$as_echo "no" >&6; }
6696fi
6697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6698
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field mem_unit in struct sysinfo" >&5
6700$as_echo_n "checking for field mem_unit in struct sysinfo... " >&6; }
6701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6702/* end confdefs.h.  */
6703#include <sys/sysinfo.h>
6704int
6705main ()
6706{
6707struct sysinfo sysinfo;
6708sysinfo.mem_unit=0;
6709
6710  ;
6711  return 0;
6712}
6713_ACEOF
6714if ac_fn_c_try_compile "$LINENO"; then :
6715
6716$as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
6717
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6719$as_echo "yes" >&6; }
6720else
6721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6722$as_echo "no" >&6; }
6723fi
6724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6725
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field freeswap in struct sysinfo" >&5
6727$as_echo_n "checking for field freeswap in struct sysinfo... " >&6; }
6728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729/* end confdefs.h.  */
6730#include <sys/sysinfo.h>
6731int
6732main ()
6733{
6734struct sysinfo sysinfo;
6735sysinfo.freeswap=0;
6736
6737  ;
6738  return 0;
6739}
6740_ACEOF
6741if ac_fn_c_try_compile "$LINENO"; then :
6742
6743$as_echo "#define HAVE_SYSINFO_FREESWAP 1" >>confdefs.h
6744
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6746$as_echo "yes" >&6; }
6747else
6748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749$as_echo "no" >&6; }
6750fi
6751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6752
6753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field totalswap in struct sysinfo" >&5
6754$as_echo_n "checking for field totalswap in struct sysinfo... " >&6; }
6755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756/* end confdefs.h.  */
6757#include <sys/sysinfo.h>
6758int
6759main ()
6760{
6761struct sysinfo sysinfo;
6762sysinfo.totalswap=0;
6763
6764  ;
6765  return 0;
6766}
6767_ACEOF
6768if ac_fn_c_try_compile "$LINENO"; then :
6769
6770$as_echo "#define HAVE_SYSINFO_TOTALSWAP 1" >>confdefs.h
6771
6772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6773$as_echo "yes" >&6; }
6774else
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776$as_echo "no" >&6; }
6777fi
6778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6779
6780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field totalram in struct sysinfo" >&5
6781$as_echo_n "checking for field totalram in struct sysinfo... " >&6; }
6782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6783/* end confdefs.h.  */
6784#include <sys/sysinfo.h>
6785int
6786main ()
6787{
6788struct sysinfo sysinfo;
6789sysinfo.totalram=0;
6790
6791  ;
6792  return 0;
6793}
6794_ACEOF
6795if ac_fn_c_try_compile "$LINENO"; then :
6796
6797$as_echo "#define HAVE_SYSINFO_TOTALRAM 1" >>confdefs.h
6798
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6800$as_echo "yes" >&6; }
6801else
6802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6803$as_echo "no" >&6; }
6804fi
6805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6806
6807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field sharedram in struct sysinfo" >&5
6808$as_echo_n "checking for field sharedram in struct sysinfo... " >&6; }
6809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810/* end confdefs.h.  */
6811#include <sys/sysinfo.h>
6812int
6813main ()
6814{
6815struct sysinfo sysinfo;
6816sysinfo.sharedram=0;
6817
6818  ;
6819  return 0;
6820}
6821_ACEOF
6822if ac_fn_c_try_compile "$LINENO"; then :
6823
6824$as_echo "#define HAVE_SYSINFO_SHAREDRAM 1" >>confdefs.h
6825
6826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6827$as_echo "yes" >&6; }
6828else
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6833
6834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field bufferram in struct sysinfo" >&5
6835$as_echo_n "checking for field bufferram in struct sysinfo... " >&6; }
6836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6837/* end confdefs.h.  */
6838#include <sys/sysinfo.h>
6839int
6840main ()
6841{
6842struct sysinfo sysinfo;
6843sysinfo.bufferram=0;
6844
6845  ;
6846  return 0;
6847}
6848_ACEOF
6849if ac_fn_c_try_compile "$LINENO"; then :
6850
6851$as_echo "#define HAVE_SYSINFO_BUFFERRAM 1" >>confdefs.h
6852
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6854$as_echo "yes" >&6; }
6855else
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6857$as_echo "no" >&6; }
6858fi
6859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6860
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field freeram in struct sysinfo" >&5
6862$as_echo_n "checking for field freeram in struct sysinfo... " >&6; }
6863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6864/* end confdefs.h.  */
6865#include <sys/sysinfo.h>
6866int
6867main ()
6868{
6869struct sysinfo sysinfo;
6870sysinfo.freeram=0;
6871
6872  ;
6873  return 0;
6874}
6875_ACEOF
6876if ac_fn_c_try_compile "$LINENO"; then :
6877
6878$as_echo "#define HAVE_SYSINFO_FREERAM 1" >>confdefs.h
6879
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6881$as_echo "yes" >&6; }
6882else
6883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6884$as_echo "no" >&6; }
6885fi
6886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6887
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field uptime in struct sysinfo" >&5
6889$as_echo_n "checking for field uptime in struct sysinfo... " >&6; }
6890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6891/* end confdefs.h.  */
6892#include <sys/sysinfo.h>
6893int
6894main ()
6895{
6896struct sysinfo sysinfo;
6897sysinfo.uptime=0;
6898
6899  ;
6900  return 0;
6901}
6902_ACEOF
6903if ac_fn_c_try_compile "$LINENO"; then :
6904
6905$as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
6906
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6908$as_echo "yes" >&6; }
6909else
6910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6911$as_echo "no" >&6; }
6912fi
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914
6915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field procs in struct sysinfo" >&5
6916$as_echo_n "checking for field procs in struct sysinfo... " >&6; }
6917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918/* end confdefs.h.  */
6919#include <sys/sysinfo.h>
6920int
6921main ()
6922{
6923struct sysinfo sysinfo;
6924sysinfo.procs=0;
6925
6926  ;
6927  return 0;
6928}
6929_ACEOF
6930if ac_fn_c_try_compile "$LINENO"; then :
6931
6932$as_echo "#define HAVE_SYSINFO_PROCS 1" >>confdefs.h
6933
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6935$as_echo "yes" >&6; }
6936else
6937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6938$as_echo "no" >&6; }
6939fi
6940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6941
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field tm_gmtoff in struct tm" >&5
6943$as_echo_n "checking for field tm_gmtoff in struct tm... " >&6; }
6944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h.  */
6946
6947#ifdef HAVE_SYS_TIME_H
6948#include <sys/time.h>
6949#endif	/* HAVE_SYS_TIME_H */
6950
6951#ifdef HAVE_TIME_H
6952#include <time.h>
6953#endif	/* HAVE_TIME_H */
6954
6955int
6956main ()
6957{
6958
6959	struct tm tm;
6960	tm.tm_gmtoff;
6961
6962  ;
6963  return 0;
6964}
6965_ACEOF
6966if ac_fn_c_try_compile "$LINENO"; then :
6967
6968$as_echo "#define HAVE_TM_TM_GMTOFF 1" >>confdefs.h
6969
6970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6971$as_echo "yes" >&6; }
6972else
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974$as_echo "no" >&6; }
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field updates in struct vminfo_t" >&5
6979$as_echo_n "checking for field updates in struct vminfo_t... " >&6; }
6980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6981/* end confdefs.h.  */
6982
6983#include <sys/sysinfo.h>
6984
6985int
6986main ()
6987{
6988
6989	vminfo_t vminfo;
6990	vminfo.updates;
6991
6992  ;
6993  return 0;
6994}
6995_ACEOF
6996if ac_fn_c_try_compile "$LINENO"; then :
6997
6998$as_echo "#define HAVE_VMINFO_T_UPDATES 1" >>confdefs.h
6999
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7001$as_echo "yes" >&6; }
7002else
7003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7004$as_echo "no" >&6; }
7005fi
7006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7007
7008
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysconf() in unistd.h" >&5
7010$as_echo_n "checking for function sysconf() in unistd.h... " >&6; }
7011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7012/* end confdefs.h.  */
7013
7014#include <unistd.h>
7015
7016int
7017main ()
7018{
7019	int i;
7020
7021	i=sysconf(_SC_PHYS_PAGES)*sysconf(_SC_PHYS_PAGES);
7022	i=sysconf(_SC_AVPHYS_PAGES)*sysconf(_SC_PHYS_PAGES);
7023
7024  ;
7025  return 0;
7026}
7027_ACEOF
7028if ac_fn_c_try_compile "$LINENO"; then :
7029
7030$as_echo "#define HAVE_UNISTD_SYSCONF 1" >>confdefs.h
7031
7032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7033$as_echo "yes" >&6; }
7034else
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036$as_echo "no" >&6; }
7037fi
7038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7039
7040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function initgroups()" >&5
7041$as_echo_n "checking for function initgroups()... " >&6; }
7042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043/* end confdefs.h.  */
7044
7045#include <sys/types.h>
7046#include <grp.h>
7047
7048int
7049main ()
7050{
7051
7052	char	*user = "zabbix";
7053	initgroups(user, 0);
7054
7055  ;
7056  return 0;
7057}
7058_ACEOF
7059if ac_fn_c_try_link "$LINENO"; then :
7060
7061$as_echo "#define HAVE_FUNCTION_INITGROUPS 1" >>confdefs.h
7062
7063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7064$as_echo "yes" >&6; }
7065else
7066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7067$as_echo "no" >&6; }
7068fi
7069rm -f core conftest.err conftest.$ac_objext \
7070    conftest$ac_exeext conftest.$ac_ext
7071
7072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for functions seteuid() and setegid()" >&5
7073$as_echo_n "checking for functions seteuid() and setegid()... " >&6; }
7074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7075/* end confdefs.h.  */
7076
7077#include <sys/types.h>
7078#include <unistd.h>
7079
7080int
7081main ()
7082{
7083
7084	seteuid(0);
7085	setegid(0);
7086
7087  ;
7088  return 0;
7089}
7090_ACEOF
7091if ac_fn_c_try_link "$LINENO"; then :
7092
7093$as_echo "#define HAVE_FUNCTION_SETEUID 1" >>confdefs.h
7094
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7096$as_echo "yes" >&6; }
7097else
7098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7099$as_echo "no" >&6; }
7100fi
7101rm -f core conftest.err conftest.$ac_objext \
7102    conftest$ac_exeext conftest.$ac_ext
7103
7104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function setproctitle()" >&5
7105$as_echo_n "checking for function setproctitle()... " >&6; }
7106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h.  */
7108
7109#include <sys/types.h>
7110#include <unistd.h>
7111
7112int
7113main ()
7114{
7115
7116	setproctitle("Test %d", 1);
7117
7118  ;
7119  return 0;
7120}
7121_ACEOF
7122if ac_fn_c_try_link "$LINENO"; then :
7123
7124$as_echo "#define HAVE_FUNCTION_SETPROCTITLE 1" >>confdefs.h
7125
7126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7127$as_echo "yes" >&6; }
7128else
7129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7130$as_echo "no" >&6; }
7131fi
7132rm -f core conftest.err conftest.$ac_objext \
7133    conftest$ac_exeext conftest.$ac_ext
7134
7135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctlbyname()" >&5
7136$as_echo_n "checking for function sysctlbyname()... " >&6; }
7137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h.  */
7139
7140#ifdef HAVE_SYS_TYPES_H
7141#include <sys/types.h>
7142#endif /* HAVE_SYS_TYPES_H */
7143
7144#ifdef HAVE_SYS_PARAM_H
7145#include <sys/param.h>
7146#endif /* HAVE_SYS_PARAM_H */
7147
7148#include <sys/sysctl.h>
7149
7150int
7151main ()
7152{
7153
7154	sysctlbyname("", 0, 0, 0, 0);
7155
7156  ;
7157  return 0;
7158}
7159_ACEOF
7160if ac_fn_c_try_link "$LINENO"; then :
7161
7162$as_echo "#define HAVE_FUNCTION_SYSCTLBYNAME 1" >>confdefs.h
7163
7164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7165$as_echo "yes" >&6; }
7166else
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7168$as_echo "no" >&6; }
7169fi
7170rm -f core conftest.err conftest.$ac_objext \
7171    conftest$ac_exeext conftest.$ac_ext
7172
7173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_BOOTTIME)" >&5
7174$as_echo_n "checking for function sysctl (KERN_BOOTTIME)... " >&6; }
7175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7176/* end confdefs.h.  */
7177
7178#ifdef HAVE_SYS_TYPES_H
7179#include <sys/types.h>
7180#endif /* HAVE_SYS_TYPES_H */
7181
7182#ifdef HAVE_SYS_PARAM_H
7183#include <sys/param.h>
7184#endif /* HAVE_SYS_PARAM_H */
7185
7186#include <sys/sysctl.h>
7187#include <unistd.h>
7188#include <time.h>
7189#include <sys/time.h>
7190
7191int
7192main ()
7193{
7194
7195	size_t		len;
7196	struct timeval	uptime;
7197        int		mib[2];
7198
7199        mib[0] = CTL_KERN;
7200        mib[1] = KERN_BOOTTIME;
7201
7202        len = sizeof(uptime);
7203        sysctl(mib, 2, &uptime, &len, 0, 0);
7204
7205  ;
7206  return 0;
7207}
7208_ACEOF
7209if ac_fn_c_try_compile "$LINENO"; then :
7210
7211$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_BOOTTIME 1" >>confdefs.h
7212
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7214$as_echo "yes" >&6; }
7215else
7216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
7218fi
7219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7220
7221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (HW_NCPU)" >&5
7222$as_echo_n "checking for function sysctl (HW_NCPU)... " >&6; }
7223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7224/* end confdefs.h.  */
7225
7226#ifdef HAVE_SYS_TYPES_H
7227#include <sys/types.h>
7228#endif /* HAVE_SYS_TYPES_H */
7229
7230#ifdef HAVE_SYS_PARAM_H
7231#include <sys/param.h>
7232#endif /* HAVE_SYS_PARAM_H */
7233
7234#include <sys/sysctl.h>
7235
7236int
7237main ()
7238{
7239
7240	size_t	len;
7241	int	mib[2], ncpu;
7242
7243	mib[0] = CTL_HW;
7244	mib[1] = HW_NCPU;
7245
7246	len = sizeof(ncpu);
7247	sysctl(mib, 2, &ncpu, &len, 0, 0);
7248
7249  ;
7250  return 0;
7251}
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254
7255$as_echo "#define HAVE_FUNCTION_SYSCTL_HW_NCPU 1" >>confdefs.h
7256
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7258$as_echo "yes" >&6; }
7259else
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7264
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_MAXFILES)" >&5
7266$as_echo_n "checking for function sysctl (KERN_MAXFILES)... " >&6; }
7267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7268/* end confdefs.h.  */
7269
7270#ifdef HAVE_SYS_TYPES_H
7271#include <sys/types.h>
7272#endif /* HAVE_SYS_TYPES_H */
7273
7274#ifdef HAVE_SYS_PARAM_H
7275#include <sys/param.h>
7276#endif /* HAVE_SYS_PARAM_H */
7277
7278#include <sys/sysctl.h>
7279
7280int
7281main ()
7282{
7283
7284	size_t	len;
7285        int	mib[2], maxfiles;
7286
7287        mib[0] = CTL_KERN;
7288        mib[1] = KERN_MAXFILES;
7289
7290        len = sizeof(maxfiles);
7291        sysctl(mib, 2, &maxfiles, &len, 0, 0);
7292
7293  ;
7294  return 0;
7295}
7296_ACEOF
7297if ac_fn_c_try_compile "$LINENO"; then :
7298
7299$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_MAXFILES 1" >>confdefs.h
7300
7301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7302$as_echo "yes" >&6; }
7303else
7304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7305$as_echo "no" >&6; }
7306fi
7307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7308
7309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_MAXPROC)" >&5
7310$as_echo_n "checking for function sysctl (KERN_MAXPROC)... " >&6; }
7311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7312/* end confdefs.h.  */
7313
7314#ifdef HAVE_SYS_TYPES_H
7315#include <sys/types.h>
7316#endif /* HAVE_SYS_TYPES_H */
7317
7318#ifdef HAVE_SYS_PARAM_H
7319#include <sys/param.h>
7320#endif /* HAVE_SYS_PARAM_H */
7321
7322#include <sys/sysctl.h>
7323
7324int
7325main ()
7326{
7327
7328	size_t	len;
7329	int	mib[2], maxproc;
7330
7331        mib[0] = CTL_KERN;
7332        mib[1] = KERN_MAXPROC;
7333
7334        len = sizeof(maxproc);
7335        sysctl(mib, 2, &maxproc, &len, 0, 0);
7336
7337  ;
7338  return 0;
7339}
7340_ACEOF
7341if ac_fn_c_try_compile "$LINENO"; then :
7342
7343$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_MAXPROC 1" >>confdefs.h
7344
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7346$as_echo "yes" >&6; }
7347else
7348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349$as_echo "no" >&6; }
7350fi
7351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7352
7353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_CPTIME,KERN_CPTIME2)" >&5
7354$as_echo_n "checking for function sysctl (KERN_CPTIME,KERN_CPTIME2)... " >&6; }
7355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7356/* end confdefs.h.  */
7357
7358#include <sys/param.h>
7359#include <sys/sysctl.h>
7360#if defined(HAVE_SYS_DKSTAT_H)
7361#	include <sys/dkstat.h>
7362#elif defined(HAVE_SYS_SCHED_H)
7363#	include <sys/sched.h>
7364#endif
7365
7366int
7367main ()
7368{
7369
7370size_t	sz;
7371int	i[] = {CP_USER, CP_NICE, CP_SYS, CP_INTR, CP_IDLE};
7372
7373{
7374	long	states[CPUSTATES];
7375	int	mib[2] = {CTL_KERN, KERN_CPTIME};
7376
7377	sz = sizeof(states);
7378	sysctl(mib, 2, &states, &sz, NULL, 0);
7379}
7380
7381{
7382	u_int64_t	states[CPUSTATES];
7383	int		mib[3] = {CTL_KERN, KERN_CPTIME2, 0};
7384
7385	sz = sizeof(states);
7386	sysctl(mib, 3, &states, &sz, NULL, 0);
7387}
7388
7389  ;
7390  return 0;
7391}
7392_ACEOF
7393if ac_fn_c_try_compile "$LINENO"; then :
7394
7395$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_CPTIME 1" >>confdefs.h
7396
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7398$as_echo "yes" >&6; }
7399else
7400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7401$as_echo "no" >&6; }
7402fi
7403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7404
7405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function clock_gettime in time.h" >&5
7406$as_echo_n "checking for function clock_gettime in time.h... " >&6; }
7407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7408/* end confdefs.h.  */
7409
7410#ifdef HAVE_TIME_H
7411#	include <time.h>
7412#elif HAVE_SYS_TIME_H
7413#	include <sys/time.h>
7414#endif	/* HAVE_SYS_TIME_H */
7415
7416int
7417main ()
7418{
7419struct timespec tp;
7420clock_gettime(CLOCK_REALTIME, &tp);
7421
7422  ;
7423  return 0;
7424}
7425_ACEOF
7426if ac_fn_c_try_link "$LINENO"; then :
7427
7428$as_echo "#define HAVE_TIME_CLOCK_GETTIME 1" >>confdefs.h
7429
7430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7431$as_echo "yes" >&6; }
7432else
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434$as_echo "no" >&6; }
7435fi
7436rm -f core conftest.err conftest.$ac_objext \
7437    conftest$ac_exeext conftest.$ac_ext
7438
7439
7440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for macro __va_copy() in stdarg.h" >&5
7441$as_echo_n "checking for macro __va_copy() in stdarg.h... " >&6; }
7442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7443/* end confdefs.h.  */
7444
7445#include <stdarg.h>
7446
7447int
7448main ()
7449{
7450
7451	va_list	src,dst;
7452
7453	__va_copy(dst,src);
7454
7455  ;
7456  return 0;
7457}
7458_ACEOF
7459if ac_fn_c_try_compile "$LINENO"; then :
7460
7461$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
7462
7463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7464$as_echo "yes" >&6; }
7465else
7466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7467$as_echo "no" >&6; }
7468fi
7469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7470
7471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for macro __VA_ARGS__" >&5
7472$as_echo_n "checking for macro __VA_ARGS__... " >&6; }
7473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7474/* end confdefs.h.  */
7475
7476#define ZBX_CONST_STRING(str)   str
7477int test(const char *fmt, ...) { return 0; }
7478
7479int
7480main ()
7481{
7482
7483#define TEST(fmt, ...) test(ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
7484TEST("%s","test");
7485TEST("test");
7486
7487  ;
7488  return 0;
7489}
7490_ACEOF
7491if ac_fn_c_try_compile "$LINENO"; then :
7492
7493$as_echo "#define HAVE___VA_ARGS__ 1" >>confdefs.h
7494
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7496$as_echo "yes" >&6; }
7497else
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7502
7503
7504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7505$as_echo_n "checking return type of signal handlers... " >&6; }
7506if ${ac_cv_type_signal+:} false; then :
7507  $as_echo_n "(cached) " >&6
7508else
7509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7510/* end confdefs.h.  */
7511#include <sys/types.h>
7512#include <signal.h>
7513
7514int
7515main ()
7516{
7517return *(signal (0, 0)) (0) == 1;
7518  ;
7519  return 0;
7520}
7521_ACEOF
7522if ac_fn_c_try_compile "$LINENO"; then :
7523  ac_cv_type_signal=int
7524else
7525  ac_cv_type_signal=void
7526fi
7527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7528fi
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7530$as_echo "$ac_cv_type_signal" >&6; }
7531
7532cat >>confdefs.h <<_ACEOF
7533#define RETSIGTYPE $ac_cv_type_signal
7534_ACEOF
7535
7536
7537ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
7538if test "x$ac_cv_func_getloadavg" = xyes; then :
7539  $as_echo "#define HAVE_GETLOADAVG 1" >>confdefs.h
7540
7541else
7542  case " $LIBOBJS " in
7543  *" getloadavg.$ac_objext "* ) ;;
7544  *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
7545 ;;
7546esac
7547
7548fi
7549
7550
7551for ac_func in hstrerror
7552do :
7553  ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror"
7554if test "x$ac_cv_func_hstrerror" = xyes; then :
7555  cat >>confdefs.h <<_ACEOF
7556#define HAVE_HSTRERROR 1
7557_ACEOF
7558
7559fi
7560done
7561
7562for ac_func in getenv
7563do :
7564  ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv"
7565if test "x$ac_cv_func_getenv" = xyes; then :
7566  cat >>confdefs.h <<_ACEOF
7567#define HAVE_GETENV 1
7568_ACEOF
7569
7570fi
7571done
7572
7573for ac_func in putenv
7574do :
7575  ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
7576if test "x$ac_cv_func_putenv" = xyes; then :
7577  cat >>confdefs.h <<_ACEOF
7578#define HAVE_PUTENV 1
7579_ACEOF
7580
7581fi
7582done
7583
7584for ac_func in sigqueue
7585do :
7586  ac_fn_c_check_func "$LINENO" "sigqueue" "ac_cv_func_sigqueue"
7587if test "x$ac_cv_func_sigqueue" = xyes; then :
7588  cat >>confdefs.h <<_ACEOF
7589#define HAVE_SIGQUEUE 1
7590_ACEOF
7591
7592fi
7593done
7594
7595for ac_func in round
7596do :
7597  ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
7598if test "x$ac_cv_func_round" = xyes; then :
7599  cat >>confdefs.h <<_ACEOF
7600#define HAVE_ROUND 1
7601_ACEOF
7602
7603fi
7604done
7605
7606
7607
7608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc filesystem" >&5
7609$as_echo_n "checking for /proc filesystem... " >&6; }
7610if test -d /proc; then
7611	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7612$as_echo "yes" >&6; }
7613
7614$as_echo "#define HAVE_PROC 1" >>confdefs.h
7615
7616else
7617	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7618$as_echo "no" >&6; }
7619fi
7620
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/stat" >&5
7622$as_echo_n "checking for file /proc/stat... " >&6; }
7623if test -r /proc/stat; then
7624	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7625$as_echo "yes" >&6; }
7626
7627$as_echo "#define HAVE_PROC_STAT 1" >>confdefs.h
7628
7629else
7630	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7631$as_echo "no" >&6; }
7632fi
7633
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/cpuinfo" >&5
7635$as_echo_n "checking for file /proc/cpuinfo... " >&6; }
7636if test -r /proc/cpuinfo; then
7637	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7638$as_echo "yes" >&6; }
7639
7640$as_echo "#define HAVE_PROC_CPUINFO 1" >>confdefs.h
7641
7642else
7643	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644$as_echo "no" >&6; }
7645fi
7646
7647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/0/psinfo" >&5
7648$as_echo_n "checking for file /proc/0/psinfo... " >&6; }
7649if test -r /proc/0/psinfo; then
7650	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7651$as_echo "yes" >&6; }
7652
7653$as_echo "#define HAVE_PROC_0_PSINFO 1" >>confdefs.h
7654
7655else
7656	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657$as_echo "no" >&6; }
7658fi
7659
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/loadavg" >&5
7661$as_echo_n "checking for file /proc/loadavg... " >&6; }
7662if test -r /proc/loadavg; then
7663	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7664$as_echo "yes" >&6; }
7665
7666$as_echo "#define HAVE_PROC_LOADAVG 1" >>confdefs.h
7667
7668else
7669	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7670$as_echo "no" >&6; }
7671fi
7672
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/net/dev" >&5
7674$as_echo_n "checking for file /proc/net/dev... " >&6; }
7675if test -r /proc/net/dev; then
7676	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7677$as_echo "yes" >&6; }
7678
7679$as_echo "#define HAVE_PROC_NET_DEV 1" >>confdefs.h
7680
7681else
7682	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
7684fi
7685
7686
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long format" >&5
7688$as_echo_n "checking for long long format... " >&6; }
7689if test "$cross_compiling" = yes; then :
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
7692else
7693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7694/* end confdefs.h.  */
7695
7696#include <sys/types.h>
7697int main()
7698{
7699        uint64_t i;
7700
7701        sscanf("200000000010020", "%qu", &i);
7702
7703        if (i == 200000000010020) return 0;
7704        else return -1;
7705}
7706
7707_ACEOF
7708if ac_fn_c_try_run "$LINENO"; then :
7709
7710$as_echo "#define HAVE_LONG_LONG_QU 1 " >>confdefs.h
7711
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7713$as_echo "yes" >&6; }
7714else
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
7717fi
7718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7719  conftest.$ac_objext conftest.beam conftest.$ac_ext
7720fi
7721
7722
7723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic linking option" >&5
7724$as_echo_n "checking for -rdynamic linking option... " >&6; }
7725saved_LDFLAGS="$LDFLAGS"
7726LDFLAGS="-rdynamic $LDFLAGS"
7727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728/* end confdefs.h.  */
7729#include <execinfo.h>
7730int
7731main ()
7732{
7733void *bcktrc[6];
7734(void)backtrace(bcktrc, 6);
7735
7736  ;
7737  return 0;
7738}
7739_ACEOF
7740if ac_fn_c_try_link "$LINENO"; then :
7741  LDFLAGS="-rdynamic $saved_LDFLAGS"
7742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7743$as_echo "yes" >&6; }
7744else
7745  LDFLAGS="$saved_LDFLAGS"
7746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747$as_echo "no" >&6; }
7748fi
7749rm -f core conftest.err conftest.$ac_objext \
7750    conftest$ac_exeext conftest.$ac_ext
7751
7752
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperfstat 5.2.0.40 fileset" >&5
7754$as_echo_n "checking for libperfstat 5.2.0.40 fileset... " >&6; }
7755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7756/* end confdefs.h.  */
7757#include <sys/protosw.h>
7758#include <libperfstat.h>
7759int
7760main ()
7761{
7762perfstat_memory_total_t	memstats;
7763memstats.virt_active = 0;
7764
7765  ;
7766  return 0;
7767}
7768_ACEOF
7769if ac_fn_c_try_compile "$LINENO"; then :
7770
7771$as_echo "#define HAVE_AIXOSLEVEL_520004 1" >>confdefs.h
7772
7773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7774$as_echo "yes" >&6; }
7775else
7776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7777$as_echo "no" >&6; }
7778fi
7779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperfstat 5.3.0.60 fileset" >&5
7782$as_echo_n "checking for libperfstat 5.3.0.60 fileset... " >&6; }
7783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784/* end confdefs.h.  */
7785#include <sys/protosw.h>
7786#include <libperfstat.h>
7787int
7788main ()
7789{
7790perfstat_partition_total_t	lparstats;
7791lparstats.type.b.donate_enabled = 0;
7792lparstats.idle_donated_purr = 0;
7793lparstats.busy_donated_purr = 0;
7794lparstats.idle_stolen_purr = 0;
7795lparstats.busy_stolen_purr = 0;
7796
7797  ;
7798  return 0;
7799}
7800_ACEOF
7801if ac_fn_c_try_compile "$LINENO"; then :
7802
7803$as_echo "#define HAVE_AIXOSLEVEL_530006 1" >>confdefs.h
7804
7805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7806$as_echo "yes" >&6; }
7807else
7808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7809$as_echo "no" >&6; }
7810fi
7811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7812
7813case "$host_os" in
7814linux*)
7815	ARCH="linux"
7816	;;
7817aix*)
7818	ARCH="aix"
7819	;;
7820darwin*|rhapsody*)
7821	ARCH="osx"
7822
7823$as_echo "#define MAC_OS_X 1" >>confdefs.h
7824
7825	;;
7826*solaris*)
7827	ARCH="solaris"
7828	;;
7829hpux*)
7830	ARCH="hpux"
7831	;;
7832freebsd*)
7833	ARCH="freebsd"
7834	;;
7835netbsd*)
7836	ARCH="netbsd"
7837	;;
7838osf*)
7839	ARCH="osf"
7840	;;
7841openbsd*)
7842	ARCH="openbsd"
7843	;;
7844*)
7845	ARCH="unknown"
7846	;;
7847esac
7848
7849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for architecture" >&5
7850$as_echo_n "checking for architecture... " >&6; }
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH ($host_os)" >&5
7852$as_echo "$ARCH ($host_os)" >&6; }
7853
7854if test "x$ARCH" = "xlinux"; then
7855	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the linux kernel version" >&5
7856$as_echo_n "checking for the linux kernel version... " >&6; }
7857
7858	kernel=`uname -r`
7859
7860	case "${kernel}" in
7861		2.6.*)
7862			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6 family (${kernel})" >&5
7863$as_echo "2.6 family (${kernel})" >&6; }
7864
7865$as_echo "#define KERNEL_2_6 1" >>confdefs.h
7866
7867			;;
7868		2.4.*)
7869			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4 family (${kernel})" >&5
7870$as_echo "2.4 family (${kernel})" >&6; }
7871
7872$as_echo "#define KERNEL_2_4 1" >>confdefs.h
7873
7874			;;
7875		*)
7876			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown family (${kernel})" >&5
7877$as_echo "unknown family (${kernel})" >&6; }
7878			;;
7879	esac
7880fi
7881
7882if test "x$ARCH" = "xsolaris"; then
7883				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -m64 compilation flag" >&5
7884$as_echo_n "checking for -m64 compilation flag... " >&6; }
7885	saved_CFLAGS="$CFLAGS"
7886	CFLAGS="-m64"
7887	if test "$cross_compiling" = yes; then :
7888  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7890as_fn_error $? "cannot run test program while cross compiling
7891See \`config.log' for more details" "$LINENO" 5; }
7892else
7893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894/* end confdefs.h.  */
7895int main(void) {return 0;}
7896_ACEOF
7897if ac_fn_c_try_run "$LINENO"; then :
7898  CFLAGS="-m64 $saved_CFLAGS"
7899	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7900$as_echo "yes" >&6; }
7901else
7902  CFLAGS="$saved_CFLAGS"
7903	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7904$as_echo "no" >&6; }
7905fi
7906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7907  conftest.$ac_objext conftest.beam conftest.$ac_ext
7908fi
7909
7910fi
7911
7912if test "x$ARCH" = "xhpux"; then
7913				hpux_version=${host_os#hpux}
7914	hpux_major=${hpux_version%.*}
7915	hpux_minor=${hpux_version#*.}
7916
7917
7918cat >>confdefs.h <<_ACEOF
7919#define HPUX_VERSION $hpux_major$hpux_minor
7920_ACEOF
7921
7922
7923		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -D_HPUX_API_LEVEL=20040821 compilation flag" >&5
7924$as_echo_n "checking for -D_HPUX_API_LEVEL=20040821 compilation flag... " >&6; }
7925	saved_CFLAGS="$CFLAGS"
7926	CFLAGS="-D_HPUX_API_LEVEL=20040821"
7927	if test "$cross_compiling" = yes; then :
7928  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7930as_fn_error $? "cannot run test program while cross compiling
7931See \`config.log' for more details" "$LINENO" 5; }
7932else
7933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7934/* end confdefs.h.  */
7935
7936#ifdef HAVE_DLFCN_H
7937#	include <dlfcn.h>
7938#endif
7939#ifdef HAVE_SYS_UTSNAME_H
7940#	include <sys/utsname.h>
7941#endif
7942
7943int main(void)
7944{
7945	void		*p1, *p2;
7946	struct utsname	name;
7947
7948	/* check that the compiler (e.g., GCC 4.3.0 and above) supports function-level versioning */
7949
7950	p1 = uname;
7951	p2 = dlsym(RTLD_DEFAULT, "uname{20040821}");
7952
7953	if (p1 != p2)
7954		return 1;
7955
7956	/* uname() fails with EFAULT on HP-UX systems that were only partially upgraded to this API level */
7957
7958	return -1 == uname(&name) ? 1 : 0;
7959}
7960
7961_ACEOF
7962if ac_fn_c_try_run "$LINENO"; then :
7963  CFLAGS="-D_HPUX_API_LEVEL=20040821 $saved_CFLAGS"
7964	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7965$as_echo "yes" >&6; }
7966else
7967  CFLAGS="$saved_CFLAGS"
7968	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7969$as_echo "no" >&6; }
7970fi
7971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7972  conftest.$ac_objext conftest.beam conftest.$ac_ext
7973fi
7974
7975fi
7976
7977
7978cat >>confdefs.h <<_ACEOF
7979#define ARCH "${ARCH}"
7980_ACEOF
7981
7982
7983
7984# The cast to long int works around a bug in the HP C Compiler
7985# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7986# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7987# This bug is HP SR number 8606223364.
7988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7989$as_echo_n "checking size of void *... " >&6; }
7990if ${ac_cv_sizeof_void_p+:} false; then :
7991  $as_echo_n "(cached) " >&6
7992else
7993  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
7994
7995else
7996  if test "$ac_cv_type_void_p" = yes; then
7997     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7999as_fn_error 77 "cannot compute sizeof (void *)
8000See \`config.log' for more details" "$LINENO" 5; }
8001   else
8002     ac_cv_sizeof_void_p=0
8003   fi
8004fi
8005
8006fi
8007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8008$as_echo "$ac_cv_sizeof_void_p" >&6; }
8009
8010
8011
8012cat >>confdefs.h <<_ACEOF
8013#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8014_ACEOF
8015
8016
8017
8018
8019# Check whether --enable-static was given.
8020if test "${enable_static+set}" = set; then :
8021  enableval=$enable_static; case "${enableval}" in
8022  yes)
8023    LDFLAGS="${LDFLAGS} -static"
8024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static linking is possible" >&5
8025$as_echo_n "checking if static linking is possible... " >&6; }
8026    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8027/* end confdefs.h.  */
8028
8029int
8030main ()
8031{
8032
8033  ;
8034  return 0;
8035}
8036_ACEOF
8037if ac_fn_c_try_link "$LINENO"; then :
8038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8039$as_echo "yes" >&6; }
8040        static_linking=yes
8041else
8042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8043$as_echo "no" >&6; }
8044        static_linking=no
8045fi
8046rm -f core conftest.err conftest.$ac_objext \
8047    conftest$ac_exeext conftest.$ac_ext
8048      if test "x$static_linking" = "xno"; then
8049        as_fn_error $? "static linking is not possible on this system" "$LINENO" 5
8050      fi
8051    ;;
8052  no) ;;
8053  *) as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;;
8054esac
8055fi
8056
8057
8058# Check whether --enable-static-libs was given.
8059if test "${enable_static_libs+set}" = set; then :
8060  enableval=$enable_static_libs; case "${enableval}" in
8061  yes)
8062    static_linking_libs=yes
8063    saved_LIBS="$LIBS"
8064    LIBS="${saved_LIBS} -Wl,-bstatic -Wl,-bdynamic"
8065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libs static linking with \"-Wl,-b\" is possible" >&5
8066$as_echo_n "checking if libs static linking with \"-Wl,-b\" is possible... " >&6; }
8067    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8068/* end confdefs.h.  */
8069
8070int
8071main ()
8072{
8073
8074  ;
8075  return 0;
8076}
8077_ACEOF
8078if ac_fn_c_try_link "$LINENO"; then :
8079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8080$as_echo "yes" >&6; }
8081        static_linking_support="-Wl,-b"
8082else
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
8085        static_linking_support=no
8086fi
8087rm -f core conftest.err conftest.$ac_objext \
8088    conftest$ac_exeext conftest.$ac_ext
8089        LIBS="$saved_LIBS"
8090
8091    if test "x$static_linking_support" = "xno"; then
8092      LIBS="${saved_LIBS} -Wl,-Bstatic -Wl,-Bdynamic"
8093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libs static linking with \"-Wl,-B\" is possible" >&5
8094$as_echo_n "checking if libs static linking with \"-Wl,-B\" is possible... " >&6; }
8095      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8096/* end confdefs.h.  */
8097
8098int
8099main ()
8100{
8101
8102  ;
8103  return 0;
8104}
8105_ACEOF
8106if ac_fn_c_try_link "$LINENO"; then :
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8108$as_echo "yes" >&6; }
8109          static_linking_support="-Wl,-B"
8110else
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8112$as_echo "no" >&6; }
8113          static_linking_support=no
8114fi
8115rm -f core conftest.err conftest.$ac_objext \
8116    conftest$ac_exeext conftest.$ac_ext
8117          LIBS="$saved_LIBS"
8118    fi
8119    ;;
8120  no) ;;
8121  *) as_fn_error $? "bad value ${enableval} for --enable-static-libs" "$LINENO" 5 ;;
8122esac
8123fi
8124
8125
8126# Check whether --enable-server was given.
8127if test "${enable_server+set}" = set; then :
8128  enableval=$enable_server; case "${enableval}" in
8129  yes) server=yes ;;
8130  no)  server=no ;;
8131  *) as_fn_error $? "bad value ${enableval} for --enable-server" "$LINENO" 5 ;;
8132esac
8133else
8134  server=no
8135fi
8136
8137 if test "x$server" = "xyes"; then
8138  SERVER_TRUE=
8139  SERVER_FALSE='#'
8140else
8141  SERVER_TRUE='#'
8142  SERVER_FALSE=
8143fi
8144
8145
8146# Check whether --enable-proxy was given.
8147if test "${enable_proxy+set}" = set; then :
8148  enableval=$enable_proxy; case "${enableval}" in
8149  yes) proxy=yes ;;
8150  no)  proxy=no ;;
8151  *) as_fn_error $? "bad value ${enableval} for --enable-proxy" "$LINENO" 5 ;;
8152esac
8153else
8154  proxy=no
8155fi
8156
8157 if test "x$proxy" = "xyes"; then
8158  PROXY_TRUE=
8159  PROXY_FALSE='#'
8160else
8161  PROXY_TRUE='#'
8162  PROXY_FALSE=
8163fi
8164
8165
8166# Check whether --enable-agent was given.
8167if test "${enable_agent+set}" = set; then :
8168  enableval=$enable_agent; case "${enableval}" in
8169  yes) agent=yes ;;
8170  no)  agent=no ;;
8171  *) as_fn_error $? "bad value ${enableval} for --enable-agent" "$LINENO" 5 ;;
8172esac
8173else
8174  agent=no
8175fi
8176
8177 if test "x$agent" = "xyes"; then
8178  AGENT_TRUE=
8179  AGENT_FALSE='#'
8180else
8181  AGENT_TRUE='#'
8182  AGENT_FALSE=
8183fi
8184
8185
8186# Check whether --enable-java was given.
8187if test "${enable_java+set}" = set; then :
8188  enableval=$enable_java; case "${enableval}" in
8189  yes) java=yes ;;
8190  no)  java=no ;;
8191  *) as_fn_error $? "bad value ${enableval} for --enable-java" "$LINENO" 5 ;;
8192esac
8193else
8194  java=no
8195fi
8196
8197 if test "x$java" = "xyes"; then
8198  JAVA_TRUE=
8199  JAVA_FALSE='#'
8200else
8201  JAVA_TRUE='#'
8202  JAVA_FALSE=
8203fi
8204
8205
8206# Check whether --enable-ipv6 was given.
8207if test "${enable_ipv6+set}" = set; then :
8208  enableval=$enable_ipv6; case "${enableval}" in
8209  yes) ipv6=yes ;;
8210  no)  ipv6=no ;;
8211  *) as_fn_error $? "bad value ${enableval} for --enable-ipv6" "$LINENO" 5 ;;
8212esac
8213else
8214  ipv6=no
8215fi
8216
8217 if test "x$ipv6" = "xyes"; then
8218  IPV6_TRUE=
8219  IPV6_FALSE='#'
8220else
8221  IPV6_TRUE='#'
8222  IPV6_FALSE=
8223fi
8224
8225
8226 if test -d create; then
8227  DBSCHEMA_TRUE=
8228  DBSCHEMA_FALSE='#'
8229else
8230  DBSCHEMA_TRUE='#'
8231  DBSCHEMA_FALSE=
8232fi
8233
8234
8235 if (test -d tests/) && (test "x$server" = "xyes" || test "x$proxy" = "xyes" || test "x$agent" = "xyes"); then
8236  ZBXCMOCKA_TRUE=
8237  ZBXCMOCKA_FALSE='#'
8238else
8239  ZBXCMOCKA_TRUE='#'
8240  ZBXCMOCKA_FALSE=
8241fi
8242
8243
8244have_db="no"
8245have_unixodbc="no"
8246have_web_monitoring="no"
8247have_jabber="no"
8248have_snmp="no"
8249have_ipmi="no"
8250have_ipv6="no"
8251have_ssh="no"
8252have_tls="no"
8253
8254
8255if test "x$ipv6" = "xyes"; then
8256
8257$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8258
8259	have_ipv6="yes"
8260fi
8261
8262if test "x$server" = "xyes" || test "x$proxy" = "xyes"; then
8263
8264	have_multirow_insert="no"
8265
8266
8267
8268# Check whether --with-ibm-db2 was given.
8269if test "${with_ibm_db2+set}" = set; then :
8270  withval=$with_ibm_db2;
8271        if test "$withval" != "no"; then
8272            want_ibm_db2="yes"
8273            if test "$withval" != "yes"; then
8274                ibm_db2_include_dir="$withval/include"
8275                ibm_db2_lib_dir="$withval/lib"
8276            else
8277                ibm_db2_include_dir=/home/db2inst1/sqllib/include
8278                ibm_db2_lib_dir=/home/db2inst1/sqllib/lib
8279            fi
8280        fi
8281
8282
8283fi
8284
8285
8286# Check whether --with-ibm-db2-include was given.
8287if test "${with_ibm_db2_include+set}" = set; then :
8288  withval=$with_ibm_db2_include;
8289        if test "$withval" != "no"; then
8290            want_ibm_db2="yes"
8291            ibm_db2_include_dir="$withval"
8292        fi
8293
8294
8295fi
8296
8297
8298# Check whether --with-ibm-db2-lib was given.
8299if test "${with_ibm_db2_lib+set}" = set; then :
8300  withval=$with_ibm_db2_lib;
8301        if test "$withval" != "no"; then
8302            want_ibm_db2="yes"
8303            ibm_db2_lib_dir="$withval"
8304        fi
8305
8306
8307fi
8308
8309
8310    if test "x$want_ibm_db2" = "xyes"; then
8311        IBM_DB2_CPPFLAGS="-I$ibm_db2_include_dir"
8312        IBM_DB2_LDFLAGS="-L$ibm_db2_lib_dir"
8313        IBM_DB2_LIBS="-ldb2"
8314
8315        saved_CPPFLAGS="$CPPFLAGS"
8316        saved_LDFLAGS="$LDFLAGS"
8317        saved_LIBS="$LIBS"
8318        CPPFLAGS="$CPPFLAGS $IBM_DB2_CPPFLAGS"
8319        LDFLAGS="$LDFLAGS $IBM_DB2_LDFLAGS"
8320        LIBS="$LIBS $IBM_DB2_LIBS"
8321
8322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBM DB2 CLI libraries" >&5
8323$as_echo_n "checking for IBM DB2 CLI libraries... " >&6; }
8324        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8325/* end confdefs.h.  */
8326#include <sqlcli1.h>
8327int
8328main ()
8329{
8330SQLHANDLE hdbc;
8331                SQLRETURN sqlr;
8332                sqlr = SQLDriverConnect(hdbc, 0, "", SQL_NTS, 0, 0, 0, SQL_DRIVER_NOPROMPT);
8333
8334  ;
8335  return 0;
8336}
8337_ACEOF
8338if ac_fn_c_try_link "$LINENO"; then :
8339
8340$as_echo "#define HAVE_IBM_DB2 1" >>confdefs.h
8341
8342                found_ibm_db2="yes"
8343                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8344$as_echo "yes" >&6; }
8345else
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8347$as_echo "no" >&6; }
8348fi
8349rm -f core conftest.err conftest.$ac_objext \
8350    conftest$ac_exeext conftest.$ac_ext
8351
8352        CPPFLAGS="$saved_CPPFLAGS"
8353        LDFLAGS="$saved_LDFLAGS"
8354        LIBS="$saved_LIBS"
8355    fi
8356
8357	if test "x$want_ibm_db2" = "xyes"; then
8358		if test "x$have_db" != "xno"; then
8359			as_fn_error $? "You can configure for only one database." "$LINENO" 5
8360		fi
8361
8362		if test "x$found_ibm_db2" = "xyes"; then
8363			have_db="IBM DB2"
8364			have_multirow_insert="yes"
8365		else
8366			as_fn_error $? "IBM DB2 library not found" "$LINENO" 5
8367		fi
8368	fi
8369
8370
8371    MYSQL_CONFIG="no"
8372
8373
8374# Check whether --with-mysql was given.
8375if test "${with_mysql+set}" = set; then :
8376  withval=$with_mysql;
8377        if test "$withval" = "no"; then
8378            want_mysql="no"
8379        elif test "$withval" = "yes"; then
8380            want_mysql="yes"
8381        else
8382            want_mysql="yes"
8383            MYSQL_CONFIG="$withval"
8384        fi
8385
8386else
8387  want_mysql="no"
8388
8389fi
8390
8391
8392    MYSQL_CFLAGS=""
8393    MYSQL_LDFLAGS=""
8394    MYSQL_LIBS=""
8395    MYSQL_VERSION=""
8396
8397
8398    if test "$want_mysql" = "yes"; then
8399
8400        for ac_prog in mysql_config mariadb_config
8401do
8402  # Extract the first word of "$ac_prog", so it can be a program name with args.
8403set dummy $ac_prog; ac_word=$2
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405$as_echo_n "checking for $ac_word... " >&6; }
8406if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
8407  $as_echo_n "(cached) " >&6
8408else
8409  case $MYSQL_CONFIG in
8410  [\\/]* | ?:[\\/]*)
8411  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
8412  ;;
8413  *)
8414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415for as_dir in $PATH
8416do
8417  IFS=$as_save_IFS
8418  test -z "$as_dir" && as_dir=.
8419    for ac_exec_ext in '' $ac_executable_extensions; do
8420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8421    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8423    break 2
8424  fi
8425done
8426  done
8427IFS=$as_save_IFS
8428
8429  ;;
8430esac
8431fi
8432MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
8433if test -n "$MYSQL_CONFIG"; then
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
8435$as_echo "$MYSQL_CONFIG" >&6; }
8436else
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439fi
8440
8441
8442  test -n "$MYSQL_CONFIG" && break
8443done
8444
8445
8446        if test -x "$MYSQL_CONFIG"; then
8447            MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
8448            _full_libmysql_libs="`$MYSQL_CONFIG --libs`"
8449
8450            _save_mysql_ldflags="${LDFLAGS}"
8451            _save_mysql_cflags="${CFLAGS}"
8452            _save_mysql_libs="${LIBS}"
8453            LDFLAGS="${LDFLAGS} ${_full_libmysql_libs}"
8454            CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}"
8455
8456            for i in $_full_libmysql_libs; do
8457                case $i in
8458                    -lmysqlclient|-lperconaserverclient|-lmariadbclient|-lmariadb)
8459
8460                        _lib_name="`echo "$i" | cut -b3-`"
8461                        as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
8463$as_echo_n "checking for main in -l$_lib_name... " >&6; }
8464if eval \${$as_ac_Lib+:} false; then :
8465  $as_echo_n "(cached) " >&6
8466else
8467  ac_check_lib_save_LIBS=$LIBS
8468LIBS="-l$_lib_name  $LIBS"
8469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8470/* end confdefs.h.  */
8471
8472
8473int
8474main ()
8475{
8476return main ();
8477  ;
8478  return 0;
8479}
8480_ACEOF
8481if ac_fn_c_try_link "$LINENO"; then :
8482  eval "$as_ac_Lib=yes"
8483else
8484  eval "$as_ac_Lib=no"
8485fi
8486rm -f core conftest.err conftest.$ac_objext \
8487    conftest$ac_exeext conftest.$ac_ext
8488LIBS=$ac_check_lib_save_LIBS
8489fi
8490eval ac_res=\$$as_ac_Lib
8491	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8492$as_echo "$ac_res" >&6; }
8493if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8494
8495                            MYSQL_LIBS="-l${_lib_name} ${MYSQL_LIBS}"
8496
8497else
8498
8499                            as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
8500
8501fi
8502
8503                ;;
8504                    -L*)
8505
8506                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} $i"
8507                ;;
8508                    -R*)
8509
8510                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} -Wl,$i"
8511                ;;
8512                    -l*)
8513
8514                        _lib_name="`echo "$i" | cut -b3-`"
8515                        as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
8516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
8517$as_echo_n "checking for main in -l$_lib_name... " >&6; }
8518if eval \${$as_ac_Lib+:} false; then :
8519  $as_echo_n "(cached) " >&6
8520else
8521  ac_check_lib_save_LIBS=$LIBS
8522LIBS="-l$_lib_name  $LIBS"
8523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8524/* end confdefs.h.  */
8525
8526
8527int
8528main ()
8529{
8530return main ();
8531  ;
8532  return 0;
8533}
8534_ACEOF
8535if ac_fn_c_try_link "$LINENO"; then :
8536  eval "$as_ac_Lib=yes"
8537else
8538  eval "$as_ac_Lib=no"
8539fi
8540rm -f core conftest.err conftest.$ac_objext \
8541    conftest$ac_exeext conftest.$ac_ext
8542LIBS=$ac_check_lib_save_LIBS
8543fi
8544eval ac_res=\$$as_ac_Lib
8545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8546$as_echo "$ac_res" >&6; }
8547if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8548
8549                            MYSQL_LIBS="${MYSQL_LIBS} ${i}"
8550
8551else
8552
8553                            as_fn_error $? "Not found $i library" "$LINENO" 5
8554
8555fi
8556
8557                ;;
8558                esac
8559            done
8560
8561            LDFLAGS="${_save_mysql_ldflags}"
8562            CFLAGS="${_save_mysql_cflags}"
8563
8564            CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}"
8565            LDFLAGS="${LDFLAGS} ${MYSQL_LDFLAGS}"
8566            LIBS="${LIBS} ${MYSQL_LIBS}"
8567
8568
8569	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MariaDB init options function" >&5
8570$as_echo_n "checking for MariaDB init options function... " >&6; }
8571	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8572/* end confdefs.h.  */
8573
8574#include <mysql.h>
8575
8576int
8577main ()
8578{
8579
8580	MYSQL	*mysql;
8581
8582	mysql_optionsv(mysql, MYSQL_INIT_COMMAND, (void *)"set @@session.auto_increment_offset=1");
8583
8584  ;
8585  return 0;
8586}
8587_ACEOF
8588if ac_fn_c_try_link "$LINENO"; then :
8589
8590cat >>confdefs.h <<_ACEOF
8591#define MYSQL_OPTIONS mysql_optionsv
8592_ACEOF
8593
8594
8595cat >>confdefs.h <<_ACEOF
8596#define MYSQL_OPTIONS_ARGS_VOID_CAST (void *)
8597_ACEOF
8598
8599	found_mariadb_options="yes"
8600	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8601$as_echo "yes" >&6; }
8602else
8603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604$as_echo "no" >&6; }
8605fi
8606rm -f core conftest.err conftest.$ac_objext \
8607    conftest$ac_exeext conftest.$ac_ext
8608
8609            if test "$found_mariadb_options" != "yes"; then
8610
8611	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL init options function" >&5
8612$as_echo_n "checking for MySQL init options function... " >&6; }
8613	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8614/* end confdefs.h.  */
8615
8616#include <mysql.h>
8617
8618int
8619main ()
8620{
8621
8622	MYSQL		*mysql;
8623
8624	mysql_options(mysql, MYSQL_INIT_COMMAND, "set @@session.auto_increment_offset=1");
8625
8626  ;
8627  return 0;
8628}
8629_ACEOF
8630if ac_fn_c_try_link "$LINENO"; then :
8631
8632cat >>confdefs.h <<_ACEOF
8633#define MYSQL_OPTIONS mysql_options
8634_ACEOF
8635
8636
8637cat >>confdefs.h <<_ACEOF
8638#define MYSQL_OPTIONS_ARGS_VOID_CAST /**/
8639_ACEOF
8640
8641	found_mysql_options="yes"
8642	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8643$as_echo "yes" >&6; }
8644else
8645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8646$as_echo "no" >&6; }
8647fi
8648rm -f core conftest.err conftest.$ac_objext \
8649    conftest$ac_exeext conftest.$ac_ext
8650
8651                if test "$found_mysql_options" != "yes"; then
8652                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8653$as_echo "no" >&6; }
8654                    as_fn_error $? "Could not find the options function for mysql init" "$LINENO" 5
8655                fi
8656            fi
8657
8658            LDFLAGS="${_save_mysql_ldflags}"
8659            CFLAGS="${_save_mysql_cflags}"
8660            LIBS="${_save_mysql_libs}"
8661
8662            unset _save_mysql_ldflags
8663            unset _save_mysql_cflags
8664            unset _save_mysql_libs
8665
8666            MYSQL_VERSION=`$MYSQL_CONFIG --version`
8667
8668
8669$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
8670
8671
8672            found_mysql="yes"
8673        else
8674            found_mysql="no"
8675        fi
8676    fi
8677
8678
8679    mysql_version_req=
8680
8681    if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
8682
8683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MySQL version is >= $mysql_version_req" >&5
8684$as_echo_n "checking if MySQL version is >= $mysql_version_req... " >&6; }
8685
8686                        mysql_version_req_major=`expr $mysql_version_req : '\([0-9]*\)'`
8687        mysql_version_req_minor=`expr $mysql_version_req : '[0-9]*\.\([0-9]*\)'`
8688        mysql_version_req_micro=`expr $mysql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8689        if test "x$mysql_version_req_micro" = "x"; then
8690            mysql_version_req_micro="0"
8691        fi
8692
8693        mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
8694                                   \+ $mysql_version_req_minor \* 1000 \
8695                                   \+ $mysql_version_req_micro`
8696
8697                        mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'`
8698        mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'`
8699        mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8700        if test "x$mysql_version_micro" = "x"; then
8701            mysql_version_micro="0"
8702        fi
8703
8704        mysql_version_number=`expr $mysql_version_major \* 1000000 \
8705                                   \+ $mysql_version_minor \* 1000 \
8706                                   \+ $mysql_version_micro`
8707
8708        mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
8709        if test "$mysql_version_check" = "1"; then
8710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8711$as_echo "yes" >&6; }
8712        else
8713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714$as_echo "no" >&6; }
8715        fi
8716    fi
8717
8718
8719
8720
8721
8722
8723	if test "x$want_mysql" = "xyes"; then
8724		if test "x$have_db" != "xno"; then
8725			as_fn_error $? "You can configure for only one database." "$LINENO" 5
8726		fi
8727
8728		if test "x$found_mysql" = "xyes"; then
8729			have_db="MySQL"
8730			have_multirow_insert="yes"
8731		else
8732			as_fn_error $? "MySQL library not found" "$LINENO" 5
8733		fi
8734	fi
8735
8736
8737
8738# Check whether --with-oracle was given.
8739if test "${with_oracle+set}" = set; then :
8740  withval=$with_oracle;
8741        if test "$withval" = "no"; then
8742            want_oracle_oci="no"
8743        elif test "$withval" = "yes"; then
8744            want_oracle_oci="yes"
8745            oracle_home_dir="$ORACLE_HOME"
8746        elif test -d "$withval"; then
8747            want_oracle_oci="yes"
8748            oracle_home_dir="$withval"
8749        else
8750            want_oracle_oci="yes"
8751            oracle_home_dir=""
8752        fi
8753
8754else
8755  want_oracle_oci="no"
8756
8757fi
8758
8759
8760
8761# Check whether --with-oracle-include was given.
8762if test "${with_oracle_include+set}" = set; then :
8763  withval=$with_oracle_include;
8764        if test "$withval" != "no"; then
8765            want_oracle_oci="yes"
8766            oracle_home_include_dir="$withval"
8767        fi
8768
8769else
8770  oracle_home_include_dir=""
8771
8772fi
8773
8774
8775# Check whether --with-oracle-lib was given.
8776if test "${with_oracle_lib+set}" = set; then :
8777  withval=$with_oracle_lib;
8778        if test "$withval" != "no"; then
8779            want_oracle_oci="yes"
8780            oracle_home_lib_dir="$withval"
8781        fi
8782
8783else
8784  oracle_home_lib_dir=""
8785
8786fi
8787
8788
8789    ORACLE_OCI_CFLAGS=""
8790    ORACLE_OCI_LDFLAGS=""
8791    ORACLE_OCI_LIBS=""
8792    ORACLE_OCI_VERSION=""
8793
8794                want_oracle_but_no_path="no"
8795
8796    if test -n "$oracle_home_dir"; then
8797
8798        if test "$oracle_home_dir" != "no" -a "$oracle_home_dir" != "yes"; then
8799
8800                        oracle_include_dir="$oracle_home_dir/rdbms/public"
8801
8802                        oracle_include_dir2="$oracle_home_dir/rdbms/demo"
8803
8804                        oracle_lib_dir="$oracle_home_dir/lib"
8805        elif test "$oracle_home_dir" = "yes"; then
8806            want_oracle_but_no_path="yes"
8807        fi
8808
8809    elif test -n "$oracle_home_include_dir" -o -n "$oracle_home_lib_dir"; then
8810
8811        if test "$oracle_home_include_dir" != "no" -a "$oracle_home_include_dir" != "yes"; then
8812            oracle_include_dir="$oracle_home_include_dir"
8813        elif test "$oracle_home_include_dir" = "yes"; then
8814            want_oracle_but_no_path="yes"
8815        fi
8816
8817        if test "$oracle_home_lib_dir" != "no" -a "$oracle_home_lib_dir" != "yes"; then
8818            oracle_lib_dir="$oracle_home_lib_dir"
8819        elif test "$oracle_home_lib_dir" = "yes"; then
8820            want_oracle_but_no_path="yes"
8821        fi
8822    fi
8823
8824    if test "$want_oracle_but_no_path" = "yes"; then
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle support is requested but no Oracle paths have been provided. \
8826Please, locate Oracle directories using --with-oracle or \
8827--with-oracle-include and --with-oracle-lib options." >&5
8828$as_echo "$as_me: WARNING: Oracle support is requested but no Oracle paths have been provided. \
8829Please, locate Oracle directories using --with-oracle or \
8830--with-oracle-include and --with-oracle-lib options." >&2;}
8831    fi
8832
8833                if test -n "$oracle_include_dir" -a -n "$oracle_lib_dir"; then
8834
8835        saved_CPPFLAGS="$CPPFLAGS"
8836        CPPFLAGS="$CPPFLAGS -I$oracle_include_dir"
8837
8838                if test -n "$oracle_include_dir2"; then
8839            CPPFLAGS="$CPPFLAGS -I$oracle_include_dir2"
8840        fi
8841
8842                        saved_LDFLAGS="$LDFLAGS"
8843        oci_ldflags="-L$oracle_lib_dir"
8844        LDFLAGS="$LDFLAGS $oci_ldflags"
8845
8846        saved_LIBS="$LIBS"
8847        oci_libs="-lclntsh"
8848        LIBS="$LIBS $oci_libs"
8849
8850                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI headers in $oracle_include_dir" >&5
8851$as_echo_n "checking for Oracle OCI headers in $oracle_include_dir... " >&6; }
8852
8853                if test -f "$oracle_include_dir/ociver.h"; then
8854            oracle_version_file="ociver.h"
8855        else
8856            oracle_version_file="oci.h"
8857        fi
8858
8859        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8860/* end confdefs.h.  */
8861
8862            #include <$oracle_version_file>
8863int
8864main ()
8865{
8866
8867#if defined(OCI_MAJOR_VERSION)
8868#if OCI_MAJOR_VERSION == 10 && OCI_MINOR_VERSION == 2
8869// Oracle 10.2 detected
8870#endif
8871#elif defined(OCI_V7_SYNTAX)
8872// OK, older Oracle detected
8873// TODO - mloskot: find better macro to check for older versions;
8874#else
8875#  error Oracle $oracle_version_file header not found
8876#endif
8877
8878
8879  ;
8880  return 0;
8881}
8882_ACEOF
8883if ac_fn_c_try_compile "$LINENO"; then :
8884
8885            ORACLE_OCI_CFLAGS="-I$oracle_include_dir"
8886
8887            if test -n "$oracle_include_dir2"; then
8888                ORACLE_OCI_CFLAGS="$ORACLE_OCI_CFLAGS -I$oracle_include_dir2"
8889            fi
8890
8891            oci_header_found="yes"
8892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8893$as_echo "yes" >&6; }
8894
8895else
8896
8897            oci_header_found="no"
8898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8899$as_echo "not found" >&6; }
8900
8901
8902fi
8903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8904
8905                                oracle_version_req=10.0
8906
8907        if test "$oci_header_found" = "yes"; then
8908
8909            oracle_version_major=`cat $oracle_include_dir/$oracle_version_file \
8910                                 | grep '#define.*OCI_MAJOR_VERSION.*' \
8911                                 | sed -e 's/#define OCI_MAJOR_VERSION  *//' \
8912                                 | sed -e 's/  *\/\*.*\*\///'`
8913
8914            oracle_version_minor=`cat $oracle_include_dir/$oracle_version_file \
8915                                 | grep '#define.*OCI_MINOR_VERSION.*' \
8916                                 | sed -e 's/#define OCI_MINOR_VERSION  *//' \
8917                                 | sed -e 's/  *\/\*.*\*\///'`
8918
8919                        oracle_version_number=`expr $oracle_version_major \* 1000000 \
8920                                  \+ $oracle_version_minor \* 1000`
8921
8922
8923            if test -n "$oracle_version_req"; then
8924                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle OCI version is >= $oracle_version_req" >&5
8925$as_echo_n "checking if Oracle OCI version is >= $oracle_version_req... " >&6; }
8926
8927                if test -n "$oracle_version_major" -a -n $"oracle_version_minor"; then
8928
8929                    ORACLE_OCI_VERSION="$oracle_version_major.$oracle_version_minor"
8930
8931                                                            oracle_version_req_major=`expr $oracle_version_req : '\([0-9]*\)'`
8932                    oracle_version_req_minor=`expr $oracle_version_req : '[0-9]*\.\([0-9]*\)'`
8933
8934                    oracle_version_req_number=`expr $oracle_version_req_major \* 1000000 \
8935                                               \+ $oracle_version_req_minor \* 1000`
8936
8937                    oracle_version_check=`expr $oracle_version_number \>\= $oracle_version_req_number`
8938                    if test "$oracle_version_check" = "1"; then
8939
8940                        oracle_version_checked="yes"
8941                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8942$as_echo "yes" >&6; }
8943
8944                    else
8945                        oracle_version_checked="no"
8946                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8947$as_echo "no" >&6; }
8948                        as_fn_error $? "Oracle $ORACLE_OCI_VERSION found, but required version is $oracle_version_req" "$LINENO" 5
8949                    fi
8950                else
8951                    ORACLE_OCI_VERSION="UNKNOWN"
8952                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8953$as_echo "no" >&6; }
8954                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&5
8955$as_echo "$as_me: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&2;}
8956                fi
8957            fi
8958
8959                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI version >= 10.x to use -lnnz1x flag" >&5
8960$as_echo_n "checking for Oracle OCI version >= 10.x to use -lnnz1x flag... " >&6; }
8961            oracle_nnz1x_flag=`expr $oracle_version_number / 1000000`
8962            if test "$oracle_nnz1x_flag" -ge 10; then
8963                oci_libs="$oci_libs -lnnz$oracle_nnz1x_flag"
8964                LIBS="$LIBS -lnnz$oracle_nnz1x_flag"
8965                { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lnnz$oracle_nnz1x_flag" >&5
8966$as_echo "-lnnz$oracle_nnz1x_flag" >&6; }
8967            else
8968                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8969$as_echo "no" >&6; }
8970            fi
8971        fi
8972
8973                                if test "$oci_header_found" = "yes"; then
8974
8975            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI libraries in $oracle_lib_dir" >&5
8976$as_echo_n "checking for Oracle OCI libraries in $oracle_lib_dir... " >&6; }
8977
8978            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8979/* end confdefs.h.  */
8980
8981                #include <oci.h>
8982int
8983main ()
8984{
8985
8986OCIEnv* envh = 0;
8987OCIEnvNlsCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0, 0, 0);
8988if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
8989
8990
8991  ;
8992  return 0;
8993}
8994_ACEOF
8995if ac_fn_c_try_link "$LINENO"; then :
8996
8997                ORACLE_OCI_LDFLAGS="$oci_ldflags"
8998                ORACLE_OCI_LIBS="$oci_libs"
8999                oci_lib_found="yes"
9000                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9001$as_echo "yes" >&6; }
9002
9003else
9004
9005                oci_lib_found="no"
9006                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9007$as_echo "not found" >&6; }
9008
9009
9010fi
9011rm -f core conftest.err conftest.$ac_objext \
9012    conftest$ac_exeext conftest.$ac_ext
9013        fi
9014
9015        CPPFLAGS="$saved_CPPFLAGS"
9016        LDFLAGS="$saved_LDFLAGS"
9017        LIBS="$saved_LIBS"
9018    fi
9019
9020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle support" >&5
9021$as_echo_n "checking for Oracle support... " >&6; }
9022
9023    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes"; then
9024
9025
9026
9027
9028
9029
9030        HAVE_ORACLE_OCI="yes"
9031    else
9032        HAVE_ORACLE_OCI="no"
9033    fi
9034
9035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ORACLE_OCI" >&5
9036$as_echo "$HAVE_ORACLE_OCI" >&6; }
9037
9038	if test "x$want_oracle_oci" = "xyes"; then
9039		if test "x$have_db" != "xno"; then
9040			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9041		fi
9042
9043		if test "x$HAVE_ORACLE_OCI" = "xyes"; then
9044			have_db="Oracle"
9045
9046			ORACLE_CPPFLAGS="$ORACLE_OCI_CFLAGS"
9047			ORACLE_LDFLAGS="$ORACLE_OCI_LDFLAGS"
9048			ORACLE_LIBS="$ORACLE_OCI_LIBS"
9049
9050
9051$as_echo "#define HAVE_ORACLE 1" >>confdefs.h
9052
9053		else
9054			as_fn_error $? "Oracle OCI library not found" "$LINENO" 5
9055		fi
9056	fi
9057
9058
9059    PG_CONFIG="no"
9060
9061
9062# Check whether --with-postgresql was given.
9063if test "${with_postgresql+set}" = set; then :
9064  withval=$with_postgresql;
9065        if test "x$withval" = "xno"; then
9066            want_postgresql="no"
9067        elif test "x$withval" = "xyes"; then
9068            want_postgresql="yes"
9069        else
9070            want_postgresql="yes"
9071            PG_CONFIG="$withval"
9072        fi
9073
9074else
9075  want_postgresql="no"
9076
9077fi
9078
9079
9080    POSTGRESQL_CFLAGS=""
9081    POSTGRESQL_LDFLAGS=""
9082    POSTGRESQL_LIBS=""
9083    POSTGRESQL_VERSION=""
9084
9085
9086    if test "x$want_postgresql" = "xyes"; then
9087        # Extract the first word of "pg_config", so it can be a program name with args.
9088set dummy pg_config; ac_word=$2
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9090$as_echo_n "checking for $ac_word... " >&6; }
9091if ${ac_cv_path_PG_CONFIG+:} false; then :
9092  $as_echo_n "(cached) " >&6
9093else
9094  case $PG_CONFIG in
9095  [\\/]* | ?:[\\/]*)
9096  ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path.
9097  ;;
9098  *)
9099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9100for as_dir in $PATH
9101do
9102  IFS=$as_save_IFS
9103  test -z "$as_dir" && as_dir=.
9104    for ac_exec_ext in '' $ac_executable_extensions; do
9105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9106    ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9108    break 2
9109  fi
9110done
9111  done
9112IFS=$as_save_IFS
9113
9114  ;;
9115esac
9116fi
9117PG_CONFIG=$ac_cv_path_PG_CONFIG
9118if test -n "$PG_CONFIG"; then
9119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
9120$as_echo "$PG_CONFIG" >&6; }
9121else
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123$as_echo "no" >&6; }
9124fi
9125
9126
9127
9128        if test -x "$PG_CONFIG"; then
9129            POSTGRESQL_CFLAGS="`$PG_CONFIG --includedir`"
9130            if test -n "$POSTGRESQL_CFLAGS"; then
9131                POSTGRESQL_CFLAGS="-I$POSTGRESQL_CFLAGS";
9132            fi
9133            POSTGRESQL_LDFLAGS="`$PG_CONFIG --libdir`"
9134            if test -n "$POSTGRESQL_LDFLAGS"; then
9135                POSTGRESQL_LDFLAGS="-L$POSTGRESQL_LDFLAGS";
9136            fi
9137            POSTGRESQL_LIBS="-lpq"
9138
9139            _save_postgresql_cflags="${CFLAGS}"
9140            _save_postgresql_ldflags="${LDFLAGS}"
9141            _save_postgresql_libs="${LIBS}"
9142            CFLAGS="${CFLAGS} ${POSTGRESQL_CFLAGS}"
9143            LDFLAGS="${LDFLAGS} ${POSTGRESQL_LDFLAGS}"
9144            LIBS="${LIBS} ${POSTGRESQL_LIBS}"
9145
9146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL libraries" >&5
9147$as_echo_n "checking for PostgreSQL libraries... " >&6; }
9148            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9149/* end confdefs.h.  */
9150
9151#include <libpq-fe.h>
9152
9153int
9154main ()
9155{
9156
9157PGconn	*conn;
9158conn = PQsetdbLogin(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
9159
9160  ;
9161  return 0;
9162}
9163_ACEOF
9164if ac_fn_c_try_link "$LINENO"; then :
9165
9166$as_echo "#define HAVE_POSTGRESQL 1" >>confdefs.h
9167
9168            found_postgresql="yes"
9169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9170$as_echo "yes" >&6; }
9171else
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
9174fi
9175rm -f core conftest.err conftest.$ac_objext \
9176    conftest$ac_exeext conftest.$ac_ext
9177
9178            CFLAGS="${_save_postgresql_cflags}"
9179            LDFLAGS="${_save_postgresql_ldflags}"
9180            LIBS="${_save_postgresql_libs}"
9181            unset _save_postgresql_cflags
9182            unset _save_postgresql_ldflags
9183            unset _save_postgresql_libs
9184
9185            if test "x$found_postgresql" = "xyes"; then
9186                POSTGRESQL_VERSION=`$PG_CONFIG --version | cut -d' ' -f2`
9187            fi
9188        fi
9189    fi
9190
9191
9192    postgresql_version_req="8.1"
9193
9194    if test "x$found_postgresql" = "xyes" -a -n "$postgresql_version_req"; then
9195
9196                        postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([0-9]*\)'`
9197        postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[0-9]*\.\([0-9]*\)'`
9198        postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9199        if test "x$postgresql_version_minor" = "x"; then
9200            postgresql_version_minor="0"
9201        fi
9202        if test "x$postgresql_version_micro" = "x"; then
9203            postgresql_version_micro="0"
9204        fi
9205
9206        postgresql_version_number=`expr $postgresql_version_major \* 1000000 \
9207                                   \+ $postgresql_version_minor \* 1000 \
9208                                   \+ $postgresql_version_micro`
9209
9210        if test -n "$postgresql_version_req"; then
9211
9212            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PostgreSQL version is >= $postgresql_version_req" >&5
9213$as_echo_n "checking if PostgreSQL version is >= $postgresql_version_req... " >&6; }
9214
9215                                    postgresql_version_req_major=`expr $postgresql_version_req : '\([0-9]*\)'`
9216            postgresql_version_req_minor=`expr $postgresql_version_req : '[0-9]*\.\([0-9]*\)'`
9217            postgresql_version_req_micro=`expr $postgresql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9218            if test "x$postgresql_version_req_micro" = "x"; then
9219                postgresql_version_req_micro="0"
9220            fi
9221
9222            postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \
9223                                       \+ $postgresql_version_req_minor \* 1000 \
9224                                       \+ $postgresql_version_req_micro`
9225
9226            postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number`
9227            if test "$postgresql_version_check" = "1"; then
9228                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9229$as_echo "yes" >&6; }
9230            else
9231                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9232$as_echo "no" >&6; }
9233            fi
9234
9235	fi
9236
9237    fi
9238
9239
9240
9241
9242
9243
9244	if test "x$want_postgresql" = "xyes"; then
9245		if test "x$have_db" != "xno"; then
9246			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9247		fi
9248
9249		if test "x$found_postgresql" = "xyes"; then
9250			if test "$postgresql_version_check" != "1"; then
9251				as_fn_error $? "PostgreSQL version mismatch" "$LINENO" 5
9252			fi
9253
9254			have_db="PostgreSQL"
9255
9256			if test "$postgresql_version_number" -ge 8002000; then
9257				have_multirow_insert="yes"
9258			fi
9259
9260		else
9261			as_fn_error $? "PostgreSQL library not found" "$LINENO" 5
9262		fi
9263	fi
9264
9265
9266
9267# Check whether --with-sqlite3 was given.
9268if test "${with_sqlite3+set}" = set; then :
9269  withval=$with_sqlite3;
9270        if test "$withval" = "no"; then
9271            want_sqlite3="no"
9272        elif test "$withval" = "yes"; then
9273            want_sqlite3="yes"
9274            ac_sqlite3_path=""
9275        else
9276            want_sqlite3="yes"
9277            ac_sqlite3_path="$withval"
9278        fi
9279
9280else
9281  want_sqlite3="no"
9282
9283fi
9284
9285
9286    SQLITE3_CFLAGS=""
9287    SQLITE3_LDFLAGS=""
9288    SQLITE3_LIBS=""
9289    SQLITE3_VERSION=""
9290
9291    if test "x$want_sqlite3" = "xyes"; then
9292
9293        ac_sqlite3_header="sqlite3.h"
9294
9295        sqlite3_version_req=3.0.0
9296        sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([0-9]*\.[0-9]*\)'`
9297        sqlite3_version_req_major=`expr $sqlite3_version_req : '\([0-9]*\)'`
9298        sqlite3_version_req_minor=`expr $sqlite3_version_req : '[0-9]*\.\([0-9]*\)'`
9299        sqlite3_version_req_micro=`expr $sqlite3_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9300        if test "x$sqlite3_version_req_micro" = "x" ; then
9301            sqlite3_version_req_micro="0"
9302        fi
9303
9304        sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \
9305                                   \+ $sqlite3_version_req_minor \* 1000 \
9306                                   \+ $sqlite3_version_req_micro`
9307
9308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLite3 library >= $sqlite3_version_req" >&5
9309$as_echo_n "checking for SQLite3 library >= $sqlite3_version_req... " >&6; }
9310
9311        if test "$ac_sqlite3_path" != ""; then
9312            ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
9313            ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
9314        else
9315            for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do
9316                if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
9317                    && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
9318                    ac_sqlite3_path=$ac_sqlite3_path_tmp
9319                    ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
9320                    ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
9321                    break;
9322                fi
9323            done
9324        fi
9325
9326        saved_CPPFLAGS="$CPPFLAGS"
9327        CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags"
9328
9329        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9330/* end confdefs.h.  */
9331
9332            #include <sqlite3.h>
9333int
9334main ()
9335{
9336
9337#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number)
9338// Everything is okay
9339#else
9340#  error SQLite version is too old
9341#endif
9342
9343
9344  ;
9345  return 0;
9346}
9347
9348_ACEOF
9349if ac_fn_c_try_compile "$LINENO"; then :
9350
9351            found_sqlite3="yes"
9352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9353$as_echo "yes" >&6; }
9354
9355else
9356
9357            found_sqlite3="no"
9358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
9360
9361
9362fi
9363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9364
9365        CPPFLAGS="$saved_CPPFLAGS"
9366
9367        if test "$found_sqlite3" = "yes"; then
9368
9369            SQLITE3_CPPFLAGS="$ac_sqlite3_cppflags"
9370            SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
9371            SQLITE3_LIBS="-lsqlite3"
9372
9373            ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
9374
9375                        if test "x$ac_sqlite3_header_path" != "x"; then
9376                ac_sqlite3_version=`cat $ac_sqlite3_header_path \
9377                    | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \
9378                        | sed -e 's/"//'`
9379                if test $ac_sqlite3_version != ""; then
9380                    SQLITE3_VERSION=$ac_sqlite3_version
9381                else
9382                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&5
9383$as_echo "$as_me: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&2;}
9384                fi
9385            fi
9386
9387
9388
9389
9390
9391
9392$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
9393
9394        fi
9395    fi
9396
9397	if test "x$want_sqlite3" = "xyes"; then
9398		if test "x$server" = "xyes"; then
9399			as_fn_error $? "SQLite is not supported as a main Zabbix database backend." "$LINENO" 5
9400		fi
9401
9402		if test "x$have_db" != "xno"; then
9403			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9404		fi
9405
9406		if test "x$found_sqlite3" = "xyes"; then
9407			have_db="SQLite v3.x"
9408
9409			saved_CPPFLAGS="$CPPFLAGS"
9410			saved_LDFLAGS="$LDFLAGS"
9411
9412			CPPFLAGS="$CPPFLAGS $SQLITE3_CPPFLAGS"
9413			LDFLAGS="$LDFLAGS $SQLITE3_LDFLAGS $SQLITE3_LIBS"
9414
9415			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sqlite3_open_v2() in sqlite3.h" >&5
9416$as_echo_n "checking for function sqlite3_open_v2() in sqlite3.h... " >&6; }
9417			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9418/* end confdefs.h.  */
9419#include <sqlite3.h>
9420int
9421main ()
9422{
9423sqlite3 *conn = 0;
9424				sqlite3_open_v2("dbname", &conn, SQLITE_OPEN_READWRITE, 0);
9425
9426  ;
9427  return 0;
9428}
9429_ACEOF
9430if ac_fn_c_try_link "$LINENO"; then :
9431
9432$as_echo "#define HAVE_FUNCTION_SQLITE3_OPEN_V2 1" >>confdefs.h
9433
9434				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9435$as_echo "yes" >&6; }
9436else
9437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438$as_echo "no" >&6; }
9439fi
9440rm -f core conftest.err conftest.$ac_objext \
9441    conftest$ac_exeext conftest.$ac_ext
9442
9443			CPPFLAGS="$saved_CPPFLAGS"
9444			LDFLAGS="$saved_LDFLAGS"
9445		else
9446			as_fn_error $? "SQLite3 library not found" "$LINENO" 5
9447		fi
9448	fi
9449
9450	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Zabbix server/proxy database selection" >&5
9451$as_echo_n "checking for Zabbix server/proxy database selection... " >&6; }
9452	if test "x$have_db" = "xno"; then
9453		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
9454$as_echo "error" >&6; }
9455		as_fn_error $? "No database selected for Zabbix server/proxy. Use --with-ibm-db2 or --with-mysql or --with-oracle or --with-postgresql or --with-sqlite3." "$LINENO" 5
9456	else
9457		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9458$as_echo "ok" >&6; }
9459	fi
9460
9461	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multirow insert statements" >&5
9462$as_echo_n "checking for multirow insert statements... " >&6; }
9463	if test "x$have_multirow_insert" = "xyes"; then
9464
9465$as_echo "#define HAVE_MULTIROW_INSERT 1" >>confdefs.h
9466
9467		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9468$as_echo "yes" >&6; }
9469	else
9470		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9471$as_echo "no" >&6; }
9472	fi
9473
9474	DB_CFLAGS="$IBM_DB2_CPPFLAGS $MYSQL_CFLAGS $ORACLE_CPPFLAGS $POSTGRESQL_CFLAGS $SQLITE3_CPPFLAGS"
9475	DB_LDFLAGS="$IBM_DB2_LDFLAGS $MYSQL_LDFLAGS $ORACLE_LDFLAGS $POSTGRESQL_LDFLAGS $SQLITE3_LDFLAGS"
9476	DB_LIBS="$IBM_DB2_LIBS $MYSQL_LIBS $ORACLE_LIBS $POSTGRESQL_LIBS $SQLITE3_LIBS"
9477
9478
9479
9480
9481
9482	SERVER_LDFLAGS="${SERVER_LDFLAGS} ${DB_LDFLAGS}"
9483	SERVER_LIBS="${SERVER_LIBS} ${DB_LIBS}"
9484
9485	PROXY_LDFLAGS="${PROXY_LDFLAGS} ${DB_LDFLAGS}"
9486	PROXY_LIBS="${PROXY_LIBS} ${DB_LIBS}"
9487
9488
9489
9490
9491
9492
9493
9494
9495if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9496	if test -n "$ac_tool_prefix"; then
9497  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9498set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9500$as_echo_n "checking for $ac_word... " >&6; }
9501if ${ac_cv_path_PKG_CONFIG+:} false; then :
9502  $as_echo_n "(cached) " >&6
9503else
9504  case $PKG_CONFIG in
9505  [\\/]* | ?:[\\/]*)
9506  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9507  ;;
9508  *)
9509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9510for as_dir in $PATH
9511do
9512  IFS=$as_save_IFS
9513  test -z "$as_dir" && as_dir=.
9514    for ac_exec_ext in '' $ac_executable_extensions; do
9515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9516    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9518    break 2
9519  fi
9520done
9521  done
9522IFS=$as_save_IFS
9523
9524  ;;
9525esac
9526fi
9527PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9528if test -n "$PKG_CONFIG"; then
9529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9530$as_echo "$PKG_CONFIG" >&6; }
9531else
9532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533$as_echo "no" >&6; }
9534fi
9535
9536
9537fi
9538if test -z "$ac_cv_path_PKG_CONFIG"; then
9539  ac_pt_PKG_CONFIG=$PKG_CONFIG
9540  # Extract the first word of "pkg-config", so it can be a program name with args.
9541set dummy pkg-config; ac_word=$2
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9543$as_echo_n "checking for $ac_word... " >&6; }
9544if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9545  $as_echo_n "(cached) " >&6
9546else
9547  case $ac_pt_PKG_CONFIG in
9548  [\\/]* | ?:[\\/]*)
9549  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9550  ;;
9551  *)
9552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9553for as_dir in $PATH
9554do
9555  IFS=$as_save_IFS
9556  test -z "$as_dir" && as_dir=.
9557    for ac_exec_ext in '' $ac_executable_extensions; do
9558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9559    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9561    break 2
9562  fi
9563done
9564  done
9565IFS=$as_save_IFS
9566
9567  ;;
9568esac
9569fi
9570ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9571if test -n "$ac_pt_PKG_CONFIG"; then
9572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9573$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9574else
9575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9576$as_echo "no" >&6; }
9577fi
9578
9579  if test "x$ac_pt_PKG_CONFIG" = x; then
9580    PKG_CONFIG=""
9581  else
9582    case $cross_compiling:$ac_tool_warned in
9583yes:)
9584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9586ac_tool_warned=yes ;;
9587esac
9588    PKG_CONFIG=$ac_pt_PKG_CONFIG
9589  fi
9590else
9591  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9592fi
9593
9594fi
9595if test -n "$PKG_CONFIG"; then
9596	_pkg_min_version=0.9.0
9597	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9598$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9599	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9600		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9601$as_echo "yes" >&6; }
9602	else
9603		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604$as_echo "no" >&6; }
9605		PKG_CONFIG=""
9606	fi
9607fi
9608
9609
9610# Check whether --with-jabber was given.
9611if test "${with_jabber+set}" = set; then :
9612  withval=$with_jabber;
9613	if test "$withval" = "no"; then
9614            want_jabber="no"
9615            _libiksemel_with="no"
9616        elif test "$withval" = "yes"; then
9617            want_jabber="yes"
9618            _libiksemel_with="yes"
9619        else
9620            want_jabber="yes"
9621            _libiksemel_with=$withval
9622        fi
9623
9624else
9625  _libiksemel_with=no
9626fi
9627
9628
9629  if test "x$_libiksemel_with" != x"no"; then
9630       if test "$_libiksemel_with" = "yes"; then
9631
9632pkg_failed=no
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IKSEMEL" >&5
9634$as_echo_n "checking for IKSEMEL... " >&6; }
9635
9636if test -n "$IKSEMEL_CFLAGS"; then
9637    pkg_cv_IKSEMEL_CFLAGS="$IKSEMEL_CFLAGS"
9638 elif test -n "$PKG_CONFIG"; then
9639    if test -n "$PKG_CONFIG" && \
9640    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"iksemel\""; } >&5
9641  ($PKG_CONFIG --exists --print-errors "iksemel") 2>&5
9642  ac_status=$?
9643  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9644  test $ac_status = 0; }; then
9645  pkg_cv_IKSEMEL_CFLAGS=`$PKG_CONFIG --cflags "iksemel" 2>/dev/null`
9646		      test "x$?" != "x0" && pkg_failed=yes
9647else
9648  pkg_failed=yes
9649fi
9650 else
9651    pkg_failed=untried
9652fi
9653if test -n "$IKSEMEL_LIBS"; then
9654    pkg_cv_IKSEMEL_LIBS="$IKSEMEL_LIBS"
9655 elif test -n "$PKG_CONFIG"; then
9656    if test -n "$PKG_CONFIG" && \
9657    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"iksemel\""; } >&5
9658  ($PKG_CONFIG --exists --print-errors "iksemel") 2>&5
9659  ac_status=$?
9660  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9661  test $ac_status = 0; }; then
9662  pkg_cv_IKSEMEL_LIBS=`$PKG_CONFIG --libs "iksemel" 2>/dev/null`
9663		      test "x$?" != "x0" && pkg_failed=yes
9664else
9665  pkg_failed=yes
9666fi
9667 else
9668    pkg_failed=untried
9669fi
9670
9671
9672
9673if test $pkg_failed = yes; then
9674   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676
9677if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9678        _pkg_short_errors_supported=yes
9679else
9680        _pkg_short_errors_supported=no
9681fi
9682        if test $_pkg_short_errors_supported = yes; then
9683	        IKSEMEL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "iksemel" 2>&1`
9684        else
9685	        IKSEMEL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "iksemel" 2>&1`
9686        fi
9687	# Put the nasty error message in config.log where it belongs
9688	echo "$IKSEMEL_PKG_ERRORS" >&5
9689
9690
9691			 found_iksemel="no"
9692			 found_jabber="no"
9693
9694elif test $pkg_failed = untried; then
9695     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696$as_echo "no" >&6; }
9697
9698			 found_iksemel="no"
9699			 found_jabber="no"
9700
9701else
9702	IKSEMEL_CFLAGS=$pkg_cv_IKSEMEL_CFLAGS
9703	IKSEMEL_LIBS=$pkg_cv_IKSEMEL_LIBS
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9705$as_echo "yes" >&6; }
9706
9707			 JABBER_INCDIR="$IKSEMEL_CPPFLAGS"
9708			 JABBER_LIBDIR="$IKSEMEL_LDFLAGS"
9709			 JABBER_LIBS="-liksemel"
9710
9711fi
9712       else
9713	       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iksemel support" >&5
9714$as_echo_n "checking for iksemel support... " >&6; }
9715
9716               if test -f $_libiksemel_with/include/iksemel.h; then
9717                       JABBER_INCDIR="-I$_libiksemel_with/include"
9718                       JABBER_LIBDIR="-L$_libiksemel_with/lib"
9719                       JABBER_LIBS="-liksemel"
9720		       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9721$as_echo "yes" >&6; }
9722               else
9723                       found_iksemel="no"
9724                       found_jabber="no"
9725                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9726$as_echo "no" >&6; }
9727               fi
9728       fi
9729
9730       if test "x$found_iksemel" != "xno" ; then
9731
9732               for ac_func in getaddrinfo
9733do :
9734  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
9735if test "x$ac_cv_func_getaddrinfo" = xyes; then :
9736  cat >>confdefs.h <<_ACEOF
9737#define HAVE_GETADDRINFO 1
9738_ACEOF
9739
9740fi
9741done
9742
9743
9744               JABBER_CPPFLAGS=$JABBER_INCDIR
9745               JABBER_LDFLAGS="$JABBER_LIBDIR"
9746
9747		if test "x$enable_static" = "xyes"; then
9748			for i in -liksemel -lgnutls -ltasn1 -lgcrypt -lgpg-error; do
9749				case $i in
9750					-liksemel)
9751				;;
9752					-l*)
9753						_lib_name=`echo "$i" | cut -b3-`
9754						as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name ''_main" | $as_tr_sh`
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name " >&5
9756$as_echo_n "checking for main in -l$_lib_name ... " >&6; }
9757if eval \${$as_ac_Lib+:} false; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  ac_check_lib_save_LIBS=$LIBS
9761LIBS="-l$_lib_name   $LIBS"
9762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763/* end confdefs.h.  */
9764
9765
9766int
9767main ()
9768{
9769return main ();
9770  ;
9771  return 0;
9772}
9773_ACEOF
9774if ac_fn_c_try_link "$LINENO"; then :
9775  eval "$as_ac_Lib=yes"
9776else
9777  eval "$as_ac_Lib=no"
9778fi
9779rm -f core conftest.err conftest.$ac_objext \
9780    conftest$ac_exeext conftest.$ac_ext
9781LIBS=$ac_check_lib_save_LIBS
9782fi
9783eval ac_res=\$$as_ac_Lib
9784	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9785$as_echo "$ac_res" >&6; }
9786if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9787
9788							JABBER_LIBS="$JABBER_LIBS $i"
9789
9790else
9791
9792							as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
9793
9794fi
9795
9796				;;
9797				esac
9798			done
9799		fi
9800
9801               found_iksemel="yes"
9802               found_jabber="yes"
9803
9804$as_echo "#define HAVE_IKSEMEL 1" >>confdefs.h
9805
9806
9807$as_echo "#define HAVE_JABBER 1" >>confdefs.h
9808
9809       fi
9810  fi
9811
9812
9813
9814
9815
9816  unset _libiksemel_with
9817
9818	if test "x$want_jabber" = "xyes"; then
9819		if test "x$found_jabber" != "xyes"; then
9820			as_fn_error $? "Jabber library not found" "$LINENO" 5
9821		else
9822			have_jabber="yes"
9823		fi
9824	fi
9825	SERVER_LDFLAGS="$SERVER_LDFLAGS $JABBER_LDFLAGS"
9826	SERVER_LIBS="$SERVER_LIBS $JABBER_LIBS"
9827
9828
9829
9830
9831    LIBXML2_CONFIG="no"
9832
9833
9834# Check whether --with-libxml2 was given.
9835if test "${with_libxml2+set}" = set; then :
9836  withval=$with_libxml2;
9837        if test "$withval" = "no"; then
9838            want_libxml2="no"
9839        elif test "$withval" = "yes"; then
9840            want_libxml2="yes"
9841        else
9842            want_libxml2="yes"
9843        fi
9844
9845else
9846  want_libxml2="no"
9847
9848fi
9849
9850
9851    LIBXML2_CFLAGS=""
9852    LIBXML2_LDFLAGS=""
9853    LIBXML2_LIBS=""
9854    LIBXML2_VERSION=""
9855
9856
9857    if test "$want_libxml2" = "yes"; then
9858
9859
9860
9861
9862
9863
9864
9865
9866if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9867	if test -n "$ac_tool_prefix"; then
9868  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9869set dummy ${ac_tool_prefix}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_PKG_CONFIG+:} false; then :
9873  $as_echo_n "(cached) " >&6
9874else
9875  case $PKG_CONFIG in
9876  [\\/]* | ?:[\\/]*)
9877  ac_cv_path_PKG_CONFIG="$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_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
9898PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9899if test -n "$PKG_CONFIG"; then
9900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9901$as_echo "$PKG_CONFIG" >&6; }
9902else
9903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
9905fi
9906
9907
9908fi
9909if test -z "$ac_cv_path_PKG_CONFIG"; then
9910  ac_pt_PKG_CONFIG=$PKG_CONFIG
9911  # Extract the first word of "pkg-config", so it can be a program name with args.
9912set dummy pkg-config; ac_word=$2
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914$as_echo_n "checking for $ac_word... " >&6; }
9915if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9916  $as_echo_n "(cached) " >&6
9917else
9918  case $ac_pt_PKG_CONFIG in
9919  [\\/]* | ?:[\\/]*)
9920  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9921  ;;
9922  *)
9923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924for as_dir in $PATH
9925do
9926  IFS=$as_save_IFS
9927  test -z "$as_dir" && as_dir=.
9928    for ac_exec_ext in '' $ac_executable_extensions; do
9929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932    break 2
9933  fi
9934done
9935  done
9936IFS=$as_save_IFS
9937
9938  ;;
9939esac
9940fi
9941ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9942if test -n "$ac_pt_PKG_CONFIG"; then
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9944$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9945else
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
9948fi
9949
9950  if test "x$ac_pt_PKG_CONFIG" = x; then
9951    PKG_CONFIG=""
9952  else
9953    case $cross_compiling:$ac_tool_warned in
9954yes:)
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9957ac_tool_warned=yes ;;
9958esac
9959    PKG_CONFIG=$ac_pt_PKG_CONFIG
9960  fi
9961else
9962  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9963fi
9964
9965fi
9966if test -n "$PKG_CONFIG"; then
9967	_pkg_min_version=0.9.0
9968	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9969$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9970	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9971		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9972$as_echo "yes" >&6; }
9973	else
9974		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975$as_echo "no" >&6; }
9976		PKG_CONFIG=""
9977	fi
9978fi
9979
9980        if test -x "$PKG_CONFIG"; then
9981
9982            LIBXML2_CFLAGS="`$PKG_CONFIG --cflags libxml-2.0`"
9983
9984            _full_libxml2_libs="`$PKG_CONFIG --libs libxml-2.0`"
9985
9986            for i in $_full_libxml2_libs; do
9987                case $i in
9988                   -lxml2)
9989                        ;;
9990                   -L*)
9991                        LIBXML2_LDFLAGS="${LIBXML2_LDFLAGS} $i"
9992                        ;;
9993                   -R*)
9994                        LIBXML2_LDFLAGS="${LIBXML2_LDFLAGS} -Wl,$i"
9995                        ;;
9996                esac
9997            done
9998
9999            if test "x$enable_static" = "xyes"; then
10000                for i in $_full_libxml2_libs; do
10001                    case $i in
10002                        -lxml2)
10003                            ;;
10004                        -l*)
10005                            _lib_name="`echo "$i" | cut -b3-`"
10006                            as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
10007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
10008$as_echo_n "checking for main in -l$_lib_name... " >&6; }
10009if eval \${$as_ac_Lib+:} false; then :
10010  $as_echo_n "(cached) " >&6
10011else
10012  ac_check_lib_save_LIBS=$LIBS
10013LIBS="-l$_lib_name  $LIBS"
10014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10015/* end confdefs.h.  */
10016
10017
10018int
10019main ()
10020{
10021return main ();
10022  ;
10023  return 0;
10024}
10025_ACEOF
10026if ac_fn_c_try_link "$LINENO"; then :
10027  eval "$as_ac_Lib=yes"
10028else
10029  eval "$as_ac_Lib=no"
10030fi
10031rm -f core conftest.err conftest.$ac_objext \
10032    conftest$ac_exeext conftest.$ac_ext
10033LIBS=$ac_check_lib_save_LIBS
10034fi
10035eval ac_res=\$$as_ac_Lib
10036	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10037$as_echo "$ac_res" >&6; }
10038if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10039
10040                                    LIBXML2_LIBS="$LIBXML2_LIBS $i"
10041
10042else
10043
10044                                    as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
10045
10046fi
10047
10048                            ;;
10049                    esac
10050                done
10051            fi
10052
10053            _save_libxml2_libs="${LIBS}"
10054            _save_libxml2_ldflags="${LDFLAGS}"
10055            _save_libxml2_cflags="${CFLAGS}"
10056            LIBS="${LIBS} ${LIBXML2_LIBS}"
10057            LDFLAGS="${LDFLAGS} ${LIBXML2_LDFLAGS}"
10058            CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}"
10059
10060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlReadMemory in -lxml2" >&5
10061$as_echo_n "checking for xmlReadMemory in -lxml2... " >&6; }
10062if ${ac_cv_lib_xml2_xmlReadMemory+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  ac_check_lib_save_LIBS=$LIBS
10066LIBS="-lxml2  $LIBS"
10067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10068/* end confdefs.h.  */
10069
10070/* Override any GCC internal prototype to avoid an error.
10071   Use char because int might match the return type of a GCC
10072   builtin and then its argument prototype would still apply.  */
10073#ifdef __cplusplus
10074extern "C"
10075#endif
10076char xmlReadMemory ();
10077int
10078main ()
10079{
10080return xmlReadMemory ();
10081  ;
10082  return 0;
10083}
10084_ACEOF
10085if ac_fn_c_try_link "$LINENO"; then :
10086  ac_cv_lib_xml2_xmlReadMemory=yes
10087else
10088  ac_cv_lib_xml2_xmlReadMemory=no
10089fi
10090rm -f core conftest.err conftest.$ac_objext \
10091    conftest$ac_exeext conftest.$ac_ext
10092LIBS=$ac_check_lib_save_LIBS
10093fi
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlReadMemory" >&5
10095$as_echo "$ac_cv_lib_xml2_xmlReadMemory" >&6; }
10096if test "x$ac_cv_lib_xml2_xmlReadMemory" = xyes; then :
10097
10098                    LIBXML2_LIBS="-lxml2 ${LIBXML2_LIBS}"
10099
10100else
10101
10102                    as_fn_error $? "Not found libxml2 library" "$LINENO" 5
10103
10104fi
10105
10106
10107            LIBS="${_save_libxml2_libs}"
10108            LDFLAGS="${_save_libxml2_ldflags}"
10109            CFLAGS="${_save_libxml2_cflags}"
10110            unset _save_libxml2_libs
10111            unset _save_libxml2_ldflags
10112            unset _save_libxml2_cflags
10113
10114            LIBXML2_VERSION=`$PKG_CONFIG --version libxml-2.0`
10115
10116
10117$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
10118
10119
10120            found_libxml2="yes"
10121        else
10122            found_libxml2="no"
10123        fi
10124    fi
10125
10126
10127
10128
10129
10130
10131	if test "x$want_libxml2" = "xyes"; then
10132		if test "x$found_libxml2" != "xyes"; then
10133			as_fn_error $? "LIBXML2 library not found" "$LINENO" 5
10134		else
10135			have_libxml2="yes"
10136		fi
10137	fi
10138	SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBXML2_LDFLAGS"
10139	SERVER_LIBS="$SERVER_LIBS $LIBXML2_LIBS"
10140
10141	PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBXML2_LDFLAGS"
10142	PROXY_LIBS="$PROXY_LIBS $LIBXML2_LIBS"
10143
10144
10145
10146
10147
10148# Check whether --with-unixodbc was given.
10149if test "${with_unixodbc+set}" = set; then :
10150  withval=$with_unixodbc;  if test "x$withval" = "xno"; then
10151            want_unixodbc="no"
10152        elif test "x$withval" = "xyes"; then
10153            want_unixodbc="yes"
10154        else
10155            want_unixodbc="yes"
10156            specified_unixodbc="yes"
10157            ODBC_CONFIG=$withval
10158        fi
10159
10160else
10161  want_unixodbc=no
10162fi
10163
10164
10165  if test "x$want_unixodbc" != "xno"; then
10166	# Extract the first word of "odbc_config", so it can be a program name with args.
10167set dummy odbc_config; ac_word=$2
10168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10169$as_echo_n "checking for $ac_word... " >&6; }
10170if ${ac_cv_path_ODBC_CONFIG+:} false; then :
10171  $as_echo_n "(cached) " >&6
10172else
10173  case $ODBC_CONFIG in
10174  [\\/]* | ?:[\\/]*)
10175  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
10176  ;;
10177  *)
10178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10179for as_dir in $PATH
10180do
10181  IFS=$as_save_IFS
10182  test -z "$as_dir" && as_dir=.
10183    for ac_exec_ext in '' $ac_executable_extensions; do
10184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10185    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10187    break 2
10188  fi
10189done
10190  done
10191IFS=$as_save_IFS
10192
10193  ;;
10194esac
10195fi
10196ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
10197if test -n "$ODBC_CONFIG"; then
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
10199$as_echo "$ODBC_CONFIG" >&6; }
10200else
10201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202$as_echo "no" >&6; }
10203fi
10204
10205
10206
10207	unixodbc_error=""
10208
10209	UNIXODBC_LIBS="-lodbc"
10210
10211	if test -x "$ODBC_CONFIG"; then
10212		UNIXODBC_CFLAGS="-I`$ODBC_CONFIG --include-prefix`"
10213		UNIXODBC_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
10214	elif test "x$specified_unixodbc" = "xyes"; then
10215		unixodbc_error="file $ODBC_CONFIG not found or not executable"
10216	fi
10217
10218	if test "x$unixodbc_error" = "x"; then
10219		_save_unixodbc_cflags="${CFLAGS}"
10220		_save_unixodbc_ldflags="${LDFLAGS}"
10221		_save_unixodbc_libs="${LIBS}"
10222		CFLAGS="${CFLAGS} ${UNIXODBC_CFLAGS}"
10223		LDFLAGS="${LDFLAGS} ${UNIXODBC_LDFLAGS}"
10224		LIBS="${LIBS} ${UNIXODBC_LIBS}"
10225
10226		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
10227$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
10228if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
10229  $as_echo_n "(cached) " >&6
10230else
10231  ac_check_lib_save_LIBS=$LIBS
10232LIBS="-lodbc  $LIBS"
10233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10234/* end confdefs.h.  */
10235
10236/* Override any GCC internal prototype to avoid an error.
10237   Use char because int might match the return type of a GCC
10238   builtin and then its argument prototype would still apply.  */
10239#ifdef __cplusplus
10240extern "C"
10241#endif
10242char SQLAllocHandle ();
10243int
10244main ()
10245{
10246return SQLAllocHandle ();
10247  ;
10248  return 0;
10249}
10250_ACEOF
10251if ac_fn_c_try_link "$LINENO"; then :
10252  ac_cv_lib_odbc_SQLAllocHandle=yes
10253else
10254  ac_cv_lib_odbc_SQLAllocHandle=no
10255fi
10256rm -f core conftest.err conftest.$ac_objext \
10257    conftest$ac_exeext conftest.$ac_ext
10258LIBS=$ac_check_lib_save_LIBS
10259fi
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
10261$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
10262if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
10263  cat >>confdefs.h <<_ACEOF
10264#define HAVE_LIBODBC 1
10265_ACEOF
10266
10267  LIBS="-lodbc $LIBS"
10268
10269else
10270  unixodbc_error="unixODBC library not found"
10271fi
10272
10273
10274		if test "x$unixodbc_error" = "x"; then
10275
10276$as_echo "#define HAVE_UNIXODBC 1" >>confdefs.h
10277
10278		fi
10279
10280		CFLAGS="${_save_unixodbc_cflags}"
10281		LDFLAGS="${_save_unixodbc_ldflags}"
10282		LIBS="${_save_unixodbc_libs}"
10283	fi
10284  fi
10285
10286
10287
10288
10289
10290
10291	if test "x$want_unixodbc" = "xyes"; then
10292		if test "x$unixodbc_error" != "x"; then
10293			as_fn_error $? "$unixodbc_error" "$LINENO" 5
10294		fi
10295		have_unixodbc="yes"
10296	fi
10297	SERVER_LDFLAGS="$SERVER_LDFLAGS $UNIXODBC_LDFLAGS"
10298	SERVER_LIBS="$SERVER_LIBS $UNIXODBC_LIBS"
10299
10300	PROXY_LDFLAGS="$PROXY_LDFLAGS $UNIXODBC_LDFLAGS"
10301	PROXY_LIBS="$PROXY_LIBS $UNIXODBC_LIBS"
10302
10303
10304
10305
10306  _libnetsnmp_config="no"
10307
10308
10309# Check whether --with-net-snmp was given.
10310if test "${with_net_snmp+set}" = set; then :
10311  withval=$with_net_snmp;  if test "$withval" = "no"; then
10312            want_netsnmp="no"
10313        elif test "$withval" = "yes"; then
10314            want_netsnmp="yes"
10315        else
10316            want_netsnmp="yes"
10317            _libnetsnmp_config=$withval
10318        fi
10319
10320else
10321  want_netsnmp=no
10322fi
10323
10324
10325  SNMP_CFLAGS=""
10326  SNMP_LDFLAGS=""
10327  SNMP_LIBS=""
10328
10329  if test "x$want_netsnmp" != "xno"; then
10330
10331        # Extract the first word of "net-snmp-config", so it can be a program name with args.
10332set dummy net-snmp-config; ac_word=$2
10333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10334$as_echo_n "checking for $ac_word... " >&6; }
10335if ${ac_cv_path__libnetsnmp_config+:} false; then :
10336  $as_echo_n "(cached) " >&6
10337else
10338  case $_libnetsnmp_config in
10339  [\\/]* | ?:[\\/]*)
10340  ac_cv_path__libnetsnmp_config="$_libnetsnmp_config" # Let the user override the test with a path.
10341  ;;
10342  *)
10343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10344for as_dir in $PATH
10345do
10346  IFS=$as_save_IFS
10347  test -z "$as_dir" && as_dir=.
10348    for ac_exec_ext in '' $ac_executable_extensions; do
10349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10350    ac_cv_path__libnetsnmp_config="$as_dir/$ac_word$ac_exec_ext"
10351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10352    break 2
10353  fi
10354done
10355  done
10356IFS=$as_save_IFS
10357
10358  ;;
10359esac
10360fi
10361_libnetsnmp_config=$ac_cv_path__libnetsnmp_config
10362if test -n "$_libnetsnmp_config"; then
10363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libnetsnmp_config" >&5
10364$as_echo "$_libnetsnmp_config" >&6; }
10365else
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10367$as_echo "no" >&6; }
10368fi
10369
10370
10371
10372	if test -x "$_libnetsnmp_config"; then
10373
10374		_full_libnetsnmp_cflags="`$_libnetsnmp_config --cflags`"
10375		for i in $_full_libnetsnmp_cflags; do
10376			case $i in
10377				-I*)
10378					SNMP_CFLAGS="$SNMP_CFLAGS $i"
10379
10380			;;
10381			esac
10382		done
10383
10384		_full_libnetsnmp_libs="`$_libnetsnmp_config --netsnmp-libs`"
10385		for i in $_full_libnetsnmp_libs; do
10386			case $i in
10387				-L*)
10388					SNMP_LDFLAGS="${SNMP_LDFLAGS} $i"
10389			;;
10390				-R*)
10391					SNMP_LDFLAGS="${SNMP_LDFLAGS} -Wl,$i"
10392			;;
10393				-l*)
10394					SNMP_LIBS="${SNMP_LIBS} $i"
10395			;;
10396			esac
10397		done
10398
10399		if test "x$enable_static" = "xyes"; then
10400			_full_libnetsnmp_libs="`$_libnetsnmp_config --libs`"
10401			for i in $_full_libnetsnmp_libs; do
10402				case $i in
10403					-lnetsnmp)
10404				;;
10405					-l*)
10406						_lib_name="`echo "$i" | cut -b3-`"
10407						as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
10409$as_echo_n "checking for main in -l$_lib_name... " >&6; }
10410if eval \${$as_ac_Lib+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  ac_check_lib_save_LIBS=$LIBS
10414LIBS="-l$_lib_name  $LIBS"
10415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10416/* end confdefs.h.  */
10417
10418
10419int
10420main ()
10421{
10422return main ();
10423  ;
10424  return 0;
10425}
10426_ACEOF
10427if ac_fn_c_try_link "$LINENO"; then :
10428  eval "$as_ac_Lib=yes"
10429else
10430  eval "$as_ac_Lib=no"
10431fi
10432rm -f core conftest.err conftest.$ac_objext \
10433    conftest$ac_exeext conftest.$ac_ext
10434LIBS=$ac_check_lib_save_LIBS
10435fi
10436eval ac_res=\$$as_ac_Lib
10437	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10438$as_echo "$ac_res" >&6; }
10439if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10440
10441								SNMP_LIBS="$SNMP_LIBS $i"
10442
10443else
10444
10445								as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
10446
10447fi
10448
10449
10450				;;
10451				esac
10452			done
10453		fi
10454
10455		_save_netsnmp_cflags="$CFLAGS"
10456		_save_netsnmp_ldflags="$LDFLAGS"
10457		_save_netsnmp_libs="$LIBS"
10458		CFLAGS="$CFLAGS $SNMP_CFLAGS"
10459		LDFLAGS="$LDFLAGS $SNMP_LDFLAGS"
10460		LIBS="$LIBS $SNMP_LIBS"
10461
10462		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnetsnmp" >&5
10463$as_echo_n "checking for main in -lnetsnmp... " >&6; }
10464if ${ac_cv_lib_netsnmp_main+:} false; then :
10465  $as_echo_n "(cached) " >&6
10466else
10467  ac_check_lib_save_LIBS=$LIBS
10468LIBS="-lnetsnmp  $LIBS"
10469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10470/* end confdefs.h.  */
10471
10472
10473int
10474main ()
10475{
10476return main ();
10477  ;
10478  return 0;
10479}
10480_ACEOF
10481if ac_fn_c_try_link "$LINENO"; then :
10482  ac_cv_lib_netsnmp_main=yes
10483else
10484  ac_cv_lib_netsnmp_main=no
10485fi
10486rm -f core conftest.err conftest.$ac_objext \
10487    conftest$ac_exeext conftest.$ac_ext
10488LIBS=$ac_check_lib_save_LIBS
10489fi
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_main" >&5
10491$as_echo "$ac_cv_lib_netsnmp_main" >&6; }
10492if test "x$ac_cv_lib_netsnmp_main" = xyes; then :
10493  cat >>confdefs.h <<_ACEOF
10494#define HAVE_LIBNETSNMP 1
10495_ACEOF
10496
10497  LIBS="-lnetsnmp $LIBS"
10498
10499else
10500  as_fn_error $? "Not found Net-SNMP library" "$LINENO" 5
10501fi
10502
10503
10504				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for localname in struct snmp_session" >&5
10505$as_echo_n "checking for localname in struct snmp_session... " >&6; }
10506		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10507/* end confdefs.h.  */
10508
10509#include <net-snmp/net-snmp-config.h>
10510#include <net-snmp/net-snmp-includes.h>
10511int
10512main ()
10513{
10514
10515struct snmp_session session;
10516session.localname = "";
10517
10518  ;
10519  return 0;
10520}
10521_ACEOF
10522if ac_fn_c_try_compile "$LINENO"; then :
10523
10524$as_echo "#define HAVE_NETSNMP_SESSION_LOCALNAME 1" >>confdefs.h
10525
10526		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10527$as_echo "yes" >&6; }
10528else
10529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10530$as_echo "no" >&6; }
10531fi
10532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10533
10534		CFLAGS="$_save_netsnmp_cflags"
10535		LDFLAGS="$_save_netsnmp_ldflags"
10536		LIBS="$_save_netsnmp_libs"
10537		unset _save_netsnmp_cflags
10538		unset _save_netsnmp_ldflags
10539		unset _save_netsnmp_libs
10540
10541
10542$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
10543
10544
10545		found_netsnmp="yes"
10546	else
10547		found_netsnmp="no"
10548	fi
10549  fi
10550
10551
10552
10553
10554
10555	if test "x$want_netsnmp" = "xyes"; then
10556		if test "x$found_netsnmp" != "xyes"; then
10557			as_fn_error $? "Invalid Net-SNMP directory - unable to find net-snmp-config" "$LINENO" 5
10558		else
10559			have_snmp="yes"
10560		fi
10561	fi
10562	SERVER_LDFLAGS="$SERVER_LDFLAGS $SNMP_LDFLAGS"
10563	SERVER_LIBS="$SERVER_LIBS $SNMP_LIBS"
10564
10565	PROXY_LDFLAGS="$PROXY_LDFLAGS $SNMP_LDFLAGS"
10566	PROXY_LIBS="$PROXY_LIBS $SNMP_LIBS"
10567
10568
10569
10570
10571
10572# Check whether --with-ssh2 was given.
10573if test "${with_ssh2+set}" = set; then :
10574  withval=$with_ssh2;
10575	if test "$withval" = "no"; then
10576	    want_ssh2="no"
10577	    _libssh2_dir="no"
10578	elif test "$withval" = "yes"; then
10579	    want_ssh2="yes"
10580	    _libssh2_dir="no"
10581	else
10582	    want_ssh2="yes"
10583	    _libssh2_dir=$withval
10584	fi
10585	accept_ssh2_version="no"
10586
10587else
10588  want_ssh2=no
10589
10590fi
10591
10592
10593  if test "x$want_ssh2" = "xyes"; then
10594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH2 support" >&5
10595$as_echo_n "checking for SSH2 support... " >&6; }
10596     if test "x$_libssh2_dir" = "xno"; then
10597       if test -f /usr/include/libssh2.h; then
10598         SSH2_CFLAGS=-I/usr/include
10599         SSH2_LDFLAGS=-L/usr/lib
10600         SSH2_LIBS="-lssh2"
10601         found_ssh2="yes"
10602
10603	# Zabbix minimal major supported version of libssh2:
10604	minimal_libssh2_major_version=1
10605
10606	# get the major version
10607	found_ssh2_version_major=`cat /usr/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10608
10609	accept_ssh2_version="no"
10610
10611	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10612		accept_ssh2_version="yes"
10613	fi;
10614
10615       elif test -f /usr/local/include/libssh2.h; then
10616         SSH2_CFLAGS=-I/usr/local/include
10617         SSH2_LDFLAGS=-L/usr/local/lib
10618         SSH2_LIBS="-lssh2"
10619         found_ssh2="yes"
10620
10621	# Zabbix minimal major supported version of libssh2:
10622	minimal_libssh2_major_version=1
10623
10624	# get the major version
10625	found_ssh2_version_major=`cat /usr/local/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10626
10627	accept_ssh2_version="no"
10628
10629	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10630		accept_ssh2_version="yes"
10631	fi;
10632
10633       else #libraries are not found in default directories
10634         found_ssh2="no"
10635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
10637       fi # test -f /usr/include/libssh2.h; then
10638     else # test "x$_libssh2_dir" = "xno"; then
10639       if test -f $_libssh2_dir/include/libssh2.h; then
10640	 SSH2_CFLAGS=-I$_libssh2_dir/include
10641         SSH2_LDFLAGS=-L$_libssh2_dir/lib
10642         SSH2_LIBS="-lssh2"
10643         found_ssh2="yes"
10644
10645	# Zabbix minimal major supported version of libssh2:
10646	minimal_libssh2_major_version=1
10647
10648	# get the major version
10649	found_ssh2_version_major=`cat $_libssh2_dir/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10650
10651	accept_ssh2_version="no"
10652
10653	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10654		accept_ssh2_version="yes"
10655	fi;
10656
10657       else #if test -f $_libssh2_dir/include/libssh2.h; then
10658         found_ssh2="no"
10659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661       fi #test -f $_libssh2_dir/include/libssh2.h; then
10662     fi #if test "x$_libssh2_dir" = "xno"; then
10663  fi # if test "x$want_ssh2" != "xno"; then
10664
10665  if test "x$found_ssh2" = "xyes"; then
10666    am_save_cflags="$CFLAGS"
10667    am_save_ldflags="$LDFLAGS"
10668    am_save_libs="$LIBS"
10669
10670    CFLAGS="$CFLAGS $SSH2_CFLAGS"
10671    LDFLAGS="$LDFLAGS $SSH2_LDFLAGS"
10672    LIBS="$LIBS $SSH2_LIBS"
10673
10674    found_ssh2="no"
10675
10676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10677/* end confdefs.h.  */
10678
10679#include <libssh2.h>
10680
10681int
10682main ()
10683{
10684
10685	LIBSSH2_SESSION	*session;
10686	session = libssh2_session_init();
10687
10688  ;
10689  return 0;
10690}
10691_ACEOF
10692if ac_fn_c_try_link "$LINENO"; then :
10693  found_ssh2="yes"
10694fi
10695rm -f core conftest.err conftest.$ac_objext \
10696    conftest$ac_exeext conftest.$ac_ext
10697
10698
10699    CFLAGS="$am_save_cflags"
10700    LDFLAGS="$am_save_ldflags"
10701    LIBS="$am_save_libs"
10702
10703    if test "x$found_ssh2" = "xyes"; then
10704
10705$as_echo "#define HAVE_SSH2 1" >>confdefs.h
10706
10707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10708$as_echo "yes" >&6; }
10709    else
10710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10711$as_echo "no" >&6; }
10712      SSH2_CFLAGS=""
10713      SSH2_LDFLAGS=""
10714      SSH2_LIBS=""
10715    fi
10716  fi
10717
10718
10719
10720
10721
10722
10723
10724
10725# Check whether --with-ssh was given.
10726if test "${with_ssh+set}" = set; then :
10727  withval=$with_ssh;
10728	if test "$withval" = "no"; then
10729	    want_ssh="no"
10730	    _libssh_dir="no"
10731	elif test "$withval" = "yes"; then
10732	    want_ssh="yes"
10733	    _libssh_dir="no"
10734	else
10735	    want_ssh="yes"
10736	    _libssh_dir=$withval
10737	fi
10738	accept_ssh_version="no"
10739
10740else
10741  want_ssh=no
10742
10743fi
10744
10745
10746  if test "x$want_ssh" = "xyes"; then
10747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH support" >&5
10748$as_echo_n "checking for SSH support... " >&6; }
10749     if test "x$_libssh_dir" = "xno"; then
10750       if test -f /usr/include/libssh/libssh.h; then
10751         SSH_CFLAGS=-I/usr/include
10752         SSH_LDFLAGS=-L/usr/lib
10753         SSH_LIBS="-lssh"
10754         found_ssh="yes"
10755
10756	# Zabbix minimal major supported version of libssh:
10757	minimal_libssh_major_version=0
10758	minimal_libssh_minor_version=6
10759
10760	# get the major version
10761	found_ssh_version_major=`cat /usr/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10762	found_ssh_version_minor=`cat /usr/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10763
10764	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10765		accept_ssh_version="yes"
10766	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10767		accept_ssh_version="no"
10768	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10769		accept_ssh_version="yes"
10770	else
10771		accept_ssh_version="no"
10772	fi;
10773
10774       elif test -f /usr/local/include/libssh/libssh.h; then
10775         SSH_CFLAGS=-I/usr/local/include
10776         SSH_LDFLAGS=-L/usr/local/lib
10777         SSH_LIBS="-lssh"
10778         found_ssh="yes"
10779
10780	# Zabbix minimal major supported version of libssh:
10781	minimal_libssh_major_version=0
10782	minimal_libssh_minor_version=6
10783
10784	# get the major version
10785	found_ssh_version_major=`cat /usr/local/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10786	found_ssh_version_minor=`cat /usr/local/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10787
10788	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10789		accept_ssh_version="yes"
10790	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10791		accept_ssh_version="no"
10792	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10793		accept_ssh_version="yes"
10794	else
10795		accept_ssh_version="no"
10796	fi;
10797
10798       else #libraries are not found in default directories
10799         found_ssh="no"
10800         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10801$as_echo "no" >&6; }
10802       fi # test -f /usr/include/libssh/libssh.h; then
10803     else # test "x$_libssh_dir" = "xno"; then
10804       if test -f $_libssh_dir/include/libssh/libssh.h; then
10805	 SSH_CFLAGS=-I$_libssh_dir/include
10806         SSH_LDFLAGS=-L$_libssh_dir/lib
10807         SSH_LIBS="-lssh"
10808         found_ssh="yes"
10809
10810	# Zabbix minimal major supported version of libssh:
10811	minimal_libssh_major_version=0
10812	minimal_libssh_minor_version=6
10813
10814	# get the major version
10815	found_ssh_version_major=`cat $_libssh_dir/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10816	found_ssh_version_minor=`cat $_libssh_dir/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10817
10818	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10819		accept_ssh_version="yes"
10820	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10821		accept_ssh_version="no"
10822	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10823		accept_ssh_version="yes"
10824	else
10825		accept_ssh_version="no"
10826	fi;
10827
10828       else #if test -f $_libssh_dir/include/libssh/libssh.h; then
10829         found_ssh="no"
10830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831$as_echo "no" >&6; }
10832       fi #test -f $_libssh_dir/include/libssh/libssh.h; then
10833     fi #if test "x$_libssh_dir" = "xno"; then
10834  fi # if test "x$want_ssh" != "xno"; then
10835
10836  if test "x$found_ssh" = "xyes"; then
10837    am_save_cflags="$CFLAGS"
10838    am_save_ldflags="$LDFLAGS"
10839    am_save_libs="$LIBS"
10840
10841    CFLAGS="$CFLAGS $SSH_CFLAGS"
10842    LDFLAGS="$LDFLAGS $SSH_LDFLAGS"
10843    LIBS="$LIBS $SSH_LIBS"
10844
10845    found_ssh="no"
10846
10847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848/* end confdefs.h.  */
10849
10850#include <libssh/libssh.h>
10851
10852int
10853main ()
10854{
10855
10856	ssh_session my_ssh_session;
10857	my_ssh_session = ssh_new();
10858
10859  ;
10860  return 0;
10861}
10862_ACEOF
10863if ac_fn_c_try_link "$LINENO"; then :
10864  found_ssh="yes"
10865fi
10866rm -f core conftest.err conftest.$ac_objext \
10867    conftest$ac_exeext conftest.$ac_ext
10868
10869
10870    CFLAGS="$am_save_cflags"
10871    LDFLAGS="$am_save_ldflags"
10872    LIBS="$am_save_libs"
10873
10874    if test "x$found_ssh" = "xyes"; then
10875
10876$as_echo "#define HAVE_SSH 1" >>confdefs.h
10877
10878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10879$as_echo "yes" >&6; }
10880    else
10881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10882$as_echo "no" >&6; }
10883      SSH_CFLAGS=""
10884      SSH_LDFLAGS=""
10885      SSH_LIBS=""
10886    fi
10887  fi
10888
10889
10890
10891
10892
10893
10894	if test "x$want_ssh2" = "xyes"; then
10895		if test "x$want_ssh" != "xno"; then
10896			as_fn_error $? "You can configure for only one SSH library (--with-ssh or --with-ssh2)." "$LINENO" 5
10897		fi
10898
10899		if test "x$found_ssh2" != "xyes"; then
10900			as_fn_error $? "SSH2 library not found" "$LINENO" 5
10901		elif test "x$accept_ssh2_version" != "xyes"; then
10902			as_fn_error $? "SSH2 library version requirement not met (>= 1.0.0)" "$LINENO" 5
10903		else
10904			have_ssh="yes (libssh2)"
10905		fi
10906	fi
10907	SERVER_LDFLAGS="$SERVER_LDFLAGS $SSH2_LDFLAGS"
10908	SERVER_LIBS="$SERVER_LIBS $SSH2_LIBS"
10909
10910	PROXY_LDFLAGS="$PROXY_LDFLAGS $SSH2_LDFLAGS"
10911	PROXY_LIBS="$PROXY_LIBS $SSH2_LIBS"
10912
10913
10914
10915		if test "x$want_ssh" = "xyes"; then
10916		if test "x$found_ssh" != "xyes"; then
10917			as_fn_error $? "SSH library not found" "$LINENO" 5
10918		elif test "x$accept_ssh_version" != "xyes"; then
10919			as_fn_error $? "SSH library version requirement not met (>= 0.6.0)" "$LINENO" 5
10920		else
10921			have_ssh="yes (libssh)"
10922		fi
10923	fi
10924	SERVER_LDFLAGS="$SERVER_LDFLAGS $SSH_LDFLAGS"
10925	SERVER_LIBS="$SERVER_LIBS $SSH_LIBS"
10926
10927	PROXY_LDFLAGS="$PROXY_LDFLAGS $SSH_LDFLAGS"
10928	PROXY_LIBS="$PROXY_LIBS $SSH_LIBS"
10929
10930
10931
10932	found_openipmi="no"
10933
10934
10935# Check whether --with-openipmi was given.
10936if test "${with_openipmi+set}" = set; then :
10937  withval=$with_openipmi;  if test "$withval" = "no"; then
10938            want_openipmi="no"
10939            _libopenipmi_with="no"
10940        elif test "$withval" = "yes"; then
10941            want_openipmi="yes"
10942            _libopenipmi_with="yes"
10943        else
10944            want_openipmi="yes"
10945            _libopenipmi_with=$withval
10946        fi
10947
10948else
10949  _libopenipmi_with=no
10950fi
10951
10952
10953  if test "x$_libopenipmi_with" != x"no"; then
10954       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENIPMI support" >&5
10955$as_echo_n "checking for OPENIPMI support... " >&6; }
10956
10957       if test "$_libopenipmi_with" = "yes"; then
10958               if test -f /usr/local/include/OpenIPMI/ipmiif.h; then
10959                       OPENIPMI_INCDIR=/usr/local/include
10960                       OPENIPMI_LIBDIR=/usr/local/lib
10961		       found_openipmi="yes"
10962               elif test -f /usr/include/OpenIPMI/ipmiif.h; then
10963                       OPENIPMI_INCDIR=/usr/include
10964                       OPENIPMI_LIBDIR=/usr/lib
10965		       found_openipmi="yes"
10966               else
10967                       found_openipmi="no"
10968                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
10970               fi
10971       else
10972               if test -f $_libopenipmi_with/include/OpenIPMI/ipmiif.h; then
10973                       OPENIPMI_INCDIR=$_libopenipmi_with/include
10974                       OPENIPMI_LIBDIR=$_libopenipmi_with/lib
10975		       found_openipmi="yes"
10976               else
10977                       found_openipmi="no"
10978                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
10980               fi
10981       fi
10982
10983       if test "x$found_openipmi" != "xno" ; then
10984               OPENIPMI_CFLAGS="-I$OPENIPMI_INCDIR"
10985               OPENIPMI_LDFLAGS="-L$OPENIPMI_LIBDIR"
10986               OPENIPMI_LIBS="-lOpenIPMI -lOpenIPMIposix"
10987
10988               found_openipmi="yes"
10989
10990$as_echo "#define HAVE_OPENIPMI 1" >>confdefs.h
10991
10992
10993$as_echo "#define OPENIPMI_DEPRECATED 1" >>confdefs.h
10994
10995               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10996$as_echo "yes" >&6; }
10997	fi
10998  fi
10999
11000
11001
11002
11003
11004  unset _libopenipmi_with
11005
11006	if test "x$want_openipmi" = "xyes"; then
11007		if test "x$found_openipmi" != "xyes"; then
11008			as_fn_error $? "Invalid OPENIPMI directory - unable to find ipmiif.h" "$LINENO" 5
11009		else
11010			have_ipmi="yes"
11011		fi
11012	fi
11013
11014	SERVER_LDFLAGS="$SERVER_LDFLAGS $OPENIPMI_LDFLAGS"
11015	SERVER_LIBS="$SERVER_LIBS $OPENIPMI_LIBS"
11016
11017	PROXY_LDFLAGS="$PROXY_LDFLAGS $OPENIPMI_LDFLAGS"
11018	PROXY_LIBS="$PROXY_LIBS $OPENIPMI_LIBS"
11019
11020
11021
11022
11023
11024# Check whether --with-zlib was given.
11025if test "${with_zlib+set}" = set; then :
11026  withval=$with_zlib;
11027			test "x$withval" = "xyes" && withval=/usr
11028			ZLIB_CFLAGS="-I$withval/include"
11029			ZLIB_LDFLAGS="-L$withval/lib"
11030			_zlib_dir_set="yes"
11031
11032
11033fi
11034
11035
11036
11037# Check whether --with-zlib-include was given.
11038if test "${with_zlib_include+set}" = set; then :
11039  withval=$with_zlib_include;
11040			ZLIB_CFLAGS="-I$withval"
11041			_zlib_dir_set="yes"
11042
11043
11044fi
11045
11046
11047
11048# Check whether --with-zlib-lib was given.
11049if test "${with_zlib_lib+set}" = set; then :
11050  withval=$with_zlib_lib;
11051			ZLIB_LDFLAGS="-L$withval"
11052			_zlib_dir_set="yes"
11053
11054
11055fi
11056
11057
11058	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib support" >&5
11059$as_echo_n "checking for zlib support... " >&6; }
11060
11061	ZLIB_LIBS="-lz"
11062
11063	if test -n "$_zlib_dir_set" -o -f /usr/include/zlib.h; then
11064		found_zlib="yes"
11065	elif test -f /usr/local/include/zlib.h; then
11066		ZLIB_CFLAGS="-I/usr/local/include"
11067		ZLIB_LDFLAGS="-L/usr/local/lib"
11068		found_zlib="yes"
11069	elif test -f /usr/pkg/include/zlib.h; then
11070		ZLIB_CFLAGS="-I/usr/pkg/include"
11071		ZLIB_LDFLAGS="-L/usr/pkg/lib"
11072		found_zlib="yes"
11073	else
11074		found_zlib="no"
11075		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11076$as_echo "no" >&6; }
11077	fi
11078
11079	if test "x$found_zlib" = "xyes"; then
11080		am_save_CFLAGS="$CFLAGS"
11081		am_save_LDFLAGS="$LDFLAGS"
11082		am_save_LIBS="$LIBS"
11083
11084		CFLAGS="$CFLAGS $ZLIB_CFLAGS"
11085		LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
11086		LIBS="$LIBS $ZLIB_LIBS"
11087
11088
11089found_zlib=no
11090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11091/* end confdefs.h.  */
11092
11093#include <zlib.h>
11094
11095int
11096main ()
11097{
11098
11099	z_stream	defstream;
11100	deflateInit(&defstream, Z_BEST_COMPRESSION);
11101
11102  ;
11103  return 0;
11104}
11105_ACEOF
11106if ac_fn_c_try_link "$LINENO"; then :
11107  found_zlib="yes"
11108fi
11109rm -f core conftest.err conftest.$ac_objext \
11110    conftest$ac_exeext conftest.$ac_ext
11111
11112
11113		CFLAGS="$am_save_CFLAGS"
11114		LDFLAGS="$am_save_LDFLAGS"
11115		LIBS="$am_save_LIBS"
11116	fi
11117
11118	if test "x$found_zlib" = "xyes"; then
11119
11120$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
11121
11122		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11123$as_echo "yes" >&6; }
11124	else
11125		ZLIB_CFLAGS=""
11126		ZLIB_LDFLAGS=""
11127		ZLIB_LIBS=""
11128	fi
11129
11130
11131
11132
11133
11134	if test "x$found_zlib" != "xyes"; then
11135		as_fn_error $? "Unable to use zlib (zlib check failed)" "$LINENO" 5
11136	fi
11137
11138
11139
11140
11141
11142# Check whether --with-libpthread was given.
11143if test "${with_libpthread+set}" = set; then :
11144  withval=$with_libpthread;
11145			test "x$withval" = "xyes" && withval=/usr
11146			LIBPTHREAD_CFLAGS="-I$withval/include"
11147			LIBPTHREAD_LDFLAGS="-L$withval/lib"
11148			_libpthread_dir_set="yes"
11149
11150
11151fi
11152
11153
11154
11155# Check whether --with-libpthread-include was given.
11156if test "${with_libpthread_include+set}" = set; then :
11157  withval=$with_libpthread_include;
11158			LIBPTHREAD_CFLAGS="-I$withval"
11159			_libpthread_dir_set="yes"
11160
11161
11162fi
11163
11164
11165
11166# Check whether --with-libpthread-lib was given.
11167if test "${with_libpthread_lib+set}" = set; then :
11168  withval=$with_libpthread_lib;
11169			LIBPTHREAD_LDFLAGS="-L$withval"
11170			_libpthread_dir_set="yes"
11171
11172
11173fi
11174
11175
11176	ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11177if test "x$ac_cv_header_pthread_h" = xyes; then :
11178  found_libpthread=yes
11179fi
11180
11181
11182	LIBPTHREAD_LIBS="-lpthread"
11183	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for process shared libpthread support" >&5
11184$as_echo_n "checking for process shared libpthread support... " >&6; }
11185
11186	if test -n "$_libpthread_dir_set" -o "x$found_libpthread" = xyes; then
11187		found_libpthread="yes"
11188	elif test -f /usr/local/include/pthread.h; then
11189		LIBPTHREAD_CFLAGS="-I/usr/local/include"
11190		LIBPTHREAD_LDFLAGS="-L/usr/local/lib"
11191		found_libpthread="yes"
11192	elif test -f /usr/pkg/include/pthread.h; then
11193		LIBPTHREAD_CFLAGS="-I/usr/pkg/include"
11194		LIBPTHREAD_LDFLAGS="-L/usr/pkg/lib"
11195		LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/usr/pkg/lib"
11196		found_libpthread="yes"
11197	elif test -f /opt/csw/include/pthread.h; then
11198		LIBPTHREAD_CFLAGS="-I/opt/csw/include"
11199		LIBPTHREAD_LDFLAGS="-L/opt/csw/lib"
11200		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
11201			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
11202		else
11203			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/opt/csw/lib"
11204		fi
11205		found_libpthread="yes"
11206	else
11207		found_libpthread="no"
11208		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11209$as_echo "no" >&6; }
11210	fi
11211
11212	if test "x$found_libpthread" = "xyes"; then
11213		am_save_CFLAGS="$CFLAGS"
11214		am_save_LDFLAGS="$LDFLAGS"
11215		am_save_LIBS="$LIBS"
11216
11217		CFLAGS="$CFLAGS $LIBPTHREAD_CFLAGS"
11218		LDFLAGS="$LDFLAGS $LIBPTHREAD_LDFLAGS"
11219		LIBS="$LIBS $LIBPTHREAD_LIBS"
11220
11221		found_libpthread="no"
11222		found_libpthread_process_shared="no"
11223
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11225/* end confdefs.h.  */
11226
11227#include <pthread.h>
11228
11229int
11230main ()
11231{
11232
11233	pthread_mutexattr_t	mta;
11234	pthread_mutex_t		mutex;
11235
11236	pthread_mutexattr_init(&mta);
11237	pthread_mutex_init(&mutex, &mta);
11238
11239  ;
11240  return 0;
11241}
11242_ACEOF
11243if ac_fn_c_try_link "$LINENO"; then :
11244  found_libpthread="yes"
11245fi
11246rm -f core conftest.err conftest.$ac_objext \
11247    conftest$ac_exeext conftest.$ac_ext
11248
11249
11250	if test "$cross_compiling" = yes; then :
11251  found_libpthread_process_shared="no"
11252else
11253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11254/* end confdefs.h.  */
11255
11256		#include <pthread.h>
11257
11258		int	main()
11259		{
11260			pthread_mutexattr_t	mta;
11261			pthread_rwlockattr_t	rwa;
11262			pthread_mutex_t		mutex;
11263			pthread_rwlock_t	rwlock;
11264
11265			if (0 != pthread_mutexattr_init(&mta))
11266				return 1;
11267
11268			if (0 != pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED))
11269				return 2;
11270
11271			if (0 != pthread_mutex_init(&mutex, &mta))
11272				return 3;
11273
11274			if (0 != pthread_rwlockattr_init(&rwa))
11275				return 4;
11276
11277			if (0 != pthread_rwlockattr_setpshared(&rwa, PTHREAD_PROCESS_SHARED))
11278				return 5;
11279
11280			if (0 != pthread_rwlock_init(&rwlock, &rwa))
11281				return 6;
11282
11283			return 0;
11284		}
11285
11286
11287
11288_ACEOF
11289if ac_fn_c_try_run "$LINENO"; then :
11290  found_libpthread_process_shared="yes"
11291else
11292  found_libpthread_process_shared="no"
11293fi
11294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11295  conftest.$ac_objext conftest.beam conftest.$ac_ext
11296fi
11297
11298
11299
11300		CFLAGS="$am_save_CFLAGS"
11301		LDFLAGS="$am_save_LDFLAGS"
11302		LIBS="$am_save_LIBS"
11303	fi
11304
11305	if test "x$found_libpthread" = "xyes"; then
11306		if test "x$found_libpthread_process_shared" = "xyes"; then
11307
11308$as_echo "#define HAVE_PTHREAD_PROCESS_SHARED 1" >>confdefs.h
11309
11310		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11311$as_echo "yes" >&6; }
11312		else
11313		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
11315		fi
11316	else
11317		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319		LIBPTHREAD_CFLAGS=""
11320		LIBPTHREAD_LDFLAGS=""
11321		LIBPTHREAD_LIBS=""
11322	fi
11323
11324
11325
11326
11327
11328	if test "x$found_libpthread" != "xyes"; then
11329		as_fn_error $? "Unable to use libpthread (libpthread check failed)" "$LINENO" 5
11330	fi
11331fi
11332
11333SERVER_LDFLAGS="$SERVER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11334SERVER_LIBS="$SERVER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11335
11336PROXY_LDFLAGS="$PROXY_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11337PROXY_LIBS="$PROXY_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11338
11339AGENT_LDFLAGS="$AGENT_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11340AGENT_LIBS="$AGENT_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11341
11342 if test "x$have_ipmi" = "xyes"; then
11343  HAVE_IPMI_TRUE=
11344  HAVE_IPMI_FALSE='#'
11345else
11346  HAVE_IPMI_TRUE='#'
11347  HAVE_IPMI_FALSE=
11348fi
11349
11350 if test "x$have_libxml2" = "xyes"; then
11351  HAVE_LIBXML2_TRUE=
11352  HAVE_LIBXML2_FALSE='#'
11353else
11354  HAVE_LIBXML2_TRUE='#'
11355  HAVE_LIBXML2_FALSE=
11356fi
11357
11358
11359have_ipcservice="no"
11360if test "x$have_ipmi" = "xyes"; then
11361	have_ipcservice="yes"
11362fi
11363
11364if test "x$server" = "xyes"; then
11365	have_ipcservice="yes"
11366fi
11367
11368 if test "x$have_ipmi" = "xyes"; then
11369  PROXY_IPCSERVICE_TRUE=
11370  PROXY_IPCSERVICE_FALSE='#'
11371else
11372  PROXY_IPCSERVICE_TRUE='#'
11373  PROXY_IPCSERVICE_FALSE=
11374fi
11375
11376
11377if test "x$have_ipcservice" = "xyes"; then
11378
11379$as_echo "#define HAVE_IPCSERVICE 1" >>confdefs.h
11380
11381
11382
11383
11384# Check whether --with-libevent was given.
11385if test "${with_libevent+set}" = set; then :
11386  withval=$with_libevent;
11387			test "x$withval" = "xyes" && withval=/usr
11388			LIBEVENT_CFLAGS="-I$withval/include"
11389			LIBEVENT_LDFLAGS="-L$withval/lib"
11390			_libevent_dir_set="yes"
11391
11392
11393fi
11394
11395
11396
11397# Check whether --with-libevent-include was given.
11398if test "${with_libevent_include+set}" = set; then :
11399  withval=$with_libevent_include;
11400			LIBEVENT_CFLAGS="-I$withval"
11401			_libevent_dir_set="yes"
11402
11403
11404fi
11405
11406
11407
11408# Check whether --with-libevent-lib was given.
11409if test "${with_libevent_lib+set}" = set; then :
11410  withval=$with_libevent_lib;
11411			LIBEVENT_LDFLAGS="-L$withval"
11412			_libevent_dir_set="yes"
11413
11414
11415fi
11416
11417
11418	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent support" >&5
11419$as_echo_n "checking for libevent support... " >&6; }
11420
11421	LIBEVENT_LIBS="-levent"
11422
11423	if test -n "$_libevent_dir_set" -o -f /usr/include/event.h; then
11424		found_libevent="yes"
11425	elif test -f /usr/local/include/event.h; then
11426		LIBEVENT_CFLAGS="-I/usr/local/include"
11427		LIBEVENT_LDFLAGS="-L/usr/local/lib"
11428		found_libevent="yes"
11429	else
11430		found_libevent="no"
11431		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
11433	fi
11434
11435	if test "x$found_libevent" = "xyes"; then
11436		am_save_CFLAGS="$CFLAGS"
11437		am_save_LDFLAGS="$LDFLAGS"
11438		am_save_LIBS="$LIBS"
11439
11440		CFLAGS="$CFLAGS $LIBEVENT_CFLAGS"
11441		LDFLAGS="$LDFLAGS $LIBEVENT_LDFLAGS"
11442		LIBS="$LIBS $LIBEVENT_LIBS"
11443
11444		found_libevent="no"
11445
11446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11447/* end confdefs.h.  */
11448
11449#include <stdlib.h>
11450#include <event.h>
11451
11452int
11453main ()
11454{
11455
11456	event_init();
11457
11458  ;
11459  return 0;
11460}
11461_ACEOF
11462if ac_fn_c_try_link "$LINENO"; then :
11463  found_libevent="yes"
11464fi
11465rm -f core conftest.err conftest.$ac_objext \
11466    conftest$ac_exeext conftest.$ac_ext
11467
11468
11469		CFLAGS="$am_save_CFLAGS"
11470		LDFLAGS="$am_save_LDFLAGS"
11471		LIBS="$am_save_LIBS"
11472	fi
11473
11474	if test "x$found_libevent" = "xyes"; then
11475
11476$as_echo "#define HAVE_LIBEVENT 1" >>confdefs.h
11477
11478		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11479$as_echo "yes" >&6; }
11480	else
11481		LIBEVENT_CFLAGS=""
11482		LIBEVENT_LDFLAGS=""
11483		LIBEVENT_LIBS=""
11484	fi
11485
11486
11487
11488
11489
11490	if test "x$found_libevent" != "xyes"; then
11491		as_fn_error $? "Unable to use libevent (libevent check failed)" "$LINENO" 5
11492	fi
11493
11494	SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBEVENT_LDFLAGS"
11495	SERVER_LIBS="$SERVER_LIBS $LIBEVENT_LIBS"
11496
11497	if test "x$have_ipmi" = "xyes"; then
11498		PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBEVENT_LDFLAGS"
11499		PROXY_LIBS="$PROXY_LIBS $LIBEVENT_LIBS"
11500	fi
11501fi
11502
11503
11504
11505# Check whether --with-mbedtls was given.
11506if test "${with_mbedtls+set}" = set; then :
11507  withval=$with_mbedtls;
11508	if test "$withval" = "no"; then
11509	    want_mbedtls="no"
11510	    _libmbedtls_dir="no"
11511	elif test "$withval" = "yes"; then
11512	    want_mbedtls="yes"
11513	    _libmbedtls_dir="no"
11514	else
11515	    want_mbedtls="yes"
11516	    _libmbedtls_dir=$withval
11517	fi
11518	accept_mbedtls_version="no"
11519
11520else
11521  want_mbedtls=no
11522
11523fi
11524
11525
11526  if test "x$want_mbedtls" = "xyes"; then
11527     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbed TLS (PolarSSL) support" >&5
11528$as_echo_n "checking for mbed TLS (PolarSSL) support... " >&6; }
11529
11530     if test "x$_libmbedtls_dir" = "xno"; then
11531       if test -f /usr/local/include/polarssl/version.h; then
11532         MBEDTLS_CFLAGS=-I/usr/local/include
11533         MBEDTLS_LDFLAGS=-L/usr/local/lib
11534         MBEDTLS_LIBS="-lpolarssl"
11535         found_mbedtls="yes"
11536
11537	# Zabbix minimal supported version of libmbedtls:
11538	minimal_mbedtls_version_major=1
11539	minimal_mbedtls_version_minor=3
11540	minimal_mbedtls_version_patch=9
11541
11542	# get version
11543	found_mbedtls_version_major=`cat /usr/local/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_MAJOR | $AWK '{print $3;}'`
11544	found_mbedtls_version_minor=`cat /usr/local/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_MINOR | $AWK '{print $3;}'`
11545	found_mbedtls_version_patch=`cat /usr/local/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_PATCH | $AWK '{print $3;}'`
11546
11547	if test $((found_mbedtls_version_major)) -gt $((minimal_mbedtls_version_major)); then
11548		accept_mbedtls_version="yes"
11549	elif test $((found_mbedtls_version_major)) -lt $((minimal_mbedtls_version_major)); then
11550		accept_mbedtls_version="no"
11551	elif test $((found_mbedtls_version_minor)) -gt $((minimal_mbedtls_version_minor)); then
11552		accept_mbedtls_version="yes"
11553	elif test $((found_mbedtls_version_minor)) -lt $((minimal_mbedtls_version_minor)); then
11554		accept_mbedtls_version="no"
11555	elif test $((found_mbedtls_version_patch)) -ge $((minimal_mbedtls_version_patch)); then
11556		accept_mbedtls_version="yes"
11557	else
11558		accept_mbedtls_version="no"
11559	fi;
11560
11561       elif test -f /usr/include/polarssl/version.h; then
11562         MBEDTLS_CFLAGS=-I/usr/include
11563         MBEDTLS_LDFLAGS=-L/usr/lib
11564         MBEDTLS_LIBS="-lpolarssl"
11565         found_mbedtls="yes"
11566
11567	# Zabbix minimal supported version of libmbedtls:
11568	minimal_mbedtls_version_major=1
11569	minimal_mbedtls_version_minor=3
11570	minimal_mbedtls_version_patch=9
11571
11572	# get version
11573	found_mbedtls_version_major=`cat /usr/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_MAJOR | $AWK '{print $3;}'`
11574	found_mbedtls_version_minor=`cat /usr/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_MINOR | $AWK '{print $3;}'`
11575	found_mbedtls_version_patch=`cat /usr/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_PATCH | $AWK '{print $3;}'`
11576
11577	if test $((found_mbedtls_version_major)) -gt $((minimal_mbedtls_version_major)); then
11578		accept_mbedtls_version="yes"
11579	elif test $((found_mbedtls_version_major)) -lt $((minimal_mbedtls_version_major)); then
11580		accept_mbedtls_version="no"
11581	elif test $((found_mbedtls_version_minor)) -gt $((minimal_mbedtls_version_minor)); then
11582		accept_mbedtls_version="yes"
11583	elif test $((found_mbedtls_version_minor)) -lt $((minimal_mbedtls_version_minor)); then
11584		accept_mbedtls_version="no"
11585	elif test $((found_mbedtls_version_patch)) -ge $((minimal_mbedtls_version_patch)); then
11586		accept_mbedtls_version="yes"
11587	else
11588		accept_mbedtls_version="no"
11589	fi;
11590
11591       else			# libraries are not found in default directories
11592         found_mbedtls="no"
11593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11594$as_echo "no" >&6; }
11595       fi
11596     else
11597       if test -f $_libmbedtls_dir/include/polarssl/version.h; then
11598         MBEDTLS_CFLAGS=-I$_libmbedtls_dir/include
11599         MBEDTLS_LDFLAGS=-L$_libmbedtls_dir/lib
11600         MBEDTLS_LIBS="-lpolarssl"
11601         found_mbedtls="yes"
11602
11603	# Zabbix minimal supported version of libmbedtls:
11604	minimal_mbedtls_version_major=1
11605	minimal_mbedtls_version_minor=3
11606	minimal_mbedtls_version_patch=9
11607
11608	# get version
11609	found_mbedtls_version_major=`cat $_libmbedtls_dir/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_MAJOR | $AWK '{print $3;}'`
11610	found_mbedtls_version_minor=`cat $_libmbedtls_dir/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_MINOR | $AWK '{print $3;}'`
11611	found_mbedtls_version_patch=`cat $_libmbedtls_dir/include/polarssl/version.h | $EGREP \#define.*POLARSSL_VERSION_PATCH | $AWK '{print $3;}'`
11612
11613	if test $((found_mbedtls_version_major)) -gt $((minimal_mbedtls_version_major)); then
11614		accept_mbedtls_version="yes"
11615	elif test $((found_mbedtls_version_major)) -lt $((minimal_mbedtls_version_major)); then
11616		accept_mbedtls_version="no"
11617	elif test $((found_mbedtls_version_minor)) -gt $((minimal_mbedtls_version_minor)); then
11618		accept_mbedtls_version="yes"
11619	elif test $((found_mbedtls_version_minor)) -lt $((minimal_mbedtls_version_minor)); then
11620		accept_mbedtls_version="no"
11621	elif test $((found_mbedtls_version_patch)) -ge $((minimal_mbedtls_version_patch)); then
11622		accept_mbedtls_version="yes"
11623	else
11624		accept_mbedtls_version="no"
11625	fi;
11626
11627       else
11628         found_mbedtls="no"
11629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
11631       fi
11632     fi
11633  fi
11634
11635  if test "x$found_mbedtls" = "xyes"; then
11636    am_save_cflags="$CFLAGS"
11637    am_save_ldflags="$LDFLAGS"
11638    am_save_libs="$LIBS"
11639
11640    CFLAGS="$CFLAGS $MBEDTLS_CFLAGS"
11641    LDFLAGS="$LDFLAGS $MBEDTLS_LDFLAGS"
11642    LIBS="$LIBS $MBEDTLS_LIBS"
11643
11644    found_mbedtls="no"
11645
11646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11647/* end confdefs.h.  */
11648
11649#include <polarssl/ssl.h>
11650
11651int
11652main ()
11653{
11654
11655	ssl_context	ssl;
11656
11657	ssl_init(&ssl);
11658
11659  ;
11660  return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_link "$LINENO"; then :
11664  found_mbedtls="yes"
11665fi
11666rm -f core conftest.err conftest.$ac_objext \
11667    conftest$ac_exeext conftest.$ac_ext
11668
11669
11670    CFLAGS="$am_save_cflags"
11671    LDFLAGS="$am_save_ldflags"
11672    LIBS="$am_save_libs"
11673
11674    if test "x$found_mbedtls" = "xyes"; then
11675
11676$as_echo "#define HAVE_POLARSSL 1" >>confdefs.h
11677
11678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11679$as_echo "yes" >&6; }
11680    else
11681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
11683      MBEDTLS_CFLAGS=""
11684      MBEDTLS_LDFLAGS=""
11685      MBEDTLS_LIBS=""
11686    fi
11687  fi
11688
11689
11690
11691
11692
11693
11694if test "x$want_mbedtls" = "xyes"; then
11695	if test "x$have_tls" != "xno"; then
11696		as_fn_error $? "You can configure for only one TLS library (--with-mbedtls, --with-gnutls or --with-openssl)." "$LINENO" 5
11697	fi
11698
11699	if test "x$found_mbedtls" != "xyes"; then
11700		as_fn_error $? "mbed TLS (PolarSSL) library libpolarssl not found" "$LINENO" 5
11701	elif test "x$accept_mbedtls_version" != "xyes"; then
11702		as_fn_error $? "mbed TLS (PolarSSL) library version requirement not met (>= 1.3.9)" "$LINENO" 5
11703	else
11704		have_tls="mbed TLS"
11705	fi
11706	TLS_CFLAGS="$MBEDTLS_CFLAGS"
11707	TLS_LDFLAGS="$MBEDTLS_LDFLAGS"
11708	TLS_LIBS="$MBEDTLS_LIBS"
11709fi
11710
11711
11712
11713# Check whether --with-gnutls was given.
11714if test "${with_gnutls+set}" = set; then :
11715  withval=$with_gnutls;
11716	if test "$withval" = "no"; then
11717	    want_gnutls="no"
11718	    _libgnutls_dir="no"
11719	elif test "$withval" = "yes"; then
11720	    want_gnutls="yes"
11721	    _libgnutls_dir="no"
11722	else
11723	    want_gnutls="yes"
11724	    _libgnutls_dir=$withval
11725	fi
11726	accept_gnutls_version="no"
11727
11728else
11729  want_gnutls=no
11730
11731fi
11732
11733
11734  if test "x$want_gnutls" = "xyes"; then
11735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GnuTLS support" >&5
11736$as_echo_n "checking for GnuTLS support... " >&6; }
11737     if test "x$_libgnutls_dir" = "xno"; then
11738       if test -f /usr/local/include/gnutls/gnutls.h; then
11739         GNUTLS_CFLAGS=-I/usr/local/include
11740         GNUTLS_LDFLAGS=-L/usr/local/lib
11741         GNUTLS_LIBS="-lgnutls"
11742         found_gnutls="yes"
11743
11744	# Zabbix minimal supported version of libgnutls:
11745	minimal_gnutls_version_major=3
11746	minimal_gnutls_version_minor=1
11747	minimal_gnutls_version_patch=18
11748
11749	# get version
11750	found_gnutls_version_major=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11751	found_gnutls_version_minor=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11752	found_gnutls_version_patch=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11753
11754	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11755		accept_gnutls_version="yes"
11756	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11757		accept_gnutls_version="no"
11758	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11759		accept_gnutls_version="yes"
11760	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11761		accept_gnutls_version="no"
11762	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11763		accept_gnutls_version="yes"
11764	else
11765		accept_gnutls_version="no"
11766	fi;
11767
11768       elif test -f /usr/include/gnutls/gnutls.h; then
11769         GNUTLS_CFLAGS=-I/usr/include
11770         GNUTLS_LDFLAGS=-L/usr/lib
11771         GNUTLS_LIBS="-lgnutls"
11772         found_gnutls="yes"
11773
11774	# Zabbix minimal supported version of libgnutls:
11775	minimal_gnutls_version_major=3
11776	minimal_gnutls_version_minor=1
11777	minimal_gnutls_version_patch=18
11778
11779	# get version
11780	found_gnutls_version_major=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11781	found_gnutls_version_minor=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11782	found_gnutls_version_patch=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11783
11784	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11785		accept_gnutls_version="yes"
11786	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11787		accept_gnutls_version="no"
11788	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11789		accept_gnutls_version="yes"
11790	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11791		accept_gnutls_version="no"
11792	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11793		accept_gnutls_version="yes"
11794	else
11795		accept_gnutls_version="no"
11796	fi;
11797
11798       else #libraries are not found in default directories
11799         found_gnutls="no"
11800         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11801$as_echo "no" >&6; }
11802       fi
11803     else
11804       if test -f $_libgnutls_dir/include/gnutls/gnutls.h; then
11805         GNUTLS_CFLAGS=-I$_libgnutls_dir/include
11806         GNUTLS_LDFLAGS=-L$_libgnutls_dir/lib
11807         GNUTLS_LIBS="-lgnutls"
11808         found_gnutls="yes"
11809
11810	# Zabbix minimal supported version of libgnutls:
11811	minimal_gnutls_version_major=3
11812	minimal_gnutls_version_minor=1
11813	minimal_gnutls_version_patch=18
11814
11815	# get version
11816	found_gnutls_version_major=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11817	found_gnutls_version_minor=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11818	found_gnutls_version_patch=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11819
11820	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11821		accept_gnutls_version="yes"
11822	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11823		accept_gnutls_version="no"
11824	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11825		accept_gnutls_version="yes"
11826	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11827		accept_gnutls_version="no"
11828	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11829		accept_gnutls_version="yes"
11830	else
11831		accept_gnutls_version="no"
11832	fi;
11833
11834       else
11835         found_gnutls="no"
11836         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11837$as_echo "no" >&6; }
11838       fi
11839     fi
11840  fi
11841
11842  if test "x$found_gnutls" = "xyes"; then
11843    am_save_cflags="$CFLAGS"
11844    am_save_ldflags="$LDFLAGS"
11845    am_save_libs="$LIBS"
11846
11847    CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
11848    LDFLAGS="$LDFLAGS $GNUTLS_LDFLAGS"
11849    LIBS="$LIBS $GNUTLS_LIBS"
11850
11851    found_gnutls="no"
11852
11853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11854/* end confdefs.h.  */
11855
11856#include <gnutls/gnutls.h>
11857
11858int
11859main ()
11860{
11861
11862	gnutls_global_init();
11863
11864  ;
11865  return 0;
11866}
11867_ACEOF
11868if ac_fn_c_try_link "$LINENO"; then :
11869  found_gnutls="yes"
11870fi
11871rm -f core conftest.err conftest.$ac_objext \
11872    conftest$ac_exeext conftest.$ac_ext
11873
11874
11875    CFLAGS="$am_save_cflags"
11876    LDFLAGS="$am_save_ldflags"
11877    LIBS="$am_save_libs"
11878
11879    if test "x$found_gnutls" = "xyes"; then
11880
11881$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11882
11883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11884$as_echo "yes" >&6; }
11885    else
11886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
11888      GNUTLS_CFLAGS=""
11889      GNUTLS_LDFLAGS=""
11890      GNUTLS_LIBS=""
11891    fi
11892  fi
11893
11894
11895
11896
11897
11898
11899if test "x$want_gnutls" = "xyes"; then
11900	if test "x$have_tls" != "xno"; then
11901		as_fn_error $? "You can configure for only one TLS library (--with-mbedtls, --with-gnutls or --with-openssl)." "$LINENO" 5
11902	fi
11903
11904	if test "x$found_gnutls" != "xyes"; then
11905		as_fn_error $? "GnuTLS library libgnutls not found" "$LINENO" 5
11906	elif test "x$accept_gnutls_version" != "xyes"; then
11907		as_fn_error $? "GnuTLS library version requirement not met (>= 3.1.18)" "$LINENO" 5
11908	else
11909		have_tls="GnuTLS"
11910	fi
11911	TLS_CFLAGS="$GNUTLS_CFLAGS"
11912	TLS_LDFLAGS="$GNUTLS_LDFLAGS"
11913	TLS_LIBS="$GNUTLS_LIBS"
11914fi
11915
11916
11917
11918# Check whether --with-openssl was given.
11919if test "${with_openssl+set}" = set; then :
11920  withval=$with_openssl;
11921	if test "$withval" = "no"; then
11922	    want_openssl="no"
11923	    _libopenssl_dir="no"
11924	elif test "$withval" = "yes"; then
11925	    want_openssl="yes"
11926	    _libopenssl_dir="no"
11927	else
11928	    want_openssl="yes"
11929	    _libopenssl_dir=$withval
11930	    _libopenssl_dir_lib="$withval/lib"
11931	fi
11932	accept_openssl_version="no"
11933
11934else
11935  want_openssl=no
11936
11937fi
11938
11939
11940  if test "x$want_openssl" = "xyes"; then
11941
11942    if test "x$enable_static_libs" = "xyes"; then
11943        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
11944
11945
11946
11947
11948
11949
11950
11951
11952if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11953	if test -n "$ac_tool_prefix"; then
11954  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11955set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_PKG_CONFIG+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $PKG_CONFIG in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11985if test -n "$PKG_CONFIG"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11987$as_echo "$PKG_CONFIG" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994fi
11995if test -z "$ac_cv_path_PKG_CONFIG"; then
11996  ac_pt_PKG_CONFIG=$PKG_CONFIG
11997  # Extract the first word of "pkg-config", so it can be a program name with args.
11998set dummy pkg-config; ac_word=$2
11999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12000$as_echo_n "checking for $ac_word... " >&6; }
12001if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
12002  $as_echo_n "(cached) " >&6
12003else
12004  case $ac_pt_PKG_CONFIG in
12005  [\\/]* | ?:[\\/]*)
12006  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12007  ;;
12008  *)
12009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12010for as_dir in $PATH
12011do
12012  IFS=$as_save_IFS
12013  test -z "$as_dir" && as_dir=.
12014    for ac_exec_ext in '' $ac_executable_extensions; do
12015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12016    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12018    break 2
12019  fi
12020done
12021  done
12022IFS=$as_save_IFS
12023
12024  ;;
12025esac
12026fi
12027ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12028if test -n "$ac_pt_PKG_CONFIG"; then
12029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12030$as_echo "$ac_pt_PKG_CONFIG" >&6; }
12031else
12032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12033$as_echo "no" >&6; }
12034fi
12035
12036  if test "x$ac_pt_PKG_CONFIG" = x; then
12037    PKG_CONFIG=""
12038  else
12039    case $cross_compiling:$ac_tool_warned in
12040yes:)
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12042$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12043ac_tool_warned=yes ;;
12044esac
12045    PKG_CONFIG=$ac_pt_PKG_CONFIG
12046  fi
12047else
12048  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12049fi
12050
12051fi
12052if test -n "$PKG_CONFIG"; then
12053	_pkg_min_version=0.9.0
12054	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12055$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12056	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12057		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12058$as_echo "yes" >&6; }
12059	else
12060		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12061$as_echo "no" >&6; }
12062		PKG_CONFIG=""
12063	fi
12064fi
12065        test -z "$PKG_CONFIG" -a -z "$_libopenssl_dir_lib" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
12066
12067    fi
12068
12069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL support" >&5
12070$as_echo_n "checking for OpenSSL support... " >&6; }
12071     if test "x$_libopenssl_dir" = "xno"; then		# if OpenSSL directory is not specified
12072       if test -f /usr/local/include/openssl/ssl.h -a -f /usr/local/include/openssl/crypto.h; then
12073         OPENSSL_CFLAGS=-I/usr/local/include
12074         OPENSSL_LDFLAGS=-L/usr/local/lib
12075         OPENSSL_LIBS="-lssl -lcrypto"
12076         found_openssl="yes"
12077
12078	# Zabbix minimal supported version of OpenSSL.
12079	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
12080	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
12081	minimal_openssl_version=0x1000100
12082
12083	# get version
12084	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "/usr/local/include/openssl/opensslv.h"`
12085	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
12086
12087	# compare versions lexicographically
12088	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
12089	if test "$openssl_version_check" = "1"; then
12090		accept_openssl_version="yes"
12091	else
12092		accept_openssl_version="no"
12093	fi;
12094
12095       elif test -f /usr/include/openssl/ssl.h -a -f /usr/include/openssl/crypto.h; then
12096         OPENSSL_CFLAGS=-I/usr/include
12097         OPENSSL_LDFLAGS=-L/usr/lib
12098         OPENSSL_LIBS="-lssl -lcrypto"
12099         found_openssl="yes"
12100
12101	# Zabbix minimal supported version of OpenSSL.
12102	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
12103	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
12104	minimal_openssl_version=0x1000100
12105
12106	# get version
12107	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "/usr/include/openssl/opensslv.h"`
12108	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
12109
12110	# compare versions lexicographically
12111	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
12112	if test "$openssl_version_check" = "1"; then
12113		accept_openssl_version="yes"
12114	else
12115		accept_openssl_version="no"
12116	fi;
12117
12118       else						# libraries are not found in default directories
12119         found_openssl="no"
12120         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12121$as_echo "no" >&6; }
12122       fi
12123     else						# search in the specified OpenSSL directory
12124       if test -f $_libopenssl_dir/include/openssl/ssl.h -a -f $_libopenssl_dir/include/openssl/crypto.h; then
12125         OPENSSL_CFLAGS=-I$_libopenssl_dir/include
12126         OPENSSL_LDFLAGS=-L$_libopenssl_dir/lib
12127         OPENSSL_LIBS="-lssl -lcrypto"
12128         found_openssl="yes"
12129
12130	# Zabbix minimal supported version of OpenSSL.
12131	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
12132	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
12133	minimal_openssl_version=0x1000100
12134
12135	# get version
12136	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "$_libopenssl_dir/include/openssl/opensslv.h"`
12137	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
12138
12139	# compare versions lexicographically
12140	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
12141	if test "$openssl_version_check" = "1"; then
12142		accept_openssl_version="yes"
12143	else
12144		accept_openssl_version="no"
12145	fi;
12146
12147       else						# libraries are not found in specified directories
12148         found_openssl="no"
12149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
12151       fi
12152     fi
12153  fi
12154
12155  if test "x$found_openssl" = "xyes"; then
12156    am_save_cflags="$CFLAGS"
12157    am_save_ldflags="$LDFLAGS"
12158    am_save_libs="$LIBS"
12159
12160    if test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
12161      OPENSSL_LIBS="$_libopenssl_dir_lib/libssl.a $_libopenssl_dir_lib/libcrypto.a"
12162    elif test "x$enable_static_libs" = "xyes"; then
12163      if test -z "$_libopenssl_dir_lib"; then
12164        if test -n "$PKG_CONFIG" && \
12165    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
12166  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
12167  ac_status=$?
12168  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12169  test $ac_status = 0; }; then
12170
12171          OPENSSL_LIBS=`$PKG_CONFIG --static --libs openssl`
12172
12173else
12174
12175          as_fn_error $? "Not found openssl package" "$LINENO" 5
12176
12177fi
12178      else
12179        { { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libopenssl_dir_lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors openssl"; } >&5
12180  (PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors openssl) 2>&5
12181  ac_status=$?
12182  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12183  test $ac_status = 0; } || as_fn_error $? "\"Not found openssl package in $_libopenssl_dir/lib/pkgconfig\"" "$LINENO" 5
12184        OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --static --libs openssl`
12185        test -z "$OPENSSL_LIBS" && OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --libs openssl`
12186      fi
12187
12188      if test "x$static_linking_support" = "xno"; then
12189        OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s|-lssl|$_libopenssl_dir_lib/libssl.a|g"|sed "s|-lcrypto|$_libopenssl_dir_lib/libcrypto.a|g"`
12190      else
12191        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"`
12192      fi
12193    fi
12194
12195    CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
12196    LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
12197    LIBS="$OPENSSL_LIBS $LIBS"
12198
12199    found_openssl="no"
12200
12201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202/* end confdefs.h.  */
12203
12204#include <openssl/ssl.h>
12205#include <openssl/bio.h>
12206
12207int
12208main ()
12209{
12210
12211	/* check that both libssl and libcrypto are available */
12212
12213	SSL	*ssl = NULL;
12214
12215	SSL_connect(ssl);	/* a function from libssl, present in both OpenSSL 1.0.1 and 1.1.0 */
12216	BIO_new(BIO_s_mem());	/* a function from libcrypto */
12217
12218  ;
12219  return 0;
12220}
12221_ACEOF
12222if ac_fn_c_try_link "$LINENO"; then :
12223  found_openssl="yes"
12224fi
12225rm -f core conftest.err conftest.$ac_objext \
12226    conftest$ac_exeext conftest.$ac_ext
12227
12228
12229    if test "x$found_openssl" = "xyes"; then
12230
12231$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
12232
12233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12234$as_echo "yes" >&6; }
12235
12236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL supports PSK" >&5
12237$as_echo_n "checking if OpenSSL supports PSK... " >&6; }
12238      found_openssl_with_psk="no"
12239
12240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241/* end confdefs.h.  */
12242
12243#include <openssl/ssl.h>
12244
12245int
12246main ()
12247{
12248
12249	/* check if OPENSSL_NO_PSK is defined */
12250#ifdef OPENSSL_NO_PSK
12251#	error "OPENSSL_NO_PSK is defined. PSK support will not be available."
12252#endif
12253
12254  ;
12255  return 0;
12256}
12257_ACEOF
12258if ac_fn_c_try_link "$LINENO"; then :
12259  found_openssl_with_psk="yes"
12260fi
12261rm -f core conftest.err conftest.$ac_objext \
12262    conftest$ac_exeext conftest.$ac_ext
12263
12264      if test "x$found_openssl_with_psk" = "xyes"; then
12265
12266$as_echo "#define HAVE_OPENSSL_WITH_PSK 1" >>confdefs.h
12267
12268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12269$as_echo "yes" >&6; }
12270        found_openssl="OpenSSL"
12271      else
12272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12273$as_echo "no" >&6; }
12274        found_openssl="OpenSSL (PSK not supported)"
12275      fi
12276
12277    else
12278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12279$as_echo "no" >&6; }
12280      OPENSSL_CFLAGS=""
12281      OPENSSL_LDFLAGS=""
12282      OPENSSL_LIBS=""
12283    fi
12284
12285    CFLAGS="$am_save_cflags"
12286    LDFLAGS="$am_save_ldflags"
12287    LIBS="$am_save_libs"
12288  fi
12289
12290
12291
12292
12293
12294
12295if test "x$want_openssl" = "xyes"; then
12296	if test "x$have_tls" != "xno"; then
12297		as_fn_error $? "You can configure for only one TLS library (--with-mbedtls, --with-gnutls or --with-openssl)." "$LINENO" 5
12298	fi
12299
12300	if test "x$found_openssl" != "xOpenSSL" -a "x$found_openssl" != "xOpenSSL (PSK not supported)"; then
12301		as_fn_error $? "OpenSSL library libssl or libcrypto not found" "$LINENO" 5
12302	elif test "x$accept_openssl_version" != "xyes"; then
12303		as_fn_error $? "OpenSSL library version requirement not met (>= 1.0.1)" "$LINENO" 5
12304	else
12305		have_tls=$found_openssl
12306	fi
12307	TLS_CFLAGS="$OPENSSL_CFLAGS"
12308	TLS_LDFLAGS="$OPENSSL_LDFLAGS"
12309	TLS_LIBS="$OPENSSL_LIBS"
12310fi
12311
12312
12313SERVER_LDFLAGS="$SERVER_LDFLAGS $TLS_LDFLAGS"
12314SERVER_LIBS="$SERVER_LIBS $TLS_LIBS"
12315
12316PROXY_LDFLAGS="$PROXY_LDFLAGS $TLS_LDFLAGS"
12317PROXY_LIBS="$PROXY_LIBS $TLS_LIBS"
12318
12319AGENT_LDFLAGS="$AGENT_LDFLAGS $TLS_LDFLAGS"
12320AGENT_LIBS="$AGENT_LIBS $TLS_LIBS"
12321
12322ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $TLS_LDFLAGS"
12323ZBXGET_LIBS="$ZBXGET_LIBS $TLS_LIBS"
12324
12325SENDER_LDFLAGS="$SENDER_LDFLAGS $TLS_LDFLAGS"
12326SENDER_LIBS="$SENDER_LIBS $TLS_LIBS"
12327
12328if test "x$java" = "xyes"; then
12329	for ac_prog in javac
12330do
12331  # Extract the first word of "$ac_prog", so it can be a program name with args.
12332set dummy $ac_prog; ac_word=$2
12333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12334$as_echo_n "checking for $ac_word... " >&6; }
12335if ${ac_cv_prog_JAVAC+:} false; then :
12336  $as_echo_n "(cached) " >&6
12337else
12338  if test -n "$JAVAC"; then
12339  ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
12340else
12341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12342for as_dir in $PATH
12343do
12344  IFS=$as_save_IFS
12345  test -z "$as_dir" && as_dir=.
12346    for ac_exec_ext in '' $ac_executable_extensions; do
12347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12348    ac_cv_prog_JAVAC="$ac_prog"
12349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12350    break 2
12351  fi
12352done
12353  done
12354IFS=$as_save_IFS
12355
12356fi
12357fi
12358JAVAC=$ac_cv_prog_JAVAC
12359if test -n "$JAVAC"; then
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
12361$as_echo "$JAVAC" >&6; }
12362else
12363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364$as_echo "no" >&6; }
12365fi
12366
12367
12368  test -n "$JAVAC" && break
12369done
12370test -n "$JAVAC" || JAVAC="no"
12371
12372	if test "x$JAVAC" = "xno"; then
12373		as_fn_error $? "Unable to find \"javac\" executable in path" "$LINENO" 5
12374	fi
12375	for ac_prog in jar
12376do
12377  # Extract the first word of "$ac_prog", so it can be a program name with args.
12378set dummy $ac_prog; ac_word=$2
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12380$as_echo_n "checking for $ac_word... " >&6; }
12381if ${ac_cv_prog_JAR+:} false; then :
12382  $as_echo_n "(cached) " >&6
12383else
12384  if test -n "$JAR"; then
12385  ac_cv_prog_JAR="$JAR" # Let the user override the test.
12386else
12387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12388for as_dir in $PATH
12389do
12390  IFS=$as_save_IFS
12391  test -z "$as_dir" && as_dir=.
12392    for ac_exec_ext in '' $ac_executable_extensions; do
12393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12394    ac_cv_prog_JAR="$ac_prog"
12395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12396    break 2
12397  fi
12398done
12399  done
12400IFS=$as_save_IFS
12401
12402fi
12403fi
12404JAR=$ac_cv_prog_JAR
12405if test -n "$JAR"; then
12406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
12407$as_echo "$JAR" >&6; }
12408else
12409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12410$as_echo "no" >&6; }
12411fi
12412
12413
12414  test -n "$JAR" && break
12415done
12416test -n "$JAR" || JAR="no"
12417
12418	if test "x$JAR" = "xno"; then
12419		as_fn_error $? "Unable to find \"jar\" executable in path" "$LINENO" 5
12420	fi
12421fi
12422
12423found_ldap="no"
12424
12425
12426# Check whether --with-ldap was given.
12427if test "${with_ldap+set}" = set; then :
12428  withval=$with_ldap;  if test "$withval" = "no"; then
12429            want_ldap="no"
12430            _libldap_with="no"
12431        elif test "$withval" = "yes"; then
12432            want_ldap="yes"
12433            _libldap_with="yes"
12434        else
12435            want_ldap="yes"
12436            _libldap_with=$withval
12437        fi
12438
12439else
12440  _libldap_with=no
12441fi
12442
12443
12444  if test "x$_libldap_with" != x"no"; then
12445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support of ldap.h" >&5
12446$as_echo_n "checking for LDAP support of ldap.h... " >&6; }
12447
12448        if test "$_libldap_with" = "yes"; then
12449                if test -f /usr/local/openldap/include/ldap.h; then
12450                        LDAP_INCDIR=/usr/local/openldap/include/
12451                        LDAP_LIBDIR=/usr/local/openldap/lib/
12452                        found_ldap="yes"
12453                elif test -f /usr/include/ldap.h; then
12454                        LDAP_INCDIR=/usr/include
12455                        LDAP_LIBDIR=/usr/lib
12456                        found_ldap="yes"
12457                elif test -f /usr/local/include/ldap.h; then
12458                        LDAP_INCDIR=/usr/local/include
12459                        LDAP_LIBDIR=/usr/local/lib
12460                        found_ldap="yes"
12461                else
12462                        found_ldap="no"
12463                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12464$as_echo "no" >&6; }
12465                fi
12466        else
12467                if test -f $_libldap_with/include/ldap.h; then
12468                        LDAP_INCDIR=$_libldap_with/include
12469                        LDAP_LIBDIR=$_libldap_with/lib
12470                        _ldap_dir_lib="$LDAP_LIBDIR"
12471
12472                        found_ldap="yes"
12473                else
12474                        found_ldap="no"
12475                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12476$as_echo "no" >&6; }
12477                fi
12478        fi
12479
12480        if test "x$found_ldap" != "xno"; then
12481
12482                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12483$as_echo "yes" >&6; }
12484                LDAP_CPPFLAGS="-I$LDAP_INCDIR"
12485                LDAP_LDFLAGS="-L$LDAP_LIBDIR"
12486                LDAP_LIBS="-lldap -llber $LDAP_LIBS"
12487
12488                if test "x$enable_static" = "xyes"; then
12489                        LDAP_LIBS="$LDAP_LIBS -lgnutls -lpthread -lsasl2"
12490                elif test "x$enable_static_libs" = "xyes"; then
12491                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking compatibility of static LDAP libs" >&5
12492$as_echo_n "checking compatibility of static LDAP libs... " >&6; }
12493                        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
12494
12495                        if test "x$static_linking_support" = "xno"; then
12496                                LDAP_LIBS=`echo "$LDAP_LIBS"|sed "s|-lldap|$_ldap_dir_lib/libldap.a|g"|sed "s|-llber|$_ldap_dir_lib/liblber.a|g"`
12497                        fi
12498
12499                        # without SSL and SASL
12500                        if test "x$static_linking_support" = "xno"; then
12501                                TRY_LDAP_LIBS="$LDAP_LIBS -lpthread"
12502                        else
12503                                TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread"
12504                        fi
12505
12506_save_ldap_cppflags="$CPPFLAGS"
12507_save_ldap_cflags="$CFLAGS"
12508_save_ldap_ldflags="$LDFLAGS"
12509_save_ldap_libs="$LIBS"
12510
12511LIBS="$LIBS $TRY_LDAP_LIBS"
12512LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12513CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12514CFLAGS="$CFLAGS "
12515ldap_link="no"
12516
12517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12518/* end confdefs.h.  */
12519
12520#include <stdio.h>
12521#include <ldap.h>
12522#include <lber.h>
12523#include <ldap_schema.h>
12524
12525int
12526main ()
12527{
12528
12529printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12530printf("%p", ber_free);
12531return 0;
12532
12533  ;
12534  return 0;
12535}
12536_ACEOF
12537if ac_fn_c_try_link "$LINENO"; then :
12538
12539ldap_link="yes"
12540
12541fi
12542rm -f core conftest.err conftest.$ac_objext \
12543    conftest$ac_exeext conftest.$ac_ext
12544
12545CPPFLAGS="$_save_ldap_cppflags"
12546CFLAGS="$_save_ldap_cflags"
12547LDFLAGS="$_save_ldap_ldflags"
12548LIBS="$_save_ldap_libs"
12549unset _save_ldap_cppflags
12550unset _save_ldap_cflags
12551unset _save_ldap_ldflags
12552unset _save_ldap_libs
12553if test "x$ldap_link" = "xyes"; then :
12554
12555                                LDAP_LIBS=$TRY_LDAP_LIBS
12556                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL" >&5
12557$as_echo "without SSL" >&6; }
12558
12559fi
12560
12561                        # without SSL
12562                        if test "x$ldap_link" = "xno"; then
12563                                if test "x$static_linking_support" = "xno"; then
12564                                        TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl2"
12565                                else
12566                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl2"
12567                                fi
12568
12569_save_ldap_cppflags="$CPPFLAGS"
12570_save_ldap_cflags="$CFLAGS"
12571_save_ldap_ldflags="$LDFLAGS"
12572_save_ldap_libs="$LIBS"
12573
12574LIBS="$LIBS $TRY_LDAP_LIBS"
12575LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12576CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12577CFLAGS="$CFLAGS "
12578ldap_link="no"
12579
12580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581/* end confdefs.h.  */
12582
12583#include <stdio.h>
12584#include <ldap.h>
12585#include <lber.h>
12586#include <ldap_schema.h>
12587
12588int
12589main ()
12590{
12591
12592printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12593printf("%p", ber_free);
12594return 0;
12595
12596  ;
12597  return 0;
12598}
12599_ACEOF
12600if ac_fn_c_try_link "$LINENO"; then :
12601
12602ldap_link="yes"
12603
12604fi
12605rm -f core conftest.err conftest.$ac_objext \
12606    conftest$ac_exeext conftest.$ac_ext
12607
12608CPPFLAGS="$_save_ldap_cppflags"
12609CFLAGS="$_save_ldap_cflags"
12610LDFLAGS="$_save_ldap_ldflags"
12611LIBS="$_save_ldap_libs"
12612unset _save_ldap_cppflags
12613unset _save_ldap_cflags
12614unset _save_ldap_ldflags
12615unset _save_ldap_libs
12616if test "x$ldap_link" = "xyes"; then :
12617
12618                                        LDAP_LIBS=$TRY_LDAP_LIBS
12619                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL" >&5
12620$as_echo "without SSL" >&6; }
12621
12622fi
12623                        fi
12624
12625                        # without SSL for Solaris
12626                        if test "x$ldap_link" = "xno"; then
12627                                if test "x$static_linking_support" = "xno"; then
12628                                        TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl"
12629                                else
12630                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl"
12631                                fi
12632
12633_save_ldap_cppflags="$CPPFLAGS"
12634_save_ldap_cflags="$CFLAGS"
12635_save_ldap_ldflags="$LDFLAGS"
12636_save_ldap_libs="$LIBS"
12637
12638LIBS="$LIBS $TRY_LDAP_LIBS"
12639LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12640CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12641CFLAGS="$CFLAGS "
12642ldap_link="no"
12643
12644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12645/* end confdefs.h.  */
12646
12647#include <stdio.h>
12648#include <ldap.h>
12649#include <lber.h>
12650#include <ldap_schema.h>
12651
12652int
12653main ()
12654{
12655
12656printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12657printf("%p", ber_free);
12658return 0;
12659
12660  ;
12661  return 0;
12662}
12663_ACEOF
12664if ac_fn_c_try_link "$LINENO"; then :
12665
12666ldap_link="yes"
12667
12668fi
12669rm -f core conftest.err conftest.$ac_objext \
12670    conftest$ac_exeext conftest.$ac_ext
12671
12672CPPFLAGS="$_save_ldap_cppflags"
12673CFLAGS="$_save_ldap_cflags"
12674LDFLAGS="$_save_ldap_ldflags"
12675LIBS="$_save_ldap_libs"
12676unset _save_ldap_cppflags
12677unset _save_ldap_cflags
12678unset _save_ldap_ldflags
12679unset _save_ldap_libs
12680if test "x$ldap_link" = "xyes"; then :
12681
12682                                        LDAP_LIBS=$TRY_LDAP_LIBS
12683                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL and with sasl" >&5
12684$as_echo "without SSL and with sasl" >&6; }
12685
12686fi
12687                        fi
12688
12689                        # with system GnuTLS
12690                        if test "x$ldap_link" = "xno"; then
12691                                if test "x$static_linking_support" = "xno"; then
12692                                        TRY_LDAP_LIBS="$LDAP_LIBS -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
12693                                else
12694                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
12695                                fi
12696
12697_save_ldap_cppflags="$CPPFLAGS"
12698_save_ldap_cflags="$CFLAGS"
12699_save_ldap_ldflags="$LDFLAGS"
12700_save_ldap_libs="$LIBS"
12701
12702LIBS="$LIBS $TRY_LDAP_LIBS"
12703LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12704CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12705CFLAGS="$CFLAGS "
12706ldap_link="no"
12707
12708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12709/* end confdefs.h.  */
12710
12711#include <stdio.h>
12712#include <ldap.h>
12713#include <lber.h>
12714#include <ldap_schema.h>
12715
12716int
12717main ()
12718{
12719
12720printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12721printf("%p", ber_free);
12722return 0;
12723
12724  ;
12725  return 0;
12726}
12727_ACEOF
12728if ac_fn_c_try_link "$LINENO"; then :
12729
12730ldap_link="yes"
12731
12732fi
12733rm -f core conftest.err conftest.$ac_objext \
12734    conftest$ac_exeext conftest.$ac_ext
12735
12736CPPFLAGS="$_save_ldap_cppflags"
12737CFLAGS="$_save_ldap_cflags"
12738LDFLAGS="$_save_ldap_ldflags"
12739LIBS="$_save_ldap_libs"
12740unset _save_ldap_cppflags
12741unset _save_ldap_cflags
12742unset _save_ldap_ldflags
12743unset _save_ldap_libs
12744if test "x$ldap_link" = "xyes"; then :
12745
12746                                        LDAP_LIBS=$TRY_LDAP_LIBS
12747                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system GnuTLS linking" >&5
12748$as_echo "with system GnuTLS linking" >&6; }
12749
12750fi
12751                        fi
12752
12753                        # with static OpenSSL and SASL2
12754                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
12755                                if test "x$static_linking_support" = "xno"; then
12756                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
12757                                else
12758                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic $OPENSSL_LIBS"
12759                                fi
12760                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
12761                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
12762                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
12763
12764_save_ldap_cppflags="$CPPFLAGS"
12765_save_ldap_cflags="$CFLAGS"
12766_save_ldap_ldflags="$LDFLAGS"
12767_save_ldap_libs="$LIBS"
12768
12769LIBS="$LIBS $OSSL_LDAP_LIBS"
12770LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
12771CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
12772CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
12773ldap_link="no"
12774
12775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776/* end confdefs.h.  */
12777
12778#include <stdio.h>
12779#include <ldap.h>
12780#include <lber.h>
12781#include <ldap_schema.h>
12782
12783int
12784main ()
12785{
12786
12787printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12788printf("%p", ber_free);
12789return 0;
12790
12791  ;
12792  return 0;
12793}
12794_ACEOF
12795if ac_fn_c_try_link "$LINENO"; then :
12796
12797ldap_link="yes"
12798
12799fi
12800rm -f core conftest.err conftest.$ac_objext \
12801    conftest$ac_exeext conftest.$ac_ext
12802
12803CPPFLAGS="$_save_ldap_cppflags"
12804CFLAGS="$_save_ldap_cflags"
12805LDFLAGS="$_save_ldap_ldflags"
12806LIBS="$_save_ldap_libs"
12807unset _save_ldap_cppflags
12808unset _save_ldap_cflags
12809unset _save_ldap_ldflags
12810unset _save_ldap_libs
12811if test "x$ldap_link" = "xyes"; then :
12812
12813                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
12814                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL and static sasl2" >&5
12815$as_echo "with static OpenSSL and static sasl2" >&6; }
12816
12817fi
12818                        fi
12819
12820                        # with static OpenSSL
12821                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
12822                                if test "x$static_linking_support" = "xno"; then
12823                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
12824                                else
12825                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl2"
12826                                fi
12827                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
12828                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
12829                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
12830
12831_save_ldap_cppflags="$CPPFLAGS"
12832_save_ldap_cflags="$CFLAGS"
12833_save_ldap_ldflags="$LDFLAGS"
12834_save_ldap_libs="$LIBS"
12835
12836LIBS="$LIBS $OSSL_LDAP_LIBS"
12837LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
12838CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
12839CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
12840ldap_link="no"
12841
12842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843/* end confdefs.h.  */
12844
12845#include <stdio.h>
12846#include <ldap.h>
12847#include <lber.h>
12848#include <ldap_schema.h>
12849
12850int
12851main ()
12852{
12853
12854printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12855printf("%p", ber_free);
12856return 0;
12857
12858  ;
12859  return 0;
12860}
12861_ACEOF
12862if ac_fn_c_try_link "$LINENO"; then :
12863
12864ldap_link="yes"
12865
12866fi
12867rm -f core conftest.err conftest.$ac_objext \
12868    conftest$ac_exeext conftest.$ac_ext
12869
12870CPPFLAGS="$_save_ldap_cppflags"
12871CFLAGS="$_save_ldap_cflags"
12872LDFLAGS="$_save_ldap_ldflags"
12873LIBS="$_save_ldap_libs"
12874unset _save_ldap_cppflags
12875unset _save_ldap_cflags
12876unset _save_ldap_ldflags
12877unset _save_ldap_libs
12878if test "x$ldap_link" = "xyes"; then :
12879
12880                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
12881                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL" >&5
12882$as_echo "with static OpenSSL" >&6; }
12883
12884fi
12885                        fi
12886
12887                        # with static OpenSSL for Solaris
12888                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
12889                                if test "x$static_linking_support" = "xno"; then
12890                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl"
12891                                else
12892                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl"
12893                                fi
12894                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
12895                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
12896                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
12897
12898_save_ldap_cppflags="$CPPFLAGS"
12899_save_ldap_cflags="$CFLAGS"
12900_save_ldap_ldflags="$LDFLAGS"
12901_save_ldap_libs="$LIBS"
12902
12903LIBS="$LIBS $OSSL_LDAP_LIBS"
12904LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
12905CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
12906CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
12907ldap_link="no"
12908
12909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12910/* end confdefs.h.  */
12911
12912#include <stdio.h>
12913#include <ldap.h>
12914#include <lber.h>
12915#include <ldap_schema.h>
12916
12917int
12918main ()
12919{
12920
12921printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12922printf("%p", ber_free);
12923return 0;
12924
12925  ;
12926  return 0;
12927}
12928_ACEOF
12929if ac_fn_c_try_link "$LINENO"; then :
12930
12931ldap_link="yes"
12932
12933fi
12934rm -f core conftest.err conftest.$ac_objext \
12935    conftest$ac_exeext conftest.$ac_ext
12936
12937CPPFLAGS="$_save_ldap_cppflags"
12938CFLAGS="$_save_ldap_cflags"
12939LDFLAGS="$_save_ldap_ldflags"
12940LIBS="$_save_ldap_libs"
12941unset _save_ldap_cppflags
12942unset _save_ldap_cflags
12943unset _save_ldap_ldflags
12944unset _save_ldap_libs
12945if test "x$ldap_link" = "xyes"; then :
12946
12947                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
12948                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL and sasl" >&5
12949$as_echo "with static OpenSSL and sasl" >&6; }
12950
12951else
12952
12953                                        as_fn_error $? "Not compatible with static OpenLDAP libs version of static OpenSSL: \"$OPENSSL_LDFLAGS\"" "$LINENO" 5
12954
12955fi
12956                        fi
12957
12958                        # with system OpenSSL and SASL2
12959                        if test "x$ldap_link" = "xno"; then
12960                                if test "x$static_linking_support" = "xno"; then
12961                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
12962                                else
12963                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic -lssl -lcrypto"
12964                                fi
12965
12966_save_ldap_cppflags="$CPPFLAGS"
12967_save_ldap_cflags="$CFLAGS"
12968_save_ldap_ldflags="$LDFLAGS"
12969_save_ldap_libs="$LIBS"
12970
12971LIBS="$LIBS $TRY_LDAP_LIBS"
12972LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12973CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12974CFLAGS="$CFLAGS "
12975ldap_link="no"
12976
12977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12978/* end confdefs.h.  */
12979
12980#include <stdio.h>
12981#include <ldap.h>
12982#include <lber.h>
12983#include <ldap_schema.h>
12984
12985int
12986main ()
12987{
12988
12989printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12990printf("%p", ber_free);
12991return 0;
12992
12993  ;
12994  return 0;
12995}
12996_ACEOF
12997if ac_fn_c_try_link "$LINENO"; then :
12998
12999ldap_link="yes"
13000
13001fi
13002rm -f core conftest.err conftest.$ac_objext \
13003    conftest$ac_exeext conftest.$ac_ext
13004
13005CPPFLAGS="$_save_ldap_cppflags"
13006CFLAGS="$_save_ldap_cflags"
13007LDFLAGS="$_save_ldap_ldflags"
13008LIBS="$_save_ldap_libs"
13009unset _save_ldap_cppflags
13010unset _save_ldap_cflags
13011unset _save_ldap_ldflags
13012unset _save_ldap_libs
13013if test "x$ldap_link" = "xyes"; then :
13014
13015                                        LDAP_LIBS=$TRY_LDAP_LIBS
13016                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL and static sasl2 linking" >&5
13017$as_echo "with system OpenSSL and static sasl2 linking" >&6; }
13018
13019fi
13020                        fi
13021
13022                        # with system OpenSSL
13023                        if test "x$ldap_link" = "xno"; then
13024                                if test "x$static_linking_support" = "xno"; then
13025                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
13026                                else
13027                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl2 -lcrypto"
13028                                fi
13029
13030_save_ldap_cppflags="$CPPFLAGS"
13031_save_ldap_cflags="$CFLAGS"
13032_save_ldap_ldflags="$LDFLAGS"
13033_save_ldap_libs="$LIBS"
13034
13035LIBS="$LIBS $TRY_LDAP_LIBS"
13036LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13037CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13038CFLAGS="$CFLAGS "
13039ldap_link="no"
13040
13041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13042/* end confdefs.h.  */
13043
13044#include <stdio.h>
13045#include <ldap.h>
13046#include <lber.h>
13047#include <ldap_schema.h>
13048
13049int
13050main ()
13051{
13052
13053printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13054printf("%p", ber_free);
13055return 0;
13056
13057  ;
13058  return 0;
13059}
13060_ACEOF
13061if ac_fn_c_try_link "$LINENO"; then :
13062
13063ldap_link="yes"
13064
13065fi
13066rm -f core conftest.err conftest.$ac_objext \
13067    conftest$ac_exeext conftest.$ac_ext
13068
13069CPPFLAGS="$_save_ldap_cppflags"
13070CFLAGS="$_save_ldap_cflags"
13071LDFLAGS="$_save_ldap_ldflags"
13072LIBS="$_save_ldap_libs"
13073unset _save_ldap_cppflags
13074unset _save_ldap_cflags
13075unset _save_ldap_ldflags
13076unset _save_ldap_libs
13077if test "x$ldap_link" = "xyes"; then :
13078
13079                                        LDAP_LIBS=$TRY_LDAP_LIBS
13080                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL linking" >&5
13081$as_echo "with system OpenSSL linking" >&6; }
13082
13083fi
13084                        fi
13085
13086                        # with system OpenSSL for Solaris
13087                        if test "x$ldap_link" = "xno"; then
13088                                if test "x$static_linking_support" = "xno"; then
13089                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl -lcrypto"
13090                                else
13091                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl -lcrypto"
13092                                fi
13093
13094_save_ldap_cppflags="$CPPFLAGS"
13095_save_ldap_cflags="$CFLAGS"
13096_save_ldap_ldflags="$LDFLAGS"
13097_save_ldap_libs="$LIBS"
13098
13099LIBS="$LIBS $TRY_LDAP_LIBS"
13100LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
13101CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
13102CFLAGS="$CFLAGS "
13103ldap_link="no"
13104
13105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106/* end confdefs.h.  */
13107
13108#include <stdio.h>
13109#include <ldap.h>
13110#include <lber.h>
13111#include <ldap_schema.h>
13112
13113int
13114main ()
13115{
13116
13117printf("%p,%p", ldap_initialize, ldap_str2attributetype);
13118printf("%p", ber_free);
13119return 0;
13120
13121  ;
13122  return 0;
13123}
13124_ACEOF
13125if ac_fn_c_try_link "$LINENO"; then :
13126
13127ldap_link="yes"
13128
13129fi
13130rm -f core conftest.err conftest.$ac_objext \
13131    conftest$ac_exeext conftest.$ac_ext
13132
13133CPPFLAGS="$_save_ldap_cppflags"
13134CFLAGS="$_save_ldap_cflags"
13135LDFLAGS="$_save_ldap_ldflags"
13136LIBS="$_save_ldap_libs"
13137unset _save_ldap_cppflags
13138unset _save_ldap_cflags
13139unset _save_ldap_ldflags
13140unset _save_ldap_libs
13141if test "x$ldap_link" = "xyes"; then :
13142
13143                                        LDAP_LIBS=$TRY_LDAP_LIBS
13144                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL and sasl linking" >&5
13145$as_echo "with system OpenSSL and sasl linking" >&6; }
13146
13147fi
13148                        fi
13149
13150                        if test "x$ldap_link" = "xno"; then
13151                                as_fn_error $? "Not found compatible version of OpenLDAP static libs" "$LINENO" 5
13152                        fi
13153                fi
13154
13155                found_ldap="yes"
13156
13157$as_echo "#define HAVE_LDAP 1" >>confdefs.h
13158
13159
13160$as_echo "#define LDAP_DEPRECATED 1" >>confdefs.h
13161
13162
13163                if test "x$enable_static" = "xyes"; then
13164                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgnutls" >&5
13165$as_echo_n "checking for main in -lgnutls... " >&6; }
13166if ${ac_cv_lib_gnutls_main+:} false; then :
13167  $as_echo_n "(cached) " >&6
13168else
13169  ac_check_lib_save_LIBS=$LIBS
13170LIBS="-lgnutls  $LIBS"
13171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13172/* end confdefs.h.  */
13173
13174
13175int
13176main ()
13177{
13178return main ();
13179  ;
13180  return 0;
13181}
13182_ACEOF
13183if ac_fn_c_try_link "$LINENO"; then :
13184  ac_cv_lib_gnutls_main=yes
13185else
13186  ac_cv_lib_gnutls_main=no
13187fi
13188rm -f core conftest.err conftest.$ac_objext \
13189    conftest$ac_exeext conftest.$ac_ext
13190LIBS=$ac_check_lib_save_LIBS
13191fi
13192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_main" >&5
13193$as_echo "$ac_cv_lib_gnutls_main" >&6; }
13194if test "x$ac_cv_lib_gnutls_main" = xyes; then :
13195  cat >>confdefs.h <<_ACEOF
13196#define HAVE_LIBGNUTLS 1
13197_ACEOF
13198
13199  LIBS="-lgnutls $LIBS"
13200
13201else
13202  as_fn_error $? "Not found GnuTLS library" "$LINENO" 5
13203fi
13204
13205                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
13206$as_echo_n "checking for main in -lpthread... " >&6; }
13207if ${ac_cv_lib_pthread_main+:} false; then :
13208  $as_echo_n "(cached) " >&6
13209else
13210  ac_check_lib_save_LIBS=$LIBS
13211LIBS="-lpthread  $LIBS"
13212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213/* end confdefs.h.  */
13214
13215
13216int
13217main ()
13218{
13219return main ();
13220  ;
13221  return 0;
13222}
13223_ACEOF
13224if ac_fn_c_try_link "$LINENO"; then :
13225  ac_cv_lib_pthread_main=yes
13226else
13227  ac_cv_lib_pthread_main=no
13228fi
13229rm -f core conftest.err conftest.$ac_objext \
13230    conftest$ac_exeext conftest.$ac_ext
13231LIBS=$ac_check_lib_save_LIBS
13232fi
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
13234$as_echo "$ac_cv_lib_pthread_main" >&6; }
13235if test "x$ac_cv_lib_pthread_main" = xyes; then :
13236  cat >>confdefs.h <<_ACEOF
13237#define HAVE_LIBPTHREAD 1
13238_ACEOF
13239
13240  LIBS="-lpthread $LIBS"
13241
13242else
13243  as_fn_error $? "Not found Pthread library" "$LINENO" 5
13244fi
13245
13246                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsasl2" >&5
13247$as_echo_n "checking for main in -lsasl2... " >&6; }
13248if ${ac_cv_lib_sasl2_main+:} false; then :
13249  $as_echo_n "(cached) " >&6
13250else
13251  ac_check_lib_save_LIBS=$LIBS
13252LIBS="-lsasl2  $LIBS"
13253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13254/* end confdefs.h.  */
13255
13256
13257int
13258main ()
13259{
13260return main ();
13261  ;
13262  return 0;
13263}
13264_ACEOF
13265if ac_fn_c_try_link "$LINENO"; then :
13266  ac_cv_lib_sasl2_main=yes
13267else
13268  ac_cv_lib_sasl2_main=no
13269fi
13270rm -f core conftest.err conftest.$ac_objext \
13271    conftest$ac_exeext conftest.$ac_ext
13272LIBS=$ac_check_lib_save_LIBS
13273fi
13274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_main" >&5
13275$as_echo "$ac_cv_lib_sasl2_main" >&6; }
13276if test "x$ac_cv_lib_sasl2_main" = xyes; then :
13277  cat >>confdefs.h <<_ACEOF
13278#define HAVE_LIBSASL2 1
13279_ACEOF
13280
13281  LIBS="-lsasl2 $LIBS"
13282
13283else
13284  as_fn_error $? "Not found SASL2 library" "$LINENO" 5
13285fi
13286
13287                fi
13288        fi
13289  fi
13290
13291
13292
13293
13294
13295  unset _libldap_with
13296
13297if test "x$want_ldap" = "xyes"; then
13298	if test "x$found_ldap" != "xyes"; then
13299		as_fn_error $? "Invalid LDAP directory - unable to find ldap.h" "$LINENO" 5
13300	fi
13301fi
13302SERVER_LDFLAGS="$SERVER_LDFLAGS $LDAP_LDFLAGS"
13303SERVER_LIBS="$SERVER_LIBS $LDAP_LIBS"
13304
13305PROXY_LDFLAGS="$PROXY_LDFLAGS $LDAP_LDFLAGS"
13306PROXY_LIBS="$PROXY_LIBS $LDAP_LIBS"
13307
13308AGENT_LDFLAGS="$AGENT_LDFLAGS $LDAP_LDFLAGS"
13309AGENT_LIBS="$AGENT_LIBS $LDAP_LIBS"
13310
13311
13312
13313found_curl="no"
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334  _libcurl_config="no"
13335
13336
13337# Check whether --with-libcurl was given.
13338if test "${with_libcurl+set}" = set; then :
13339  withval=$with_libcurl;
13340        if test "x$withval" = "xno"; then
13341            want_curl="no"
13342        elif test "x$withval" = "xyes"; then
13343            want_curl="yes"
13344        else
13345            want_curl="yes"
13346            _libcurl_config=$withval
13347        fi
13348
13349else
13350  want_curl=no
13351fi
13352
13353
13354	if test "x$want_curl" != "xno"; then
13355
13356		for ac_prog in gawk mawk nawk awk
13357do
13358  # Extract the first word of "$ac_prog", so it can be a program name with args.
13359set dummy $ac_prog; ac_word=$2
13360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13361$as_echo_n "checking for $ac_word... " >&6; }
13362if ${ac_cv_prog_AWK+:} false; then :
13363  $as_echo_n "(cached) " >&6
13364else
13365  if test -n "$AWK"; then
13366  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13367else
13368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13369for as_dir in $PATH
13370do
13371  IFS=$as_save_IFS
13372  test -z "$as_dir" && as_dir=.
13373    for ac_exec_ext in '' $ac_executable_extensions; do
13374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13375    ac_cv_prog_AWK="$ac_prog"
13376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13377    break 2
13378  fi
13379done
13380  done
13381IFS=$as_save_IFS
13382
13383fi
13384fi
13385AWK=$ac_cv_prog_AWK
13386if test -n "$AWK"; then
13387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13388$as_echo "$AWK" >&6; }
13389else
13390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13391$as_echo "no" >&6; }
13392fi
13393
13394
13395  test -n "$AWK" && break
13396done
13397
13398
13399		_libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
13400
13401		_libcurl_try_link=no
13402
13403		# Extract the first word of "curl-config", so it can be a program name with args.
13404set dummy curl-config; ac_word=$2
13405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13406$as_echo_n "checking for $ac_word... " >&6; }
13407if ${ac_cv_path__libcurl_config+:} false; then :
13408  $as_echo_n "(cached) " >&6
13409else
13410  case $_libcurl_config in
13411  [\\/]* | ?:[\\/]*)
13412  ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path.
13413  ;;
13414  *)
13415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13416for as_dir in $PATH
13417do
13418  IFS=$as_save_IFS
13419  test -z "$as_dir" && as_dir=.
13420    for ac_exec_ext in '' $ac_executable_extensions; do
13421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13422    ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
13423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13424    break 2
13425  fi
13426done
13427  done
13428IFS=$as_save_IFS
13429
13430  ;;
13431esac
13432fi
13433_libcurl_config=$ac_cv_path__libcurl_config
13434if test -n "$_libcurl_config"; then
13435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libcurl_config" >&5
13436$as_echo "$_libcurl_config" >&6; }
13437else
13438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13439$as_echo "no" >&6; }
13440fi
13441
13442
13443
13444		if test -x "$_libcurl_config"; then
13445			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of libcurl" >&5
13446$as_echo_n "checking for the version of libcurl... " >&6; }
13447if ${libcurl_cv_lib_curl_version+:} false; then :
13448  $as_echo_n "(cached) " >&6
13449else
13450  libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'`
13451
13452fi
13453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_version" >&5
13454$as_echo "$libcurl_cv_lib_curl_version" >&6; }
13455
13456			_libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
13457			_libcurl_wanted=`echo 7.13.1 | $_libcurl_version_parse`
13458
13459			if test $_libcurl_wanted -gt 0; then
13460				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= version 7.13.1" >&5
13461$as_echo_n "checking for libcurl >= version 7.13.1... " >&6; }
13462if ${libcurl_cv_lib_version_ok+:} false; then :
13463  $as_echo_n "(cached) " >&6
13464else
13465
13466						if test $_libcurl_version -ge $_libcurl_wanted; then
13467							libcurl_cv_lib_version_ok=yes
13468							else
13469							libcurl_cv_lib_version_ok=no
13470						fi
13471
13472
13473fi
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_version_ok" >&5
13475$as_echo "$libcurl_cv_lib_version_ok" >&6; }
13476			fi
13477
13478			if test $_libcurl_wanted -eq 0 || test "x$libcurl_cv_lib_version_ok" = "xyes"; then
13479				if test "x$LIBCURL_CFLAGS" = "x"; then
13480					LIBCURL_CFLAGS=`$_libcurl_config --cflags`
13481				fi
13482
13483				if test "x$LIBCURL_LIBS" = "x"; then
13484					_curl_dir_lib=`$_libcurl_config --prefix`
13485					_curl_dir_lib="$_curl_dir_lib/lib"
13486					_full_libcurl_libs=`$_libcurl_config --libs`
13487					for i in $_full_libcurl_libs; do
13488						case $i in
13489							-L*)
13490								LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS $i"
13491						;;
13492							-R*)
13493								LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS -Wl,$i"
13494						;;
13495							-lcurl)
13496								if test "x$enable_static_libs" = "xyes" -a "x$static_linking_support" = "xno"; then
13497									i="$_curl_dir_lib/libcurl.a"
13498								elif test "x$enable_static_libs" = "xyes"; then
13499									i="${static_linking_support}static $i ${static_linking_support}dynamic"
13500								fi
13501								LIBCURL_LIBS="$LIBCURL_LIBS $i"
13502						;;
13503							-l*)
13504								if test "x$enable_static_libs" = "xyes"; then
13505									_lib_name=`echo "$i" | cut -b3-`
13506									test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
13507								fi
13508								LIBCURL_LIBS="$LIBCURL_LIBS $i"
13509						;;
13510						esac
13511					done
13512
13513					_save_curl_cflags="$CFLAGS"
13514					_save_curl_ldflags="$LDFLAGS"
13515					_save_curl_libs="$LIBS"
13516					CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
13517					LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
13518					if test "x$enable_static_libs" = "xyes"; then
13519						test "x$want_openssl" = "xyes" && CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
13520						test "x$want_openssl" = "xyes" && LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
13521						test "x$want_ldap" = "xyes" && CFLAGS="$LDAP_CPPFLAGS $CFLAGS"
13522						test "x$want_ldap" = "xyes" && LDFLAGS="$LDAP_LDFLAGS $LDFLAGS"
13523					fi
13524
13525					if test "x$enable_static" = "xyes" -o "x$enable_static_libs" = "xyes"; then
13526						_full_libcurl_libs=`$_libcurl_config --static-libs`
13527
13528						if test "x$enable_static_libs" = "xyes" -a -z "$LIBPTHREAD_LIBS"; then
13529
13530
13531# Check whether --with-libpthread was given.
13532if test "${with_libpthread+set}" = set; then :
13533  withval=$with_libpthread;
13534			test "x$withval" = "xyes" && withval=/usr
13535			LIBPTHREAD_CFLAGS="-I$withval/include"
13536			LIBPTHREAD_LDFLAGS="-L$withval/lib"
13537			_libpthread_dir_set="yes"
13538
13539
13540fi
13541
13542
13543
13544# Check whether --with-libpthread-include was given.
13545if test "${with_libpthread_include+set}" = set; then :
13546  withval=$with_libpthread_include;
13547			LIBPTHREAD_CFLAGS="-I$withval"
13548			_libpthread_dir_set="yes"
13549
13550
13551fi
13552
13553
13554
13555# Check whether --with-libpthread-lib was given.
13556if test "${with_libpthread_lib+set}" = set; then :
13557  withval=$with_libpthread_lib;
13558			LIBPTHREAD_LDFLAGS="-L$withval"
13559			_libpthread_dir_set="yes"
13560
13561
13562fi
13563
13564
13565	ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13566if test "x$ac_cv_header_pthread_h" = xyes; then :
13567  found_libpthread=yes
13568fi
13569
13570
13571	LIBPTHREAD_LIBS="-lpthread"
13572	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for process shared libpthread support" >&5
13573$as_echo_n "checking for process shared libpthread support... " >&6; }
13574
13575	if test -n "$_libpthread_dir_set" -o "x$found_libpthread" = xyes; then
13576		found_libpthread="yes"
13577	elif test -f /usr/local/include/pthread.h; then
13578		LIBPTHREAD_CFLAGS="-I/usr/local/include"
13579		LIBPTHREAD_LDFLAGS="-L/usr/local/lib"
13580		found_libpthread="yes"
13581	elif test -f /usr/pkg/include/pthread.h; then
13582		LIBPTHREAD_CFLAGS="-I/usr/pkg/include"
13583		LIBPTHREAD_LDFLAGS="-L/usr/pkg/lib"
13584		LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/usr/pkg/lib"
13585		found_libpthread="yes"
13586	elif test -f /opt/csw/include/pthread.h; then
13587		LIBPTHREAD_CFLAGS="-I/opt/csw/include"
13588		LIBPTHREAD_LDFLAGS="-L/opt/csw/lib"
13589		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
13590			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
13591		else
13592			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/opt/csw/lib"
13593		fi
13594		found_libpthread="yes"
13595	else
13596		found_libpthread="no"
13597		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13598$as_echo "no" >&6; }
13599	fi
13600
13601	if test "x$found_libpthread" = "xyes"; then
13602		am_save_CFLAGS="$CFLAGS"
13603		am_save_LDFLAGS="$LDFLAGS"
13604		am_save_LIBS="$LIBS"
13605
13606		CFLAGS="$CFLAGS $LIBPTHREAD_CFLAGS"
13607		LDFLAGS="$LDFLAGS $LIBPTHREAD_LDFLAGS"
13608		LIBS="$LIBS $LIBPTHREAD_LIBS"
13609
13610		found_libpthread="no"
13611		found_libpthread_process_shared="no"
13612
13613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13614/* end confdefs.h.  */
13615
13616#include <pthread.h>
13617
13618int
13619main ()
13620{
13621
13622	pthread_mutexattr_t	mta;
13623	pthread_mutex_t		mutex;
13624
13625	pthread_mutexattr_init(&mta);
13626	pthread_mutex_init(&mutex, &mta);
13627
13628  ;
13629  return 0;
13630}
13631_ACEOF
13632if ac_fn_c_try_link "$LINENO"; then :
13633  found_libpthread="yes"
13634fi
13635rm -f core conftest.err conftest.$ac_objext \
13636    conftest$ac_exeext conftest.$ac_ext
13637
13638
13639	if test "$cross_compiling" = yes; then :
13640  found_libpthread_process_shared="no"
13641else
13642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643/* end confdefs.h.  */
13644
13645		#include <pthread.h>
13646
13647		int	main()
13648		{
13649			pthread_mutexattr_t	mta;
13650			pthread_rwlockattr_t	rwa;
13651			pthread_mutex_t		mutex;
13652			pthread_rwlock_t	rwlock;
13653
13654			if (0 != pthread_mutexattr_init(&mta))
13655				return 1;
13656
13657			if (0 != pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED))
13658				return 2;
13659
13660			if (0 != pthread_mutex_init(&mutex, &mta))
13661				return 3;
13662
13663			if (0 != pthread_rwlockattr_init(&rwa))
13664				return 4;
13665
13666			if (0 != pthread_rwlockattr_setpshared(&rwa, PTHREAD_PROCESS_SHARED))
13667				return 5;
13668
13669			if (0 != pthread_rwlock_init(&rwlock, &rwa))
13670				return 6;
13671
13672			return 0;
13673		}
13674
13675
13676
13677_ACEOF
13678if ac_fn_c_try_run "$LINENO"; then :
13679  found_libpthread_process_shared="yes"
13680else
13681  found_libpthread_process_shared="no"
13682fi
13683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13684  conftest.$ac_objext conftest.beam conftest.$ac_ext
13685fi
13686
13687
13688
13689		CFLAGS="$am_save_CFLAGS"
13690		LDFLAGS="$am_save_LDFLAGS"
13691		LIBS="$am_save_LIBS"
13692	fi
13693
13694	if test "x$found_libpthread" = "xyes"; then
13695		if test "x$found_libpthread_process_shared" = "xyes"; then
13696
13697$as_echo "#define HAVE_PTHREAD_PROCESS_SHARED 1" >>confdefs.h
13698
13699		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13700$as_echo "yes" >&6; }
13701		else
13702		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13703$as_echo "no" >&6; }
13704		fi
13705	else
13706		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13707$as_echo "no" >&6; }
13708		LIBPTHREAD_CFLAGS=""
13709		LIBPTHREAD_LDFLAGS=""
13710		LIBPTHREAD_LIBS=""
13711	fi
13712
13713
13714
13715
13716
13717							if test "x$found_libpthread" != "xyes"; then
13718								as_fn_error $? "Unable to use libpthread (libpthread check failed)" "$LINENO" 5
13719							fi
13720							_full_libcurl_libs="$LIBPTHREAD_LIBS $_full_libcurl_libs"
13721						fi
13722
13723						for i in $_full_libcurl_libs; do
13724							case $i in
13725								-lcurl)
13726							;;
13727								-l*)
13728									_lib_i=$i
13729									_lib_name=`echo "$i" | cut -b3-`
13730									as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name ''_main" | $as_tr_sh`
13731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name " >&5
13732$as_echo_n "checking for main in -l$_lib_name ... " >&6; }
13733if eval \${$as_ac_Lib+:} false; then :
13734  $as_echo_n "(cached) " >&6
13735else
13736  ac_check_lib_save_LIBS=$LIBS
13737LIBS="-l$_lib_name   $LIBS"
13738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13739/* end confdefs.h.  */
13740
13741
13742int
13743main ()
13744{
13745return main ();
13746  ;
13747  return 0;
13748}
13749_ACEOF
13750if ac_fn_c_try_link "$LINENO"; then :
13751  eval "$as_ac_Lib=yes"
13752else
13753  eval "$as_ac_Lib=no"
13754fi
13755rm -f core conftest.err conftest.$ac_objext \
13756    conftest$ac_exeext conftest.$ac_ext
13757LIBS=$ac_check_lib_save_LIBS
13758fi
13759eval ac_res=\$$as_ac_Lib
13760	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13761$as_echo "$ac_res" >&6; }
13762if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13763
13764										if test "x$enable_static_libs" = "xyes"; then
13765											case $i in
13766												-lssl|-lcrypto)
13767													test "x$want_openssl" = "xyes" && i="$OPENSSL_LIBS"
13768											;;
13769												-lldap|-lldap_r|-llber)
13770													test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
13771											;;
13772												-l*)
13773													test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
13774											;;
13775											esac
13776										fi
13777										test -z "${LIBCURL_LIBS##*$_lib_i*}" && LIBCURL_LIBS=`echo "$LIBCURL_LIBS"|sed "s|$_lib_i||g"`
13778										test -z "${LIBCURL_LIBS##*$i*}" || LIBCURL_LIBS="$LIBCURL_LIBS $i"
13779
13780else
13781
13782										as_fn_error $? "static library $_lib_name required for linking libcurl not found" "$LINENO" 5
13783
13784fi
13785
13786							;;
13787								-framework|CoreFoundation|Security)
13788									LIBCURL_LIBS="$LIBCURL_LIBS $i"
13789							;;
13790							esac
13791						done
13792					fi # "x$enable_static" or "x$enable_static_libs"
13793
13794					LIBS="$LIBS $LIBCURL_LIBS"
13795
13796					{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5
13797$as_echo_n "checking for main in -lcurl... " >&6; }
13798if ${ac_cv_lib_curl_main+:} false; then :
13799  $as_echo_n "(cached) " >&6
13800else
13801  ac_check_lib_save_LIBS=$LIBS
13802LIBS="-lcurl  $LIBS"
13803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804/* end confdefs.h.  */
13805
13806
13807int
13808main ()
13809{
13810return main ();
13811  ;
13812  return 0;
13813}
13814_ACEOF
13815if ac_fn_c_try_link "$LINENO"; then :
13816  ac_cv_lib_curl_main=yes
13817else
13818  ac_cv_lib_curl_main=no
13819fi
13820rm -f core conftest.err conftest.$ac_objext \
13821    conftest$ac_exeext conftest.$ac_ext
13822LIBS=$ac_check_lib_save_LIBS
13823fi
13824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5
13825$as_echo "$ac_cv_lib_curl_main" >&6; }
13826if test "x$ac_cv_lib_curl_main" = xyes; then :
13827  cat >>confdefs.h <<_ACEOF
13828#define HAVE_LIBCURL 1
13829_ACEOF
13830
13831  LIBS="-lcurl $LIBS"
13832
13833else
13834  as_fn_error $? "libcurl library not found" "$LINENO" 5
13835fi
13836
13837
13838					CFLAGS="$_save_curl_cflags"
13839					LDFLAGS="$_save_curl_ldflags"
13840					LIBS="$_save_curl_libs"
13841					unset _save_curl_cflags
13842					unset _save_curl_ldflags
13843					unset _save_curl_libs
13844
13845					# This is so silly, but Apple actually has a bug in their
13846					# curl-config script.  Fixed in Tiger, but there are still
13847					# lots of Panther installs around.
13848					case "${host}" in
13849						powerpc-apple-darwin7*)
13850							LIBCURL_LIBS=`echo $LIBCURL_LIBS | sed -e 's|-arch i386||g'`
13851						;;
13852					esac
13853				fi # "x$LIBCURL_LIBS" = "x"
13854
13855				# All curl-config scripts support --feature
13856				_libcurl_features=`$_libcurl_config --feature`
13857
13858				# Is it modern enough to have --protocols? (7.12.4)
13859				if test $_libcurl_version -ge 461828; then
13860					_libcurl_protocols=`$_libcurl_config --protocols`
13861				fi
13862
13863				_libcurl_try_link=yes
13864			fi # $_libcurl_wanted -eq 0 || "x$libcurl_cv_lib_version_ok" = "xyes"
13865
13866			unset _libcurl_wanted
13867		fi # -x "$_libcurl_config"
13868
13869		if test "x$_libcurl_try_link" = "xyes"; then
13870			# we didn't find curl-config, so let's see if the user-supplied
13871			# link line (or failing that, "-lcurl") is enough.
13872
13873			LIBCURL_LIBS=${LIBCURL_LIBS-"$_libcurl_libs -lcurl"}
13874
13875			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcurl is usable" >&5
13876$as_echo_n "checking whether libcurl is usable... " >&6; }
13877if ${libcurl_cv_lib_curl_usable+:} false; then :
13878  $as_echo_n "(cached) " >&6
13879else
13880
13881				_save_curl_libs="${LIBS}"
13882				_save_curl_ldflags="${LDFLAGS}"
13883				_save_curl_cflags="${CFLAGS}"
13884				LIBS="${LIBS} ${LIBCURL_LIBS}"
13885				LDFLAGS="${LDFLAGS} ${LIBCURL_LDFLAGS}"
13886				CFLAGS="${CFLAGS} ${LIBCURL_CFLAGS}"
13887				if test "x$enable_static_libs" = "xyes"; then
13888					test "x$want_openssl" = "xyes" && CFLAGS=" $OPENSSL_CFLAGS $CFLAGS"
13889					test "x$want_openssl" = "xyes" && LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
13890					test "x$want_ldap" = "xyes" && CFLAGS="$LDAP_CPPFLAGS $CFLAGS"
13891					test "x$want_ldap" = "xyes" && LDFLAGS="$LDAP_LDFLAGS $LDFLAGS"
13892				fi
13893
13894				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895/* end confdefs.h.  */
13896#include <curl/curl.h>
13897#ifndef NULL
13898#define NULL (void *)0
13899#endif
13900int
13901main ()
13902{
13903
13904/* Try and use a few common options to force a failure if we are
13905   missing symbols or can't link. */
13906int x;
13907curl_easy_setopt(NULL,CURLOPT_URL,NULL);
13908x=CURL_ERROR_SIZE;
13909x=CURLOPT_WRITEFUNCTION;
13910x=CURLOPT_FILE;
13911x=CURLOPT_ERRORBUFFER;
13912x=CURLOPT_STDERR;
13913x=CURLOPT_VERBOSE;
13914
13915  ;
13916  return 0;
13917}
13918_ACEOF
13919if ac_fn_c_try_link "$LINENO"; then :
13920  libcurl_cv_lib_curl_usable=yes
13921else
13922  libcurl_cv_lib_curl_usable=no
13923fi
13924rm -f core conftest.err conftest.$ac_objext \
13925    conftest$ac_exeext conftest.$ac_ext
13926
13927				LIBS="${_save_curl_libs}"
13928				LDFLAGS="${_save_curl_ldflags}"
13929				CFLAGS="${_save_curl_cflags}"
13930				unset _save_curl_libs
13931				unset _save_curl_ldflags
13932				unset _save_curl_cflags
13933
13934fi
13935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_usable" >&5
13936$as_echo "$libcurl_cv_lib_curl_usable" >&6; }
13937
13938			if test "x$libcurl_cv_lib_curl_usable" = "xno"; then
13939				link_mode="dynamic"
13940				if test "x$enable_static" = "xyes"; then
13941					link_mode="static"
13942				fi
13943				as_fn_error $? "libcurl is not available for ${link_mode} linking" "$LINENO" 5
13944			fi
13945
13946			# Does curl_free() exist in this version of libcurl?
13947			# If not, fake it with free()
13948
13949			_save_curl_libs="${LIBS}"
13950			_save_curl_ldflags="${LDFLAGS}"
13951			_save_curl_cflags="${CFLAGS}"
13952			LIBS="${LIBS} ${LIBCURL_LIBS}"
13953			LDFLAGS="${LDFLAGS} ${LIBCURL_LDFLAGS}"
13954			CFLAGS="${CFLAGS} ${LIBCURL_CFLAGS}"
13955
13956			ac_fn_c_check_func "$LINENO" "curl_free" "ac_cv_func_curl_free"
13957if test "x$ac_cv_func_curl_free" = xyes; then :
13958
13959else
13960
13961$as_echo "#define curl_free free" >>confdefs.h
13962
13963fi
13964
13965
13966			ac_fn_c_check_func "$LINENO" "curl_easy_escape" "ac_cv_func_curl_easy_escape"
13967if test "x$ac_cv_func_curl_easy_escape" = xyes; then :
13968
13969$as_echo "#define HAVE_FUNCTION_CURL_EASY_ESCAPE 1" >>confdefs.h
13970
13971fi
13972
13973
13974			LIBS="${_save_curl_libs}"
13975			LDFLAGS="${_save_curl_ldflags}"
13976			CFLAGS="${_save_curl_cflags}"
13977			unset _save_curl_libs
13978			unset _save_curl_ldflags
13979			unset _save_curl_cflags
13980
13981
13982$as_echo "#define HAVE_LIBCURL 1" >>confdefs.h
13983
13984
13985
13986
13987			found_curl="yes"
13988
13989			for _libcurl_feature in $_libcurl_features ; do
13990				cat >>confdefs.h <<_ACEOF
13991#define `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_cpp` 1
13992_ACEOF
13993
13994				eval `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_sh`=yes
13995			done
13996
13997			if test "x$_libcurl_protocols" = "x"; then
13998				# We don't have --protocols, so just assume that all
13999				# protocols are available
14000				_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
14001
14002				if test "x$libcurl_feature_SSL" = "xyes"; then
14003					_libcurl_protocols="$_libcurl_protocols HTTPS"
14004
14005					# FTPS wasn't standards-compliant until version
14006					# 7.11.0
14007					if test $_libcurl_version -ge 461568; then
14008						_libcurl_protocols="$_libcurl_protocols FTPS"
14009					fi
14010				fi
14011			fi
14012
14013			for _libcurl_protocol in $_libcurl_protocols ; do
14014				cat >>confdefs.h <<_ACEOF
14015#define `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_cpp` 1
14016_ACEOF
14017
14018				eval `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_sh`=yes
14019			done
14020		else
14021			unset LIBCURL_LIBS
14022			unset LIBCURL_CFLAGS
14023		fi # "x$_libcurl_try_link" = "xyes"
14024
14025		unset _libcurl_try_link
14026		unset _libcurl_version_parse
14027		unset _libcurl_config
14028		unset _libcurl_feature
14029		unset _libcurl_features
14030		unset _libcurl_protocol
14031		unset _libcurl_protocols
14032		unset _libcurl_version
14033		unset _libcurl_libs
14034	fi # "x$want_curl" != "xno"
14035
14036  if test "x$want_curl" = "xno" || test "x$libcurl_cv_lib_curl_usable" != "xyes"; then
14037     # This is the IF-NO path
14038     :
14039  else
14040     # This is the IF-YES path
14041     :
14042  fi
14043
14044
14045if test "x$want_curl" = "xyes"; then
14046	if test "x$found_curl" != "xyes"; then
14047		as_fn_error $? "Curl library not found" "$LINENO" 5
14048	fi
14049fi
14050if test "x$found_curl" = "xyes"; then
14051	have_web_monitoring="cURL"
14052fi
14053CFLAGS="$LIBCURL_CFLAGS $CFLAGS"
14054
14055SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBCURL_LDFLAGS"
14056SERVER_LIBS="$SERVER_LIBS $LIBCURL_LIBS"
14057
14058PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBCURL_LDFLAGS"
14059PROXY_LIBS="$PROXY_LIBS $LIBCURL_LIBS"
14060
14061 if test "x$found_curl" = "xyes"; then
14062  HAVE_LIBCURL_TRUE=
14063  HAVE_LIBCURL_FALSE='#'
14064else
14065  HAVE_LIBCURL_TRUE='#'
14066  HAVE_LIBCURL_FALSE=
14067fi
14068
14069
14070AGENT_LDFLAGS="$AGENT_LDFLAGS $LIBCURL_LDFLAGS"
14071AGENT_LIBS="$AGENT_LIBS $LIBCURL_LIBS"
14072
14073ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
14074ZBXGET_LIBS="$ZBXGET_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
14075
14076SENDER_LDFLAGS="$SENDER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
14077SENDER_LIBS="$SENDER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
14078
14079if test "x$server" = "xyes" || test "x$proxy" = "xyes" || test "x$agent" = "xyes"; then
14080
14081
14082# Check whether --with-libpcre was given.
14083if test "${with_libpcre+set}" = set; then :
14084  withval=$with_libpcre;
14085			if test "$withval" = "yes"; then
14086				if test -f /usr/local/include/pcre.h; then
14087					withval="/usr/local"
14088				else
14089					withval="/usr"
14090				fi
14091			else
14092				_libpcre_dir_lib="$withval/lib"
14093			fi
14094			_libpcre_dir="$withval"
14095			test "x$withval" = "xyes" && withval=/usr
14096			LIBPCRE_CFLAGS="-I$withval/include"
14097			LIBPCRE_LDFLAGS="-L$withval/lib"
14098			_libpcre_dir_set="yes"
14099
14100
14101fi
14102
14103
14104
14105# Check whether --with-libpcre-include was given.
14106if test "${with_libpcre_include+set}" = set; then :
14107  withval=$with_libpcre_include;
14108			LIBPCRE_CFLAGS="-I$withval"
14109			_libpcre_dir_set="yes"
14110
14111
14112fi
14113
14114
14115
14116# Check whether --with-libpcre-lib was given.
14117if test "${with_libpcre_lib+set}" = set; then :
14118  withval=$with_libpcre_lib;
14119			_libpcre_dir="$withval"
14120			_libpcre_dir_lib="$withval"
14121			LIBPCRE_LDFLAGS="-L$withval"
14122			_libpcre_dir_set="yes"
14123
14124
14125fi
14126
14127
14128	if test "x$enable_static_libs" = "xyes"; then
14129
14130
14131
14132
14133
14134
14135
14136
14137if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14138	if test -n "$ac_tool_prefix"; then
14139  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14140set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14142$as_echo_n "checking for $ac_word... " >&6; }
14143if ${ac_cv_path_PKG_CONFIG+:} false; then :
14144  $as_echo_n "(cached) " >&6
14145else
14146  case $PKG_CONFIG in
14147  [\\/]* | ?:[\\/]*)
14148  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14149  ;;
14150  *)
14151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14152for as_dir in $PATH
14153do
14154  IFS=$as_save_IFS
14155  test -z "$as_dir" && as_dir=.
14156    for ac_exec_ext in '' $ac_executable_extensions; do
14157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14158    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14160    break 2
14161  fi
14162done
14163  done
14164IFS=$as_save_IFS
14165
14166  ;;
14167esac
14168fi
14169PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14170if test -n "$PKG_CONFIG"; then
14171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14172$as_echo "$PKG_CONFIG" >&6; }
14173else
14174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14175$as_echo "no" >&6; }
14176fi
14177
14178
14179fi
14180if test -z "$ac_cv_path_PKG_CONFIG"; then
14181  ac_pt_PKG_CONFIG=$PKG_CONFIG
14182  # Extract the first word of "pkg-config", so it can be a program name with args.
14183set dummy pkg-config; ac_word=$2
14184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14185$as_echo_n "checking for $ac_word... " >&6; }
14186if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14187  $as_echo_n "(cached) " >&6
14188else
14189  case $ac_pt_PKG_CONFIG in
14190  [\\/]* | ?:[\\/]*)
14191  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14192  ;;
14193  *)
14194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14195for as_dir in $PATH
14196do
14197  IFS=$as_save_IFS
14198  test -z "$as_dir" && as_dir=.
14199    for ac_exec_ext in '' $ac_executable_extensions; do
14200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14201    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14203    break 2
14204  fi
14205done
14206  done
14207IFS=$as_save_IFS
14208
14209  ;;
14210esac
14211fi
14212ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14213if test -n "$ac_pt_PKG_CONFIG"; then
14214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14215$as_echo "$ac_pt_PKG_CONFIG" >&6; }
14216else
14217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14218$as_echo "no" >&6; }
14219fi
14220
14221  if test "x$ac_pt_PKG_CONFIG" = x; then
14222    PKG_CONFIG=""
14223  else
14224    case $cross_compiling:$ac_tool_warned in
14225yes:)
14226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14228ac_tool_warned=yes ;;
14229esac
14230    PKG_CONFIG=$ac_pt_PKG_CONFIG
14231  fi
14232else
14233  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14234fi
14235
14236fi
14237if test -n "$PKG_CONFIG"; then
14238	_pkg_min_version=0.9.0
14239	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14240$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14241	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14242		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14243$as_echo "yes" >&6; }
14244	else
14245		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14246$as_echo "no" >&6; }
14247		PKG_CONFIG=""
14248	fi
14249fi
14250		test -z "$PKG_CONFIG" -a -z "$_libpcre_dir_lib" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
14251
14252	fi
14253
14254	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcre support" >&5
14255$as_echo_n "checking for libpcre support... " >&6; }
14256
14257	LIBPCRE_LIBS="-lpcre"
14258
14259	if test "x$enable_static" = "xyes"; then
14260		LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
14261	elif test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
14262		LIBPCRE_LIBS="$_libpcre_dir_lib/libpcre.a"
14263	elif test "x$enable_static_libs" = "xyes"; then
14264
14265		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
14266
14267		if test -z "$_libpcre_dir_lib"; then
14268			if test -n "$PKG_CONFIG" && \
14269    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
14270  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
14271  ac_status=$?
14272  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14273  test $ac_status = 0; }; then
14274
14275				LIBPCRE_LIBS=`$PKG_CONFIG --static --libs libpcre`
14276
14277else
14278
14279				as_fn_error $? "Not found libpcre package" "$LINENO" 5
14280
14281fi
14282		else
14283			{ { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libpcre_dir_lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors libpcre"; } >&5
14284  (PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors libpcre) 2>&5
14285  ac_status=$?
14286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14287  test $ac_status = 0; } || as_fn_error $? "\"Not found libpcre package in $_libpcre_dir/lib/pkgconfig\"" "$LINENO" 5
14288			LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --static --libs libpcre`
14289			test -z "$LIBPCRE_LIBS" && LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --libs libpcre`
14290		fi
14291
14292		if test "x$static_linking_support" = "xno"; then
14293			LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s|-lpcre|$_libpcre_dir_lib/libpcre.a|g"`
14294		else
14295			LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s/-lpcre/${static_linking_support}static -lpcre ${static_linking_support}dynamic/g"`
14296		fi
14297	fi
14298
14299	if test -n "$_libpcre_dir_set" -o -f /usr/include/pcre.h; then
14300		found_libpcre="yes"
14301	elif test -f /usr/local/include/pcre.h; then
14302		LIBPCRE_CFLAGS="-I/usr/local/include"
14303		LIBPCRE_LDFLAGS="-L/usr/local/lib"
14304		found_libpcre="yes"
14305	elif test -f /usr/pkg/include/pcre.h; then
14306		LIBPCRE_CFLAGS="-I/usr/pkg/include"
14307		LIBPCRE_LDFLAGS="-L/usr/pkg/lib"
14308		LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS -Wl,-R/usr/pkg/lib"
14309		found_libpcre="yes"
14310	elif test -f /opt/csw/include/pcre.h; then
14311		LIBPCRE_CFLAGS="-I/opt/csw/include"
14312		LIBPCRE_LDFLAGS="-L/opt/csw/lib"
14313		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
14314			LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
14315		else
14316			LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS -Wl,-R/opt/csw/lib"
14317		fi
14318		found_libpcre="yes"
14319	else
14320		found_libpcre="no"
14321		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14322$as_echo "no" >&6; }
14323	fi
14324
14325	if test "x$found_libpcre" = "xyes"; then
14326		am_save_CFLAGS="$CFLAGS"
14327		am_save_LDFLAGS="$LDFLAGS"
14328		am_save_LIBS="$LIBS"
14329
14330		CFLAGS="$CFLAGS $LIBPCRE_CFLAGS"
14331		LDFLAGS="$LDFLAGS $LIBPCRE_LDFLAGS"
14332		LIBS="$LIBS $LIBPCRE_LIBS"
14333
14334		found_libpcre="no"
14335
14336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337/* end confdefs.h.  */
14338
14339#include <pcre.h>
14340
14341int
14342main ()
14343{
14344
14345	const char* error = NULL;
14346	int error_offset = -1;
14347	pcre *regexp = pcre_compile("test", PCRE_UTF8, &error, &error_offset, NULL);
14348	pcre_free(regexp);
14349
14350  ;
14351  return 0;
14352}
14353_ACEOF
14354if ac_fn_c_try_link "$LINENO"; then :
14355  found_libpcre="yes"
14356fi
14357rm -f core conftest.err conftest.$ac_objext \
14358    conftest$ac_exeext conftest.$ac_ext
14359
14360
14361		CFLAGS="$am_save_CFLAGS"
14362		LDFLAGS="$am_save_LDFLAGS"
14363		LIBS="$am_save_LIBS"
14364	fi
14365
14366	if test "x$found_libpcre" = "xyes"; then
14367
14368$as_echo "#define HAVE_PCRE_H 1" >>confdefs.h
14369
14370		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14371$as_echo "yes" >&6; }
14372	else
14373		LIBPCRE_CFLAGS=""
14374		LIBPCRE_LDFLAGS=""
14375		LIBPCRE_LIBS=""
14376	fi
14377
14378
14379
14380
14381
14382	if test "x$found_libpcre" != "xyes"; then
14383		as_fn_error $? "Unable to use libpcre (libpcre check failed)" "$LINENO" 5
14384	fi
14385fi
14386
14387CFLAGS="$CFLAGS $LIBPCRE_CFLAGS"
14388LDFLAGS="$LDFLAGS $LIBPCRE_LDFLAGS"
14389if test "x$ARCH" = "xosx"; then
14390	LIBS="$LIBPCRE_LIBS $LIBS"
14391else
14392	LIBS="$LIBS $LIBPCRE_LIBS"
14393fi
14394
14395found_iconv="no"
14396
14397
14398# Check whether --with-iconv was given.
14399if test "${with_iconv+set}" = set; then :
14400  withval=$with_iconv;
14401			if test "$withval" = "yes"; then
14402				ICONV_CFLAGS="-I/usr/include"
14403				ICONV_LDFLAGS="-L/usr/lib"
14404				_iconv_dir_set=$withval
14405			elif test "$withval" != "no"; then
14406				_iconv_dir_lib="$withval/lib"
14407				ICONV_CFLAGS="-I$withval/include"
14408				ICONV_LDFLAGS="-L$_iconv_dir_lib"
14409				_iconv_dir_set="yes"
14410			fi
14411
14412
14413fi
14414
14415
14416
14417# Check whether --with-iconv-include was given.
14418if test "${with_iconv_include+set}" = set; then :
14419  withval=$with_iconv_include;
14420			ICONV_CFLAGS="-I$withval"
14421			_iconv_dir_set="yes"
14422
14423
14424fi
14425
14426
14427
14428# Check whether --with-iconv-lib was given.
14429if test "${with_iconv_lib+set}" = set; then :
14430  withval=$with_iconv_lib;
14431			ICONV_LDFLAGS="-L$withval"
14432			_iconv_dir_lib="-L$withval"
14433			_iconv_dir_set="yes"
14434
14435
14436fi
14437
14438
14439	ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
14440if test "x$ac_cv_header_iconv_h" = xyes; then :
14441  found_iconv=yes
14442fi
14443
14444
14445	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICONV support" >&5
14446$as_echo_n "checking for ICONV support... " >&6; }
14447	if test -n "$_iconv_dir_set" -o "x$found_iconv" = xyes; then
14448		found_iconv="yes"
14449	elif test -f /usr/local/include/iconv.h; then
14450		ICONV_CFLAGS="-I/usr/local/include"
14451		ICONV_LDFLAGS="-L/usr/local/lib"
14452		found_iconv="yes"
14453	else
14454		found_iconv="no"
14455		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456$as_echo "no" >&6; }
14457	fi
14458
14459	if test "x$found_iconv" = "xyes"; then
14460		am_save_CFLAGS="$CFLAGS"
14461		am_save_LDFLAGS="$LDFLAGS"
14462		am_save_LIBS="$LIBS"
14463
14464		CFLAGS="$CFLAGS $ICONV_CFLAGS"
14465		LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
14466
14467
14468found_iconv=no
14469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14470/* end confdefs.h.  */
14471
14472#include <stdlib.h>
14473#include <iconv.h>
14474
14475int
14476main ()
14477{
14478
14479	iconv_t cd = iconv_open("","");
14480	iconv(cd, NULL, NULL, NULL, NULL);
14481	iconv_close(cd);
14482
14483  ;
14484  return 0;
14485}
14486_ACEOF
14487if ac_fn_c_try_link "$LINENO"; then :
14488  found_iconv="yes"
14489fi
14490rm -f core conftest.err conftest.$ac_objext \
14491    conftest$ac_exeext conftest.$ac_ext
14492
14493
14494		if test "x$found_iconv" = "xno"; then
14495			ICONV_LIBS="-liconv"
14496			if test "x$enable_static_libs" = "xyes"; then
14497				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
14498
14499				if test "x$static_linking_support" = "xno"; then
14500					ICONV_LIBS="$_iconv_dir_lib/libiconv.a"
14501				else
14502					ICONV_LIBS="${static_linking_support}static $ICONV_LIBS ${static_linking_support}dynamic"
14503				fi
14504			fi
14505			LIBS="$LIBS $ICONV_LIBS"
14506
14507found_iconv=no
14508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14509/* end confdefs.h.  */
14510
14511#include <stdlib.h>
14512#include <iconv.h>
14513
14514int
14515main ()
14516{
14517
14518	iconv_t cd = iconv_open("","");
14519	iconv(cd, NULL, NULL, NULL, NULL);
14520	iconv_close(cd);
14521
14522  ;
14523  return 0;
14524}
14525_ACEOF
14526if ac_fn_c_try_link "$LINENO"; then :
14527  found_iconv="yes"
14528fi
14529rm -f core conftest.err conftest.$ac_objext \
14530    conftest$ac_exeext conftest.$ac_ext
14531
14532		fi
14533
14534		LIBS="$am_save_LIBS"
14535		CFLAGS="$am_save_CFLAGS"
14536		LDFLAGS="$am_save_LDFLAGS"
14537	fi
14538
14539	if test "x$found_iconv" = "xyes"; then
14540
14541$as_echo "#define HAVE_ICONV 1" >>confdefs.h
14542
14543		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14544$as_echo "yes" >&6; }
14545	else
14546		ICONV_LIBS=""
14547		ICONV_CFLAGS=""
14548		ICONV_LDFLAGS=""
14549	fi
14550
14551
14552
14553
14554
14555if test "x$found_iconv" != "xyes"; then
14556	as_fn_error $? "Unable to use iconv (libiconv check failed)" "$LINENO" 5
14557fi
14558LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
14559LIBS="$LIBS $ICONV_LIBS"
14560
14561RANLIB="ranlib"
14562
14563
14564SERVER_CONFIG_FILE="${sysconfdir}/zabbix_server.conf"
14565PROXY_CONFIG_FILE="${sysconfdir}/zabbix_proxy.conf"
14566AGENT_CONFIG_FILE="${sysconfdir}/zabbix_agentd.conf"
14567
14568EXTERNAL_SCRIPTS_PATH="${datadir}/zabbix/externalscripts"
14569ALERT_SCRIPTS_PATH="${datadir}/zabbix/alertscripts"
14570
14571CURL_SSL_CERT_LOCATION="${datadir}/zabbix/ssl/certs"
14572CURL_SSL_KEY_LOCATION="${datadir}/zabbix/ssl/keys"
14573
14574LOAD_MODULE_PATH="${libdir}/modules"
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mkdir -p candidate" >&5
14605$as_echo_n "checking for mkdir -p candidate... " >&6; }
14606if test "x${MKDIR_P}" = "x"; then
14607        if test "x${mkdir_p}" = "x"; then
14608                as_fn_error $? "No suitable \"mkdir -p\" candidate found." "$LINENO" 5
14609        fi
14610        MKDIR_P=${mkdir_p}
14611
14612fi
14613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${MKDIR_P})" >&5
14614$as_echo "ok (${MKDIR_P})" >&6; }
14615
14616case "x$ARCH" in
14617	xlinux|xsolaris)
14618
14619$as_echo "#define ZBX_PROCSTAT_COLLECTOR 1 " >>confdefs.h
14620
14621		;;
14622esac
14623
14624
14625
14626
14627ac_config_files="$ac_config_files Makefile database/Makefile database/ibm_db2/Makefile database/mysql/Makefile database/oracle/Makefile database/postgresql/Makefile database/sqlite3/Makefile misc/Makefile src/Makefile src/libs/Makefile src/libs/zbxlog/Makefile src/libs/zbxalgo/Makefile src/libs/zbxmemory/Makefile src/libs/zbxcrypto/Makefile src/libs/zbxconf/Makefile src/libs/zbxdbcache/Makefile src/libs/zbxdbhigh/Makefile src/libs/zbxmedia/Makefile src/libs/zbxsysinfo/Makefile src/libs/zbxcommon/Makefile src/libs/zbxsysinfo/agent/Makefile src/libs/zbxsysinfo/common/Makefile src/libs/zbxsysinfo/simple/Makefile src/libs/zbxsysinfo/linux/Makefile src/libs/zbxsysinfo/aix/Makefile src/libs/zbxsysinfo/freebsd/Makefile src/libs/zbxsysinfo/hpux/Makefile src/libs/zbxsysinfo/openbsd/Makefile src/libs/zbxsysinfo/osx/Makefile src/libs/zbxsysinfo/solaris/Makefile src/libs/zbxsysinfo/osf/Makefile src/libs/zbxsysinfo/netbsd/Makefile src/libs/zbxsysinfo/unknown/Makefile src/libs/zbxnix/Makefile src/libs/zbxsys/Makefile src/libs/zbxcomms/Makefile src/libs/zbxcommshigh/Makefile src/libs/zbxdb/Makefile src/libs/zbxdbupgrade/Makefile src/libs/zbxjson/Makefile src/libs/zbxhttp/Makefile src/libs/zbxserver/Makefile src/libs/zbxicmpping/Makefile src/libs/zbxexec/Makefile src/libs/zbxself/Makefile src/libs/zbxmodules/Makefile src/libs/zbxregexp/Makefile src/libs/zbxtasks/Makefile src/libs/zbxipcservice/Makefile src/libs/zbxhistory/Makefile src/libs/zbxcompress/Makefile src/zabbix_agent/Makefile src/zabbix_get/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_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"
14628
14629cat >confcache <<\_ACEOF
14630# This file is a shell script that caches the results of configure
14631# tests run on this system so they can be shared between configure
14632# scripts and configure runs, see configure's option --config-cache.
14633# It is not useful on other systems.  If it contains results you don't
14634# want to keep, you may remove or edit it.
14635#
14636# config.status only pays attention to the cache file if you give it
14637# the --recheck option to rerun configure.
14638#
14639# `ac_cv_env_foo' variables (set or unset) will be overridden when
14640# loading this file, other *unset* `ac_cv_foo' will be assigned the
14641# following values.
14642
14643_ACEOF
14644
14645# The following way of writing the cache mishandles newlines in values,
14646# but we know of no workaround that is simple, portable, and efficient.
14647# So, we kill variables containing newlines.
14648# Ultrix sh set writes to stderr and can't be redirected directly,
14649# and sets the high bit in the cache file unless we assign to the vars.
14650(
14651  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14652    eval ac_val=\$$ac_var
14653    case $ac_val in #(
14654    *${as_nl}*)
14655      case $ac_var in #(
14656      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14657$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14658      esac
14659      case $ac_var in #(
14660      _ | IFS | as_nl) ;; #(
14661      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14662      *) { eval $ac_var=; unset $ac_var;} ;;
14663      esac ;;
14664    esac
14665  done
14666
14667  (set) 2>&1 |
14668    case $as_nl`(ac_space=' '; set) 2>&1` in #(
14669    *${as_nl}ac_space=\ *)
14670      # `set' does not quote correctly, so add quotes: double-quote
14671      # substitution turns \\\\ into \\, and sed turns \\ into \.
14672      sed -n \
14673	"s/'/'\\\\''/g;
14674	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14675      ;; #(
14676    *)
14677      # `set' quotes correctly as required by POSIX, so do not add quotes.
14678      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14679      ;;
14680    esac |
14681    sort
14682) |
14683  sed '
14684     /^ac_cv_env_/b end
14685     t clear
14686     :clear
14687     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14688     t end
14689     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14690     :end' >>confcache
14691if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14692  if test -w "$cache_file"; then
14693    if test "x$cache_file" != "x/dev/null"; then
14694      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14695$as_echo "$as_me: updating cache $cache_file" >&6;}
14696      if test ! -f "$cache_file" || test -h "$cache_file"; then
14697	cat confcache >"$cache_file"
14698      else
14699        case $cache_file in #(
14700        */* | ?:*)
14701	  mv -f confcache "$cache_file"$$ &&
14702	  mv -f "$cache_file"$$ "$cache_file" ;; #(
14703        *)
14704	  mv -f confcache "$cache_file" ;;
14705	esac
14706      fi
14707    fi
14708  else
14709    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14710$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14711  fi
14712fi
14713rm -f confcache
14714
14715test "x$prefix" = xNONE && prefix=$ac_default_prefix
14716# Let make expand exec_prefix.
14717test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14718
14719DEFS=-DHAVE_CONFIG_H
14720
14721ac_libobjs=
14722ac_ltlibobjs=
14723for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14724  # 1. Remove the extension, and $U if already installed.
14725  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14726  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14727  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14728  #    will be set to the directory where LIBOBJS objects are built.
14729  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14730  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14731done
14732LIBOBJS=$ac_libobjs
14733
14734LTLIBOBJS=$ac_ltlibobjs
14735
14736
14737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
14738$as_echo_n "checking that generated files are newer than configure... " >&6; }
14739   if test -n "$am_sleep_pid"; then
14740     # Hide warnings about reused PIDs.
14741     wait $am_sleep_pid 2>/dev/null
14742   fi
14743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14744$as_echo "done" >&6; }
14745 if test -n "$EXEEXT"; then
14746  am__EXEEXT_TRUE=
14747  am__EXEEXT_FALSE='#'
14748else
14749  am__EXEEXT_TRUE='#'
14750  am__EXEEXT_FALSE=
14751fi
14752
14753if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14754  as_fn_error $? "conditional \"AMDEP\" was never defined.
14755Usually this means the macro was only invoked conditionally." "$LINENO" 5
14756fi
14757if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14758  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14759Usually this means the macro was only invoked conditionally." "$LINENO" 5
14760fi
14761if test -z "${SERVER_TRUE}" && test -z "${SERVER_FALSE}"; then
14762  as_fn_error $? "conditional \"SERVER\" was never defined.
14763Usually this means the macro was only invoked conditionally." "$LINENO" 5
14764fi
14765if test -z "${PROXY_TRUE}" && test -z "${PROXY_FALSE}"; then
14766  as_fn_error $? "conditional \"PROXY\" was never defined.
14767Usually this means the macro was only invoked conditionally." "$LINENO" 5
14768fi
14769if test -z "${AGENT_TRUE}" && test -z "${AGENT_FALSE}"; then
14770  as_fn_error $? "conditional \"AGENT\" was never defined.
14771Usually this means the macro was only invoked conditionally." "$LINENO" 5
14772fi
14773if test -z "${JAVA_TRUE}" && test -z "${JAVA_FALSE}"; then
14774  as_fn_error $? "conditional \"JAVA\" was never defined.
14775Usually this means the macro was only invoked conditionally." "$LINENO" 5
14776fi
14777if test -z "${IPV6_TRUE}" && test -z "${IPV6_FALSE}"; then
14778  as_fn_error $? "conditional \"IPV6\" was never defined.
14779Usually this means the macro was only invoked conditionally." "$LINENO" 5
14780fi
14781if test -z "${DBSCHEMA_TRUE}" && test -z "${DBSCHEMA_FALSE}"; then
14782  as_fn_error $? "conditional \"DBSCHEMA\" was never defined.
14783Usually this means the macro was only invoked conditionally." "$LINENO" 5
14784fi
14785if test -z "${ZBXCMOCKA_TRUE}" && test -z "${ZBXCMOCKA_FALSE}"; then
14786  as_fn_error $? "conditional \"ZBXCMOCKA\" was never defined.
14787Usually this means the macro was only invoked conditionally." "$LINENO" 5
14788fi
14789if test -z "${HAVE_IPMI_TRUE}" && test -z "${HAVE_IPMI_FALSE}"; then
14790  as_fn_error $? "conditional \"HAVE_IPMI\" was never defined.
14791Usually this means the macro was only invoked conditionally." "$LINENO" 5
14792fi
14793if test -z "${HAVE_LIBXML2_TRUE}" && test -z "${HAVE_LIBXML2_FALSE}"; then
14794  as_fn_error $? "conditional \"HAVE_LIBXML2\" was never defined.
14795Usually this means the macro was only invoked conditionally." "$LINENO" 5
14796fi
14797if test -z "${PROXY_IPCSERVICE_TRUE}" && test -z "${PROXY_IPCSERVICE_FALSE}"; then
14798  as_fn_error $? "conditional \"PROXY_IPCSERVICE\" was never defined.
14799Usually this means the macro was only invoked conditionally." "$LINENO" 5
14800fi
14801if test -z "${HAVE_LIBCURL_TRUE}" && test -z "${HAVE_LIBCURL_FALSE}"; then
14802  as_fn_error $? "conditional \"HAVE_LIBCURL\" was never defined.
14803Usually this means the macro was only invoked conditionally." "$LINENO" 5
14804fi
14805
14806: "${CONFIG_STATUS=./config.status}"
14807ac_write_fail=0
14808ac_clean_files_save=$ac_clean_files
14809ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14810{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14811$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14812as_write_fail=0
14813cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14814#! $SHELL
14815# Generated by $as_me.
14816# Run this file to recreate the current configuration.
14817# Compiler output produced by configure, useful for debugging
14818# configure, is in config.log if it exists.
14819
14820debug=false
14821ac_cs_recheck=false
14822ac_cs_silent=false
14823
14824SHELL=\${CONFIG_SHELL-$SHELL}
14825export SHELL
14826_ASEOF
14827cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14828## -------------------- ##
14829## M4sh Initialization. ##
14830## -------------------- ##
14831
14832# Be more Bourne compatible
14833DUALCASE=1; export DUALCASE # for MKS sh
14834if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14835  emulate sh
14836  NULLCMD=:
14837  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14838  # is contrary to our usage.  Disable this feature.
14839  alias -g '${1+"$@"}'='"$@"'
14840  setopt NO_GLOB_SUBST
14841else
14842  case `(set -o) 2>/dev/null` in #(
14843  *posix*) :
14844    set -o posix ;; #(
14845  *) :
14846     ;;
14847esac
14848fi
14849
14850
14851as_nl='
14852'
14853export as_nl
14854# Printing a long string crashes Solaris 7 /usr/bin/printf.
14855as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14856as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14857as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14858# Prefer a ksh shell builtin over an external printf program on Solaris,
14859# but without wasting forks for bash or zsh.
14860if test -z "$BASH_VERSION$ZSH_VERSION" \
14861    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14862  as_echo='print -r --'
14863  as_echo_n='print -rn --'
14864elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14865  as_echo='printf %s\n'
14866  as_echo_n='printf %s'
14867else
14868  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14869    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14870    as_echo_n='/usr/ucb/echo -n'
14871  else
14872    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14873    as_echo_n_body='eval
14874      arg=$1;
14875      case $arg in #(
14876      *"$as_nl"*)
14877	expr "X$arg" : "X\\(.*\\)$as_nl";
14878	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14879      esac;
14880      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14881    '
14882    export as_echo_n_body
14883    as_echo_n='sh -c $as_echo_n_body as_echo'
14884  fi
14885  export as_echo_body
14886  as_echo='sh -c $as_echo_body as_echo'
14887fi
14888
14889# The user is always right.
14890if test "${PATH_SEPARATOR+set}" != set; then
14891  PATH_SEPARATOR=:
14892  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14893    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14894      PATH_SEPARATOR=';'
14895  }
14896fi
14897
14898
14899# IFS
14900# We need space, tab and new line, in precisely that order.  Quoting is
14901# there to prevent editors from complaining about space-tab.
14902# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14903# splitting by setting IFS to empty value.)
14904IFS=" ""	$as_nl"
14905
14906# Find who we are.  Look in the path if we contain no directory separator.
14907as_myself=
14908case $0 in #((
14909  *[\\/]* ) as_myself=$0 ;;
14910  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14911for as_dir in $PATH
14912do
14913  IFS=$as_save_IFS
14914  test -z "$as_dir" && as_dir=.
14915    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14916  done
14917IFS=$as_save_IFS
14918
14919     ;;
14920esac
14921# We did not find ourselves, most probably we were run as `sh COMMAND'
14922# in which case we are not to be found in the path.
14923if test "x$as_myself" = x; then
14924  as_myself=$0
14925fi
14926if test ! -f "$as_myself"; then
14927  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14928  exit 1
14929fi
14930
14931# Unset variables that we do not need and which cause bugs (e.g. in
14932# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14933# suppresses any "Segmentation fault" message there.  '((' could
14934# trigger a bug in pdksh 5.2.14.
14935for as_var in BASH_ENV ENV MAIL MAILPATH
14936do eval test x\${$as_var+set} = xset \
14937  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14938done
14939PS1='$ '
14940PS2='> '
14941PS4='+ '
14942
14943# NLS nuisances.
14944LC_ALL=C
14945export LC_ALL
14946LANGUAGE=C
14947export LANGUAGE
14948
14949# CDPATH.
14950(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14951
14952
14953# as_fn_error STATUS ERROR [LINENO LOG_FD]
14954# ----------------------------------------
14955# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14956# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14957# script with STATUS, using 1 if that was 0.
14958as_fn_error ()
14959{
14960  as_status=$1; test $as_status -eq 0 && as_status=1
14961  if test "$4"; then
14962    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14963    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14964  fi
14965  $as_echo "$as_me: error: $2" >&2
14966  as_fn_exit $as_status
14967} # as_fn_error
14968
14969
14970# as_fn_set_status STATUS
14971# -----------------------
14972# Set $? to STATUS, without forking.
14973as_fn_set_status ()
14974{
14975  return $1
14976} # as_fn_set_status
14977
14978# as_fn_exit STATUS
14979# -----------------
14980# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14981as_fn_exit ()
14982{
14983  set +e
14984  as_fn_set_status $1
14985  exit $1
14986} # as_fn_exit
14987
14988# as_fn_unset VAR
14989# ---------------
14990# Portably unset VAR.
14991as_fn_unset ()
14992{
14993  { eval $1=; unset $1;}
14994}
14995as_unset=as_fn_unset
14996# as_fn_append VAR VALUE
14997# ----------------------
14998# Append the text in VALUE to the end of the definition contained in VAR. Take
14999# advantage of any shell optimizations that allow amortized linear growth over
15000# repeated appends, instead of the typical quadratic growth present in naive
15001# implementations.
15002if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15003  eval 'as_fn_append ()
15004  {
15005    eval $1+=\$2
15006  }'
15007else
15008  as_fn_append ()
15009  {
15010    eval $1=\$$1\$2
15011  }
15012fi # as_fn_append
15013
15014# as_fn_arith ARG...
15015# ------------------
15016# Perform arithmetic evaluation on the ARGs, and store the result in the
15017# global $as_val. Take advantage of shells that can avoid forks. The arguments
15018# must be portable across $(()) and expr.
15019if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15020  eval 'as_fn_arith ()
15021  {
15022    as_val=$(( $* ))
15023  }'
15024else
15025  as_fn_arith ()
15026  {
15027    as_val=`expr "$@" || test $? -eq 1`
15028  }
15029fi # as_fn_arith
15030
15031
15032if expr a : '\(a\)' >/dev/null 2>&1 &&
15033   test "X`expr 00001 : '.*\(...\)'`" = X001; then
15034  as_expr=expr
15035else
15036  as_expr=false
15037fi
15038
15039if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15040  as_basename=basename
15041else
15042  as_basename=false
15043fi
15044
15045if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15046  as_dirname=dirname
15047else
15048  as_dirname=false
15049fi
15050
15051as_me=`$as_basename -- "$0" ||
15052$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15053	 X"$0" : 'X\(//\)$' \| \
15054	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15055$as_echo X/"$0" |
15056    sed '/^.*\/\([^/][^/]*\)\/*$/{
15057	    s//\1/
15058	    q
15059	  }
15060	  /^X\/\(\/\/\)$/{
15061	    s//\1/
15062	    q
15063	  }
15064	  /^X\/\(\/\).*/{
15065	    s//\1/
15066	    q
15067	  }
15068	  s/.*/./; q'`
15069
15070# Avoid depending upon Character Ranges.
15071as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15072as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15073as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15074as_cr_digits='0123456789'
15075as_cr_alnum=$as_cr_Letters$as_cr_digits
15076
15077ECHO_C= ECHO_N= ECHO_T=
15078case `echo -n x` in #(((((
15079-n*)
15080  case `echo 'xy\c'` in
15081  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
15082  xy)  ECHO_C='\c';;
15083  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15084       ECHO_T='	';;
15085  esac;;
15086*)
15087  ECHO_N='-n';;
15088esac
15089
15090rm -f conf$$ conf$$.exe conf$$.file
15091if test -d conf$$.dir; then
15092  rm -f conf$$.dir/conf$$.file
15093else
15094  rm -f conf$$.dir
15095  mkdir conf$$.dir 2>/dev/null
15096fi
15097if (echo >conf$$.file) 2>/dev/null; then
15098  if ln -s conf$$.file conf$$ 2>/dev/null; then
15099    as_ln_s='ln -s'
15100    # ... but there are two gotchas:
15101    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15102    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15103    # In both cases, we have to default to `cp -pR'.
15104    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15105      as_ln_s='cp -pR'
15106  elif ln conf$$.file conf$$ 2>/dev/null; then
15107    as_ln_s=ln
15108  else
15109    as_ln_s='cp -pR'
15110  fi
15111else
15112  as_ln_s='cp -pR'
15113fi
15114rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15115rmdir conf$$.dir 2>/dev/null
15116
15117
15118# as_fn_mkdir_p
15119# -------------
15120# Create "$as_dir" as a directory, including parents if necessary.
15121as_fn_mkdir_p ()
15122{
15123
15124  case $as_dir in #(
15125  -*) as_dir=./$as_dir;;
15126  esac
15127  test -d "$as_dir" || eval $as_mkdir_p || {
15128    as_dirs=
15129    while :; do
15130      case $as_dir in #(
15131      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15132      *) as_qdir=$as_dir;;
15133      esac
15134      as_dirs="'$as_qdir' $as_dirs"
15135      as_dir=`$as_dirname -- "$as_dir" ||
15136$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15137	 X"$as_dir" : 'X\(//\)[^/]' \| \
15138	 X"$as_dir" : 'X\(//\)$' \| \
15139	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15140$as_echo X"$as_dir" |
15141    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15142	    s//\1/
15143	    q
15144	  }
15145	  /^X\(\/\/\)[^/].*/{
15146	    s//\1/
15147	    q
15148	  }
15149	  /^X\(\/\/\)$/{
15150	    s//\1/
15151	    q
15152	  }
15153	  /^X\(\/\).*/{
15154	    s//\1/
15155	    q
15156	  }
15157	  s/.*/./; q'`
15158      test -d "$as_dir" && break
15159    done
15160    test -z "$as_dirs" || eval "mkdir $as_dirs"
15161  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15162
15163
15164} # as_fn_mkdir_p
15165if mkdir -p . 2>/dev/null; then
15166  as_mkdir_p='mkdir -p "$as_dir"'
15167else
15168  test -d ./-p && rmdir ./-p
15169  as_mkdir_p=false
15170fi
15171
15172
15173# as_fn_executable_p FILE
15174# -----------------------
15175# Test if FILE is an executable regular file.
15176as_fn_executable_p ()
15177{
15178  test -f "$1" && test -x "$1"
15179} # as_fn_executable_p
15180as_test_x='test -x'
15181as_executable_p=as_fn_executable_p
15182
15183# Sed expression to map a string onto a valid CPP name.
15184as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15185
15186# Sed expression to map a string onto a valid variable name.
15187as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15188
15189
15190exec 6>&1
15191## ----------------------------------- ##
15192## Main body of $CONFIG_STATUS script. ##
15193## ----------------------------------- ##
15194_ASEOF
15195test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15196
15197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15198# Save the log message, to keep $0 and so on meaningful, and to
15199# report actual input values of CONFIG_FILES etc. instead of their
15200# values after options handling.
15201ac_log="
15202This file was extended by Zabbix $as_me 4.0.30, which was
15203generated by GNU Autoconf 2.69.  Invocation command line was
15204
15205  CONFIG_FILES    = $CONFIG_FILES
15206  CONFIG_HEADERS  = $CONFIG_HEADERS
15207  CONFIG_LINKS    = $CONFIG_LINKS
15208  CONFIG_COMMANDS = $CONFIG_COMMANDS
15209  $ $0 $@
15210
15211on `(hostname || uname -n) 2>/dev/null | sed 1q`
15212"
15213
15214_ACEOF
15215
15216case $ac_config_files in *"
15217"*) set x $ac_config_files; shift; ac_config_files=$*;;
15218esac
15219
15220case $ac_config_headers in *"
15221"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15222esac
15223
15224
15225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15226# Files that config.status was made for.
15227config_files="$ac_config_files"
15228config_headers="$ac_config_headers"
15229config_commands="$ac_config_commands"
15230
15231_ACEOF
15232
15233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15234ac_cs_usage="\
15235\`$as_me' instantiates files and other configuration actions
15236from templates according to the current configuration.  Unless the files
15237and actions are specified as TAGs, all are instantiated by default.
15238
15239Usage: $0 [OPTION]... [TAG]...
15240
15241  -h, --help       print this help, then exit
15242  -V, --version    print version number and configuration settings, then exit
15243      --config     print configuration, then exit
15244  -q, --quiet, --silent
15245                   do not print progress messages
15246  -d, --debug      don't remove temporary files
15247      --recheck    update $as_me by reconfiguring in the same conditions
15248      --file=FILE[:TEMPLATE]
15249                   instantiate the configuration file FILE
15250      --header=FILE[:TEMPLATE]
15251                   instantiate the configuration header FILE
15252
15253Configuration files:
15254$config_files
15255
15256Configuration headers:
15257$config_headers
15258
15259Configuration commands:
15260$config_commands
15261
15262Report bugs to the package provider."
15263
15264_ACEOF
15265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15266ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15267ac_cs_version="\\
15268Zabbix config.status 4.0.30
15269configured by $0, generated by GNU Autoconf 2.69,
15270  with options \\"\$ac_cs_config\\"
15271
15272Copyright (C) 2012 Free Software Foundation, Inc.
15273This config.status script is free software; the Free Software Foundation
15274gives unlimited permission to copy, distribute and modify it."
15275
15276ac_pwd='$ac_pwd'
15277srcdir='$srcdir'
15278INSTALL='$INSTALL'
15279MKDIR_P='$MKDIR_P'
15280AWK='$AWK'
15281test -n "\$AWK" || AWK=awk
15282_ACEOF
15283
15284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15285# The default lists apply if the user does not specify any file.
15286ac_need_defaults=:
15287while test $# != 0
15288do
15289  case $1 in
15290  --*=?*)
15291    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15292    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15293    ac_shift=:
15294    ;;
15295  --*=)
15296    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15297    ac_optarg=
15298    ac_shift=:
15299    ;;
15300  *)
15301    ac_option=$1
15302    ac_optarg=$2
15303    ac_shift=shift
15304    ;;
15305  esac
15306
15307  case $ac_option in
15308  # Handling of the options.
15309  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15310    ac_cs_recheck=: ;;
15311  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15312    $as_echo "$ac_cs_version"; exit ;;
15313  --config | --confi | --conf | --con | --co | --c )
15314    $as_echo "$ac_cs_config"; exit ;;
15315  --debug | --debu | --deb | --de | --d | -d )
15316    debug=: ;;
15317  --file | --fil | --fi | --f )
15318    $ac_shift
15319    case $ac_optarg in
15320    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15321    '') as_fn_error $? "missing file argument" ;;
15322    esac
15323    as_fn_append CONFIG_FILES " '$ac_optarg'"
15324    ac_need_defaults=false;;
15325  --header | --heade | --head | --hea )
15326    $ac_shift
15327    case $ac_optarg in
15328    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15329    esac
15330    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15331    ac_need_defaults=false;;
15332  --he | --h)
15333    # Conflict between --help and --header
15334    as_fn_error $? "ambiguous option: \`$1'
15335Try \`$0 --help' for more information.";;
15336  --help | --hel | -h )
15337    $as_echo "$ac_cs_usage"; exit ;;
15338  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15339  | -silent | --silent | --silen | --sile | --sil | --si | --s)
15340    ac_cs_silent=: ;;
15341
15342  # This is an error.
15343  -*) as_fn_error $? "unrecognized option: \`$1'
15344Try \`$0 --help' for more information." ;;
15345
15346  *) as_fn_append ac_config_targets " $1"
15347     ac_need_defaults=false ;;
15348
15349  esac
15350  shift
15351done
15352
15353ac_configure_extra_args=
15354
15355if $ac_cs_silent; then
15356  exec 6>/dev/null
15357  ac_configure_extra_args="$ac_configure_extra_args --silent"
15358fi
15359
15360_ACEOF
15361cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15362if \$ac_cs_recheck; then
15363  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15364  shift
15365  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15366  CONFIG_SHELL='$SHELL'
15367  export CONFIG_SHELL
15368  exec "\$@"
15369fi
15370
15371_ACEOF
15372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15373exec 5>>config.log
15374{
15375  echo
15376  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15377## Running $as_me. ##
15378_ASBOX
15379  $as_echo "$ac_log"
15380} >&5
15381
15382_ACEOF
15383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15384#
15385# INIT-COMMANDS
15386#
15387AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
15388
15389_ACEOF
15390
15391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15392
15393# Handling of arguments.
15394for ac_config_target in $ac_config_targets
15395do
15396  case $ac_config_target in
15397    "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
15398    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15399    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15400    "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
15401    "database/ibm_db2/Makefile") CONFIG_FILES="$CONFIG_FILES database/ibm_db2/Makefile" ;;
15402    "database/mysql/Makefile") CONFIG_FILES="$CONFIG_FILES database/mysql/Makefile" ;;
15403    "database/oracle/Makefile") CONFIG_FILES="$CONFIG_FILES database/oracle/Makefile" ;;
15404    "database/postgresql/Makefile") CONFIG_FILES="$CONFIG_FILES database/postgresql/Makefile" ;;
15405    "database/sqlite3/Makefile") CONFIG_FILES="$CONFIG_FILES database/sqlite3/Makefile" ;;
15406    "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;;
15407    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
15408    "src/libs/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/Makefile" ;;
15409    "src/libs/zbxlog/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxlog/Makefile" ;;
15410    "src/libs/zbxalgo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxalgo/Makefile" ;;
15411    "src/libs/zbxmemory/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmemory/Makefile" ;;
15412    "src/libs/zbxcrypto/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcrypto/Makefile" ;;
15413    "src/libs/zbxconf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxconf/Makefile" ;;
15414    "src/libs/zbxdbcache/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbcache/Makefile" ;;
15415    "src/libs/zbxdbhigh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbhigh/Makefile" ;;
15416    "src/libs/zbxmedia/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmedia/Makefile" ;;
15417    "src/libs/zbxsysinfo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/Makefile" ;;
15418    "src/libs/zbxcommon/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcommon/Makefile" ;;
15419    "src/libs/zbxsysinfo/agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/agent/Makefile" ;;
15420    "src/libs/zbxsysinfo/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/common/Makefile" ;;
15421    "src/libs/zbxsysinfo/simple/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/simple/Makefile" ;;
15422    "src/libs/zbxsysinfo/linux/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/linux/Makefile" ;;
15423    "src/libs/zbxsysinfo/aix/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/aix/Makefile" ;;
15424    "src/libs/zbxsysinfo/freebsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/freebsd/Makefile" ;;
15425    "src/libs/zbxsysinfo/hpux/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/hpux/Makefile" ;;
15426    "src/libs/zbxsysinfo/openbsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/openbsd/Makefile" ;;
15427    "src/libs/zbxsysinfo/osx/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/osx/Makefile" ;;
15428    "src/libs/zbxsysinfo/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/solaris/Makefile" ;;
15429    "src/libs/zbxsysinfo/osf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/osf/Makefile" ;;
15430    "src/libs/zbxsysinfo/netbsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/netbsd/Makefile" ;;
15431    "src/libs/zbxsysinfo/unknown/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/unknown/Makefile" ;;
15432    "src/libs/zbxnix/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxnix/Makefile" ;;
15433    "src/libs/zbxsys/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsys/Makefile" ;;
15434    "src/libs/zbxcomms/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcomms/Makefile" ;;
15435    "src/libs/zbxcommshigh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcommshigh/Makefile" ;;
15436    "src/libs/zbxdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdb/Makefile" ;;
15437    "src/libs/zbxdbupgrade/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbupgrade/Makefile" ;;
15438    "src/libs/zbxjson/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxjson/Makefile" ;;
15439    "src/libs/zbxhttp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxhttp/Makefile" ;;
15440    "src/libs/zbxserver/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxserver/Makefile" ;;
15441    "src/libs/zbxicmpping/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxicmpping/Makefile" ;;
15442    "src/libs/zbxexec/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxexec/Makefile" ;;
15443    "src/libs/zbxself/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxself/Makefile" ;;
15444    "src/libs/zbxmodules/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmodules/Makefile" ;;
15445    "src/libs/zbxregexp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxregexp/Makefile" ;;
15446    "src/libs/zbxtasks/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxtasks/Makefile" ;;
15447    "src/libs/zbxipcservice/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxipcservice/Makefile" ;;
15448    "src/libs/zbxhistory/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxhistory/Makefile" ;;
15449    "src/libs/zbxcompress/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcompress/Makefile" ;;
15450    "src/zabbix_agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_agent/Makefile" ;;
15451    "src/zabbix_get/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_get/Makefile" ;;
15452    "src/zabbix_sender/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_sender/Makefile" ;;
15453    "src/zabbix_server/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/Makefile" ;;
15454    "src/zabbix_server/alerter/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/alerter/Makefile" ;;
15455    "src/zabbix_server/dbsyncer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/dbsyncer/Makefile" ;;
15456    "src/zabbix_server/dbconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/dbconfig/Makefile" ;;
15457    "src/zabbix_server/discoverer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/discoverer/Makefile" ;;
15458    "src/zabbix_server/housekeeper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/housekeeper/Makefile" ;;
15459    "src/zabbix_server/httppoller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/httppoller/Makefile" ;;
15460    "src/zabbix_server/pinger/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/pinger/Makefile" ;;
15461    "src/zabbix_server/poller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/poller/Makefile" ;;
15462    "src/zabbix_server/snmptrapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/snmptrapper/Makefile" ;;
15463    "src/zabbix_server/timer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/timer/Makefile" ;;
15464    "src/zabbix_server/trapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/trapper/Makefile" ;;
15465    "src/zabbix_server/escalator/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/escalator/Makefile" ;;
15466    "src/zabbix_server/proxypoller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/proxypoller/Makefile" ;;
15467    "src/zabbix_server/selfmon/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/selfmon/Makefile" ;;
15468    "src/zabbix_server/vmware/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/vmware/Makefile" ;;
15469    "src/zabbix_server/taskmanager/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/taskmanager/Makefile" ;;
15470    "src/zabbix_server/ipmi/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/ipmi/Makefile" ;;
15471    "src/zabbix_server/odbc/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/odbc/Makefile" ;;
15472    "src/zabbix_server/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/scripts/Makefile" ;;
15473    "src/zabbix_server/preprocessor/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/preprocessor/Makefile" ;;
15474    "src/zabbix_proxy/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/Makefile" ;;
15475    "src/zabbix_proxy/heart/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/heart/Makefile" ;;
15476    "src/zabbix_proxy/housekeeper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/housekeeper/Makefile" ;;
15477    "src/zabbix_proxy/proxyconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/proxyconfig/Makefile" ;;
15478    "src/zabbix_proxy/datasender/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/datasender/Makefile" ;;
15479    "src/zabbix_proxy/taskmanager/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/taskmanager/Makefile" ;;
15480    "src/zabbix_java/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_java/Makefile" ;;
15481    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
15482
15483  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15484  esac
15485done
15486
15487
15488# If the user did not use the arguments to specify the items to instantiate,
15489# then the envvar interface is used.  Set only those that are not.
15490# We use the long form for the default assignment because of an extremely
15491# bizarre bug on SunOS 4.1.3.
15492if $ac_need_defaults; then
15493  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15494  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15495  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15496fi
15497
15498# Have a temporary directory for convenience.  Make it in the build tree
15499# simply because there is no reason against having it here, and in addition,
15500# creating and moving files from /tmp can sometimes cause problems.
15501# Hook for its removal unless debugging.
15502# Note that there is a small window in which the directory will not be cleaned:
15503# after its creation but before its name has been assigned to `$tmp'.
15504$debug ||
15505{
15506  tmp= ac_tmp=
15507  trap 'exit_status=$?
15508  : "${ac_tmp:=$tmp}"
15509  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15510' 0
15511  trap 'as_fn_exit 1' 1 2 13 15
15512}
15513# Create a (secure) tmp directory for tmp files.
15514
15515{
15516  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15517  test -d "$tmp"
15518}  ||
15519{
15520  tmp=./conf$$-$RANDOM
15521  (umask 077 && mkdir "$tmp")
15522} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15523ac_tmp=$tmp
15524
15525# Set up the scripts for CONFIG_FILES section.
15526# No need to generate them if there are no CONFIG_FILES.
15527# This happens for instance with `./config.status config.h'.
15528if test -n "$CONFIG_FILES"; then
15529
15530
15531ac_cr=`echo X | tr X '\015'`
15532# On cygwin, bash can eat \r inside `` if the user requested igncr.
15533# But we know of no other shell where ac_cr would be empty at this
15534# point, so we can use a bashism as a fallback.
15535if test "x$ac_cr" = x; then
15536  eval ac_cr=\$\'\\r\'
15537fi
15538ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15539if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15540  ac_cs_awk_cr='\\r'
15541else
15542  ac_cs_awk_cr=$ac_cr
15543fi
15544
15545echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15546_ACEOF
15547
15548
15549{
15550  echo "cat >conf$$subs.awk <<_ACEOF" &&
15551  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15552  echo "_ACEOF"
15553} >conf$$subs.sh ||
15554  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15555ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15556ac_delim='%!_!# '
15557for ac_last_try in false false false false false :; do
15558  . ./conf$$subs.sh ||
15559    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15560
15561  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15562  if test $ac_delim_n = $ac_delim_num; then
15563    break
15564  elif $ac_last_try; then
15565    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15566  else
15567    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15568  fi
15569done
15570rm -f conf$$subs.sh
15571
15572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15573cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15574_ACEOF
15575sed -n '
15576h
15577s/^/S["/; s/!.*/"]=/
15578p
15579g
15580s/^[^!]*!//
15581:repl
15582t repl
15583s/'"$ac_delim"'$//
15584t delim
15585:nl
15586h
15587s/\(.\{148\}\)..*/\1/
15588t more1
15589s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15590p
15591n
15592b repl
15593:more1
15594s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15595p
15596g
15597s/.\{148\}//
15598t nl
15599:delim
15600h
15601s/\(.\{148\}\)..*/\1/
15602t more2
15603s/["\\]/\\&/g; s/^/"/; s/$/"/
15604p
15605b
15606:more2
15607s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15608p
15609g
15610s/.\{148\}//
15611t delim
15612' <conf$$subs.awk | sed '
15613/^[^""]/{
15614  N
15615  s/\n//
15616}
15617' >>$CONFIG_STATUS || ac_write_fail=1
15618rm -f conf$$subs.awk
15619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15620_ACAWK
15621cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15622  for (key in S) S_is_set[key] = 1
15623  FS = ""
15624
15625}
15626{
15627  line = $ 0
15628  nfields = split(line, field, "@")
15629  substed = 0
15630  len = length(field[1])
15631  for (i = 2; i < nfields; i++) {
15632    key = field[i]
15633    keylen = length(key)
15634    if (S_is_set[key]) {
15635      value = S[key]
15636      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15637      len += length(value) + length(field[++i])
15638      substed = 1
15639    } else
15640      len += 1 + keylen
15641  }
15642
15643  print line
15644}
15645
15646_ACAWK
15647_ACEOF
15648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15649if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15650  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15651else
15652  cat
15653fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15654  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15655_ACEOF
15656
15657# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15658# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15659# trailing colons and then remove the whole line if VPATH becomes empty
15660# (actually we leave an empty line to preserve line numbers).
15661if test "x$srcdir" = x.; then
15662  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
15663h
15664s///
15665s/^/:/
15666s/[	 ]*$/:/
15667s/:\$(srcdir):/:/g
15668s/:\${srcdir}:/:/g
15669s/:@srcdir@:/:/g
15670s/^:*//
15671s/:*$//
15672x
15673s/\(=[	 ]*\).*/\1/
15674G
15675s/\n//
15676s/^[^=]*=[	 ]*$//
15677}'
15678fi
15679
15680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15681fi # test -n "$CONFIG_FILES"
15682
15683# Set up the scripts for CONFIG_HEADERS section.
15684# No need to generate them if there are no CONFIG_HEADERS.
15685# This happens for instance with `./config.status Makefile'.
15686if test -n "$CONFIG_HEADERS"; then
15687cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15688BEGIN {
15689_ACEOF
15690
15691# Transform confdefs.h into an awk script `defines.awk', embedded as
15692# here-document in config.status, that substitutes the proper values into
15693# config.h.in to produce config.h.
15694
15695# Create a delimiter string that does not exist in confdefs.h, to ease
15696# handling of long lines.
15697ac_delim='%!_!# '
15698for ac_last_try in false false :; do
15699  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15700  if test -z "$ac_tt"; then
15701    break
15702  elif $ac_last_try; then
15703    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15704  else
15705    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15706  fi
15707done
15708
15709# For the awk script, D is an array of macro values keyed by name,
15710# likewise P contains macro parameters if any.  Preserve backslash
15711# newline sequences.
15712
15713ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15714sed -n '
15715s/.\{148\}/&'"$ac_delim"'/g
15716t rset
15717:rset
15718s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
15719t def
15720d
15721:def
15722s/\\$//
15723t bsnl
15724s/["\\]/\\&/g
15725s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15726D["\1"]=" \3"/p
15727s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
15728d
15729:bsnl
15730s/["\\]/\\&/g
15731s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15732D["\1"]=" \3\\\\\\n"\\/p
15733t cont
15734s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15735t cont
15736d
15737:cont
15738n
15739s/.\{148\}/&'"$ac_delim"'/g
15740t clear
15741:clear
15742s/\\$//
15743t bsnlc
15744s/["\\]/\\&/g; s/^/"/; s/$/"/p
15745d
15746:bsnlc
15747s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15748b cont
15749' <confdefs.h | sed '
15750s/'"$ac_delim"'/"\\\
15751"/g' >>$CONFIG_STATUS || ac_write_fail=1
15752
15753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15754  for (key in D) D_is_set[key] = 1
15755  FS = ""
15756}
15757/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15758  line = \$ 0
15759  split(line, arg, " ")
15760  if (arg[1] == "#") {
15761    defundef = arg[2]
15762    mac1 = arg[3]
15763  } else {
15764    defundef = substr(arg[1], 2)
15765    mac1 = arg[2]
15766  }
15767  split(mac1, mac2, "(") #)
15768  macro = mac2[1]
15769  prefix = substr(line, 1, index(line, defundef) - 1)
15770  if (D_is_set[macro]) {
15771    # Preserve the white space surrounding the "#".
15772    print prefix "define", macro P[macro] D[macro]
15773    next
15774  } else {
15775    # Replace #undef with comments.  This is necessary, for example,
15776    # in the case of _POSIX_SOURCE, which is predefined and required
15777    # on some systems where configure will not decide to define it.
15778    if (defundef == "undef") {
15779      print "/*", prefix defundef, macro, "*/"
15780      next
15781    }
15782  }
15783}
15784{ print }
15785_ACAWK
15786_ACEOF
15787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15788  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15789fi # test -n "$CONFIG_HEADERS"
15790
15791
15792eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
15793shift
15794for ac_tag
15795do
15796  case $ac_tag in
15797  :[FHLC]) ac_mode=$ac_tag; continue;;
15798  esac
15799  case $ac_mode$ac_tag in
15800  :[FHL]*:*);;
15801  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15802  :[FH]-) ac_tag=-:-;;
15803  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15804  esac
15805  ac_save_IFS=$IFS
15806  IFS=:
15807  set x $ac_tag
15808  IFS=$ac_save_IFS
15809  shift
15810  ac_file=$1
15811  shift
15812
15813  case $ac_mode in
15814  :L) ac_source=$1;;
15815  :[FH])
15816    ac_file_inputs=
15817    for ac_f
15818    do
15819      case $ac_f in
15820      -) ac_f="$ac_tmp/stdin";;
15821      *) # Look for the file first in the build tree, then in the source tree
15822	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
15823	 # because $ac_f cannot contain `:'.
15824	 test -f "$ac_f" ||
15825	   case $ac_f in
15826	   [\\/$]*) false;;
15827	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15828	   esac ||
15829	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15830      esac
15831      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15832      as_fn_append ac_file_inputs " '$ac_f'"
15833    done
15834
15835    # Let's still pretend it is `configure' which instantiates (i.e., don't
15836    # use $as_me), people would be surprised to read:
15837    #    /* config.h.  Generated by config.status.  */
15838    configure_input='Generated from '`
15839	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15840	`' by configure.'
15841    if test x"$ac_file" != x-; then
15842      configure_input="$ac_file.  $configure_input"
15843      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15844$as_echo "$as_me: creating $ac_file" >&6;}
15845    fi
15846    # Neutralize special characters interpreted by sed in replacement strings.
15847    case $configure_input in #(
15848    *\&* | *\|* | *\\* )
15849       ac_sed_conf_input=`$as_echo "$configure_input" |
15850       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15851    *) ac_sed_conf_input=$configure_input;;
15852    esac
15853
15854    case $ac_tag in
15855    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15856      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15857    esac
15858    ;;
15859  esac
15860
15861  ac_dir=`$as_dirname -- "$ac_file" ||
15862$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15863	 X"$ac_file" : 'X\(//\)[^/]' \| \
15864	 X"$ac_file" : 'X\(//\)$' \| \
15865	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15866$as_echo X"$ac_file" |
15867    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15868	    s//\1/
15869	    q
15870	  }
15871	  /^X\(\/\/\)[^/].*/{
15872	    s//\1/
15873	    q
15874	  }
15875	  /^X\(\/\/\)$/{
15876	    s//\1/
15877	    q
15878	  }
15879	  /^X\(\/\).*/{
15880	    s//\1/
15881	    q
15882	  }
15883	  s/.*/./; q'`
15884  as_dir="$ac_dir"; as_fn_mkdir_p
15885  ac_builddir=.
15886
15887case "$ac_dir" in
15888.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15889*)
15890  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15891  # A ".." for each directory in $ac_dir_suffix.
15892  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15893  case $ac_top_builddir_sub in
15894  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15895  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15896  esac ;;
15897esac
15898ac_abs_top_builddir=$ac_pwd
15899ac_abs_builddir=$ac_pwd$ac_dir_suffix
15900# for backward compatibility:
15901ac_top_builddir=$ac_top_build_prefix
15902
15903case $srcdir in
15904  .)  # We are building in place.
15905    ac_srcdir=.
15906    ac_top_srcdir=$ac_top_builddir_sub
15907    ac_abs_top_srcdir=$ac_pwd ;;
15908  [\\/]* | ?:[\\/]* )  # Absolute name.
15909    ac_srcdir=$srcdir$ac_dir_suffix;
15910    ac_top_srcdir=$srcdir
15911    ac_abs_top_srcdir=$srcdir ;;
15912  *) # Relative name.
15913    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15914    ac_top_srcdir=$ac_top_build_prefix$srcdir
15915    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15916esac
15917ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15918
15919
15920  case $ac_mode in
15921  :F)
15922  #
15923  # CONFIG_FILE
15924  #
15925
15926  case $INSTALL in
15927  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15928  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15929  esac
15930  ac_MKDIR_P=$MKDIR_P
15931  case $MKDIR_P in
15932  [\\/$]* | ?:[\\/]* ) ;;
15933  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15934  esac
15935_ACEOF
15936
15937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15938# If the template does not know about datarootdir, expand it.
15939# FIXME: This hack should be removed a few years after 2.60.
15940ac_datarootdir_hack=; ac_datarootdir_seen=
15941ac_sed_dataroot='
15942/datarootdir/ {
15943  p
15944  q
15945}
15946/@datadir@/p
15947/@docdir@/p
15948/@infodir@/p
15949/@localedir@/p
15950/@mandir@/p'
15951case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15952*datarootdir*) ac_datarootdir_seen=yes;;
15953*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15954  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15955$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15956_ACEOF
15957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15958  ac_datarootdir_hack='
15959  s&@datadir@&$datadir&g
15960  s&@docdir@&$docdir&g
15961  s&@infodir@&$infodir&g
15962  s&@localedir@&$localedir&g
15963  s&@mandir@&$mandir&g
15964  s&\\\${datarootdir}&$datarootdir&g' ;;
15965esac
15966_ACEOF
15967
15968# Neutralize VPATH when `$srcdir' = `.'.
15969# Shell code in configure.ac might set extrasub.
15970# FIXME: do we really want to maintain this feature?
15971cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15972ac_sed_extra="$ac_vpsub
15973$extrasub
15974_ACEOF
15975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15976:t
15977/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15978s|@configure_input@|$ac_sed_conf_input|;t t
15979s&@top_builddir@&$ac_top_builddir_sub&;t t
15980s&@top_build_prefix@&$ac_top_build_prefix&;t t
15981s&@srcdir@&$ac_srcdir&;t t
15982s&@abs_srcdir@&$ac_abs_srcdir&;t t
15983s&@top_srcdir@&$ac_top_srcdir&;t t
15984s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15985s&@builddir@&$ac_builddir&;t t
15986s&@abs_builddir@&$ac_abs_builddir&;t t
15987s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15988s&@INSTALL@&$ac_INSTALL&;t t
15989s&@MKDIR_P@&$ac_MKDIR_P&;t t
15990$ac_datarootdir_hack
15991"
15992eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15993  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15994
15995test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15996  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15997  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
15998      "$ac_tmp/out"`; test -z "$ac_out"; } &&
15999  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16000which seems to be undefined.  Please make sure it is defined" >&5
16001$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16002which seems to be undefined.  Please make sure it is defined" >&2;}
16003
16004  rm -f "$ac_tmp/stdin"
16005  case $ac_file in
16006  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16007  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16008  esac \
16009  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16010 ;;
16011  :H)
16012  #
16013  # CONFIG_HEADER
16014  #
16015  if test x"$ac_file" != x-; then
16016    {
16017      $as_echo "/* $configure_input  */" \
16018      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16019    } >"$ac_tmp/config.h" \
16020      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16021    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16022      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16023$as_echo "$as_me: $ac_file is unchanged" >&6;}
16024    else
16025      rm -f "$ac_file"
16026      mv "$ac_tmp/config.h" "$ac_file" \
16027	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
16028    fi
16029  else
16030    $as_echo "/* $configure_input  */" \
16031      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16032      || as_fn_error $? "could not create -" "$LINENO" 5
16033  fi
16034# Compute "$ac_file"'s index in $config_headers.
16035_am_arg="$ac_file"
16036_am_stamp_count=1
16037for _am_header in $config_headers :; do
16038  case $_am_header in
16039    $_am_arg | $_am_arg:* )
16040      break ;;
16041    * )
16042      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
16043  esac
16044done
16045echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
16046$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16047	 X"$_am_arg" : 'X\(//\)[^/]' \| \
16048	 X"$_am_arg" : 'X\(//\)$' \| \
16049	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
16050$as_echo X"$_am_arg" |
16051    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16052	    s//\1/
16053	    q
16054	  }
16055	  /^X\(\/\/\)[^/].*/{
16056	    s//\1/
16057	    q
16058	  }
16059	  /^X\(\/\/\)$/{
16060	    s//\1/
16061	    q
16062	  }
16063	  /^X\(\/\).*/{
16064	    s//\1/
16065	    q
16066	  }
16067	  s/.*/./; q'`/stamp-h$_am_stamp_count
16068 ;;
16069
16070  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16071$as_echo "$as_me: executing $ac_file commands" >&6;}
16072 ;;
16073  esac
16074
16075
16076  case $ac_file$ac_mode in
16077    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
16078  # Older Autoconf quotes --file arguments for eval, but not when files
16079  # are listed without --file.  Let's play safe and only enable the eval
16080  # if we detect the quoting.
16081  # TODO: see whether this extra hack can be removed once we start
16082  # requiring Autoconf 2.70 or later.
16083  case $CONFIG_FILES in #(
16084  *\'*) :
16085    eval set x "$CONFIG_FILES" ;; #(
16086  *) :
16087    set x $CONFIG_FILES ;; #(
16088  *) :
16089     ;;
16090esac
16091  shift
16092  # Used to flag and report bootstrapping failures.
16093  am_rc=0
16094  for am_mf
16095  do
16096    # Strip MF so we end up with the name of the file.
16097    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
16098    # Check whether this is an Automake generated Makefile which includes
16099    # dependency-tracking related rules and includes.
16100    # Grep'ing the whole file directly is not great: AIX grep has a line
16101    # limit of 2048, but all sed's we know have understand at least 4000.
16102    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
16103      || continue
16104    am_dirpart=`$as_dirname -- "$am_mf" ||
16105$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16106	 X"$am_mf" : 'X\(//\)[^/]' \| \
16107	 X"$am_mf" : 'X\(//\)$' \| \
16108	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
16109$as_echo X"$am_mf" |
16110    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16111	    s//\1/
16112	    q
16113	  }
16114	  /^X\(\/\/\)[^/].*/{
16115	    s//\1/
16116	    q
16117	  }
16118	  /^X\(\/\/\)$/{
16119	    s//\1/
16120	    q
16121	  }
16122	  /^X\(\/\).*/{
16123	    s//\1/
16124	    q
16125	  }
16126	  s/.*/./; q'`
16127    am_filepart=`$as_basename -- "$am_mf" ||
16128$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
16129	 X"$am_mf" : 'X\(//\)$' \| \
16130	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
16131$as_echo X/"$am_mf" |
16132    sed '/^.*\/\([^/][^/]*\)\/*$/{
16133	    s//\1/
16134	    q
16135	  }
16136	  /^X\/\(\/\/\)$/{
16137	    s//\1/
16138	    q
16139	  }
16140	  /^X\/\(\/\).*/{
16141	    s//\1/
16142	    q
16143	  }
16144	  s/.*/./; q'`
16145    { echo "$as_me:$LINENO: cd "$am_dirpart" \
16146      && sed -e '/# am--include-marker/d' "$am_filepart" \
16147        | $MAKE -f - am--depfiles" >&5
16148   (cd "$am_dirpart" \
16149      && sed -e '/# am--include-marker/d' "$am_filepart" \
16150        | $MAKE -f - am--depfiles) >&5 2>&5
16151   ac_status=$?
16152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16153   (exit $ac_status); } || am_rc=$?
16154  done
16155  if test $am_rc -ne 0; then
16156    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16158as_fn_error $? "Something went wrong bootstrapping makefile fragments
16159    for automatic dependency tracking.  Try re-running configure with the
16160    '--disable-dependency-tracking' option to at least be able to build
16161    the package (albeit without support for automatic dependency tracking).
16162See \`config.log' for more details" "$LINENO" 5; }
16163  fi
16164  { am_dirpart=; unset am_dirpart;}
16165  { am_filepart=; unset am_filepart;}
16166  { am_mf=; unset am_mf;}
16167  { am_rc=; unset am_rc;}
16168  rm -f conftest-deps.mk
16169}
16170 ;;
16171
16172  esac
16173done # for ac_tag
16174
16175
16176as_fn_exit 0
16177_ACEOF
16178ac_clean_files=$ac_clean_files_save
16179
16180test $ac_write_fail = 0 ||
16181  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16182
16183
16184# configure is writing to config.log, and then calls config.status.
16185# config.status does its own redirection, appending to config.log.
16186# Unfortunately, on DOS this fails, as config.log is still kept open
16187# by configure, so config.status won't be able to write to it; its
16188# output is simply discarded.  So we exec the FD to /dev/null,
16189# effectively closing config.log, so it can be properly (re)opened and
16190# appended to by config.status.  When coming back to configure, we
16191# need to make the FD available again.
16192if test "$no_create" != yes; then
16193  ac_cs_success=:
16194  ac_config_status_args=
16195  test "$silent" = yes &&
16196    ac_config_status_args="$ac_config_status_args --quiet"
16197  exec 5>/dev/null
16198  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16199  exec 5>>config.log
16200  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16201  # would make configure fail if this is the last instruction.
16202  $ac_cs_success || as_fn_exit 1
16203fi
16204if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16205  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16206$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16207fi
16208
16209
16210
16211SERVER_CONFIG_FILE=`eval echo "${SERVER_CONFIG_FILE}"`
16212SERVER_CONFIG_FILE=`eval echo "${SERVER_CONFIG_FILE}"`
16213
16214PROXY_CONFIG_FILE=`eval echo "${PROXY_CONFIG_FILE}"`
16215PROXY_CONFIG_FILE=`eval echo "${PROXY_CONFIG_FILE}"`
16216
16217AGENT_CONFIG_FILE=`eval echo "${AGENT_CONFIG_FILE}"`
16218AGENT_CONFIG_FILE=`eval echo "${AGENT_CONFIG_FILE}"`
16219
16220EXTERNAL_SCRIPTS_PATH=`eval echo "${EXTERNAL_SCRIPTS_PATH}"`
16221EXTERNAL_SCRIPTS_PATH=`eval echo "${EXTERNAL_SCRIPTS_PATH}"`
16222
16223ALERT_SCRIPTS_PATH=`eval echo "${ALERT_SCRIPTS_PATH}"`
16224ALERT_SCRIPTS_PATH=`eval echo "${ALERT_SCRIPTS_PATH}"`
16225
16226CURL_SSL_CERT_LOCATION=`eval echo "${CURL_SSL_CERT_LOCATION}"`
16227CURL_SSL_CERT_LOCATION=`eval echo "${CURL_SSL_CERT_LOCATION}"`
16228
16229CURL_SSL_KEY_LOCATION=`eval echo "${CURL_SSL_KEY_LOCATION}"`
16230CURL_SSL_KEY_LOCATION=`eval echo "${CURL_SSL_KEY_LOCATION}"`
16231
16232LOAD_MODULE_PATH=`eval echo "${LOAD_MODULE_PATH}"`
16233LOAD_MODULE_PATH=`eval echo "${LOAD_MODULE_PATH}"`
16234
16235echo "
16236
16237Configuration:
16238
16239  Detected OS:           ${host_os}
16240  Install path:          ${prefix}
16241  Compilation arch:      ${ARCH}
16242
16243  Compiler:              ${CC}
16244  Compiler flags:        ${CFLAGS}
16245
16246  Library-specific flags:"
16247
16248if test "x$DB_CFLAGS" != "x"; then
16249	echo "    database:              ${DB_CFLAGS}"
16250fi
16251
16252if test "x$JABBER_CPPFLAGS" != "x"; then
16253	echo "    Jabber:                ${JABBER_CPPFLAGS}"
16254fi
16255
16256if test "x$LIBXML2_CFLAGS" != "x"; then
16257	echo "    libXML2:               ${LIBXML2_CFLAGS}"
16258fi
16259
16260if test "x$UNIXODBC_CFLAGS" != "x"; then
16261	echo "    unixODBC:              ${UNIXODBC_CFLAGS}"
16262fi
16263
16264if test "x$SNMP_CFLAGS" != "x"; then
16265	echo "    Net-SNMP:              ${SNMP_CFLAGS}"
16266fi
16267
16268if test "x$OPENIPMI_CFLAGS" != "x"; then
16269	echo "    OpenIPMI:              ${OPENIPMI_CFLAGS}"
16270fi
16271
16272if test "x$SSH2_CFLAGS" != "x"; then
16273	echo "    libssh2:               ${SSH2_CFLAGS}"
16274fi
16275
16276if test "x$SSH_CFLAGS" != "x"; then
16277	echo "    libssh:                ${SSH_CFLAGS}"
16278fi
16279
16280if test "x$TLS_CFLAGS" != "x"; then
16281	echo "    TLS:                   ${TLS_CFLAGS}"
16282fi
16283
16284if test "x$LDAP_CPPFLAGS" != "x"; then
16285	echo "    LDAP:                  ${LDAP_CPPFLAGS}"
16286fi
16287
16288if test "x$ICONV_CFLAGS" != "x"; then
16289	echo "    iconv:                 ${ICONV_CFLAGS}"
16290fi
16291
16292if test "x$LIBEVENT_CFLAGS" != "x"; then
16293	echo "    libevent:              ${LIBEVENT_CFLAGS}"
16294fi
16295
16296echo "
16297  Enable server:         ${server}"
16298
16299if test "x$server" != "xno"; then
16300
16301echo "  Server details:
16302    With database:         ${have_db}
16303    WEB Monitoring:        ${have_web_monitoring}"
16304
16305if test "x$have_web_monitoring" = "xcURL"; then
16306echo "      SSL certificates:      ${CURL_SSL_CERT_LOCATION}
16307      SSL keys:              ${CURL_SSL_KEY_LOCATION}"
16308fi
16309
16310echo "    Native Jabber:         ${have_jabber}
16311    SNMP:                  ${have_snmp}
16312    IPMI:                  ${have_ipmi}
16313    SSH:                   ${have_ssh}
16314    TLS:                   ${have_tls}
16315    ODBC:                  ${have_unixodbc}
16316    Linker flags:          ${SERVER_LDFLAGS} ${LDFLAGS}
16317    Libraries:             ${SERVER_LIBS} ${LIBS}
16318    Configuration file:    ${SERVER_CONFIG_FILE}
16319    External scripts:      ${EXTERNAL_SCRIPTS_PATH}
16320    Alert scripts:         ${ALERT_SCRIPTS_PATH}
16321    Modules:               ${LOAD_MODULE_PATH}"
16322
16323fi
16324
16325echo "
16326  Enable proxy:          ${proxy}"
16327
16328if test "x$proxy" != "xno"; then
16329
16330echo "  Proxy details:
16331    With database:         ${have_db}
16332    WEB Monitoring:        ${have_web_monitoring}"
16333
16334if test "x$have_web_monitoring" = "xcURL"; then
16335echo "      SSL certificates:      ${CURL_SSL_CERT_LOCATION}
16336      SSL keys:              ${CURL_SSL_KEY_LOCATION}"
16337fi
16338
16339echo "    SNMP:                  ${have_snmp}
16340    IPMI:                  ${have_ipmi}
16341    SSH:                   ${have_ssh}
16342    TLS:                   ${have_tls}
16343    ODBC:                  ${have_unixodbc}
16344    Linker flags:          ${PROXY_LDFLAGS} ${LDFLAGS}
16345    Libraries:             ${PROXY_LIBS} ${LIBS}
16346    Configuration file:    ${PROXY_CONFIG_FILE}
16347    External scripts:      ${EXTERNAL_SCRIPTS_PATH}
16348    Modules:               ${LOAD_MODULE_PATH}"
16349
16350fi
16351
16352echo "
16353  Enable agent:          ${agent}"
16354
16355if test "x$agent" != "xno"; then
16356
16357echo "  Agent details:
16358    TLS:                   ${have_tls}
16359    Linker flags:          ${AGENT_LDFLAGS} ${LDFLAGS}
16360    Libraries:             ${AGENT_LIBS} ${LIBS}
16361    Configuration file:    ${AGENT_CONFIG_FILE}
16362    Modules:               ${LOAD_MODULE_PATH}"
16363
16364fi
16365
16366echo "
16367  Enable Java gateway:   ${java}"
16368
16369if test "x$java" != "xno"; then
16370
16371echo "  Java gateway details:
16372    Java compiler:         ${JAVAC}
16373    Java archiver:         ${JAR}"
16374
16375fi
16376
16377echo "
16378  LDAP support:          ${found_ldap}
16379  IPv6 support:          ${have_ipv6}"
16380
16381echo
16382echo "***********************************************************"
16383echo "*            Now run '${am_make} install'                       *"
16384echo "*                                                         *"
16385echo "*            Thank you for using Zabbix!                  *"
16386echo "*              <http://www.zabbix.com>                    *"
16387echo "***********************************************************"
16388echo
16389