6369068fcab0d053e3c34f2f437643ecbc91c24b
[freeradius.git] / src / modules / rlm_couchbase / configure
1 #! /bin/sh
2 # From configure.ac Revision.
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.69.
5 #
6 #
7 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19   emulate sh
20   NULLCMD=:
21   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22   # is contrary to our usage.  Disable this feature.
23   alias -g '${1+"$@"}'='"$@"'
24   setopt NO_GLOB_SUBST
25 else
26   case `(set -o) 2>/dev/null` in #(
27   *posix*) :
28     set -o posix ;; #(
29   *) :
30      ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46   as_echo='print -r --'
47   as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='printf %s\n'
50   as_echo_n='printf %s'
51 else
52   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54     as_echo_n='/usr/ucb/echo -n'
55   else
56     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57     as_echo_n_body='eval
58       arg=$1;
59       case $arg in #(
60       *"$as_nl"*)
61         expr "X$arg" : "X\\(.*\\)$as_nl";
62         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63       esac;
64       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65     '
66     export as_echo_n_body
67     as_echo_n='sh -c $as_echo_n_body as_echo'
68   fi
69   export as_echo_body
70   as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75   PATH_SEPARATOR=:
76   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78       PATH_SEPARATOR=';'
79   }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order.  Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" ""        $as_nl"
89
90 # Find who we are.  Look in the path if we contain no directory separator.
91 as_myself=
92 case $0 in #((
93   *[\\/]* ) as_myself=$0 ;;
94   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97   IFS=$as_save_IFS
98   test -z "$as_dir" && as_dir=.
99     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100   done
101 IFS=$as_save_IFS
102
103      ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108   as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112   exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there.  '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 # Use a proper internal environment variable to ensure we don't fall
137   # into an infinite loop, continuously re-executing ourselves.
138   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
139     _as_can_reexec=no; export _as_can_reexec;
140     # We cannot yet assume a decent shell, so we have to provide a
141 # neutralization value for shells without unset; and this also
142 # works around shells that cannot unset nonexistent variables.
143 # Preserve -v and -x to the replacement shell.
144 BASH_ENV=/dev/null
145 ENV=/dev/null
146 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
147 case $- in # ((((
148   *v*x* | *x*v* ) as_opts=-vx ;;
149   *v* ) as_opts=-v ;;
150   *x* ) as_opts=-x ;;
151   * ) as_opts= ;;
152 esac
153 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
154 # Admittedly, this is quite paranoid, since all the known shells bail
155 # out after a failed `exec'.
156 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
157 as_fn_exit 255
158   fi
159   # We don't want this to propagate to other subprocesses.
160           { _as_can_reexec=; unset _as_can_reexec;}
161 if test "x$CONFIG_SHELL" = x; then
162   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
163   emulate sh
164   NULLCMD=:
165   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
166   # is contrary to our usage.  Disable this feature.
167   alias -g '\${1+\"\$@\"}'='\"\$@\"'
168   setopt NO_GLOB_SUBST
169 else
170   case \`(set -o) 2>/dev/null\` in #(
171   *posix*) :
172     set -o posix ;; #(
173   *) :
174      ;;
175 esac
176 fi
177 "
178   as_required="as_fn_return () { (exit \$1); }
179 as_fn_success () { as_fn_return 0; }
180 as_fn_failure () { as_fn_return 1; }
181 as_fn_ret_success () { return 0; }
182 as_fn_ret_failure () { return 1; }
183
184 exitcode=0
185 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
186 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
187 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
188 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
189 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190
191 else
192   exitcode=1; echo positional parameters were not saved.
193 fi
194 test x\$exitcode = x0 || exit 1
195 test -x / || exit 1"
196   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
197   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
198   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
199   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
200   if (eval "$as_required") 2>/dev/null; then :
201   as_have_required=yes
202 else
203   as_have_required=no
204 fi
205   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
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
225 fi
226 fi
227            done;;
228        esac
229   as_found=false
230 done
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
234 fi; }
235 IFS=$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.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248   *v*x* | *x*v* ) as_opts=-vx ;;
249   *v* ) as_opts=-v ;;
250   *x* ) as_opts=-x ;;
251   * ) as_opts= ;;
252 esac
253 exec $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
257 exit 255
258 fi
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
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_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.
305 as_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.
315 as_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.
363 as_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.
373 if (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   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # 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.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # 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.
408 as_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
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_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.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_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
500 ECHO_C= ECHO_N= ECHO_T=
501 case `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';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (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
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_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.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 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.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="rlm_couchbase.c"
586 ac_subst_vars='LTLIBOBJS
587 LIBOBJS
588 targetname
589 mod_ldflags
590 mod_cflags
591 CPP
592 OBJEXT
593 EXEEXT
594 ac_ct_CC
595 CPPFLAGS
596 LDFLAGS
597 CFLAGS
598 CC
599 target_alias
600 host_alias
601 build_alias
602 LIBS
603 ECHO_T
604 ECHO_N
605 ECHO_C
606 DEFS
607 mandir
608 localedir
609 libdir
610 psdir
611 pdfdir
612 dvidir
613 htmldir
614 infodir
615 docdir
616 oldincludedir
617 includedir
618 localstatedir
619 sharedstatedir
620 sysconfdir
621 datadir
622 datarootdir
623 libexecdir
624 sbindir
625 bindir
626 program_transform_name
627 prefix
628 exec_prefix
629 PACKAGE_URL
630 PACKAGE_BUGREPORT
631 PACKAGE_STRING
632 PACKAGE_VERSION
633 PACKAGE_TARNAME
634 PACKAGE_NAME
635 PATH_SEPARATOR
636 SHELL'
637 ac_subst_files=''
638 ac_user_opts='
639 enable_option_checking
640 with_jsonc_include_dir
641 with_jsonc_lib_dir
642 with_jsonc_dir
643 with_libcouchbase_include_dir
644 with_libcouchbase_lib_dir
645 with_libcouchbase_dir
646 '
647       ac_precious_vars='build_alias
648 host_alias
649 target_alias
650 CC
651 CFLAGS
652 LDFLAGS
653 LIBS
654 CPPFLAGS
655 CPP'
656
657
658 # Initialize some variables set by options.
659 ac_init_help=
660 ac_init_version=false
661 ac_unrecognized_opts=
662 ac_unrecognized_sep=
663 # The variables have the same names as the options, with
664 # dashes changed to underlines.
665 cache_file=/dev/null
666 exec_prefix=NONE
667 no_create=
668 no_recursion=
669 prefix=NONE
670 program_prefix=NONE
671 program_suffix=NONE
672 program_transform_name=s,x,x,
673 silent=
674 site=
675 srcdir=
676 verbose=
677 x_includes=NONE
678 x_libraries=NONE
679
680 # Installation directory options.
681 # These are left unexpanded so users can "make install exec_prefix=/foo"
682 # and all the variables that are supposed to be based on exec_prefix
683 # by default will actually change.
684 # Use braces instead of parens because sh, perl, etc. also accept them.
685 # (The list follows the same order as the GNU Coding Standards.)
686 bindir='${exec_prefix}/bin'
687 sbindir='${exec_prefix}/sbin'
688 libexecdir='${exec_prefix}/libexec'
689 datarootdir='${prefix}/share'
690 datadir='${datarootdir}'
691 sysconfdir='${prefix}/etc'
692 sharedstatedir='${prefix}/com'
693 localstatedir='${prefix}/var'
694 includedir='${prefix}/include'
695 oldincludedir='/usr/include'
696 docdir='${datarootdir}/doc/${PACKAGE}'
697 infodir='${datarootdir}/info'
698 htmldir='${docdir}'
699 dvidir='${docdir}'
700 pdfdir='${docdir}'
701 psdir='${docdir}'
702 libdir='${exec_prefix}/lib'
703 localedir='${datarootdir}/locale'
704 mandir='${datarootdir}/man'
705
706 ac_prev=
707 ac_dashdash=
708 for ac_option
709 do
710   # If the previous option needs an argument, assign it.
711   if test -n "$ac_prev"; then
712     eval $ac_prev=\$ac_option
713     ac_prev=
714     continue
715   fi
716
717   case $ac_option in
718   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
719   *=)   ac_optarg= ;;
720   *)    ac_optarg=yes ;;
721   esac
722
723   # Accept the important Cygnus configure options, so we can diagnose typos.
724
725   case $ac_dashdash$ac_option in
726   --)
727     ac_dashdash=yes ;;
728
729   -bindir | --bindir | --bindi | --bind | --bin | --bi)
730     ac_prev=bindir ;;
731   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
732     bindir=$ac_optarg ;;
733
734   -build | --build | --buil | --bui | --bu)
735     ac_prev=build_alias ;;
736   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
737     build_alias=$ac_optarg ;;
738
739   -cache-file | --cache-file | --cache-fil | --cache-fi \
740   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
741     ac_prev=cache_file ;;
742   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
743   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
744     cache_file=$ac_optarg ;;
745
746   --config-cache | -C)
747     cache_file=config.cache ;;
748
749   -datadir | --datadir | --datadi | --datad)
750     ac_prev=datadir ;;
751   -datadir=* | --datadir=* | --datadi=* | --datad=*)
752     datadir=$ac_optarg ;;
753
754   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
755   | --dataroo | --dataro | --datar)
756     ac_prev=datarootdir ;;
757   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
758   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
759     datarootdir=$ac_optarg ;;
760
761   -disable-* | --disable-*)
762     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
763     # Reject names that are not valid shell variable names.
764     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
765       as_fn_error $? "invalid feature name: $ac_useropt"
766     ac_useropt_orig=$ac_useropt
767     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
768     case $ac_user_opts in
769       *"
770 "enable_$ac_useropt"
771 "*) ;;
772       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
773          ac_unrecognized_sep=', ';;
774     esac
775     eval enable_$ac_useropt=no ;;
776
777   -docdir | --docdir | --docdi | --doc | --do)
778     ac_prev=docdir ;;
779   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
780     docdir=$ac_optarg ;;
781
782   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
783     ac_prev=dvidir ;;
784   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
785     dvidir=$ac_optarg ;;
786
787   -enable-* | --enable-*)
788     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
789     # Reject names that are not valid shell variable names.
790     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
791       as_fn_error $? "invalid feature name: $ac_useropt"
792     ac_useropt_orig=$ac_useropt
793     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
794     case $ac_user_opts in
795       *"
796 "enable_$ac_useropt"
797 "*) ;;
798       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
799          ac_unrecognized_sep=', ';;
800     esac
801     eval enable_$ac_useropt=\$ac_optarg ;;
802
803   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
804   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
805   | --exec | --exe | --ex)
806     ac_prev=exec_prefix ;;
807   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
808   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
809   | --exec=* | --exe=* | --ex=*)
810     exec_prefix=$ac_optarg ;;
811
812   -gas | --gas | --ga | --g)
813     # Obsolete; use --with-gas.
814     with_gas=yes ;;
815
816   -help | --help | --hel | --he | -h)
817     ac_init_help=long ;;
818   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
819     ac_init_help=recursive ;;
820   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
821     ac_init_help=short ;;
822
823   -host | --host | --hos | --ho)
824     ac_prev=host_alias ;;
825   -host=* | --host=* | --hos=* | --ho=*)
826     host_alias=$ac_optarg ;;
827
828   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
829     ac_prev=htmldir ;;
830   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
831   | --ht=*)
832     htmldir=$ac_optarg ;;
833
834   -includedir | --includedir | --includedi | --included | --include \
835   | --includ | --inclu | --incl | --inc)
836     ac_prev=includedir ;;
837   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
838   | --includ=* | --inclu=* | --incl=* | --inc=*)
839     includedir=$ac_optarg ;;
840
841   -infodir | --infodir | --infodi | --infod | --info | --inf)
842     ac_prev=infodir ;;
843   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
844     infodir=$ac_optarg ;;
845
846   -libdir | --libdir | --libdi | --libd)
847     ac_prev=libdir ;;
848   -libdir=* | --libdir=* | --libdi=* | --libd=*)
849     libdir=$ac_optarg ;;
850
851   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
852   | --libexe | --libex | --libe)
853     ac_prev=libexecdir ;;
854   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
855   | --libexe=* | --libex=* | --libe=*)
856     libexecdir=$ac_optarg ;;
857
858   -localedir | --localedir | --localedi | --localed | --locale)
859     ac_prev=localedir ;;
860   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
861     localedir=$ac_optarg ;;
862
863   -localstatedir | --localstatedir | --localstatedi | --localstated \
864   | --localstate | --localstat | --localsta | --localst | --locals)
865     ac_prev=localstatedir ;;
866   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
867   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
868     localstatedir=$ac_optarg ;;
869
870   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
871     ac_prev=mandir ;;
872   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
873     mandir=$ac_optarg ;;
874
875   -nfp | --nfp | --nf)
876     # Obsolete; use --without-fp.
877     with_fp=no ;;
878
879   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
880   | --no-cr | --no-c | -n)
881     no_create=yes ;;
882
883   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
884   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
885     no_recursion=yes ;;
886
887   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
888   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
889   | --oldin | --oldi | --old | --ol | --o)
890     ac_prev=oldincludedir ;;
891   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
892   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
893   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
894     oldincludedir=$ac_optarg ;;
895
896   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
897     ac_prev=prefix ;;
898   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
899     prefix=$ac_optarg ;;
900
901   -program-prefix | --program-prefix | --program-prefi | --program-pref \
902   | --program-pre | --program-pr | --program-p)
903     ac_prev=program_prefix ;;
904   -program-prefix=* | --program-prefix=* | --program-prefi=* \
905   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
906     program_prefix=$ac_optarg ;;
907
908   -program-suffix | --program-suffix | --program-suffi | --program-suff \
909   | --program-suf | --program-su | --program-s)
910     ac_prev=program_suffix ;;
911   -program-suffix=* | --program-suffix=* | --program-suffi=* \
912   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
913     program_suffix=$ac_optarg ;;
914
915   -program-transform-name | --program-transform-name \
916   | --program-transform-nam | --program-transform-na \
917   | --program-transform-n | --program-transform- \
918   | --program-transform | --program-transfor \
919   | --program-transfo | --program-transf \
920   | --program-trans | --program-tran \
921   | --progr-tra | --program-tr | --program-t)
922     ac_prev=program_transform_name ;;
923   -program-transform-name=* | --program-transform-name=* \
924   | --program-transform-nam=* | --program-transform-na=* \
925   | --program-transform-n=* | --program-transform-=* \
926   | --program-transform=* | --program-transfor=* \
927   | --program-transfo=* | --program-transf=* \
928   | --program-trans=* | --program-tran=* \
929   | --progr-tra=* | --program-tr=* | --program-t=*)
930     program_transform_name=$ac_optarg ;;
931
932   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
933     ac_prev=pdfdir ;;
934   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
935     pdfdir=$ac_optarg ;;
936
937   -psdir | --psdir | --psdi | --psd | --ps)
938     ac_prev=psdir ;;
939   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
940     psdir=$ac_optarg ;;
941
942   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
943   | -silent | --silent | --silen | --sile | --sil)
944     silent=yes ;;
945
946   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
947     ac_prev=sbindir ;;
948   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
949   | --sbi=* | --sb=*)
950     sbindir=$ac_optarg ;;
951
952   -sharedstatedir | --sharedstatedir | --sharedstatedi \
953   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
954   | --sharedst | --shareds | --shared | --share | --shar \
955   | --sha | --sh)
956     ac_prev=sharedstatedir ;;
957   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
958   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
959   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
960   | --sha=* | --sh=*)
961     sharedstatedir=$ac_optarg ;;
962
963   -site | --site | --sit)
964     ac_prev=site ;;
965   -site=* | --site=* | --sit=*)
966     site=$ac_optarg ;;
967
968   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
969     ac_prev=srcdir ;;
970   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
971     srcdir=$ac_optarg ;;
972
973   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
974   | --syscon | --sysco | --sysc | --sys | --sy)
975     ac_prev=sysconfdir ;;
976   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
977   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
978     sysconfdir=$ac_optarg ;;
979
980   -target | --target | --targe | --targ | --tar | --ta | --t)
981     ac_prev=target_alias ;;
982   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
983     target_alias=$ac_optarg ;;
984
985   -v | -verbose | --verbose | --verbos | --verbo | --verb)
986     verbose=yes ;;
987
988   -version | --version | --versio | --versi | --vers | -V)
989     ac_init_version=: ;;
990
991   -with-* | --with-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       as_fn_error $? "invalid package name: $ac_useropt"
996     ac_useropt_orig=$ac_useropt
997     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998     case $ac_user_opts in
999       *"
1000 "with_$ac_useropt"
1001 "*) ;;
1002       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1003          ac_unrecognized_sep=', ';;
1004     esac
1005     eval with_$ac_useropt=\$ac_optarg ;;
1006
1007   -without-* | --without-*)
1008     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1009     # Reject names that are not valid shell variable names.
1010     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1011       as_fn_error $? "invalid package name: $ac_useropt"
1012     ac_useropt_orig=$ac_useropt
1013     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1014     case $ac_user_opts in
1015       *"
1016 "with_$ac_useropt"
1017 "*) ;;
1018       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1019          ac_unrecognized_sep=', ';;
1020     esac
1021     eval with_$ac_useropt=no ;;
1022
1023   --x)
1024     # Obsolete; use --with-x.
1025     with_x=yes ;;
1026
1027   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1028   | --x-incl | --x-inc | --x-in | --x-i)
1029     ac_prev=x_includes ;;
1030   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1031   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1032     x_includes=$ac_optarg ;;
1033
1034   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1035   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1036     ac_prev=x_libraries ;;
1037   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1038   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1039     x_libraries=$ac_optarg ;;
1040
1041   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1042 Try \`$0 --help' for more information"
1043     ;;
1044
1045   *=*)
1046     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1047     # Reject names that are not valid shell variable names.
1048     case $ac_envvar in #(
1049       '' | [0-9]* | *[!_$as_cr_alnum]* )
1050       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1051     esac
1052     eval $ac_envvar=\$ac_optarg
1053     export $ac_envvar ;;
1054
1055   *)
1056     # FIXME: should be removed in autoconf 3.0.
1057     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1058     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1059       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1060     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1061     ;;
1062
1063   esac
1064 done
1065
1066 if test -n "$ac_prev"; then
1067   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1068   as_fn_error $? "missing argument to $ac_option"
1069 fi
1070
1071 if test -n "$ac_unrecognized_opts"; then
1072   case $enable_option_checking in
1073     no) ;;
1074     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1075     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1076   esac
1077 fi
1078
1079 # Check all directory arguments for consistency.
1080 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1081                 datadir sysconfdir sharedstatedir localstatedir includedir \
1082                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1083                 libdir localedir mandir
1084 do
1085   eval ac_val=\$$ac_var
1086   # Remove trailing slashes.
1087   case $ac_val in
1088     */ )
1089       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1090       eval $ac_var=\$ac_val;;
1091   esac
1092   # Be sure to have absolute directory names.
1093   case $ac_val in
1094     [\\/$]* | ?:[\\/]* )  continue;;
1095     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1096   esac
1097   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1098 done
1099
1100 # There might be people who depend on the old broken behavior: `$host'
1101 # used to hold the argument of --host etc.
1102 # FIXME: To remove some day.
1103 build=$build_alias
1104 host=$host_alias
1105 target=$target_alias
1106
1107 # FIXME: To remove some day.
1108 if test "x$host_alias" != x; then
1109   if test "x$build_alias" = x; then
1110     cross_compiling=maybe
1111   elif test "x$build_alias" != "x$host_alias"; then
1112     cross_compiling=yes
1113   fi
1114 fi
1115
1116 ac_tool_prefix=
1117 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1118
1119 test "$silent" = yes && exec 6>/dev/null
1120
1121
1122 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1123 ac_ls_di=`ls -di .` &&
1124 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1125   as_fn_error $? "working directory cannot be determined"
1126 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1127   as_fn_error $? "pwd does not report name of working directory"
1128
1129
1130 # Find the source files, if location was not specified.
1131 if test -z "$srcdir"; then
1132   ac_srcdir_defaulted=yes
1133   # Try the directory containing this script, then the parent directory.
1134   ac_confdir=`$as_dirname -- "$as_myself" ||
1135 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1136          X"$as_myself" : 'X\(//\)[^/]' \| \
1137          X"$as_myself" : 'X\(//\)$' \| \
1138          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1139 $as_echo X"$as_myself" |
1140     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1141             s//\1/
1142             q
1143           }
1144           /^X\(\/\/\)[^/].*/{
1145             s//\1/
1146             q
1147           }
1148           /^X\(\/\/\)$/{
1149             s//\1/
1150             q
1151           }
1152           /^X\(\/\).*/{
1153             s//\1/
1154             q
1155           }
1156           s/.*/./; q'`
1157   srcdir=$ac_confdir
1158   if test ! -r "$srcdir/$ac_unique_file"; then
1159     srcdir=..
1160   fi
1161 else
1162   ac_srcdir_defaulted=no
1163 fi
1164 if test ! -r "$srcdir/$ac_unique_file"; then
1165   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1166   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1167 fi
1168 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1169 ac_abs_confdir=`(
1170         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1171         pwd)`
1172 # When building in place, set srcdir=.
1173 if test "$ac_abs_confdir" = "$ac_pwd"; then
1174   srcdir=.
1175 fi
1176 # Remove unnecessary trailing slashes from srcdir.
1177 # Double slashes in file names in object file debugging info
1178 # mess up M-x gdb in Emacs.
1179 case $srcdir in
1180 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1181 esac
1182 for ac_var in $ac_precious_vars; do
1183   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1184   eval ac_env_${ac_var}_value=\$${ac_var}
1185   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1186   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1187 done
1188
1189 #
1190 # Report the --help message.
1191 #
1192 if test "$ac_init_help" = "long"; then
1193   # Omit some internal or obsolete options to make the list less imposing.
1194   # This message is too long to be a string in the A/UX 3.1 sh.
1195   cat <<_ACEOF
1196 \`configure' configures this package to adapt to many kinds of systems.
1197
1198 Usage: $0 [OPTION]... [VAR=VALUE]...
1199
1200 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1201 VAR=VALUE.  See below for descriptions of some of the useful variables.
1202
1203 Defaults for the options are specified in brackets.
1204
1205 Configuration:
1206   -h, --help              display this help and exit
1207       --help=short        display options specific to this package
1208       --help=recursive    display the short help of all the included packages
1209   -V, --version           display version information and exit
1210   -q, --quiet, --silent   do not print \`checking ...' messages
1211       --cache-file=FILE   cache test results in FILE [disabled]
1212   -C, --config-cache      alias for \`--cache-file=config.cache'
1213   -n, --no-create         do not create output files
1214       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1215
1216 Installation directories:
1217   --prefix=PREFIX         install architecture-independent files in PREFIX
1218                           [$ac_default_prefix]
1219   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1220                           [PREFIX]
1221
1222 By default, \`make install' will install all the files in
1223 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1224 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1225 for instance \`--prefix=\$HOME'.
1226
1227 For better control, use the options below.
1228
1229 Fine tuning of the installation directories:
1230   --bindir=DIR            user executables [EPREFIX/bin]
1231   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1232   --libexecdir=DIR        program executables [EPREFIX/libexec]
1233   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1234   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1235   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1236   --libdir=DIR            object code libraries [EPREFIX/lib]
1237   --includedir=DIR        C header files [PREFIX/include]
1238   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1239   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1240   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1241   --infodir=DIR           info documentation [DATAROOTDIR/info]
1242   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1243   --mandir=DIR            man documentation [DATAROOTDIR/man]
1244   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1245   --htmldir=DIR           html documentation [DOCDIR]
1246   --dvidir=DIR            dvi documentation [DOCDIR]
1247   --pdfdir=DIR            pdf documentation [DOCDIR]
1248   --psdir=DIR             ps documentation [DOCDIR]
1249 _ACEOF
1250
1251   cat <<\_ACEOF
1252 _ACEOF
1253 fi
1254
1255 if test -n "$ac_init_help"; then
1256
1257   cat <<\_ACEOF
1258
1259 Optional Packages:
1260   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1261   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1262   --with-jsonc-include-dir=DIR
1263                           Directory where the json-c includes may be found
1264   --with-jsonc-lib-dir=DIR
1265                           Directory where the json-c libraries may be found
1266   --with-jsonc-dir=DIR    Base directory where json-c is installed
1267   --with-libcouchbase-include-dir=DIR
1268                           Directory where the libcouchbase includes may be
1269                           found
1270   --with-libcouchbase-lib-dir=DIR
1271                           Directory where the libcouchbase libraries may be
1272                           found
1273   --with-libcouchbase-dir=DIR
1274                           Base directory where libcouchbase is installed
1275
1276 Some influential environment variables:
1277   CC          C compiler command
1278   CFLAGS      C compiler flags
1279   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1280               nonstandard directory <lib dir>
1281   LIBS        libraries to pass to the linker, e.g. -l<library>
1282   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1283               you have headers in a nonstandard directory <include dir>
1284   CPP         C preprocessor
1285
1286 Use these variables to override the choices made by `configure' or to help
1287 it to find libraries and programs with nonstandard names/locations.
1288
1289 Report bugs to the package provider.
1290 _ACEOF
1291 ac_status=$?
1292 fi
1293
1294 if test "$ac_init_help" = "recursive"; then
1295   # If there are subdirs, report their specific --help.
1296   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1297     test -d "$ac_dir" ||
1298       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1299       continue
1300     ac_builddir=.
1301
1302 case "$ac_dir" in
1303 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1304 *)
1305   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1306   # A ".." for each directory in $ac_dir_suffix.
1307   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1308   case $ac_top_builddir_sub in
1309   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1310   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1311   esac ;;
1312 esac
1313 ac_abs_top_builddir=$ac_pwd
1314 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1315 # for backward compatibility:
1316 ac_top_builddir=$ac_top_build_prefix
1317
1318 case $srcdir in
1319   .)  # We are building in place.
1320     ac_srcdir=.
1321     ac_top_srcdir=$ac_top_builddir_sub
1322     ac_abs_top_srcdir=$ac_pwd ;;
1323   [\\/]* | ?:[\\/]* )  # Absolute name.
1324     ac_srcdir=$srcdir$ac_dir_suffix;
1325     ac_top_srcdir=$srcdir
1326     ac_abs_top_srcdir=$srcdir ;;
1327   *) # Relative name.
1328     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1329     ac_top_srcdir=$ac_top_build_prefix$srcdir
1330     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1331 esac
1332 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1333
1334     cd "$ac_dir" || { ac_status=$?; continue; }
1335     # Check for guested configure.
1336     if test -f "$ac_srcdir/configure.gnu"; then
1337       echo &&
1338       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1339     elif test -f "$ac_srcdir/configure"; then
1340       echo &&
1341       $SHELL "$ac_srcdir/configure" --help=recursive
1342     else
1343       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1344     fi || ac_status=$?
1345     cd "$ac_pwd" || { ac_status=$?; break; }
1346   done
1347 fi
1348
1349 test -n "$ac_init_help" && exit $ac_status
1350 if $ac_init_version; then
1351   cat <<\_ACEOF
1352 configure
1353 generated by GNU Autoconf 2.69
1354
1355 Copyright (C) 2012 Free Software Foundation, Inc.
1356 This configure script is free software; the Free Software Foundation
1357 gives unlimited permission to copy, distribute and modify it.
1358 _ACEOF
1359   exit
1360 fi
1361
1362 ## ------------------------ ##
1363 ## Autoconf initialization. ##
1364 ## ------------------------ ##
1365
1366 # ac_fn_c_try_compile LINENO
1367 # --------------------------
1368 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1369 ac_fn_c_try_compile ()
1370 {
1371   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1372   rm -f conftest.$ac_objext
1373   if { { ac_try="$ac_compile"
1374 case "(($ac_try" in
1375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1376   *) ac_try_echo=$ac_try;;
1377 esac
1378 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1379 $as_echo "$ac_try_echo"; } >&5
1380   (eval "$ac_compile") 2>conftest.err
1381   ac_status=$?
1382   if test -s conftest.err; then
1383     grep -v '^ *+' conftest.err >conftest.er1
1384     cat conftest.er1 >&5
1385     mv -f conftest.er1 conftest.err
1386   fi
1387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1388   test $ac_status = 0; } && {
1389          test -z "$ac_c_werror_flag" ||
1390          test ! -s conftest.err
1391        } && test -s conftest.$ac_objext; then :
1392   ac_retval=0
1393 else
1394   $as_echo "$as_me: failed program was:" >&5
1395 sed 's/^/| /' conftest.$ac_ext >&5
1396
1397         ac_retval=1
1398 fi
1399   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1400   as_fn_set_status $ac_retval
1401
1402 } # ac_fn_c_try_compile
1403
1404 # ac_fn_c_try_cpp LINENO
1405 # ----------------------
1406 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1407 ac_fn_c_try_cpp ()
1408 {
1409   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1410   if { { ac_try="$ac_cpp conftest.$ac_ext"
1411 case "(($ac_try" in
1412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1413   *) ac_try_echo=$ac_try;;
1414 esac
1415 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1416 $as_echo "$ac_try_echo"; } >&5
1417   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1418   ac_status=$?
1419   if test -s conftest.err; then
1420     grep -v '^ *+' conftest.err >conftest.er1
1421     cat conftest.er1 >&5
1422     mv -f conftest.er1 conftest.err
1423   fi
1424   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1425   test $ac_status = 0; } > conftest.i && {
1426          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1427          test ! -s conftest.err
1428        }; then :
1429   ac_retval=0
1430 else
1431   $as_echo "$as_me: failed program was:" >&5
1432 sed 's/^/| /' conftest.$ac_ext >&5
1433
1434     ac_retval=1
1435 fi
1436   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1437   as_fn_set_status $ac_retval
1438
1439 } # ac_fn_c_try_cpp
1440
1441 # ac_fn_c_try_link LINENO
1442 # -----------------------
1443 # Try to link conftest.$ac_ext, and return whether this succeeded.
1444 ac_fn_c_try_link ()
1445 {
1446   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1447   rm -f conftest.$ac_objext conftest$ac_exeext
1448   if { { ac_try="$ac_link"
1449 case "(($ac_try" in
1450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1451   *) ac_try_echo=$ac_try;;
1452 esac
1453 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1454 $as_echo "$ac_try_echo"; } >&5
1455   (eval "$ac_link") 2>conftest.err
1456   ac_status=$?
1457   if test -s conftest.err; then
1458     grep -v '^ *+' conftest.err >conftest.er1
1459     cat conftest.er1 >&5
1460     mv -f conftest.er1 conftest.err
1461   fi
1462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1463   test $ac_status = 0; } && {
1464          test -z "$ac_c_werror_flag" ||
1465          test ! -s conftest.err
1466        } && test -s conftest$ac_exeext && {
1467          test "$cross_compiling" = yes ||
1468          test -x conftest$ac_exeext
1469        }; then :
1470   ac_retval=0
1471 else
1472   $as_echo "$as_me: failed program was:" >&5
1473 sed 's/^/| /' conftest.$ac_ext >&5
1474
1475         ac_retval=1
1476 fi
1477   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1478   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1479   # interfere with the next link command; also delete a directory that is
1480   # left behind by Apple's compiler.  We do this before executing the actions.
1481   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1482   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1483   as_fn_set_status $ac_retval
1484
1485 } # ac_fn_c_try_link
1486
1487 # ac_fn_c_check_func LINENO FUNC VAR
1488 # ----------------------------------
1489 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1490 ac_fn_c_check_func ()
1491 {
1492   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1494 $as_echo_n "checking for $2... " >&6; }
1495 if eval \${$3+:} false; then :
1496   $as_echo_n "(cached) " >&6
1497 else
1498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1499 /* end confdefs.h.  */
1500 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1501    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1502 #define $2 innocuous_$2
1503
1504 /* System header to define __stub macros and hopefully few prototypes,
1505     which can conflict with char $2 (); below.
1506     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1507     <limits.h> exists even on freestanding compilers.  */
1508
1509 #ifdef __STDC__
1510 # include <limits.h>
1511 #else
1512 # include <assert.h>
1513 #endif
1514
1515 #undef $2
1516
1517 /* Override any GCC internal prototype to avoid an error.
1518    Use char because int might match the return type of a GCC
1519    builtin and then its argument prototype would still apply.  */
1520 #ifdef __cplusplus
1521 extern "C"
1522 #endif
1523 char $2 ();
1524 /* The GNU C library defines this for functions which it implements
1525     to always fail with ENOSYS.  Some functions are actually named
1526     something starting with __ and the normal name is an alias.  */
1527 #if defined __stub_$2 || defined __stub___$2
1528 choke me
1529 #endif
1530
1531 int
1532 main ()
1533 {
1534 return $2 ();
1535   ;
1536   return 0;
1537 }
1538 _ACEOF
1539 if ac_fn_c_try_link "$LINENO"; then :
1540   eval "$3=yes"
1541 else
1542   eval "$3=no"
1543 fi
1544 rm -f core conftest.err conftest.$ac_objext \
1545     conftest$ac_exeext conftest.$ac_ext
1546 fi
1547 eval ac_res=\$$3
1548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1549 $as_echo "$ac_res" >&6; }
1550   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1551
1552 } # ac_fn_c_check_func
1553 cat >config.log <<_ACEOF
1554 This file contains any messages produced by compilers while
1555 running configure, to aid debugging if configure makes a mistake.
1556
1557 It was created by $as_me, which was
1558 generated by GNU Autoconf 2.69.  Invocation command line was
1559
1560   $ $0 $@
1561
1562 _ACEOF
1563 exec 5>>config.log
1564 {
1565 cat <<_ASUNAME
1566 ## --------- ##
1567 ## Platform. ##
1568 ## --------- ##
1569
1570 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1571 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1572 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1573 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1574 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1575
1576 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1577 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1578
1579 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1580 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1581 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1582 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1583 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1584 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1585 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1586
1587 _ASUNAME
1588
1589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1590 for as_dir in $PATH
1591 do
1592   IFS=$as_save_IFS
1593   test -z "$as_dir" && as_dir=.
1594     $as_echo "PATH: $as_dir"
1595   done
1596 IFS=$as_save_IFS
1597
1598 } >&5
1599
1600 cat >&5 <<_ACEOF
1601
1602
1603 ## ----------- ##
1604 ## Core tests. ##
1605 ## ----------- ##
1606
1607 _ACEOF
1608
1609
1610 # Keep a trace of the command line.
1611 # Strip out --no-create and --no-recursion so they do not pile up.
1612 # Strip out --silent because we don't want to record it for future runs.
1613 # Also quote any args containing shell meta-characters.
1614 # Make two passes to allow for proper duplicate-argument suppression.
1615 ac_configure_args=
1616 ac_configure_args0=
1617 ac_configure_args1=
1618 ac_must_keep_next=false
1619 for ac_pass in 1 2
1620 do
1621   for ac_arg
1622   do
1623     case $ac_arg in
1624     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1625     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1626     | -silent | --silent | --silen | --sile | --sil)
1627       continue ;;
1628     *\'*)
1629       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1630     esac
1631     case $ac_pass in
1632     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1633     2)
1634       as_fn_append ac_configure_args1 " '$ac_arg'"
1635       if test $ac_must_keep_next = true; then
1636         ac_must_keep_next=false # Got value, back to normal.
1637       else
1638         case $ac_arg in
1639           *=* | --config-cache | -C | -disable-* | --disable-* \
1640           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1641           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1642           | -with-* | --with-* | -without-* | --without-* | --x)
1643             case "$ac_configure_args0 " in
1644               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1645             esac
1646             ;;
1647           -* ) ac_must_keep_next=true ;;
1648         esac
1649       fi
1650       as_fn_append ac_configure_args " '$ac_arg'"
1651       ;;
1652     esac
1653   done
1654 done
1655 { ac_configure_args0=; unset ac_configure_args0;}
1656 { ac_configure_args1=; unset ac_configure_args1;}
1657
1658 # When interrupted or exit'd, cleanup temporary files, and complete
1659 # config.log.  We remove comments because anyway the quotes in there
1660 # would cause problems or look ugly.
1661 # WARNING: Use '\'' to represent an apostrophe within the trap.
1662 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1663 trap 'exit_status=$?
1664   # Save into config.log some information that might help in debugging.
1665   {
1666     echo
1667
1668     $as_echo "## ---------------- ##
1669 ## Cache variables. ##
1670 ## ---------------- ##"
1671     echo
1672     # The following way of writing the cache mishandles newlines in values,
1673 (
1674   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1675     eval ac_val=\$$ac_var
1676     case $ac_val in #(
1677     *${as_nl}*)
1678       case $ac_var in #(
1679       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1680 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1681       esac
1682       case $ac_var in #(
1683       _ | IFS | as_nl) ;; #(
1684       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1685       *) { eval $ac_var=; unset $ac_var;} ;;
1686       esac ;;
1687     esac
1688   done
1689   (set) 2>&1 |
1690     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1691     *${as_nl}ac_space=\ *)
1692       sed -n \
1693         "s/'\''/'\''\\\\'\'''\''/g;
1694           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1695       ;; #(
1696     *)
1697       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1698       ;;
1699     esac |
1700     sort
1701 )
1702     echo
1703
1704     $as_echo "## ----------------- ##
1705 ## Output variables. ##
1706 ## ----------------- ##"
1707     echo
1708     for ac_var in $ac_subst_vars
1709     do
1710       eval ac_val=\$$ac_var
1711       case $ac_val in
1712       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1713       esac
1714       $as_echo "$ac_var='\''$ac_val'\''"
1715     done | sort
1716     echo
1717
1718     if test -n "$ac_subst_files"; then
1719       $as_echo "## ------------------- ##
1720 ## File substitutions. ##
1721 ## ------------------- ##"
1722       echo
1723       for ac_var in $ac_subst_files
1724       do
1725         eval ac_val=\$$ac_var
1726         case $ac_val in
1727         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1728         esac
1729         $as_echo "$ac_var='\''$ac_val'\''"
1730       done | sort
1731       echo
1732     fi
1733
1734     if test -s confdefs.h; then
1735       $as_echo "## ----------- ##
1736 ## confdefs.h. ##
1737 ## ----------- ##"
1738       echo
1739       cat confdefs.h
1740       echo
1741     fi
1742     test "$ac_signal" != 0 &&
1743       $as_echo "$as_me: caught signal $ac_signal"
1744     $as_echo "$as_me: exit $exit_status"
1745   } >&5
1746   rm -f core *.core core.conftest.* &&
1747     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1748     exit $exit_status
1749 ' 0
1750 for ac_signal in 1 2 13 15; do
1751   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1752 done
1753 ac_signal=0
1754
1755 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1756 rm -f -r conftest* confdefs.h
1757
1758 $as_echo "/* confdefs.h */" > confdefs.h
1759
1760 # Predefined preprocessor variables.
1761
1762 cat >>confdefs.h <<_ACEOF
1763 #define PACKAGE_NAME "$PACKAGE_NAME"
1764 _ACEOF
1765
1766 cat >>confdefs.h <<_ACEOF
1767 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1768 _ACEOF
1769
1770 cat >>confdefs.h <<_ACEOF
1771 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1772 _ACEOF
1773
1774 cat >>confdefs.h <<_ACEOF
1775 #define PACKAGE_STRING "$PACKAGE_STRING"
1776 _ACEOF
1777
1778 cat >>confdefs.h <<_ACEOF
1779 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1780 _ACEOF
1781
1782 cat >>confdefs.h <<_ACEOF
1783 #define PACKAGE_URL "$PACKAGE_URL"
1784 _ACEOF
1785
1786
1787 # Let the site file select an alternate cache file if it wants to.
1788 # Prefer an explicitly selected file to automatically selected ones.
1789 ac_site_file1=NONE
1790 ac_site_file2=NONE
1791 if test -n "$CONFIG_SITE"; then
1792   # We do not want a PATH search for config.site.
1793   case $CONFIG_SITE in #((
1794     -*)  ac_site_file1=./$CONFIG_SITE;;
1795     */*) ac_site_file1=$CONFIG_SITE;;
1796     *)   ac_site_file1=./$CONFIG_SITE;;
1797   esac
1798 elif test "x$prefix" != xNONE; then
1799   ac_site_file1=$prefix/share/config.site
1800   ac_site_file2=$prefix/etc/config.site
1801 else
1802   ac_site_file1=$ac_default_prefix/share/config.site
1803   ac_site_file2=$ac_default_prefix/etc/config.site
1804 fi
1805 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1806 do
1807   test "x$ac_site_file" = xNONE && continue
1808   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1809     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1810 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1811     sed 's/^/| /' "$ac_site_file" >&5
1812     . "$ac_site_file" \
1813       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1814 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1815 as_fn_error $? "failed to load site script $ac_site_file
1816 See \`config.log' for more details" "$LINENO" 5; }
1817   fi
1818 done
1819
1820 if test -r "$cache_file"; then
1821   # Some versions of bash will fail to source /dev/null (special files
1822   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
1823   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1824     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1825 $as_echo "$as_me: loading cache $cache_file" >&6;}
1826     case $cache_file in
1827       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1828       *)                      . "./$cache_file";;
1829     esac
1830   fi
1831 else
1832   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
1833 $as_echo "$as_me: creating cache $cache_file" >&6;}
1834   >$cache_file
1835 fi
1836
1837 # Check that the precious variables saved in the cache have kept the same
1838 # value.
1839 ac_cache_corrupted=false
1840 for ac_var in $ac_precious_vars; do
1841   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1842   eval ac_new_set=\$ac_env_${ac_var}_set
1843   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1844   eval ac_new_val=\$ac_env_${ac_var}_value
1845   case $ac_old_set,$ac_new_set in
1846     set,)
1847       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1848 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1849       ac_cache_corrupted=: ;;
1850     ,set)
1851       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
1852 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1853       ac_cache_corrupted=: ;;
1854     ,);;
1855     *)
1856       if test "x$ac_old_val" != "x$ac_new_val"; then
1857         # differences in whitespace do not lead to failure.
1858         ac_old_val_w=`echo x $ac_old_val`
1859         ac_new_val_w=`echo x $ac_new_val`
1860         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1861           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
1862 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1863           ac_cache_corrupted=:
1864         else
1865           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1866 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1867           eval $ac_var=\$ac_old_val
1868         fi
1869         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
1870 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1871         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
1872 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1873       fi;;
1874   esac
1875   # Pass precious variables to config.status.
1876   if test "$ac_new_set" = set; then
1877     case $ac_new_val in
1878     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1879     *) ac_arg=$ac_var=$ac_new_val ;;
1880     esac
1881     case " $ac_configure_args " in
1882       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1883       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1884     esac
1885   fi
1886 done
1887 if $ac_cache_corrupted; then
1888   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1889 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1890   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1891 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1892   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1893 fi
1894 ## -------------------- ##
1895 ## Main body of script. ##
1896 ## -------------------- ##
1897
1898 ac_ext=c
1899 ac_cpp='$CPP $CPPFLAGS'
1900 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1901 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1902 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1903
1904
1905
1906
1907 ac_config_headers="$ac_config_headers config.h"
1908
1909
1910 if test x$with_rlm_couchbase != xno; then
1911
1912         ac_ext=c
1913 ac_cpp='$CPP $CPPFLAGS'
1914 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1915 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1916 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1917 if test -n "$ac_tool_prefix"; then
1918   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1919 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1921 $as_echo_n "checking for $ac_word... " >&6; }
1922 if ${ac_cv_prog_CC+:} false; then :
1923   $as_echo_n "(cached) " >&6
1924 else
1925   if test -n "$CC"; then
1926   ac_cv_prog_CC="$CC" # Let the user override the test.
1927 else
1928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1929 for as_dir in $PATH
1930 do
1931   IFS=$as_save_IFS
1932   test -z "$as_dir" && as_dir=.
1933     for ac_exec_ext in '' $ac_executable_extensions; do
1934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1935     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1937     break 2
1938   fi
1939 done
1940   done
1941 IFS=$as_save_IFS
1942
1943 fi
1944 fi
1945 CC=$ac_cv_prog_CC
1946 if test -n "$CC"; then
1947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1948 $as_echo "$CC" >&6; }
1949 else
1950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1951 $as_echo "no" >&6; }
1952 fi
1953
1954
1955 fi
1956 if test -z "$ac_cv_prog_CC"; then
1957   ac_ct_CC=$CC
1958   # Extract the first word of "gcc", so it can be a program name with args.
1959 set dummy gcc; ac_word=$2
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1961 $as_echo_n "checking for $ac_word... " >&6; }
1962 if ${ac_cv_prog_ac_ct_CC+:} false; then :
1963   $as_echo_n "(cached) " >&6
1964 else
1965   if test -n "$ac_ct_CC"; then
1966   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1967 else
1968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1969 for as_dir in $PATH
1970 do
1971   IFS=$as_save_IFS
1972   test -z "$as_dir" && as_dir=.
1973     for ac_exec_ext in '' $ac_executable_extensions; do
1974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1975     ac_cv_prog_ac_ct_CC="gcc"
1976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1977     break 2
1978   fi
1979 done
1980   done
1981 IFS=$as_save_IFS
1982
1983 fi
1984 fi
1985 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1986 if test -n "$ac_ct_CC"; then
1987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
1988 $as_echo "$ac_ct_CC" >&6; }
1989 else
1990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1991 $as_echo "no" >&6; }
1992 fi
1993
1994   if test "x$ac_ct_CC" = x; then
1995     CC=""
1996   else
1997     case $cross_compiling:$ac_tool_warned in
1998 yes:)
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2000 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2001 ac_tool_warned=yes ;;
2002 esac
2003     CC=$ac_ct_CC
2004   fi
2005 else
2006   CC="$ac_cv_prog_CC"
2007 fi
2008
2009 if test -z "$CC"; then
2010           if test -n "$ac_tool_prefix"; then
2011     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2012 set dummy ${ac_tool_prefix}cc; ac_word=$2
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2014 $as_echo_n "checking for $ac_word... " >&6; }
2015 if ${ac_cv_prog_CC+:} false; then :
2016   $as_echo_n "(cached) " >&6
2017 else
2018   if test -n "$CC"; then
2019   ac_cv_prog_CC="$CC" # Let the user override the test.
2020 else
2021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2022 for as_dir in $PATH
2023 do
2024   IFS=$as_save_IFS
2025   test -z "$as_dir" && as_dir=.
2026     for ac_exec_ext in '' $ac_executable_extensions; do
2027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2028     ac_cv_prog_CC="${ac_tool_prefix}cc"
2029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2030     break 2
2031   fi
2032 done
2033   done
2034 IFS=$as_save_IFS
2035
2036 fi
2037 fi
2038 CC=$ac_cv_prog_CC
2039 if test -n "$CC"; then
2040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2041 $as_echo "$CC" >&6; }
2042 else
2043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2044 $as_echo "no" >&6; }
2045 fi
2046
2047
2048   fi
2049 fi
2050 if test -z "$CC"; then
2051   # Extract the first word of "cc", so it can be a program name with args.
2052 set dummy cc; ac_word=$2
2053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2054 $as_echo_n "checking for $ac_word... " >&6; }
2055 if ${ac_cv_prog_CC+:} false; then :
2056   $as_echo_n "(cached) " >&6
2057 else
2058   if test -n "$CC"; then
2059   ac_cv_prog_CC="$CC" # Let the user override the test.
2060 else
2061   ac_prog_rejected=no
2062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2063 for as_dir in $PATH
2064 do
2065   IFS=$as_save_IFS
2066   test -z "$as_dir" && as_dir=.
2067     for ac_exec_ext in '' $ac_executable_extensions; do
2068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2069     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2070        ac_prog_rejected=yes
2071        continue
2072      fi
2073     ac_cv_prog_CC="cc"
2074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2075     break 2
2076   fi
2077 done
2078   done
2079 IFS=$as_save_IFS
2080
2081 if test $ac_prog_rejected = yes; then
2082   # We found a bogon in the path, so make sure we never use it.
2083   set dummy $ac_cv_prog_CC
2084   shift
2085   if test $# != 0; then
2086     # We chose a different compiler from the bogus one.
2087     # However, it has the same basename, so the bogon will be chosen
2088     # first if we set CC to just the basename; use the full file name.
2089     shift
2090     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2091   fi
2092 fi
2093 fi
2094 fi
2095 CC=$ac_cv_prog_CC
2096 if test -n "$CC"; then
2097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2098 $as_echo "$CC" >&6; }
2099 else
2100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2101 $as_echo "no" >&6; }
2102 fi
2103
2104
2105 fi
2106 if test -z "$CC"; then
2107   if test -n "$ac_tool_prefix"; then
2108   for ac_prog in cl.exe
2109   do
2110     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2111 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2113 $as_echo_n "checking for $ac_word... " >&6; }
2114 if ${ac_cv_prog_CC+:} false; then :
2115   $as_echo_n "(cached) " >&6
2116 else
2117   if test -n "$CC"; then
2118   ac_cv_prog_CC="$CC" # Let the user override the test.
2119 else
2120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2121 for as_dir in $PATH
2122 do
2123   IFS=$as_save_IFS
2124   test -z "$as_dir" && as_dir=.
2125     for ac_exec_ext in '' $ac_executable_extensions; do
2126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2127     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2129     break 2
2130   fi
2131 done
2132   done
2133 IFS=$as_save_IFS
2134
2135 fi
2136 fi
2137 CC=$ac_cv_prog_CC
2138 if test -n "$CC"; then
2139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2140 $as_echo "$CC" >&6; }
2141 else
2142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2143 $as_echo "no" >&6; }
2144 fi
2145
2146
2147     test -n "$CC" && break
2148   done
2149 fi
2150 if test -z "$CC"; then
2151   ac_ct_CC=$CC
2152   for ac_prog in cl.exe
2153 do
2154   # Extract the first word of "$ac_prog", so it can be a program name with args.
2155 set dummy $ac_prog; ac_word=$2
2156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2157 $as_echo_n "checking for $ac_word... " >&6; }
2158 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2159   $as_echo_n "(cached) " >&6
2160 else
2161   if test -n "$ac_ct_CC"; then
2162   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2163 else
2164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2165 for as_dir in $PATH
2166 do
2167   IFS=$as_save_IFS
2168   test -z "$as_dir" && as_dir=.
2169     for ac_exec_ext in '' $ac_executable_extensions; do
2170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2171     ac_cv_prog_ac_ct_CC="$ac_prog"
2172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2173     break 2
2174   fi
2175 done
2176   done
2177 IFS=$as_save_IFS
2178
2179 fi
2180 fi
2181 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2182 if test -n "$ac_ct_CC"; then
2183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2184 $as_echo "$ac_ct_CC" >&6; }
2185 else
2186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2187 $as_echo "no" >&6; }
2188 fi
2189
2190
2191   test -n "$ac_ct_CC" && break
2192 done
2193
2194   if test "x$ac_ct_CC" = x; then
2195     CC=""
2196   else
2197     case $cross_compiling:$ac_tool_warned in
2198 yes:)
2199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2200 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2201 ac_tool_warned=yes ;;
2202 esac
2203     CC=$ac_ct_CC
2204   fi
2205 fi
2206
2207 fi
2208
2209
2210 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2211 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2212 as_fn_error $? "no acceptable C compiler found in \$PATH
2213 See \`config.log' for more details" "$LINENO" 5; }
2214
2215 # Provide some information about the compiler.
2216 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2217 set X $ac_compile
2218 ac_compiler=$2
2219 for ac_option in --version -v -V -qversion; do
2220   { { ac_try="$ac_compiler $ac_option >&5"
2221 case "(($ac_try" in
2222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2223   *) ac_try_echo=$ac_try;;
2224 esac
2225 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2226 $as_echo "$ac_try_echo"; } >&5
2227   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2228   ac_status=$?
2229   if test -s conftest.err; then
2230     sed '10a\
2231 ... rest of stderr output deleted ...
2232          10q' conftest.err >conftest.er1
2233     cat conftest.er1 >&5
2234   fi
2235   rm -f conftest.er1 conftest.err
2236   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237   test $ac_status = 0; }
2238 done
2239
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241 /* end confdefs.h.  */
2242
2243 int
2244 main ()
2245 {
2246
2247   ;
2248   return 0;
2249 }
2250 _ACEOF
2251 ac_clean_files_save=$ac_clean_files
2252 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2253 # Try to create an executable without -o first, disregard a.out.
2254 # It will help us diagnose broken compilers, and finding out an intuition
2255 # of exeext.
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2257 $as_echo_n "checking whether the C compiler works... " >&6; }
2258 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2259
2260 # The possible output files:
2261 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2262
2263 ac_rmfiles=
2264 for ac_file in $ac_files
2265 do
2266   case $ac_file in
2267     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2268     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2269   esac
2270 done
2271 rm -f $ac_rmfiles
2272
2273 if { { ac_try="$ac_link_default"
2274 case "(($ac_try" in
2275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276   *) ac_try_echo=$ac_try;;
2277 esac
2278 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279 $as_echo "$ac_try_echo"; } >&5
2280   (eval "$ac_link_default") 2>&5
2281   ac_status=$?
2282   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2283   test $ac_status = 0; }; then :
2284   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2285 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2286 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2287 # so that the user can short-circuit this test for compilers unknown to
2288 # Autoconf.
2289 for ac_file in $ac_files ''
2290 do
2291   test -f "$ac_file" || continue
2292   case $ac_file in
2293     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2294         ;;
2295     [ab].out )
2296         # We found the default executable, but exeext='' is most
2297         # certainly right.
2298         break;;
2299     *.* )
2300         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2301         then :; else
2302            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2303         fi
2304         # We set ac_cv_exeext here because the later test for it is not
2305         # safe: cross compilers may not add the suffix if given an `-o'
2306         # argument, so we may need to know it at that point already.
2307         # Even if this section looks crufty: it has the advantage of
2308         # actually working.
2309         break;;
2310     * )
2311         break;;
2312   esac
2313 done
2314 test "$ac_cv_exeext" = no && ac_cv_exeext=
2315
2316 else
2317   ac_file=''
2318 fi
2319 if test -z "$ac_file"; then :
2320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2321 $as_echo "no" >&6; }
2322 $as_echo "$as_me: failed program was:" >&5
2323 sed 's/^/| /' conftest.$ac_ext >&5
2324
2325 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2326 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2327 as_fn_error 77 "C compiler cannot create executables
2328 See \`config.log' for more details" "$LINENO" 5; }
2329 else
2330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2331 $as_echo "yes" >&6; }
2332 fi
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2334 $as_echo_n "checking for C compiler default output file name... " >&6; }
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2336 $as_echo "$ac_file" >&6; }
2337 ac_exeext=$ac_cv_exeext
2338
2339 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2340 ac_clean_files=$ac_clean_files_save
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2342 $as_echo_n "checking for suffix of executables... " >&6; }
2343 if { { ac_try="$ac_link"
2344 case "(($ac_try" in
2345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2346   *) ac_try_echo=$ac_try;;
2347 esac
2348 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2349 $as_echo "$ac_try_echo"; } >&5
2350   (eval "$ac_link") 2>&5
2351   ac_status=$?
2352   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353   test $ac_status = 0; }; then :
2354   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2355 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2356 # work properly (i.e., refer to `conftest.exe'), while it won't with
2357 # `rm'.
2358 for ac_file in conftest.exe conftest conftest.*; do
2359   test -f "$ac_file" || continue
2360   case $ac_file in
2361     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2362     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2363           break;;
2364     * ) break;;
2365   esac
2366 done
2367 else
2368   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2369 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2370 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2371 See \`config.log' for more details" "$LINENO" 5; }
2372 fi
2373 rm -f conftest conftest$ac_cv_exeext
2374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2375 $as_echo "$ac_cv_exeext" >&6; }
2376
2377 rm -f conftest.$ac_ext
2378 EXEEXT=$ac_cv_exeext
2379 ac_exeext=$EXEEXT
2380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381 /* end confdefs.h.  */
2382 #include <stdio.h>
2383 int
2384 main ()
2385 {
2386 FILE *f = fopen ("conftest.out", "w");
2387  return ferror (f) || fclose (f) != 0;
2388
2389   ;
2390   return 0;
2391 }
2392 _ACEOF
2393 ac_clean_files="$ac_clean_files conftest.out"
2394 # Check that the compiler produces executables we can run.  If not, either
2395 # the compiler is broken, or we cross compile.
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2397 $as_echo_n "checking whether we are cross compiling... " >&6; }
2398 if test "$cross_compiling" != yes; then
2399   { { ac_try="$ac_link"
2400 case "(($ac_try" in
2401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2402   *) ac_try_echo=$ac_try;;
2403 esac
2404 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2405 $as_echo "$ac_try_echo"; } >&5
2406   (eval "$ac_link") 2>&5
2407   ac_status=$?
2408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409   test $ac_status = 0; }
2410   if { ac_try='./conftest$ac_cv_exeext'
2411   { { case "(($ac_try" in
2412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2413   *) ac_try_echo=$ac_try;;
2414 esac
2415 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2416 $as_echo "$ac_try_echo"; } >&5
2417   (eval "$ac_try") 2>&5
2418   ac_status=$?
2419   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2420   test $ac_status = 0; }; }; then
2421     cross_compiling=no
2422   else
2423     if test "$cross_compiling" = maybe; then
2424         cross_compiling=yes
2425     else
2426         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2427 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2428 as_fn_error $? "cannot run C compiled programs.
2429 If you meant to cross compile, use \`--host'.
2430 See \`config.log' for more details" "$LINENO" 5; }
2431     fi
2432   fi
2433 fi
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2435 $as_echo "$cross_compiling" >&6; }
2436
2437 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2438 ac_clean_files=$ac_clean_files_save
2439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2440 $as_echo_n "checking for suffix of object files... " >&6; }
2441 if ${ac_cv_objext+:} false; then :
2442   $as_echo_n "(cached) " >&6
2443 else
2444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445 /* end confdefs.h.  */
2446
2447 int
2448 main ()
2449 {
2450
2451   ;
2452   return 0;
2453 }
2454 _ACEOF
2455 rm -f conftest.o conftest.obj
2456 if { { ac_try="$ac_compile"
2457 case "(($ac_try" in
2458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2459   *) ac_try_echo=$ac_try;;
2460 esac
2461 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2462 $as_echo "$ac_try_echo"; } >&5
2463   (eval "$ac_compile") 2>&5
2464   ac_status=$?
2465   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2466   test $ac_status = 0; }; then :
2467   for ac_file in conftest.o conftest.obj conftest.*; do
2468   test -f "$ac_file" || continue;
2469   case $ac_file in
2470     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2471     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2472        break;;
2473   esac
2474 done
2475 else
2476   $as_echo "$as_me: failed program was:" >&5
2477 sed 's/^/| /' conftest.$ac_ext >&5
2478
2479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2480 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2481 as_fn_error $? "cannot compute suffix of object files: cannot compile
2482 See \`config.log' for more details" "$LINENO" 5; }
2483 fi
2484 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2485 fi
2486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2487 $as_echo "$ac_cv_objext" >&6; }
2488 OBJEXT=$ac_cv_objext
2489 ac_objext=$OBJEXT
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2491 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2492 if ${ac_cv_c_compiler_gnu+:} false; then :
2493   $as_echo_n "(cached) " >&6
2494 else
2495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2496 /* end confdefs.h.  */
2497
2498 int
2499 main ()
2500 {
2501 #ifndef __GNUC__
2502        choke me
2503 #endif
2504
2505   ;
2506   return 0;
2507 }
2508 _ACEOF
2509 if ac_fn_c_try_compile "$LINENO"; then :
2510   ac_compiler_gnu=yes
2511 else
2512   ac_compiler_gnu=no
2513 fi
2514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2515 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2516
2517 fi
2518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2519 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
2520 if test $ac_compiler_gnu = yes; then
2521   GCC=yes
2522 else
2523   GCC=
2524 fi
2525 ac_test_CFLAGS=${CFLAGS+set}
2526 ac_save_CFLAGS=$CFLAGS
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2528 $as_echo_n "checking whether $CC accepts -g... " >&6; }
2529 if ${ac_cv_prog_cc_g+:} false; then :
2530   $as_echo_n "(cached) " >&6
2531 else
2532   ac_save_c_werror_flag=$ac_c_werror_flag
2533    ac_c_werror_flag=yes
2534    ac_cv_prog_cc_g=no
2535    CFLAGS="-g"
2536    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2537 /* end confdefs.h.  */
2538
2539 int
2540 main ()
2541 {
2542
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 if ac_fn_c_try_compile "$LINENO"; then :
2548   ac_cv_prog_cc_g=yes
2549 else
2550   CFLAGS=""
2551       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2552 /* end confdefs.h.  */
2553
2554 int
2555 main ()
2556 {
2557
2558   ;
2559   return 0;
2560 }
2561 _ACEOF
2562 if ac_fn_c_try_compile "$LINENO"; then :
2563
2564 else
2565   ac_c_werror_flag=$ac_save_c_werror_flag
2566          CFLAGS="-g"
2567          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568 /* end confdefs.h.  */
2569
2570 int
2571 main ()
2572 {
2573
2574   ;
2575   return 0;
2576 }
2577 _ACEOF
2578 if ac_fn_c_try_compile "$LINENO"; then :
2579   ac_cv_prog_cc_g=yes
2580 fi
2581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582 fi
2583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2584 fi
2585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2586    ac_c_werror_flag=$ac_save_c_werror_flag
2587 fi
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2589 $as_echo "$ac_cv_prog_cc_g" >&6; }
2590 if test "$ac_test_CFLAGS" = set; then
2591   CFLAGS=$ac_save_CFLAGS
2592 elif test $ac_cv_prog_cc_g = yes; then
2593   if test "$GCC" = yes; then
2594     CFLAGS="-g -O2"
2595   else
2596     CFLAGS="-g"
2597   fi
2598 else
2599   if test "$GCC" = yes; then
2600     CFLAGS="-O2"
2601   else
2602     CFLAGS=
2603   fi
2604 fi
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2606 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2607 if ${ac_cv_prog_cc_c89+:} false; then :
2608   $as_echo_n "(cached) " >&6
2609 else
2610   ac_cv_prog_cc_c89=no
2611 ac_save_CC=$CC
2612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613 /* end confdefs.h.  */
2614 #include <stdarg.h>
2615 #include <stdio.h>
2616 struct stat;
2617 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2618 struct buf { int x; };
2619 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2620 static char *e (p, i)
2621      char **p;
2622      int i;
2623 {
2624   return p[i];
2625 }
2626 static char *f (char * (*g) (char **, int), char **p, ...)
2627 {
2628   char *s;
2629   va_list v;
2630   va_start (v,p);
2631   s = g (p, va_arg (v,int));
2632   va_end (v);
2633   return s;
2634 }
2635
2636 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2637    function prototypes and stuff, but not '\xHH' hex character constants.
2638    These don't provoke an error unfortunately, instead are silently treated
2639    as 'x'.  The following induces an error, until -std is added to get
2640    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2641    array size at least.  It's necessary to write '\x00'==0 to get something
2642    that's true only with -std.  */
2643 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2644
2645 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2646    inside strings and character constants.  */
2647 #define FOO(x) 'x'
2648 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2649
2650 int test (int i, double x);
2651 struct s1 {int (*f) (int a);};
2652 struct s2 {int (*f) (double a);};
2653 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2654 int argc;
2655 char **argv;
2656 int
2657 main ()
2658 {
2659 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2660   ;
2661   return 0;
2662 }
2663 _ACEOF
2664 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2665         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2666 do
2667   CC="$ac_save_CC $ac_arg"
2668   if ac_fn_c_try_compile "$LINENO"; then :
2669   ac_cv_prog_cc_c89=$ac_arg
2670 fi
2671 rm -f core conftest.err conftest.$ac_objext
2672   test "x$ac_cv_prog_cc_c89" != "xno" && break
2673 done
2674 rm -f conftest.$ac_ext
2675 CC=$ac_save_CC
2676
2677 fi
2678 # AC_CACHE_VAL
2679 case "x$ac_cv_prog_cc_c89" in
2680   x)
2681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2682 $as_echo "none needed" >&6; } ;;
2683   xno)
2684     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2685 $as_echo "unsupported" >&6; } ;;
2686   *)
2687     CC="$CC $ac_cv_prog_cc_c89"
2688     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2689 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2690 esac
2691 if test "x$ac_cv_prog_cc_c89" != xno; then :
2692
2693 fi
2694
2695 ac_ext=c
2696 ac_cpp='$CPP $CPPFLAGS'
2697 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2700
2701         ac_ext=c
2702 ac_cpp='$CPP $CPPFLAGS'
2703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
2707 $as_echo_n "checking how to run the C preprocessor... " >&6; }
2708 # On Suns, sometimes $CPP names a directory.
2709 if test -n "$CPP" && test -d "$CPP"; then
2710   CPP=
2711 fi
2712 if test -z "$CPP"; then
2713   if ${ac_cv_prog_CPP+:} false; then :
2714   $as_echo_n "(cached) " >&6
2715 else
2716       # Double quotes because CPP needs to be expanded
2717     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2718     do
2719       ac_preproc_ok=false
2720 for ac_c_preproc_warn_flag in '' yes
2721 do
2722   # Use a header file that comes with gcc, so configuring glibc
2723   # with a fresh cross-compiler works.
2724   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2725   # <limits.h> exists even on freestanding compilers.
2726   # On the NeXT, cc -E runs the code through the compiler's parser,
2727   # not just through cpp. "Syntax error" is here to catch this case.
2728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729 /* end confdefs.h.  */
2730 #ifdef __STDC__
2731 # include <limits.h>
2732 #else
2733 # include <assert.h>
2734 #endif
2735                      Syntax error
2736 _ACEOF
2737 if ac_fn_c_try_cpp "$LINENO"; then :
2738
2739 else
2740   # Broken: fails on valid input.
2741 continue
2742 fi
2743 rm -f conftest.err conftest.i conftest.$ac_ext
2744
2745   # OK, works on sane cases.  Now check whether nonexistent headers
2746   # can be detected and how.
2747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748 /* end confdefs.h.  */
2749 #include <ac_nonexistent.h>
2750 _ACEOF
2751 if ac_fn_c_try_cpp "$LINENO"; then :
2752   # Broken: success on invalid input.
2753 continue
2754 else
2755   # Passes both tests.
2756 ac_preproc_ok=:
2757 break
2758 fi
2759 rm -f conftest.err conftest.i conftest.$ac_ext
2760
2761 done
2762 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2763 rm -f conftest.i conftest.err conftest.$ac_ext
2764 if $ac_preproc_ok; then :
2765   break
2766 fi
2767
2768     done
2769     ac_cv_prog_CPP=$CPP
2770
2771 fi
2772   CPP=$ac_cv_prog_CPP
2773 else
2774   ac_cv_prog_CPP=$CPP
2775 fi
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
2777 $as_echo "$CPP" >&6; }
2778 ac_preproc_ok=false
2779 for ac_c_preproc_warn_flag in '' yes
2780 do
2781   # Use a header file that comes with gcc, so configuring glibc
2782   # with a fresh cross-compiler works.
2783   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2784   # <limits.h> exists even on freestanding compilers.
2785   # On the NeXT, cc -E runs the code through the compiler's parser,
2786   # not just through cpp. "Syntax error" is here to catch this case.
2787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2788 /* end confdefs.h.  */
2789 #ifdef __STDC__
2790 # include <limits.h>
2791 #else
2792 # include <assert.h>
2793 #endif
2794                      Syntax error
2795 _ACEOF
2796 if ac_fn_c_try_cpp "$LINENO"; then :
2797
2798 else
2799   # Broken: fails on valid input.
2800 continue
2801 fi
2802 rm -f conftest.err conftest.i conftest.$ac_ext
2803
2804   # OK, works on sane cases.  Now check whether nonexistent headers
2805   # can be detected and how.
2806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807 /* end confdefs.h.  */
2808 #include <ac_nonexistent.h>
2809 _ACEOF
2810 if ac_fn_c_try_cpp "$LINENO"; then :
2811   # Broken: success on invalid input.
2812 continue
2813 else
2814   # Passes both tests.
2815 ac_preproc_ok=:
2816 break
2817 fi
2818 rm -f conftest.err conftest.i conftest.$ac_ext
2819
2820 done
2821 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2822 rm -f conftest.i conftest.err conftest.$ac_ext
2823 if $ac_preproc_ok; then :
2824
2825 else
2826   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2827 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2828 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
2829 See \`config.log' for more details" "$LINENO" 5; }
2830 fi
2831
2832 ac_ext=c
2833 ac_cpp='$CPP $CPPFLAGS'
2834 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2835 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2836 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2837
2838
2839
2840
2841                 jsonc_include_dir=
2842
2843 # Check whether --with-jsonc-include-dir was given.
2844 if test "${with_jsonc_include_dir+set}" = set; then :
2845   withval=$with_jsonc_include_dir; case "$withval" in
2846                         no)
2847                                 as_fn_error $? "Need jsonc-include-dir" "$LINENO" 5
2848                         ;;
2849                         yes)
2850                         ;;
2851                         *)
2852                                 jsonc_include_dir="$withval"
2853                         ;;
2854                 esac
2855 fi
2856
2857
2858                 jsonc_lib_dir=
2859
2860 # Check whether --with-jsonc-lib-dir was given.
2861 if test "${with_jsonc_lib_dir+set}" = set; then :
2862   withval=$with_jsonc_lib_dir; case "$withval" in
2863                         no)
2864                                 as_fn_error $? "Need jsonc-lib-dir" "$LINENO" 5
2865                         ;;
2866                         yes)
2867                         ;;
2868                         *)
2869                                 jsonc_lib_dir="$withval"
2870                         ;;
2871                 esac
2872 fi
2873
2874
2875
2876 # Check whether --with-jsonc-dir was given.
2877 if test "${with_jsonc_dir+set}" = set; then :
2878   withval=$with_jsonc_dir; case "$withval" in
2879                         no)
2880                                 as_fn_error $? "Need json-c-dir" "$LINENO" 5
2881                         ;;
2882                         yes)
2883                         ;;
2884                         *)
2885                                 jsonc_lib_dir="$withval/lib"
2886                                 jsonc_include_dir="$withval/include"
2887                         ;;
2888                 esac
2889 fi
2890
2891
2892
2893         have_json="yes"
2894         smart_try_dir="$jsonc_include_dir"
2895
2896
2897
2898 ac_safe=`echo "json/json.h" | sed 'y%./+-%__pm%'`
2899 old_CPPFLAGS="$CPPFLAGS"
2900 smart_include=
2901 smart_include_dir=
2902
2903 if test "x$smart_try_dir" != "x"; then
2904   for try in $smart_try_dir; do
2905     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json/json.h in $try" >&5
2906 $as_echo_n "checking for json/json.h in $try... " >&6; }
2907     CPPFLAGS="-isystem $try $old_CPPFLAGS"
2908     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2909 /* end confdefs.h.  */
2910
2911                     #include <json/json.h>
2912 int
2913 main ()
2914 {
2915 int a = 1;
2916   ;
2917   return 0;
2918 }
2919 _ACEOF
2920 if ac_fn_c_try_compile "$LINENO"; then :
2921
2922                      smart_include="-isystem $try"
2923                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2924 $as_echo "yes" >&6; }
2925                      break
2926
2927 else
2928
2929                      smart_include=
2930                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2931 $as_echo "no" >&6; }
2932
2933 fi
2934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2935   done
2936   CPPFLAGS="$old_CPPFLAGS"
2937 fi
2938
2939 if test "x$smart_include" = "x"; then
2940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json/json.h" >&5
2941 $as_echo_n "checking for json/json.h... " >&6; }
2942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943 /* end confdefs.h.  */
2944
2945                   #include <json/json.h>
2946 int
2947 main ()
2948 {
2949 int a = 1;
2950   ;
2951   return 0;
2952 }
2953 _ACEOF
2954 if ac_fn_c_try_compile "$LINENO"; then :
2955
2956                    smart_include=" "
2957                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2958 $as_echo "yes" >&6; }
2959                    break
2960
2961 else
2962
2963                    smart_include=
2964                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2965 $as_echo "no" >&6; }
2966
2967 fi
2968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2969 fi
2970
2971 if test "x$smart_include" = "x"; then
2972
2973
2974 if test "x$LOCATE" != "x"; then
2975         DIRS=
2976   file=json/json.h
2977
2978   for x in `${LOCATE} $file 2>/dev/null`; do
2979                                         base=`echo $x | sed "s%/${file}%%"`
2980     if test "x$x" = "x$base"; then
2981       continue;
2982     fi
2983
2984     dir=`${DIRNAME} $x 2>/dev/null`
2985                 exclude=`echo ${dir} | ${GREP} /home`
2986     if test "x$exclude" != "x"; then
2987       continue
2988     fi
2989
2990                     already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
2991     if test "x$already" = "x"; then
2992       DIRS="$DIRS $dir"
2993     fi
2994   done
2995 fi
2996
2997 eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
2998
2999   for try in $smart_include_dir /usr/local/include /opt/include; do
3000     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json/json.h in $try" >&5
3001 $as_echo_n "checking for json/json.h in $try... " >&6; }
3002     CPPFLAGS="-isystem $try $old_CPPFLAGS"
3003     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3004 /* end confdefs.h.  */
3005
3006                     #include <json/json.h>
3007 int
3008 main ()
3009 {
3010 int a = 1;
3011   ;
3012   return 0;
3013 }
3014 _ACEOF
3015 if ac_fn_c_try_compile "$LINENO"; then :
3016
3017                      smart_include="-isystem $try"
3018                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3019 $as_echo "yes" >&6; }
3020                      break
3021
3022 else
3023
3024                      smart_include=
3025                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3026 $as_echo "no" >&6; }
3027
3028 fi
3029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3030   done
3031   CPPFLAGS="$old_CPPFLAGS"
3032 fi
3033
3034 if test "x$smart_include" != "x"; then
3035   eval "ac_cv_header_$ac_safe=yes"
3036   CPPFLAGS="$smart_include $old_CPPFLAGS"
3037   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
3038 fi
3039
3040         if test "x$ac_cv_header_json_json_h" != "xyes"; then
3041                 have_json="no"
3042                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: json-c headers not found. Use --with-jsonc-include-dir=<path>." >&5
3043 $as_echo "$as_me: WARNING: json-c headers not found. Use --with-jsonc-include-dir=<path>." >&2;}
3044         fi
3045
3046
3047         smart_try_dir="$jsonc_lib_dir"
3048
3049
3050 sm_lib_safe=`echo "json-c" | sed 'y%./+-%__p_%'`
3051 sm_func_safe=`echo "json_c_version" | sed 'y%./+-%__p_%'`
3052
3053 old_LIBS="$LIBS"
3054 old_CPPFLAGS="$CPPFLAGS"
3055 smart_lib=
3056 smart_ldflags=
3057 smart_lib_dir=
3058
3059 if test "x$smart_try_dir" != "x"; then
3060   for try in $smart_try_dir; do
3061     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_c_version in -ljson-c in $try" >&5
3062 $as_echo_n "checking for json_c_version in -ljson-c in $try... " >&6; }
3063     LIBS="-ljson-c $old_LIBS"
3064     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
3065     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3066 /* end confdefs.h.  */
3067 extern char json_c_version();
3068 int
3069 main ()
3070 {
3071 json_c_version()
3072   ;
3073   return 0;
3074 }
3075 _ACEOF
3076 if ac_fn_c_try_link "$LINENO"; then :
3077
3078                  smart_lib="-ljson-c"
3079                  smart_ldflags="-L$try -Wl,-rpath,$try"
3080                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3081 $as_echo "yes" >&6; }
3082                  break
3083
3084 else
3085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086 $as_echo "no" >&6; }
3087 fi
3088 rm -f core conftest.err conftest.$ac_objext \
3089     conftest$ac_exeext conftest.$ac_ext
3090   done
3091   LIBS="$old_LIBS"
3092   CPPFLAGS="$old_CPPFLAGS"
3093 fi
3094
3095 if test "x$smart_lib" = "x"; then
3096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_c_version in -ljson-c" >&5
3097 $as_echo_n "checking for json_c_version in -ljson-c... " >&6; }
3098   LIBS="-ljson-c $old_LIBS"
3099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3100 /* end confdefs.h.  */
3101 extern char json_c_version();
3102 int
3103 main ()
3104 {
3105 json_c_version()
3106   ;
3107   return 0;
3108 }
3109 _ACEOF
3110 if ac_fn_c_try_link "$LINENO"; then :
3111
3112                 smart_lib="-ljson-c"
3113                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3114 $as_echo "yes" >&6; }
3115
3116 else
3117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118 $as_echo "no" >&6; }
3119 fi
3120 rm -f core conftest.err conftest.$ac_objext \
3121     conftest$ac_exeext conftest.$ac_ext
3122   LIBS="$old_LIBS"
3123 fi
3124
3125 if test "x$smart_lib" = "x"; then
3126
3127
3128 if test "x$LOCATE" != "x"; then
3129         DIRS=
3130   file=libjson-c${libltdl_cv_shlibext}
3131
3132   for x in `${LOCATE} $file 2>/dev/null`; do
3133                                         base=`echo $x | sed "s%/${file}%%"`
3134     if test "x$x" = "x$base"; then
3135       continue;
3136     fi
3137
3138     dir=`${DIRNAME} $x 2>/dev/null`
3139                 exclude=`echo ${dir} | ${GREP} /home`
3140     if test "x$exclude" != "x"; then
3141       continue
3142     fi
3143
3144                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
3145     if test "x$already" = "x"; then
3146       DIRS="$DIRS $dir"
3147     fi
3148   done
3149 fi
3150
3151 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
3152
3153
3154
3155 if test "x$LOCATE" != "x"; then
3156         DIRS=
3157   file=libjson-c.a
3158
3159   for x in `${LOCATE} $file 2>/dev/null`; do
3160                                         base=`echo $x | sed "s%/${file}%%"`
3161     if test "x$x" = "x$base"; then
3162       continue;
3163     fi
3164
3165     dir=`${DIRNAME} $x 2>/dev/null`
3166                 exclude=`echo ${dir} | ${GREP} /home`
3167     if test "x$exclude" != "x"; then
3168       continue
3169     fi
3170
3171                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
3172     if test "x$already" = "x"; then
3173       DIRS="$DIRS $dir"
3174     fi
3175   done
3176 fi
3177
3178 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
3179
3180
3181   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
3182     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_c_version in -ljson-c in $try" >&5
3183 $as_echo_n "checking for json_c_version in -ljson-c in $try... " >&6; }
3184     LIBS="-ljson-c $old_LIBS"
3185     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
3186     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3187 /* end confdefs.h.  */
3188 extern char json_c_version();
3189 int
3190 main ()
3191 {
3192 json_c_version()
3193   ;
3194   return 0;
3195 }
3196 _ACEOF
3197 if ac_fn_c_try_link "$LINENO"; then :
3198
3199                   smart_lib="-ljson-c"
3200                   smart_ldflags="-L$try -Wl,-rpath,$try"
3201                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3202 $as_echo "yes" >&6; }
3203                   break
3204
3205 else
3206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3207 $as_echo "no" >&6; }
3208 fi
3209 rm -f core conftest.err conftest.$ac_objext \
3210     conftest$ac_exeext conftest.$ac_ext
3211   done
3212   LIBS="$old_LIBS"
3213   CPPFLAGS="$old_CPPFLAGS"
3214 fi
3215
3216 if test "x$smart_lib" != "x"; then
3217   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
3218   LIBS="$smart_ldflags $smart_lib $old_LIBS"
3219   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
3220 fi
3221
3222         if test "x$ac_cv_lib_json_c_json_c_version" != "xyes"
3223         then
3224
3225
3226 sm_lib_safe=`echo "json" | sed 'y%./+-%__p_%'`
3227 sm_func_safe=`echo "json_tokener_new" | sed 'y%./+-%__p_%'`
3228
3229 old_LIBS="$LIBS"
3230 old_CPPFLAGS="$CPPFLAGS"
3231 smart_lib=
3232 smart_ldflags=
3233 smart_lib_dir=
3234
3235 if test "x$smart_try_dir" != "x"; then
3236   for try in $smart_try_dir; do
3237     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_tokener_new in -ljson in $try" >&5
3238 $as_echo_n "checking for json_tokener_new in -ljson in $try... " >&6; }
3239     LIBS="-ljson $old_LIBS"
3240     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
3241     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3242 /* end confdefs.h.  */
3243 extern char json_tokener_new();
3244 int
3245 main ()
3246 {
3247 json_tokener_new()
3248   ;
3249   return 0;
3250 }
3251 _ACEOF
3252 if ac_fn_c_try_link "$LINENO"; then :
3253
3254                  smart_lib="-ljson"
3255                  smart_ldflags="-L$try -Wl,-rpath,$try"
3256                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3257 $as_echo "yes" >&6; }
3258                  break
3259
3260 else
3261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3262 $as_echo "no" >&6; }
3263 fi
3264 rm -f core conftest.err conftest.$ac_objext \
3265     conftest$ac_exeext conftest.$ac_ext
3266   done
3267   LIBS="$old_LIBS"
3268   CPPFLAGS="$old_CPPFLAGS"
3269 fi
3270
3271 if test "x$smart_lib" = "x"; then
3272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_tokener_new in -ljson" >&5
3273 $as_echo_n "checking for json_tokener_new in -ljson... " >&6; }
3274   LIBS="-ljson $old_LIBS"
3275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3276 /* end confdefs.h.  */
3277 extern char json_tokener_new();
3278 int
3279 main ()
3280 {
3281 json_tokener_new()
3282   ;
3283   return 0;
3284 }
3285 _ACEOF
3286 if ac_fn_c_try_link "$LINENO"; then :
3287
3288                 smart_lib="-ljson"
3289                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3290 $as_echo "yes" >&6; }
3291
3292 else
3293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3294 $as_echo "no" >&6; }
3295 fi
3296 rm -f core conftest.err conftest.$ac_objext \
3297     conftest$ac_exeext conftest.$ac_ext
3298   LIBS="$old_LIBS"
3299 fi
3300
3301 if test "x$smart_lib" = "x"; then
3302
3303
3304 if test "x$LOCATE" != "x"; then
3305         DIRS=
3306   file=libjson${libltdl_cv_shlibext}
3307
3308   for x in `${LOCATE} $file 2>/dev/null`; do
3309                                         base=`echo $x | sed "s%/${file}%%"`
3310     if test "x$x" = "x$base"; then
3311       continue;
3312     fi
3313
3314     dir=`${DIRNAME} $x 2>/dev/null`
3315                 exclude=`echo ${dir} | ${GREP} /home`
3316     if test "x$exclude" != "x"; then
3317       continue
3318     fi
3319
3320                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
3321     if test "x$already" = "x"; then
3322       DIRS="$DIRS $dir"
3323     fi
3324   done
3325 fi
3326
3327 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
3328
3329
3330
3331 if test "x$LOCATE" != "x"; then
3332         DIRS=
3333   file=libjson.a
3334
3335   for x in `${LOCATE} $file 2>/dev/null`; do
3336                                         base=`echo $x | sed "s%/${file}%%"`
3337     if test "x$x" = "x$base"; then
3338       continue;
3339     fi
3340
3341     dir=`${DIRNAME} $x 2>/dev/null`
3342                 exclude=`echo ${dir} | ${GREP} /home`
3343     if test "x$exclude" != "x"; then
3344       continue
3345     fi
3346
3347                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
3348     if test "x$already" = "x"; then
3349       DIRS="$DIRS $dir"
3350     fi
3351   done
3352 fi
3353
3354 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
3355
3356
3357   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
3358     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_tokener_new in -ljson in $try" >&5
3359 $as_echo_n "checking for json_tokener_new in -ljson in $try... " >&6; }
3360     LIBS="-ljson $old_LIBS"
3361     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
3362     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3363 /* end confdefs.h.  */
3364 extern char json_tokener_new();
3365 int
3366 main ()
3367 {
3368 json_tokener_new()
3369   ;
3370   return 0;
3371 }
3372 _ACEOF
3373 if ac_fn_c_try_link "$LINENO"; then :
3374
3375                   smart_lib="-ljson"
3376                   smart_ldflags="-L$try -Wl,-rpath,$try"
3377                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3378 $as_echo "yes" >&6; }
3379                   break
3380
3381 else
3382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383 $as_echo "no" >&6; }
3384 fi
3385 rm -f core conftest.err conftest.$ac_objext \
3386     conftest$ac_exeext conftest.$ac_ext
3387   done
3388   LIBS="$old_LIBS"
3389   CPPFLAGS="$old_CPPFLAGS"
3390 fi
3391
3392 if test "x$smart_lib" != "x"; then
3393   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
3394   LIBS="$smart_ldflags $smart_lib $old_LIBS"
3395   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
3396 fi
3397
3398                 if test "x$ac_cv_lib_json_json_tokener_new" != "xyes"
3399                 then
3400                         have_json="no"
3401                 fi
3402         fi
3403
3404         if test "x$have_json" = "xyes"; then
3405                                 LDFLAGS="$SMART_LIBS"
3406
3407                                 for ac_func in \
3408                         json_c_version \
3409                         json_object_get_string_len \
3410                         json_object_object_get_ex \
3411                         json_object_new_int64 \
3412                         json_tokener_parse_verbose \
3413                         json_tokener_error_desc \
3414                         json_tokener_get_error
3415
3416 do :
3417   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
3418 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3419 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3420   cat >>confdefs.h <<_ACEOF
3421 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
3422 _ACEOF
3423
3424 fi
3425 done
3426
3427         else
3428                 fail="$fail json-c"
3429         fi
3430
3431
3432                 libcouchbase_include_dir=
3433
3434 # Check whether --with-libcouchbase-include-dir was given.
3435 if test "${with_libcouchbase_include_dir+set}" = set; then :
3436   withval=$with_libcouchbase_include_dir; case "$withval" in
3437                         no)
3438                                 as_fn_error $? "Need libcouchbase-include-dir" "$LINENO" 5
3439                         ;;
3440                         yes)
3441                         ;;
3442                         *)
3443                                 libcouchbase_include_dir="$withval"
3444                         ;;
3445                 esac
3446 fi
3447
3448
3449                 libcouchbase_lib_dir=
3450
3451 # Check whether --with-libcouchbase-lib-dir was given.
3452 if test "${with_libcouchbase_lib_dir+set}" = set; then :
3453   withval=$with_libcouchbase_lib_dir; case "$withval" in
3454                         no)
3455                                 as_fn_error $? "Need libcouchbase-lib-dir" "$LINENO" 5
3456                         ;;
3457                         yes)
3458                         ;;
3459                         *)
3460                                 libcouchbase_lib_dir="$withval"
3461                         ;;
3462                 esac
3463 fi
3464
3465
3466
3467 # Check whether --with-libcouchbase-dir was given.
3468 if test "${with_libcouchbase_dir+set}" = set; then :
3469   withval=$with_libcouchbase_dir; case "$withval" in
3470                         no)
3471                                 as_fn_error $? "Need libcouchbase-dir" "$LINENO" 5
3472                         ;;
3473                         yes)
3474                         ;;
3475                         *)
3476                                 libcouchbase_lib_dir="$withval/lib"
3477                                 libcouchbase_include_dir="$withval/include"
3478                         ;;
3479                 esac
3480 fi
3481
3482
3483
3484         have_couchbase="yes"
3485         smart_try_dir="$libcouchbase_include_dir"
3486
3487
3488 ac_safe=`echo "libcouchbase/couchbase.h" | sed 'y%./+-%__pm%'`
3489 old_CPPFLAGS="$CPPFLAGS"
3490 smart_include=
3491 smart_include_dir=
3492
3493 if test "x$smart_try_dir" != "x"; then
3494   for try in $smart_try_dir; do
3495     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcouchbase/couchbase.h in $try" >&5
3496 $as_echo_n "checking for libcouchbase/couchbase.h in $try... " >&6; }
3497     CPPFLAGS="-isystem $try $old_CPPFLAGS"
3498     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3499 /* end confdefs.h.  */
3500
3501                     #include <libcouchbase/couchbase.h>
3502 int
3503 main ()
3504 {
3505 int a = 1;
3506   ;
3507   return 0;
3508 }
3509 _ACEOF
3510 if ac_fn_c_try_compile "$LINENO"; then :
3511
3512                      smart_include="-isystem $try"
3513                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3514 $as_echo "yes" >&6; }
3515                      break
3516
3517 else
3518
3519                      smart_include=
3520                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521 $as_echo "no" >&6; }
3522
3523 fi
3524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3525   done
3526   CPPFLAGS="$old_CPPFLAGS"
3527 fi
3528
3529 if test "x$smart_include" = "x"; then
3530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcouchbase/couchbase.h" >&5
3531 $as_echo_n "checking for libcouchbase/couchbase.h... " >&6; }
3532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3533 /* end confdefs.h.  */
3534
3535                   #include <libcouchbase/couchbase.h>
3536 int
3537 main ()
3538 {
3539 int a = 1;
3540   ;
3541   return 0;
3542 }
3543 _ACEOF
3544 if ac_fn_c_try_compile "$LINENO"; then :
3545
3546                    smart_include=" "
3547                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3548 $as_echo "yes" >&6; }
3549                    break
3550
3551 else
3552
3553                    smart_include=
3554                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3555 $as_echo "no" >&6; }
3556
3557 fi
3558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3559 fi
3560
3561 if test "x$smart_include" = "x"; then
3562
3563
3564 if test "x$LOCATE" != "x"; then
3565         DIRS=
3566   file=libcouchbase/couchbase.h
3567
3568   for x in `${LOCATE} $file 2>/dev/null`; do
3569                                         base=`echo $x | sed "s%/${file}%%"`
3570     if test "x$x" = "x$base"; then
3571       continue;
3572     fi
3573
3574     dir=`${DIRNAME} $x 2>/dev/null`
3575                 exclude=`echo ${dir} | ${GREP} /home`
3576     if test "x$exclude" != "x"; then
3577       continue
3578     fi
3579
3580                     already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
3581     if test "x$already" = "x"; then
3582       DIRS="$DIRS $dir"
3583     fi
3584   done
3585 fi
3586
3587 eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
3588
3589   for try in $smart_include_dir /usr/local/include /opt/include; do
3590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcouchbase/couchbase.h in $try" >&5
3591 $as_echo_n "checking for libcouchbase/couchbase.h in $try... " >&6; }
3592     CPPFLAGS="-isystem $try $old_CPPFLAGS"
3593     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3594 /* end confdefs.h.  */
3595
3596                     #include <libcouchbase/couchbase.h>
3597 int
3598 main ()
3599 {
3600 int a = 1;
3601   ;
3602   return 0;
3603 }
3604 _ACEOF
3605 if ac_fn_c_try_compile "$LINENO"; then :
3606
3607                      smart_include="-isystem $try"
3608                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3609 $as_echo "yes" >&6; }
3610                      break
3611
3612 else
3613
3614                      smart_include=
3615                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3616 $as_echo "no" >&6; }
3617
3618 fi
3619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3620   done
3621   CPPFLAGS="$old_CPPFLAGS"
3622 fi
3623
3624 if test "x$smart_include" != "x"; then
3625   eval "ac_cv_header_$ac_safe=yes"
3626   CPPFLAGS="$smart_include $old_CPPFLAGS"
3627   SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
3628 fi
3629
3630         if test "x$ac_cv_header_libcouchbase_couchbase_h" != "xyes"; then
3631                 have_couchbase="no"
3632                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcouchbase headers not found. Use --with-libcouchbase-include-dir=<path>." >&5
3633 $as_echo "$as_me: WARNING: libcouchbase headers not found. Use --with-libcouchbase-include-dir=<path>." >&2;}
3634         fi
3635
3636
3637         smart_try_dir="$libcouchbase_lib_dir"
3638
3639
3640 sm_lib_safe=`echo "couchbase" | sed 'y%./+-%__p_%'`
3641 sm_func_safe=`echo "lcb_get_version" | sed 'y%./+-%__p_%'`
3642
3643 old_LIBS="$LIBS"
3644 old_CPPFLAGS="$CPPFLAGS"
3645 smart_lib=
3646 smart_ldflags=
3647 smart_lib_dir=
3648
3649 if test "x$smart_try_dir" != "x"; then
3650   for try in $smart_try_dir; do
3651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcb_get_version in -lcouchbase in $try" >&5
3652 $as_echo_n "checking for lcb_get_version in -lcouchbase in $try... " >&6; }
3653     LIBS="-lcouchbase $old_LIBS"
3654     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
3655     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3656 /* end confdefs.h.  */
3657 extern char lcb_get_version();
3658 int
3659 main ()
3660 {
3661 lcb_get_version()
3662   ;
3663   return 0;
3664 }
3665 _ACEOF
3666 if ac_fn_c_try_link "$LINENO"; then :
3667
3668                  smart_lib="-lcouchbase"
3669                  smart_ldflags="-L$try -Wl,-rpath,$try"
3670                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3671 $as_echo "yes" >&6; }
3672                  break
3673
3674 else
3675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3676 $as_echo "no" >&6; }
3677 fi
3678 rm -f core conftest.err conftest.$ac_objext \
3679     conftest$ac_exeext conftest.$ac_ext
3680   done
3681   LIBS="$old_LIBS"
3682   CPPFLAGS="$old_CPPFLAGS"
3683 fi
3684
3685 if test "x$smart_lib" = "x"; then
3686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcb_get_version in -lcouchbase" >&5
3687 $as_echo_n "checking for lcb_get_version in -lcouchbase... " >&6; }
3688   LIBS="-lcouchbase $old_LIBS"
3689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3690 /* end confdefs.h.  */
3691 extern char lcb_get_version();
3692 int
3693 main ()
3694 {
3695 lcb_get_version()
3696   ;
3697   return 0;
3698 }
3699 _ACEOF
3700 if ac_fn_c_try_link "$LINENO"; then :
3701
3702                 smart_lib="-lcouchbase"
3703                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3704 $as_echo "yes" >&6; }
3705
3706 else
3707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708 $as_echo "no" >&6; }
3709 fi
3710 rm -f core conftest.err conftest.$ac_objext \
3711     conftest$ac_exeext conftest.$ac_ext
3712   LIBS="$old_LIBS"
3713 fi
3714
3715 if test "x$smart_lib" = "x"; then
3716
3717
3718 if test "x$LOCATE" != "x"; then
3719         DIRS=
3720   file=libcouchbase${libltdl_cv_shlibext}
3721
3722   for x in `${LOCATE} $file 2>/dev/null`; do
3723                                         base=`echo $x | sed "s%/${file}%%"`
3724     if test "x$x" = "x$base"; then
3725       continue;
3726     fi
3727
3728     dir=`${DIRNAME} $x 2>/dev/null`
3729                 exclude=`echo ${dir} | ${GREP} /home`
3730     if test "x$exclude" != "x"; then
3731       continue
3732     fi
3733
3734                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
3735     if test "x$already" = "x"; then
3736       DIRS="$DIRS $dir"
3737     fi
3738   done
3739 fi
3740
3741 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
3742
3743
3744
3745 if test "x$LOCATE" != "x"; then
3746         DIRS=
3747   file=libcouchbase.a
3748
3749   for x in `${LOCATE} $file 2>/dev/null`; do
3750                                         base=`echo $x | sed "s%/${file}%%"`
3751     if test "x$x" = "x$base"; then
3752       continue;
3753     fi
3754
3755     dir=`${DIRNAME} $x 2>/dev/null`
3756                 exclude=`echo ${dir} | ${GREP} /home`
3757     if test "x$exclude" != "x"; then
3758       continue
3759     fi
3760
3761                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
3762     if test "x$already" = "x"; then
3763       DIRS="$DIRS $dir"
3764     fi
3765   done
3766 fi
3767
3768 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
3769
3770
3771   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
3772     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcb_get_version in -lcouchbase in $try" >&5
3773 $as_echo_n "checking for lcb_get_version in -lcouchbase in $try... " >&6; }
3774     LIBS="-lcouchbase $old_LIBS"
3775     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
3776     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3777 /* end confdefs.h.  */
3778 extern char lcb_get_version();
3779 int
3780 main ()
3781 {
3782 lcb_get_version()
3783   ;
3784   return 0;
3785 }
3786 _ACEOF
3787 if ac_fn_c_try_link "$LINENO"; then :
3788
3789                   smart_lib="-lcouchbase"
3790                   smart_ldflags="-L$try -Wl,-rpath,$try"
3791                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3792 $as_echo "yes" >&6; }
3793                   break
3794
3795 else
3796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797 $as_echo "no" >&6; }
3798 fi
3799 rm -f core conftest.err conftest.$ac_objext \
3800     conftest$ac_exeext conftest.$ac_ext
3801   done
3802   LIBS="$old_LIBS"
3803   CPPFLAGS="$old_CPPFLAGS"
3804 fi
3805
3806 if test "x$smart_lib" != "x"; then
3807   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
3808   LIBS="$smart_ldflags $smart_lib $old_LIBS"
3809   SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS"
3810 fi
3811
3812         if test "x$ac_cv_lib_couchbase_lcb_get_version" != "xyes"
3813         then
3814                 have_couchbase="no"
3815                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcouchbase libraries not found. Use --with-libcouchbase-lib-dir=<path>." >&5
3816 $as_echo "$as_me: WARNING: libcouchbase libraries not found. Use --with-libcouchbase-lib-dir=<path>." >&2;}
3817         fi
3818
3819         if test "x$have_couchbase" != "xyes"; then
3820                 fail="$fail json-c"
3821         fi
3822
3823         if test "x$have_couchbase" = "xno"; then
3824                 fail="$fail libcouchbase"
3825         fi
3826
3827
3828         targetname=rlm_couchbase
3829 else
3830         targetname=
3831         echo \*\*\* module rlm_couchbase is disabled.
3832 fi
3833
3834 if test x"$fail" != x""; then
3835         if test x"${enable_strict_dependencies}" = x"yes"; then
3836                 as_fn_error $? "set --without-rlm_couchbase to disable it explicitly." "$LINENO" 5
3837         else
3838                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building rlm_couchbase." >&5
3839 $as_echo "$as_me: WARNING: silently not building rlm_couchbase." >&2;}
3840                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: rlm_couchbase requires: $fail." >&5
3841 $as_echo "$as_me: WARNING: FAILURE: rlm_couchbase requires: $fail." >&2;};
3842                 targetname=""
3843         fi
3844 fi
3845
3846 mod_ldflags="${SMART_LIBS}"
3847 mod_cflags="${SMART_CFLAGS}"
3848
3849
3850
3851
3852
3853
3854   unset ac_cv_env_LIBS_set
3855   unset ac_cv_env_LIBS_value
3856
3857   ac_config_files="$ac_config_files all.mk"
3858
3859 cat >confcache <<\_ACEOF
3860 # This file is a shell script that caches the results of configure
3861 # tests run on this system so they can be shared between configure
3862 # scripts and configure runs, see configure's option --config-cache.
3863 # It is not useful on other systems.  If it contains results you don't
3864 # want to keep, you may remove or edit it.
3865 #
3866 # config.status only pays attention to the cache file if you give it
3867 # the --recheck option to rerun configure.
3868 #
3869 # `ac_cv_env_foo' variables (set or unset) will be overridden when
3870 # loading this file, other *unset* `ac_cv_foo' will be assigned the
3871 # following values.
3872
3873 _ACEOF
3874
3875 # The following way of writing the cache mishandles newlines in values,
3876 # but we know of no workaround that is simple, portable, and efficient.
3877 # So, we kill variables containing newlines.
3878 # Ultrix sh set writes to stderr and can't be redirected directly,
3879 # and sets the high bit in the cache file unless we assign to the vars.
3880 (
3881   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
3882     eval ac_val=\$$ac_var
3883     case $ac_val in #(
3884     *${as_nl}*)
3885       case $ac_var in #(
3886       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3887 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3888       esac
3889       case $ac_var in #(
3890       _ | IFS | as_nl) ;; #(
3891       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3892       *) { eval $ac_var=; unset $ac_var;} ;;
3893       esac ;;
3894     esac
3895   done
3896
3897   (set) 2>&1 |
3898     case $as_nl`(ac_space=' '; set) 2>&1` in #(
3899     *${as_nl}ac_space=\ *)
3900       # `set' does not quote correctly, so add quotes: double-quote
3901       # substitution turns \\\\ into \\, and sed turns \\ into \.
3902       sed -n \
3903         "s/'/'\\\\''/g;
3904           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3905       ;; #(
3906     *)
3907       # `set' quotes correctly as required by POSIX, so do not add quotes.
3908       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3909       ;;
3910     esac |
3911     sort
3912 ) |
3913   sed '
3914      /^ac_cv_env_/b end
3915      t clear
3916      :clear
3917      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
3918      t end
3919      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
3920      :end' >>confcache
3921 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
3922   if test -w "$cache_file"; then
3923     if test "x$cache_file" != "x/dev/null"; then
3924       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3925 $as_echo "$as_me: updating cache $cache_file" >&6;}
3926       if test ! -f "$cache_file" || test -h "$cache_file"; then
3927         cat confcache >"$cache_file"
3928       else
3929         case $cache_file in #(
3930         */* | ?:*)
3931           mv -f confcache "$cache_file"$$ &&
3932           mv -f "$cache_file"$$ "$cache_file" ;; #(
3933         *)
3934           mv -f confcache "$cache_file" ;;
3935         esac
3936       fi
3937     fi
3938   else
3939     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3940 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
3941   fi
3942 fi
3943 rm -f confcache
3944
3945 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3946 # Let make expand exec_prefix.
3947 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3948
3949 DEFS=-DHAVE_CONFIG_H
3950
3951 ac_libobjs=
3952 ac_ltlibobjs=
3953 U=
3954 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
3955   # 1. Remove the extension, and $U if already installed.
3956   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
3957   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
3958   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
3959   #    will be set to the directory where LIBOBJS objects are built.
3960   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
3961   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
3962 done
3963 LIBOBJS=$ac_libobjs
3964
3965 LTLIBOBJS=$ac_ltlibobjs
3966
3967
3968
3969 : "${CONFIG_STATUS=./config.status}"
3970 ac_write_fail=0
3971 ac_clean_files_save=$ac_clean_files
3972 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
3973 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
3974 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
3975 as_write_fail=0
3976 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
3977 #! $SHELL
3978 # Generated by $as_me.
3979 # Run this file to recreate the current configuration.
3980 # Compiler output produced by configure, useful for debugging
3981 # configure, is in config.log if it exists.
3982
3983 debug=false
3984 ac_cs_recheck=false
3985 ac_cs_silent=false
3986
3987 SHELL=\${CONFIG_SHELL-$SHELL}
3988 export SHELL
3989 _ASEOF
3990 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
3991 ## -------------------- ##
3992 ## M4sh Initialization. ##
3993 ## -------------------- ##
3994
3995 # Be more Bourne compatible
3996 DUALCASE=1; export DUALCASE # for MKS sh
3997 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
3998   emulate sh
3999   NULLCMD=:
4000   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
4001   # is contrary to our usage.  Disable this feature.
4002   alias -g '${1+"$@"}'='"$@"'
4003   setopt NO_GLOB_SUBST
4004 else
4005   case `(set -o) 2>/dev/null` in #(
4006   *posix*) :
4007     set -o posix ;; #(
4008   *) :
4009      ;;
4010 esac
4011 fi
4012
4013
4014 as_nl='
4015 '
4016 export as_nl
4017 # Printing a long string crashes Solaris 7 /usr/bin/printf.
4018 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4019 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4020 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4021 # Prefer a ksh shell builtin over an external printf program on Solaris,
4022 # but without wasting forks for bash or zsh.
4023 if test -z "$BASH_VERSION$ZSH_VERSION" \
4024     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
4025   as_echo='print -r --'
4026   as_echo_n='print -rn --'
4027 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
4028   as_echo='printf %s\n'
4029   as_echo_n='printf %s'
4030 else
4031   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
4032     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
4033     as_echo_n='/usr/ucb/echo -n'
4034   else
4035     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
4036     as_echo_n_body='eval
4037       arg=$1;
4038       case $arg in #(
4039       *"$as_nl"*)
4040         expr "X$arg" : "X\\(.*\\)$as_nl";
4041         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
4042       esac;
4043       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
4044     '
4045     export as_echo_n_body
4046     as_echo_n='sh -c $as_echo_n_body as_echo'
4047   fi
4048   export as_echo_body
4049   as_echo='sh -c $as_echo_body as_echo'
4050 fi
4051
4052 # The user is always right.
4053 if test "${PATH_SEPARATOR+set}" != set; then
4054   PATH_SEPARATOR=:
4055   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
4056     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
4057       PATH_SEPARATOR=';'
4058   }
4059 fi
4060
4061
4062 # IFS
4063 # We need space, tab and new line, in precisely that order.  Quoting is
4064 # there to prevent editors from complaining about space-tab.
4065 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
4066 # splitting by setting IFS to empty value.)
4067 IFS=" ""        $as_nl"
4068
4069 # Find who we are.  Look in the path if we contain no directory separator.
4070 as_myself=
4071 case $0 in #((
4072   *[\\/]* ) as_myself=$0 ;;
4073   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4074 for as_dir in $PATH
4075 do
4076   IFS=$as_save_IFS
4077   test -z "$as_dir" && as_dir=.
4078     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
4079   done
4080 IFS=$as_save_IFS
4081
4082      ;;
4083 esac
4084 # We did not find ourselves, most probably we were run as `sh COMMAND'
4085 # in which case we are not to be found in the path.
4086 if test "x$as_myself" = x; then
4087   as_myself=$0
4088 fi
4089 if test ! -f "$as_myself"; then
4090   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
4091   exit 1
4092 fi
4093
4094 # Unset variables that we do not need and which cause bugs (e.g. in
4095 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
4096 # suppresses any "Segmentation fault" message there.  '((' could
4097 # trigger a bug in pdksh 5.2.14.
4098 for as_var in BASH_ENV ENV MAIL MAILPATH
4099 do eval test x\${$as_var+set} = xset \
4100   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
4101 done
4102 PS1='$ '
4103 PS2='> '
4104 PS4='+ '
4105
4106 # NLS nuisances.
4107 LC_ALL=C
4108 export LC_ALL
4109 LANGUAGE=C
4110 export LANGUAGE
4111
4112 # CDPATH.
4113 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4114
4115
4116 # as_fn_error STATUS ERROR [LINENO LOG_FD]
4117 # ----------------------------------------
4118 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
4119 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
4120 # script with STATUS, using 1 if that was 0.
4121 as_fn_error ()
4122 {
4123   as_status=$1; test $as_status -eq 0 && as_status=1
4124   if test "$4"; then
4125     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4126     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
4127   fi
4128   $as_echo "$as_me: error: $2" >&2
4129   as_fn_exit $as_status
4130 } # as_fn_error
4131
4132
4133 # as_fn_set_status STATUS
4134 # -----------------------
4135 # Set $? to STATUS, without forking.
4136 as_fn_set_status ()
4137 {
4138   return $1
4139 } # as_fn_set_status
4140
4141 # as_fn_exit STATUS
4142 # -----------------
4143 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
4144 as_fn_exit ()
4145 {
4146   set +e
4147   as_fn_set_status $1
4148   exit $1
4149 } # as_fn_exit
4150
4151 # as_fn_unset VAR
4152 # ---------------
4153 # Portably unset VAR.
4154 as_fn_unset ()
4155 {
4156   { eval $1=; unset $1;}
4157 }
4158 as_unset=as_fn_unset
4159 # as_fn_append VAR VALUE
4160 # ----------------------
4161 # Append the text in VALUE to the end of the definition contained in VAR. Take
4162 # advantage of any shell optimizations that allow amortized linear growth over
4163 # repeated appends, instead of the typical quadratic growth present in naive
4164 # implementations.
4165 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
4166   eval 'as_fn_append ()
4167   {
4168     eval $1+=\$2
4169   }'
4170 else
4171   as_fn_append ()
4172   {
4173     eval $1=\$$1\$2
4174   }
4175 fi # as_fn_append
4176
4177 # as_fn_arith ARG...
4178 # ------------------
4179 # Perform arithmetic evaluation on the ARGs, and store the result in the
4180 # global $as_val. Take advantage of shells that can avoid forks. The arguments
4181 # must be portable across $(()) and expr.
4182 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
4183   eval 'as_fn_arith ()
4184   {
4185     as_val=$(( $* ))
4186   }'
4187 else
4188   as_fn_arith ()
4189   {
4190     as_val=`expr "$@" || test $? -eq 1`
4191   }
4192 fi # as_fn_arith
4193
4194
4195 if expr a : '\(a\)' >/dev/null 2>&1 &&
4196    test "X`expr 00001 : '.*\(...\)'`" = X001; then
4197   as_expr=expr
4198 else
4199   as_expr=false
4200 fi
4201
4202 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
4203   as_basename=basename
4204 else
4205   as_basename=false
4206 fi
4207
4208 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
4209   as_dirname=dirname
4210 else
4211   as_dirname=false
4212 fi
4213
4214 as_me=`$as_basename -- "$0" ||
4215 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
4216          X"$0" : 'X\(//\)$' \| \
4217          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
4218 $as_echo X/"$0" |
4219     sed '/^.*\/\([^/][^/]*\)\/*$/{
4220             s//\1/
4221             q
4222           }
4223           /^X\/\(\/\/\)$/{
4224             s//\1/
4225             q
4226           }
4227           /^X\/\(\/\).*/{
4228             s//\1/
4229             q
4230           }
4231           s/.*/./; q'`
4232
4233 # Avoid depending upon Character Ranges.
4234 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
4235 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
4236 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
4237 as_cr_digits='0123456789'
4238 as_cr_alnum=$as_cr_Letters$as_cr_digits
4239
4240 ECHO_C= ECHO_N= ECHO_T=
4241 case `echo -n x` in #(((((
4242 -n*)
4243   case `echo 'xy\c'` in
4244   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
4245   xy)  ECHO_C='\c';;
4246   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
4247        ECHO_T=' ';;
4248   esac;;
4249 *)
4250   ECHO_N='-n';;
4251 esac
4252
4253 rm -f conf$$ conf$$.exe conf$$.file
4254 if test -d conf$$.dir; then
4255   rm -f conf$$.dir/conf$$.file
4256 else
4257   rm -f conf$$.dir
4258   mkdir conf$$.dir 2>/dev/null
4259 fi
4260 if (echo >conf$$.file) 2>/dev/null; then
4261   if ln -s conf$$.file conf$$ 2>/dev/null; then
4262     as_ln_s='ln -s'
4263     # ... but there are two gotchas:
4264     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
4265     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
4266     # In both cases, we have to default to `cp -pR'.
4267     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
4268       as_ln_s='cp -pR'
4269   elif ln conf$$.file conf$$ 2>/dev/null; then
4270     as_ln_s=ln
4271   else
4272     as_ln_s='cp -pR'
4273   fi
4274 else
4275   as_ln_s='cp -pR'
4276 fi
4277 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
4278 rmdir conf$$.dir 2>/dev/null
4279
4280
4281 # as_fn_mkdir_p
4282 # -------------
4283 # Create "$as_dir" as a directory, including parents if necessary.
4284 as_fn_mkdir_p ()
4285 {
4286
4287   case $as_dir in #(
4288   -*) as_dir=./$as_dir;;
4289   esac
4290   test -d "$as_dir" || eval $as_mkdir_p || {
4291     as_dirs=
4292     while :; do
4293       case $as_dir in #(
4294       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
4295       *) as_qdir=$as_dir;;
4296       esac
4297       as_dirs="'$as_qdir' $as_dirs"
4298       as_dir=`$as_dirname -- "$as_dir" ||
4299 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4300          X"$as_dir" : 'X\(//\)[^/]' \| \
4301          X"$as_dir" : 'X\(//\)$' \| \
4302          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
4303 $as_echo X"$as_dir" |
4304     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4305             s//\1/
4306             q
4307           }
4308           /^X\(\/\/\)[^/].*/{
4309             s//\1/
4310             q
4311           }
4312           /^X\(\/\/\)$/{
4313             s//\1/
4314             q
4315           }
4316           /^X\(\/\).*/{
4317             s//\1/
4318             q
4319           }
4320           s/.*/./; q'`
4321       test -d "$as_dir" && break
4322     done
4323     test -z "$as_dirs" || eval "mkdir $as_dirs"
4324   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
4325
4326
4327 } # as_fn_mkdir_p
4328 if mkdir -p . 2>/dev/null; then
4329   as_mkdir_p='mkdir -p "$as_dir"'
4330 else
4331   test -d ./-p && rmdir ./-p
4332   as_mkdir_p=false
4333 fi
4334
4335
4336 # as_fn_executable_p FILE
4337 # -----------------------
4338 # Test if FILE is an executable regular file.
4339 as_fn_executable_p ()
4340 {
4341   test -f "$1" && test -x "$1"
4342 } # as_fn_executable_p
4343 as_test_x='test -x'
4344 as_executable_p=as_fn_executable_p
4345
4346 # Sed expression to map a string onto a valid CPP name.
4347 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
4348
4349 # Sed expression to map a string onto a valid variable name.
4350 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
4351
4352
4353 exec 6>&1
4354 ## ----------------------------------- ##
4355 ## Main body of $CONFIG_STATUS script. ##
4356 ## ----------------------------------- ##
4357 _ASEOF
4358 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
4359
4360 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4361 # Save the log message, to keep $0 and so on meaningful, and to
4362 # report actual input values of CONFIG_FILES etc. instead of their
4363 # values after options handling.
4364 ac_log="
4365 This file was extended by $as_me, which was
4366 generated by GNU Autoconf 2.69.  Invocation command line was
4367
4368   CONFIG_FILES    = $CONFIG_FILES
4369   CONFIG_HEADERS  = $CONFIG_HEADERS
4370   CONFIG_LINKS    = $CONFIG_LINKS
4371   CONFIG_COMMANDS = $CONFIG_COMMANDS
4372   $ $0 $@
4373
4374 on `(hostname || uname -n) 2>/dev/null | sed 1q`
4375 "
4376
4377 _ACEOF
4378
4379 case $ac_config_files in *"
4380 "*) set x $ac_config_files; shift; ac_config_files=$*;;
4381 esac
4382
4383 case $ac_config_headers in *"
4384 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
4385 esac
4386
4387
4388 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4389 # Files that config.status was made for.
4390 config_files="$ac_config_files"
4391 config_headers="$ac_config_headers"
4392
4393 _ACEOF
4394
4395 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4396 ac_cs_usage="\
4397 \`$as_me' instantiates files and other configuration actions
4398 from templates according to the current configuration.  Unless the files
4399 and actions are specified as TAGs, all are instantiated by default.
4400
4401 Usage: $0 [OPTION]... [TAG]...
4402
4403   -h, --help       print this help, then exit
4404   -V, --version    print version number and configuration settings, then exit
4405       --config     print configuration, then exit
4406   -q, --quiet, --silent
4407                    do not print progress messages
4408   -d, --debug      don't remove temporary files
4409       --recheck    update $as_me by reconfiguring in the same conditions
4410       --file=FILE[:TEMPLATE]
4411                    instantiate the configuration file FILE
4412       --header=FILE[:TEMPLATE]
4413                    instantiate the configuration header FILE
4414
4415 Configuration files:
4416 $config_files
4417
4418 Configuration headers:
4419 $config_headers
4420
4421 Report bugs to the package provider."
4422
4423 _ACEOF
4424 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4425 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
4426 ac_cs_version="\\
4427 config.status
4428 configured by $0, generated by GNU Autoconf 2.69,
4429   with options \\"\$ac_cs_config\\"
4430
4431 Copyright (C) 2012 Free Software Foundation, Inc.
4432 This config.status script is free software; the Free Software Foundation
4433 gives unlimited permission to copy, distribute and modify it."
4434
4435 ac_pwd='$ac_pwd'
4436 srcdir='$srcdir'
4437 test -n "\$AWK" || AWK=awk
4438 _ACEOF
4439
4440 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4441 # The default lists apply if the user does not specify any file.
4442 ac_need_defaults=:
4443 while test $# != 0
4444 do
4445   case $1 in
4446   --*=?*)
4447     ac_option=`expr "X$1" : 'X\([^=]*\)='`
4448     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
4449     ac_shift=:
4450     ;;
4451   --*=)
4452     ac_option=`expr "X$1" : 'X\([^=]*\)='`
4453     ac_optarg=
4454     ac_shift=:
4455     ;;
4456   *)
4457     ac_option=$1
4458     ac_optarg=$2
4459     ac_shift=shift
4460     ;;
4461   esac
4462
4463   case $ac_option in
4464   # Handling of the options.
4465   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4466     ac_cs_recheck=: ;;
4467   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
4468     $as_echo "$ac_cs_version"; exit ;;
4469   --config | --confi | --conf | --con | --co | --c )
4470     $as_echo "$ac_cs_config"; exit ;;
4471   --debug | --debu | --deb | --de | --d | -d )
4472     debug=: ;;
4473   --file | --fil | --fi | --f )
4474     $ac_shift
4475     case $ac_optarg in
4476     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
4477     '') as_fn_error $? "missing file argument" ;;
4478     esac
4479     as_fn_append CONFIG_FILES " '$ac_optarg'"
4480     ac_need_defaults=false;;
4481   --header | --heade | --head | --hea )
4482     $ac_shift
4483     case $ac_optarg in
4484     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
4485     esac
4486     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
4487     ac_need_defaults=false;;
4488   --he | --h)
4489     # Conflict between --help and --header
4490     as_fn_error $? "ambiguous option: \`$1'
4491 Try \`$0 --help' for more information.";;
4492   --help | --hel | -h )
4493     $as_echo "$ac_cs_usage"; exit ;;
4494   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
4495   | -silent | --silent | --silen | --sile | --sil | --si | --s)
4496     ac_cs_silent=: ;;
4497
4498   # This is an error.
4499   -*) as_fn_error $? "unrecognized option: \`$1'
4500 Try \`$0 --help' for more information." ;;
4501
4502   *) as_fn_append ac_config_targets " $1"
4503      ac_need_defaults=false ;;
4504
4505   esac
4506   shift
4507 done
4508
4509 ac_configure_extra_args=
4510
4511 if $ac_cs_silent; then
4512   exec 6>/dev/null
4513   ac_configure_extra_args="$ac_configure_extra_args --silent"
4514 fi
4515
4516 _ACEOF
4517 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4518 if \$ac_cs_recheck; then
4519   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
4520   shift
4521   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
4522   CONFIG_SHELL='$SHELL'
4523   export CONFIG_SHELL
4524   exec "\$@"
4525 fi
4526
4527 _ACEOF
4528 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4529 exec 5>>config.log
4530 {
4531   echo
4532   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
4533 ## Running $as_me. ##
4534 _ASBOX
4535   $as_echo "$ac_log"
4536 } >&5
4537
4538 _ACEOF
4539 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4540 _ACEOF
4541
4542 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4543
4544 # Handling of arguments.
4545 for ac_config_target in $ac_config_targets
4546 do
4547   case $ac_config_target in
4548     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
4549     "all.mk") CONFIG_FILES="$CONFIG_FILES all.mk" ;;
4550
4551   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
4552   esac
4553 done
4554
4555
4556 # If the user did not use the arguments to specify the items to instantiate,
4557 # then the envvar interface is used.  Set only those that are not.
4558 # We use the long form for the default assignment because of an extremely
4559 # bizarre bug on SunOS 4.1.3.
4560 if $ac_need_defaults; then
4561   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
4562   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
4563 fi
4564
4565 # Have a temporary directory for convenience.  Make it in the build tree
4566 # simply because there is no reason against having it here, and in addition,
4567 # creating and moving files from /tmp can sometimes cause problems.
4568 # Hook for its removal unless debugging.
4569 # Note that there is a small window in which the directory will not be cleaned:
4570 # after its creation but before its name has been assigned to `$tmp'.
4571 $debug ||
4572 {
4573   tmp= ac_tmp=
4574   trap 'exit_status=$?
4575   : "${ac_tmp:=$tmp}"
4576   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
4577 ' 0
4578   trap 'as_fn_exit 1' 1 2 13 15
4579 }
4580 # Create a (secure) tmp directory for tmp files.
4581
4582 {
4583   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
4584   test -d "$tmp"
4585 }  ||
4586 {
4587   tmp=./conf$$-$RANDOM
4588   (umask 077 && mkdir "$tmp")
4589 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
4590 ac_tmp=$tmp
4591
4592 # Set up the scripts for CONFIG_FILES section.
4593 # No need to generate them if there are no CONFIG_FILES.
4594 # This happens for instance with `./config.status config.h'.
4595 if test -n "$CONFIG_FILES"; then
4596
4597
4598 ac_cr=`echo X | tr X '\015'`
4599 # On cygwin, bash can eat \r inside `` if the user requested igncr.
4600 # But we know of no other shell where ac_cr would be empty at this
4601 # point, so we can use a bashism as a fallback.
4602 if test "x$ac_cr" = x; then
4603   eval ac_cr=\$\'\\r\'
4604 fi
4605 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
4606 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
4607   ac_cs_awk_cr='\\r'
4608 else
4609   ac_cs_awk_cr=$ac_cr
4610 fi
4611
4612 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
4613 _ACEOF
4614
4615
4616 {
4617   echo "cat >conf$$subs.awk <<_ACEOF" &&
4618   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
4619   echo "_ACEOF"
4620 } >conf$$subs.sh ||
4621   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4622 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
4623 ac_delim='%!_!# '
4624 for ac_last_try in false false false false false :; do
4625   . ./conf$$subs.sh ||
4626     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4627
4628   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
4629   if test $ac_delim_n = $ac_delim_num; then
4630     break
4631   elif $ac_last_try; then
4632     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4633   else
4634     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
4635   fi
4636 done
4637 rm -f conf$$subs.sh
4638
4639 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4640 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
4641 _ACEOF
4642 sed -n '
4643 h
4644 s/^/S["/; s/!.*/"]=/
4645 p
4646 g
4647 s/^[^!]*!//
4648 :repl
4649 t repl
4650 s/'"$ac_delim"'$//
4651 t delim
4652 :nl
4653 h
4654 s/\(.\{148\}\)..*/\1/
4655 t more1
4656 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
4657 p
4658 n
4659 b repl
4660 :more1
4661 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
4662 p
4663 g
4664 s/.\{148\}//
4665 t nl
4666 :delim
4667 h
4668 s/\(.\{148\}\)..*/\1/
4669 t more2
4670 s/["\\]/\\&/g; s/^/"/; s/$/"/
4671 p
4672 b
4673 :more2
4674 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
4675 p
4676 g
4677 s/.\{148\}//
4678 t delim
4679 ' <conf$$subs.awk | sed '
4680 /^[^""]/{
4681   N
4682   s/\n//
4683 }
4684 ' >>$CONFIG_STATUS || ac_write_fail=1
4685 rm -f conf$$subs.awk
4686 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4687 _ACAWK
4688 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
4689   for (key in S) S_is_set[key] = 1
4690   FS = "\a"
4691
4692 }
4693 {
4694   line = $ 0
4695   nfields = split(line, field, "@")
4696   substed = 0
4697   len = length(field[1])
4698   for (i = 2; i < nfields; i++) {
4699     key = field[i]
4700     keylen = length(key)
4701     if (S_is_set[key]) {
4702       value = S[key]
4703       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
4704       len += length(value) + length(field[++i])
4705       substed = 1
4706     } else
4707       len += 1 + keylen
4708   }
4709
4710   print line
4711 }
4712
4713 _ACAWK
4714 _ACEOF
4715 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4716 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
4717   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
4718 else
4719   cat
4720 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
4721   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
4722 _ACEOF
4723
4724 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
4725 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
4726 # trailing colons and then remove the whole line if VPATH becomes empty
4727 # (actually we leave an empty line to preserve line numbers).
4728 if test "x$srcdir" = x.; then
4729   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
4730 h
4731 s///
4732 s/^/:/
4733 s/[      ]*$/:/
4734 s/:\$(srcdir):/:/g
4735 s/:\${srcdir}:/:/g
4736 s/:@srcdir@:/:/g
4737 s/^:*//
4738 s/:*$//
4739 x
4740 s/\(=[   ]*\).*/\1/
4741 G
4742 s/\n//
4743 s/^[^=]*=[       ]*$//
4744 }'
4745 fi
4746
4747 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4748 fi # test -n "$CONFIG_FILES"
4749
4750 # Set up the scripts for CONFIG_HEADERS section.
4751 # No need to generate them if there are no CONFIG_HEADERS.
4752 # This happens for instance with `./config.status Makefile'.
4753 if test -n "$CONFIG_HEADERS"; then
4754 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
4755 BEGIN {
4756 _ACEOF
4757
4758 # Transform confdefs.h into an awk script `defines.awk', embedded as
4759 # here-document in config.status, that substitutes the proper values into
4760 # config.h.in to produce config.h.
4761
4762 # Create a delimiter string that does not exist in confdefs.h, to ease
4763 # handling of long lines.
4764 ac_delim='%!_!# '
4765 for ac_last_try in false false :; do
4766   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
4767   if test -z "$ac_tt"; then
4768     break
4769   elif $ac_last_try; then
4770     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
4771   else
4772     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
4773   fi
4774 done
4775
4776 # For the awk script, D is an array of macro values keyed by name,
4777 # likewise P contains macro parameters if any.  Preserve backslash
4778 # newline sequences.
4779
4780 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
4781 sed -n '
4782 s/.\{148\}/&'"$ac_delim"'/g
4783 t rset
4784 :rset
4785 s/^[     ]*#[    ]*define[       ][      ]*/ /
4786 t def
4787 d
4788 :def
4789 s/\\$//
4790 t bsnl
4791 s/["\\]/\\&/g
4792 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
4793 D["\1"]=" \3"/p
4794 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
4795 d
4796 :bsnl
4797 s/["\\]/\\&/g
4798 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
4799 D["\1"]=" \3\\\\\\n"\\/p
4800 t cont
4801 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
4802 t cont
4803 d
4804 :cont
4805 n
4806 s/.\{148\}/&'"$ac_delim"'/g
4807 t clear
4808 :clear
4809 s/\\$//
4810 t bsnlc
4811 s/["\\]/\\&/g; s/^/"/; s/$/"/p
4812 d
4813 :bsnlc
4814 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
4815 b cont
4816 ' <confdefs.h | sed '
4817 s/'"$ac_delim"'/"\\\
4818 "/g' >>$CONFIG_STATUS || ac_write_fail=1
4819
4820 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4821   for (key in D) D_is_set[key] = 1
4822   FS = "\a"
4823 }
4824 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
4825   line = \$ 0
4826   split(line, arg, " ")
4827   if (arg[1] == "#") {
4828     defundef = arg[2]
4829     mac1 = arg[3]
4830   } else {
4831     defundef = substr(arg[1], 2)
4832     mac1 = arg[2]
4833   }
4834   split(mac1, mac2, "(") #)
4835   macro = mac2[1]
4836   prefix = substr(line, 1, index(line, defundef) - 1)
4837   if (D_is_set[macro]) {
4838     # Preserve the white space surrounding the "#".
4839     print prefix "define", macro P[macro] D[macro]
4840     next
4841   } else {
4842     # Replace #undef with comments.  This is necessary, for example,
4843     # in the case of _POSIX_SOURCE, which is predefined and required
4844     # on some systems where configure will not decide to define it.
4845     if (defundef == "undef") {
4846       print "/*", prefix defundef, macro, "*/"
4847       next
4848     }
4849   }
4850 }
4851 { print }
4852 _ACAWK
4853 _ACEOF
4854 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4855   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
4856 fi # test -n "$CONFIG_HEADERS"
4857
4858
4859 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
4860 shift
4861 for ac_tag
4862 do
4863   case $ac_tag in
4864   :[FHLC]) ac_mode=$ac_tag; continue;;
4865   esac
4866   case $ac_mode$ac_tag in
4867   :[FHL]*:*);;
4868   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
4869   :[FH]-) ac_tag=-:-;;
4870   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
4871   esac
4872   ac_save_IFS=$IFS
4873   IFS=:
4874   set x $ac_tag
4875   IFS=$ac_save_IFS
4876   shift
4877   ac_file=$1
4878   shift
4879
4880   case $ac_mode in
4881   :L) ac_source=$1;;
4882   :[FH])
4883     ac_file_inputs=
4884     for ac_f
4885     do
4886       case $ac_f in
4887       -) ac_f="$ac_tmp/stdin";;
4888       *) # Look for the file first in the build tree, then in the source tree
4889          # (if the path is not absolute).  The absolute path cannot be DOS-style,
4890          # because $ac_f cannot contain `:'.
4891          test -f "$ac_f" ||
4892            case $ac_f in
4893            [\\/$]*) false;;
4894            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
4895            esac ||
4896            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
4897       esac
4898       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
4899       as_fn_append ac_file_inputs " '$ac_f'"
4900     done
4901
4902     # Let's still pretend it is `configure' which instantiates (i.e., don't
4903     # use $as_me), people would be surprised to read:
4904     #    /* config.h.  Generated by config.status.  */
4905     configure_input='Generated from '`
4906           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
4907         `' by configure.'
4908     if test x"$ac_file" != x-; then
4909       configure_input="$ac_file.  $configure_input"
4910       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
4911 $as_echo "$as_me: creating $ac_file" >&6;}
4912     fi
4913     # Neutralize special characters interpreted by sed in replacement strings.
4914     case $configure_input in #(
4915     *\&* | *\|* | *\\* )
4916        ac_sed_conf_input=`$as_echo "$configure_input" |
4917        sed 's/[\\\\&|]/\\\\&/g'`;; #(
4918     *) ac_sed_conf_input=$configure_input;;
4919     esac
4920
4921     case $ac_tag in
4922     *:-:* | *:-) cat >"$ac_tmp/stdin" \
4923       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
4924     esac
4925     ;;
4926   esac
4927
4928   ac_dir=`$as_dirname -- "$ac_file" ||
4929 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4930          X"$ac_file" : 'X\(//\)[^/]' \| \
4931          X"$ac_file" : 'X\(//\)$' \| \
4932          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
4933 $as_echo X"$ac_file" |
4934     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4935             s//\1/
4936             q
4937           }
4938           /^X\(\/\/\)[^/].*/{
4939             s//\1/
4940             q
4941           }
4942           /^X\(\/\/\)$/{
4943             s//\1/
4944             q
4945           }
4946           /^X\(\/\).*/{
4947             s//\1/
4948             q
4949           }
4950           s/.*/./; q'`
4951   as_dir="$ac_dir"; as_fn_mkdir_p
4952   ac_builddir=.
4953
4954 case "$ac_dir" in
4955 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
4956 *)
4957   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
4958   # A ".." for each directory in $ac_dir_suffix.
4959   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
4960   case $ac_top_builddir_sub in
4961   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
4962   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
4963   esac ;;
4964 esac
4965 ac_abs_top_builddir=$ac_pwd
4966 ac_abs_builddir=$ac_pwd$ac_dir_suffix
4967 # for backward compatibility:
4968 ac_top_builddir=$ac_top_build_prefix
4969
4970 case $srcdir in
4971   .)  # We are building in place.
4972     ac_srcdir=.
4973     ac_top_srcdir=$ac_top_builddir_sub
4974     ac_abs_top_srcdir=$ac_pwd ;;
4975   [\\/]* | ?:[\\/]* )  # Absolute name.
4976     ac_srcdir=$srcdir$ac_dir_suffix;
4977     ac_top_srcdir=$srcdir
4978     ac_abs_top_srcdir=$srcdir ;;
4979   *) # Relative name.
4980     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
4981     ac_top_srcdir=$ac_top_build_prefix$srcdir
4982     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
4983 esac
4984 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
4985
4986
4987   case $ac_mode in
4988   :F)
4989   #
4990   # CONFIG_FILE
4991   #
4992
4993 _ACEOF
4994
4995 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4996 # If the template does not know about datarootdir, expand it.
4997 # FIXME: This hack should be removed a few years after 2.60.
4998 ac_datarootdir_hack=; ac_datarootdir_seen=
4999 ac_sed_dataroot='
5000 /datarootdir/ {
5001   p
5002   q
5003 }
5004 /@datadir@/p
5005 /@docdir@/p
5006 /@infodir@/p
5007 /@localedir@/p
5008 /@mandir@/p'
5009 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
5010 *datarootdir*) ac_datarootdir_seen=yes;;
5011 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
5013 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
5014 _ACEOF
5015 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5016   ac_datarootdir_hack='
5017   s&@datadir@&$datadir&g
5018   s&@docdir@&$docdir&g
5019   s&@infodir@&$infodir&g
5020   s&@localedir@&$localedir&g
5021   s&@mandir@&$mandir&g
5022   s&\\\${datarootdir}&$datarootdir&g' ;;
5023 esac
5024 _ACEOF
5025
5026 # Neutralize VPATH when `$srcdir' = `.'.
5027 # Shell code in configure.ac might set extrasub.
5028 # FIXME: do we really want to maintain this feature?
5029 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5030 ac_sed_extra="$ac_vpsub
5031 $extrasub
5032 _ACEOF
5033 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5034 :t
5035 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5036 s|@configure_input@|$ac_sed_conf_input|;t t
5037 s&@top_builddir@&$ac_top_builddir_sub&;t t
5038 s&@top_build_prefix@&$ac_top_build_prefix&;t t
5039 s&@srcdir@&$ac_srcdir&;t t
5040 s&@abs_srcdir@&$ac_abs_srcdir&;t t
5041 s&@top_srcdir@&$ac_top_srcdir&;t t
5042 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
5043 s&@builddir@&$ac_builddir&;t t
5044 s&@abs_builddir@&$ac_abs_builddir&;t t
5045 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
5046 $ac_datarootdir_hack
5047 "
5048 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
5049   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5050
5051 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
5052   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
5053   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
5054       "$ac_tmp/out"`; test -z "$ac_out"; } &&
5055   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5056 which seems to be undefined.  Please make sure it is defined" >&5
5057 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5058 which seems to be undefined.  Please make sure it is defined" >&2;}
5059
5060   rm -f "$ac_tmp/stdin"
5061   case $ac_file in
5062   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
5063   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
5064   esac \
5065   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5066  ;;
5067   :H)
5068   #
5069   # CONFIG_HEADER
5070   #
5071   if test x"$ac_file" != x-; then
5072     {
5073       $as_echo "/* $configure_input  */" \
5074       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
5075     } >"$ac_tmp/config.h" \
5076       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5077     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
5078       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
5079 $as_echo "$as_me: $ac_file is unchanged" >&6;}
5080     else
5081       rm -f "$ac_file"
5082       mv "$ac_tmp/config.h" "$ac_file" \
5083         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5084     fi
5085   else
5086     $as_echo "/* $configure_input  */" \
5087       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
5088       || as_fn_error $? "could not create -" "$LINENO" 5
5089   fi
5090  ;;
5091
5092
5093   esac
5094
5095 done # for ac_tag
5096
5097
5098 as_fn_exit 0
5099 _ACEOF
5100 ac_clean_files=$ac_clean_files_save
5101
5102 test $ac_write_fail = 0 ||
5103   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
5104
5105
5106 # configure is writing to config.log, and then calls config.status.
5107 # config.status does its own redirection, appending to config.log.
5108 # Unfortunately, on DOS this fails, as config.log is still kept open
5109 # by configure, so config.status won't be able to write to it; its
5110 # output is simply discarded.  So we exec the FD to /dev/null,
5111 # effectively closing config.log, so it can be properly (re)opened and
5112 # appended to by config.status.  When coming back to configure, we
5113 # need to make the FD available again.
5114 if test "$no_create" != yes; then
5115   ac_cs_success=:
5116   ac_config_status_args=
5117   test "$silent" = yes &&
5118     ac_config_status_args="$ac_config_status_args --quiet"
5119   exec 5>/dev/null
5120   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
5121   exec 5>>config.log
5122   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
5123   # would make configure fail if this is the last instruction.
5124   $ac_cs_success || as_fn_exit 1
5125 fi
5126 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
5127   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
5128 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
5129 fi
5130
5131