1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199
200  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
201    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
202    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
203    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
204    PATH=/empty FPATH=/empty; export PATH FPATH
205    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
206      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
276$0: including any error possibly output before this
277$0: message. Then install a modern shell, or manually run
278$0: the script under such a shell if you do have one."
279  fi
280  exit 1
281fi
282fi
283fi
284SHELL=${CONFIG_SHELL-/bin/sh}
285export SHELL
286# Unset more variables known to interfere with behavior of common tools.
287CLICOLOR_FORCE= GREP_OPTIONS=
288unset CLICOLOR_FORCE GREP_OPTIONS
289
290## --------------------- ##
291## M4sh Shell Functions. ##
292## --------------------- ##
293# as_fn_unset VAR
294# ---------------
295# Portably unset VAR.
296as_fn_unset ()
297{
298  { eval $1=; unset $1;}
299}
300as_unset=as_fn_unset
301
302# as_fn_set_status STATUS
303# -----------------------
304# Set $? to STATUS, without forking.
305as_fn_set_status ()
306{
307  return $1
308} # as_fn_set_status
309
310# as_fn_exit STATUS
311# -----------------
312# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
313as_fn_exit ()
314{
315  set +e
316  as_fn_set_status $1
317  exit $1
318} # as_fn_exit
319
320# as_fn_mkdir_p
321# -------------
322# Create "$as_dir" as a directory, including parents if necessary.
323as_fn_mkdir_p ()
324{
325
326  case $as_dir in #(
327  -*) as_dir=./$as_dir;;
328  esac
329  test -d "$as_dir" || eval $as_mkdir_p || {
330    as_dirs=
331    while :; do
332      case $as_dir in #(
333      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
334      *) as_qdir=$as_dir;;
335      esac
336      as_dirs="'$as_qdir' $as_dirs"
337      as_dir=`$as_dirname -- "$as_dir" ||
338$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
339	 X"$as_dir" : 'X\(//\)[^/]' \| \
340	 X"$as_dir" : 'X\(//\)$' \| \
341	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
342$as_echo X"$as_dir" |
343    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\/\)[^/].*/{
348	    s//\1/
349	    q
350	  }
351	  /^X\(\/\/\)$/{
352	    s//\1/
353	    q
354	  }
355	  /^X\(\/\).*/{
356	    s//\1/
357	    q
358	  }
359	  s/.*/./; q'`
360      test -d "$as_dir" && break
361    done
362    test -z "$as_dirs" || eval "mkdir $as_dirs"
363  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
364
365
366} # as_fn_mkdir_p
367
368# as_fn_executable_p FILE
369# -----------------------
370# Test if FILE is an executable regular file.
371as_fn_executable_p ()
372{
373  test -f "$1" && test -x "$1"
374} # as_fn_executable_p
375# as_fn_append VAR VALUE
376# ----------------------
377# Append the text in VALUE to the end of the definition contained in VAR. Take
378# advantage of any shell optimizations that allow amortized linear growth over
379# repeated appends, instead of the typical quadratic growth present in naive
380# implementations.
381if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
382  eval 'as_fn_append ()
383  {
384    eval $1+=\$2
385  }'
386else
387  as_fn_append ()
388  {
389    eval $1=\$$1\$2
390  }
391fi # as_fn_append
392
393# as_fn_arith ARG...
394# ------------------
395# Perform arithmetic evaluation on the ARGs, and store the result in the
396# global $as_val. Take advantage of shells that can avoid forks. The arguments
397# must be portable across $(()) and expr.
398if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
399  eval 'as_fn_arith ()
400  {
401    as_val=$(( $* ))
402  }'
403else
404  as_fn_arith ()
405  {
406    as_val=`expr "$@" || test $? -eq 1`
407  }
408fi # as_fn_arith
409
410
411# as_fn_error STATUS ERROR [LINENO LOG_FD]
412# ----------------------------------------
413# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
414# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
415# script with STATUS, using 1 if that was 0.
416as_fn_error ()
417{
418  as_status=$1; test $as_status -eq 0 && as_status=1
419  if test "$4"; then
420    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
421    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
422  fi
423  $as_echo "$as_me: error: $2" >&2
424  as_fn_exit $as_status
425} # as_fn_error
426
427if expr a : '\(a\)' >/dev/null 2>&1 &&
428   test "X`expr 00001 : '.*\(...\)'`" = X001; then
429  as_expr=expr
430else
431  as_expr=false
432fi
433
434if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
435  as_basename=basename
436else
437  as_basename=false
438fi
439
440if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
441  as_dirname=dirname
442else
443  as_dirname=false
444fi
445
446as_me=`$as_basename -- "$0" ||
447$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
448	 X"$0" : 'X\(//\)$' \| \
449	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
450$as_echo X/"$0" |
451    sed '/^.*\/\([^/][^/]*\)\/*$/{
452	    s//\1/
453	    q
454	  }
455	  /^X\/\(\/\/\)$/{
456	    s//\1/
457	    q
458	  }
459	  /^X\/\(\/\).*/{
460	    s//\1/
461	    q
462	  }
463	  s/.*/./; q'`
464
465# Avoid depending upon Character Ranges.
466as_cr_letters='abcdefghijklmnopqrstuvwxyz'
467as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
468as_cr_Letters=$as_cr_letters$as_cr_LETTERS
469as_cr_digits='0123456789'
470as_cr_alnum=$as_cr_Letters$as_cr_digits
471
472
473  as_lineno_1=$LINENO as_lineno_1a=$LINENO
474  as_lineno_2=$LINENO as_lineno_2a=$LINENO
475  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
476  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
477  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
478  sed -n '
479    p
480    /[$]LINENO/=
481  ' <$as_myself |
482    sed '
483      s/[$]LINENO.*/&-/
484      t lineno
485      b
486      :lineno
487      N
488      :loop
489      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
490      t loop
491      s/-\n.*//
492    ' >$as_me.lineno &&
493  chmod +x "$as_me.lineno" ||
494    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
495
496  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
497  # already done that, so ensure we don't try to do so again and fall
498  # in an infinite loop.  This has already happened in practice.
499  _as_can_reexec=no; export _as_can_reexec
500  # Don't try to exec as it changes $[0], causing all sort of problems
501  # (the dirname of $[0] is not the place where we might find the
502  # original and so on.  Autoconf is especially sensitive to this).
503  . "./$as_me.lineno"
504  # Exit status is that of the last command.
505  exit
506}
507
508ECHO_C= ECHO_N= ECHO_T=
509case `echo -n x` in #(((((
510-n*)
511  case `echo 'xy\c'` in
512  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
513  xy)  ECHO_C='\c';;
514  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
515       ECHO_T='	';;
516  esac;;
517*)
518  ECHO_N='-n';;
519esac
520
521rm -f conf$$ conf$$.exe conf$$.file
522if test -d conf$$.dir; then
523  rm -f conf$$.dir/conf$$.file
524else
525  rm -f conf$$.dir
526  mkdir conf$$.dir 2>/dev/null
527fi
528if (echo >conf$$.file) 2>/dev/null; then
529  if ln -s conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s='ln -s'
531    # ... but there are two gotchas:
532    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
533    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
534    # In both cases, we have to default to `cp -pR'.
535    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
536      as_ln_s='cp -pR'
537  elif ln conf$$.file conf$$ 2>/dev/null; then
538    as_ln_s=ln
539  else
540    as_ln_s='cp -pR'
541  fi
542else
543  as_ln_s='cp -pR'
544fi
545rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
546rmdir conf$$.dir 2>/dev/null
547
548if mkdir -p . 2>/dev/null; then
549  as_mkdir_p='mkdir -p "$as_dir"'
550else
551  test -d ./-p && rmdir ./-p
552  as_mkdir_p=false
553fi
554
555as_test_x='test -x'
556as_executable_p=as_fn_executable_p
557
558# Sed expression to map a string onto a valid CPP name.
559as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
560
561# Sed expression to map a string onto a valid variable name.
562as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
563
564SHELL=${CONFIG_SHELL-/bin/sh}
565
566
567test -n "$DJDIR" || exec 7<&0 </dev/null
568exec 6>&1
569
570# Name of the host.
571# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
572# so uname gets run too.
573ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
574
575#
576# Initializations.
577#
578ac_default_prefix=/usr/local
579ac_clean_files=
580ac_config_libobj_dir=.
581LIBOBJS=
582cross_compiling=no
583subdirs=
584MFLAGS=
585MAKEFLAGS=
586
587# Identity of this package.
588PACKAGE_NAME=
589PACKAGE_TARNAME=
590PACKAGE_VERSION=
591PACKAGE_STRING=
592PACKAGE_BUGREPORT=
593PACKAGE_URL=
594
595ac_unique_file="GDALmake.opt.in"
596# Factoring default headers for most tests.
597ac_includes_default="\
598#include <stdio.h>
599#ifdef HAVE_SYS_TYPES_H
600# include <sys/types.h>
601#endif
602#ifdef HAVE_SYS_STAT_H
603# include <sys/stat.h>
604#endif
605#ifdef STDC_HEADERS
606# include <stdlib.h>
607# include <stddef.h>
608#else
609# ifdef HAVE_STDLIB_H
610#  include <stdlib.h>
611# endif
612#endif
613#ifdef HAVE_STRING_H
614# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
615#  include <memory.h>
616# endif
617# include <string.h>
618#endif
619#ifdef HAVE_STRINGS_H
620# include <strings.h>
621#endif
622#ifdef HAVE_INTTYPES_H
623# include <inttypes.h>
624#endif
625#ifdef HAVE_STDINT_H
626# include <stdint.h>
627#endif
628#ifdef HAVE_UNISTD_H
629# include <unistd.h>
630#endif"
631
632ac_subst_vars='LTLIBOBJS
633LIBOBJS
634HEIF_LIBS
635HEIF_CFLAGS
636EXR_LIBS
637EXR_CFLAGS
638LERC_INCLUDE
639HAVE_LERC
640HAVE_OPENSSL_CRYPTO
641USE_ONLY_CRYPTODLL_ALG
642HAVE_CRYPTOPP
643HAVE_ARMADILLO
644RDB_SETTING
645RASDAMAN_LIB
646RASDAMAN_INC
647RASDAMAN_ENABLED
648JVM_LIB
649MDB_ENABLED
650TILEDB_SETTING
651JNI_LIB
652HDFS_INC
653HDFS_LIB
654HDFS_ENABLED
655JAVA_INC
656JAVA_HOME
657BINDINGS
658PY_HAVE_SETUPTOOLS
659PYTHON
660BINTRUE
661EXE_EXT
662EXTRA_INCLUDES
663MACOSX_FRAMEWORK
664GDAL_VER
665GDAL_VERSION_REV
666GDAL_VERSION_MINOR
667GDAL_VERSION_MAJOR
668PDFIUM_PLUGIN_LIB
669PDFIUM_INC
670HAVE_PDFIUM
671PODOFO_PLUGIN_LIB
672PODOFO_INC
673HAVE_PODOFO
674POPPLER_PLUGIN_LIB
675POPPLER_MINOR_VERSION
676POPPLER_MAJOR_VERSION
677HAVE_POPPLER
678POPPLER_LIBS
679POPPLER_CFLAGS
680PDF_PLUGIN
681PAM_SETTING
682JSON_INCLUDE
683LIBJSONC_SETTING
684FREEXL_INCLUDE
685HAVE_FREEXL
686OPENCL_LIB
687OPENCL_FLAGS
688QHULL_INCLUDE_SUBDIR_IS_LIBQHULL
689QHULL_SETTING
690SFCGAL_CONFIG
691SFCGAL_VERSION
692HAVE_SFCGAL
693SFCGAL_CFLAGS
694SFCGAL_LIBS
695GEOS_CONFIG
696GEOS_VERSION
697HAVE_GEOS
698GEOS_CFLAGS
699GEOS_LIBS
700WEBP_SETTING
701IDB_LIB
702IDB_INC
703HAVE_IDB
704TEIGHA_CPPFLAGS
705HAVE_TEIGHA
706TEIGHA_DIR
707HAVE_PCRE
708RASTERLITE2_CFLAGS
709HAVE_RASTERLITE2
710LIBXML2_LIB
711LIBXML2_INC
712HAVE_LIBXML2
713LIBXML2_LIBS
714LIBXML2_CFLAGS
715DODS_INC
716LIBDAP_LIBS
717LIBDAP_CFLAGS
718OCI_INCLUDE
719HAVE_OCI
720ODBC_SETTING
721LIBKML_INCLUDE
722HAVE_LIBKML
723LIBKML_LDFLAGS
724LIBKML_VERSION
725LIBKML_LDLAGS
726LIBKML_LIBS
727LIBKML_CFLAGS
728EXPAT_INCLUDE
729HAVE_EXPAT
730EXPAT_VERSION
731EXPAT_LDFLAGS
732EXPAT_CFLAGS
733XERCES_INCLUDE
734HAVE_XERCES
735XERCES_LDFLAGS
736XERCES_CFLAGS
737XERCES_VERSION
738INGRES_INC
739INGRES_LIB
740II_SYSTEM
741HAVE_INGRES
742MYSQL_LIB
743MYSQL_INC
744HAVE_MYSQL
745MYSQL_CONFIG
746GNM_ENABLED
747OPT_GDAL_FORMATS
748ORACLE_OCI_LDFLAGS
749ORACLE_OCI_CFLAGS
750ORACLE_OCI_VERSION
751JP2LURA_INCLUDE
752MRSID_LIDAR_LIBS
753MRSID_LIDAR_INCLUDE
754MRSID_LIBS
755MRSID_FLAGS
756MRSID_INCLUDE
757KAKDIR
758ECW_INCLUDE
759ECW_FLAGS
760ECW_LIBS
761ECW_SETTING
762FGDB_INC
763FGDB_LIB
764FGDB_ENABLED
765OPENJPEG_LIBS
766OPENJPEG_CFLAGS
767JASPER_FLAGS
768HAVE_JASPER
769NETCDF_HAS_HDF4
770NETCDF_HAS_NC4
771NETCDF_ROOT
772NETCDF_MEM
773NETCDF_SETTING
774NETCDF_NCCONFIG
775KEA_LIB
776KEA_INC
777HAVE_KEA
778KEA_CONFIG
779HDF5_INCLUDE
780HAVE_HDF5
781HDF5_LIBS
782HDF5_CFLAGS
783HDF4_HAS_MAXOPENFILES
784HDF4_INCLUDE
785HAVE_HDF4
786MONGOCXXV3_ENABLED
787MONGOCXXV3_LIBS
788MONGOCXXV3_CFLAGS
789MONGODB_INC
790MONGODB_LIB
791MONGODB_ENABLED
792SOSI_INC
793SOSI_LIB
794SOSI_ENABLED
795X_FME_HOME
796OGDI_INCLUDE
797HAVE_OGDI
798OGDI_LIBS
799OGDI_CFLAGS
800GIF_SETTING
801TIFF_JPEG12_ENABLED
802JPEG12_ENABLED
803CHARLS_INC
804HAVE_CHARLS
805GEOTIFF_INCLUDE
806GEOTIFF_SETTING
807PCIDSK_INCLUDE
808PCIDSK_LIB
809PCIDSK_SETTING
810GTA_SETTING
811DDS_SETTING
812CRUNCHDIR
813PNG_SETTING
814PCRASTER_SETTING
815FITS_SETTING
816HAVE_GRASS
817GRASS_GISBASE
818GRASS_INCLUDE
819GRASS_SETTING
820PG_LIB
821PG_INC
822HAVE_PG
823PQ_LIBS
824PQ_CFLAGS
825GDALFORMATS_ENABLED
826OGRFORMATS_ENABLED_CFLAGS
827OGRFORMATS_ENABLED
828ZSTD_SETTING
829LIBLZMA_SETTING
830SPATIALITE_412_OR_LATER
831SPATIALITE_INC
832SPATIALITE_SONAME
833HAVE_SPATIALITE
834PROJ_INCLUDE
835SQLITE_HAS_COLUMN_METADATA
836HAVE_SQLITE
837SQLITE_INC
838SQLITE3_LDFLAGS
839SQLITE3_CFLAGS
840SQLITE3_VERSION
841CURL_LIB
842CURL_INC
843CURL_SETTING
844LIBCURL_CONFIG
845TIFF_SETTING
846JPEG_SETTING
847bashcompdir
848PKG_CONFIG
849LTLIBICONV
850LIBICONV
851LIBDEFLATE_SETTING
852LIBZ_SETTING
853RENAME_INTERNAL_SHAPELIB_SYMBOLS
854RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS
855RENAME_INTERNAL_LIBTIFF_SYMBOLS
856HAVE_HIDE_INTERNAL_SYMBOLS
857CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT
858CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT
859AVXFLAGS
860SSSE3FLAGS
861SSEFLAGS
862HAVE_GCC_BSWAP
863HAVE_GCC_ATOMIC_BUILTINS
864CXXFLAGS_NOFTRAPV
865CFLAGS_NOFTRAPV
866ENABLE_UFFD
867HAVE_LIBTOOL
868SO_EXT
869LD_SHARED
870CXXCPP
871CPP
872LT_SYS_LIBRARY_PATH
873OTOOL64
874OTOOL
875LIPO
876NMEDIT
877DSYMUTIL
878MANIFEST_TOOL
879AWK
880RANLIB
881STRIP
882ac_ct_AR
883AR
884LN_S
885NM
886ac_ct_DUMPBIN
887DUMPBIN
888LD
889FGREP
890EGREP
891GREP
892SED
893LIBTOOL
894OBJDUMP
895DLLTOOL
896AS
897WARN_EFFCPLUSPLUS
898WARN_OLD_STYLE_CAST
899NO_LOGICAL_OP_FLAG
900NO_NON_VIRTUAL_DTOR_FLAG
901NO_SIGN_COMPARE
902NO_UNUSED_PARAMETER_FLAG
903C_WFLAGS
904CXX_WFLAGS
905HAVE_CXX11
906CXX14_SUPPORT
907HAVE_CXX14
908ac_ct_CXX
909CXXFLAGS
910CXX
911OBJEXT
912EXEEXT
913ac_ct_CC
914CPPFLAGS
915LDFLAGS
916CFLAGS
917CC
918host_os
919host_vendor
920host_cpu
921host
922build_os
923build_vendor
924build_cpu
925build
926PACKAGE
927target_alias
928host_alias
929build_alias
930LIBS
931ECHO_T
932ECHO_N
933ECHO_C
934DEFS
935mandir
936localedir
937libdir
938psdir
939pdfdir
940dvidir
941htmldir
942infodir
943docdir
944oldincludedir
945includedir
946runstatedir
947localstatedir
948sharedstatedir
949sysconfdir
950datadir
951datarootdir
952libexecdir
953sbindir
954bindir
955program_transform_name
956prefix
957exec_prefix
958PACKAGE_URL
959PACKAGE_BUGREPORT
960PACKAGE_STRING
961PACKAGE_VERSION
962PACKAGE_TARNAME
963PACKAGE_NAME
964PATH_SEPARATOR
965SHELL'
966ac_subst_files=''
967ac_user_opts='
968enable_option_checking
969with_cpp14
970enable_shared
971enable_static
972with_pic
973enable_fast_install
974with_aix_soname
975with_gnu_ld
976with_sysroot
977enable_libtool_lock
978with_libtool
979with_ld_shared
980with_unix_stdio_64
981enable_debug
982with_sse
983with_ssse3
984with_avx
985enable_lto
986with_hide_internal_symbols
987with_rename_internal_libtiff_symbols
988with_rename_internal_libgeotiff_symbols
989with_rename_internal_shapelib_symbols
990with_local
991with_threads
992with_libz
993with_libdeflate
994enable_rpath
995with_libiconv_prefix
996with_bash_completion
997with_jpeg
998with_libtiff
999with_curl
1000with_sqlite3
1001with_proj
1002with_proj_extra_lib_for_test
1003with_spatialite
1004with_spatialite_soname
1005with_liblzma
1006with_zstd
1007enable_all_optional_drivers
1008enable_driver_aaigrid
1009enable_driver_adrg
1010enable_driver_aigrid
1011enable_driver_airsar
1012enable_driver_arg
1013enable_driver_blx
1014enable_driver_bmp
1015enable_driver_bsb
1016enable_driver_cals
1017enable_driver_ceos
1018enable_driver_ceos2
1019enable_driver_coasp
1020enable_driver_cosar
1021enable_driver_ctg
1022enable_driver_dimap
1023enable_driver_dted
1024enable_driver_elas
1025enable_driver_envisat
1026enable_driver_ers
1027enable_driver_esric
1028enable_driver_fit
1029enable_driver_gff
1030enable_driver_gsg
1031enable_driver_gxf
1032enable_driver_hf2
1033enable_driver_idrisi
1034enable_driver_ilwis
1035enable_driver_ingr
1036enable_driver_iris
1037enable_driver_iso8211
1038enable_driver_jaxapalsar
1039enable_driver_jdem
1040enable_driver_kmlsuperoverlay
1041enable_driver_l1b
1042enable_driver_leveller
1043enable_driver_map
1044enable_driver_mrf
1045enable_driver_msgn
1046enable_driver_ngsgeoid
1047enable_driver_nitf
1048enable_driver_northwood
1049enable_driver_pds
1050enable_driver_prf
1051enable_driver_r
1052enable_driver_raw
1053enable_driver_rmf
1054enable_driver_rs2
1055enable_driver_safe
1056enable_driver_saga
1057enable_driver_sdts
1058enable_driver_sentinel2
1059enable_driver_sgi
1060enable_driver_sigdem
1061enable_driver_srtmhgt
1062enable_driver_stacta
1063enable_driver_terragen
1064enable_driver_tga
1065enable_driver_til
1066enable_driver_tsx
1067enable_driver_usgsdem
1068enable_driver_xpm
1069enable_driver_xyz
1070enable_driver_zmap
1071enable_driver_grib
1072enable_driver_ozi
1073enable_driver_pdf
1074enable_driver_rik
1075enable_driver_arcgen
1076enable_driver_avc
1077enable_driver_cad
1078enable_driver_csv
1079enable_driver_dgn
1080enable_driver_dxf
1081enable_driver_edigeo
1082enable_driver_flatgeobuf
1083enable_driver_geoconcept
1084enable_driver_georss
1085enable_driver_gml
1086enable_driver_gmt
1087enable_driver_gpsbabel
1088enable_driver_gpx
1089enable_driver_gtm
1090enable_driver_jml
1091enable_driver_mapml
1092enable_driver_mvt
1093enable_driver_ntf
1094enable_driver_openfilegdb
1095enable_driver_pgdump
1096enable_driver_rec
1097enable_driver_s57
1098enable_driver_selafin
1099enable_driver_shape
1100enable_driver_svg
1101enable_driver_sxf
1102enable_driver_tiger
1103enable_driver_vdv
1104enable_driver_wasp
1105enable_driver_eeda
1106enable_driver_plmosaic
1107enable_driver_rda
1108enable_driver_wcs
1109enable_driver_wms
1110enable_driver_wmts
1111enable_driver_daas
1112enable_driver_ogcapi
1113enable_driver_amigocloud
1114enable_driver_carto
1115enable_driver_cloudant
1116enable_driver_couchdb
1117enable_driver_csw
1118enable_driver_elastic
1119enable_driver_ngw
1120enable_driver_plscenes
1121enable_driver_wfs
1122enable_driver_rasterlite
1123enable_driver_mbtiles
1124enable_driver_gpkg
1125enable_driver_vfk
1126enable_driver_osm
1127enable_driver_ods
1128enable_driver_xlsx
1129enable_driver_lvbag
1130enable_driver_nas
1131enable_driver_ili
1132enable_driver_gmlas
1133enable_driver_odbc
1134enable_driver_pgeo
1135enable_driver_mssqlspatial
1136enable_driver_geomedia
1137enable_driver_walk
1138with_pg
1139with_grass
1140with_libgrass
1141with_cfitsio
1142with_pcraster
1143with_png
1144with_dds
1145with_gta
1146with_pcidsk
1147with_geotiff
1148with_charls
1149with_jpeg12
1150with_gif
1151with_ogdi
1152with_fme
1153with_sosi
1154with_mongocxx
1155with_boost_lib_path
1156with_mongocxxv3
1157with_hdf4
1158with_hdf5
1159with_kea
1160with_netcdf
1161with_jasper
1162with_openjpeg
1163with_fgdb
1164with_ecw
1165with_kakadu
1166with_mrsid
1167with_jp2mrsid
1168with_mrsid_lidar
1169with_jp2lura
1170with_msg
1171with_oci
1172with_oci_include
1173with_oci_lib
1174with_gnm
1175with_mysql
1176with_ingres
1177with_xerces
1178with_xerces_inc
1179with_xerces_lib
1180with_expat
1181with_expat_inc
1182with_expat_lib
1183with_libkml
1184with_libkml_inc
1185with_libkml_lib
1186with_odbc
1187with_dods_root
1188with_xml2
1189with_rasterlite2
1190with_pcre
1191with_teigha
1192with_teigha_plt
1193with_idb
1194with_webp
1195with_geos
1196with_sfcgal
1197with_qhull
1198with_opencl
1199with_opencl_include
1200with_opencl_lib
1201with_freexl
1202with_libjson_c
1203with_pam
1204enable_pdf_plugin
1205with_poppler
1206with_podofo
1207with_podofo_lib
1208with_podofo_extra_lib_for_test
1209with_pdfium
1210with_gdal_ver
1211with_macosx_framework
1212with_perl
1213with_python
1214with_java
1215with_hdfs
1216with_tiledb
1217with_mdb
1218with_jvm_lib
1219with_jvm_lib_add_rpath
1220with_rasdaman
1221with_rdb
1222with_armadillo
1223with_cryptopp
1224with_crypto
1225with_lerc
1226with_null
1227with_exr
1228with_heif
1229'
1230      ac_precious_vars='build_alias
1231host_alias
1232target_alias
1233CC
1234CFLAGS
1235LDFLAGS
1236LIBS
1237CPPFLAGS
1238CXX
1239CXXFLAGS
1240CCC
1241LT_SYS_LIBRARY_PATH
1242CPP
1243CXXCPP
1244PKG_CONFIG
1245bashcompdir
1246PQ_CFLAGS
1247PQ_LIBS
1248OGDI_CFLAGS
1249OGDI_LIBS
1250MONGOCXXV3_CFLAGS
1251MONGOCXXV3_LIBS
1252HDF5_CFLAGS
1253HDF5_LIBS
1254OPENJPEG_CFLAGS
1255OPENJPEG_LIBS
1256LIBKML_CFLAGS
1257LIBKML_LIBS
1258LIBDAP_CFLAGS
1259LIBDAP_LIBS
1260LIBXML2_CFLAGS
1261LIBXML2_LIBS
1262POPPLER_CFLAGS
1263POPPLER_LIBS
1264EXR_CFLAGS
1265EXR_LIBS
1266HEIF_CFLAGS
1267HEIF_LIBS'
1268
1269
1270# Initialize some variables set by options.
1271ac_init_help=
1272ac_init_version=false
1273ac_unrecognized_opts=
1274ac_unrecognized_sep=
1275# The variables have the same names as the options, with
1276# dashes changed to underlines.
1277cache_file=/dev/null
1278exec_prefix=NONE
1279no_create=
1280no_recursion=
1281prefix=NONE
1282program_prefix=NONE
1283program_suffix=NONE
1284program_transform_name=s,x,x,
1285silent=
1286site=
1287srcdir=
1288verbose=
1289x_includes=NONE
1290x_libraries=NONE
1291
1292# Installation directory options.
1293# These are left unexpanded so users can "make install exec_prefix=/foo"
1294# and all the variables that are supposed to be based on exec_prefix
1295# by default will actually change.
1296# Use braces instead of parens because sh, perl, etc. also accept them.
1297# (The list follows the same order as the GNU Coding Standards.)
1298bindir='${exec_prefix}/bin'
1299sbindir='${exec_prefix}/sbin'
1300libexecdir='${exec_prefix}/libexec'
1301datarootdir='${prefix}/share'
1302datadir='${datarootdir}'
1303sysconfdir='${prefix}/etc'
1304sharedstatedir='${prefix}/com'
1305localstatedir='${prefix}/var'
1306runstatedir='${localstatedir}/run'
1307includedir='${prefix}/include'
1308oldincludedir='/usr/include'
1309docdir='${datarootdir}/doc/${PACKAGE}'
1310infodir='${datarootdir}/info'
1311htmldir='${docdir}'
1312dvidir='${docdir}'
1313pdfdir='${docdir}'
1314psdir='${docdir}'
1315libdir='${exec_prefix}/lib'
1316localedir='${datarootdir}/locale'
1317mandir='${datarootdir}/man'
1318
1319ac_prev=
1320ac_dashdash=
1321for ac_option
1322do
1323  # If the previous option needs an argument, assign it.
1324  if test -n "$ac_prev"; then
1325    eval $ac_prev=\$ac_option
1326    ac_prev=
1327    continue
1328  fi
1329
1330  case $ac_option in
1331  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1332  *=)   ac_optarg= ;;
1333  *)    ac_optarg=yes ;;
1334  esac
1335
1336  # Accept the important Cygnus configure options, so we can diagnose typos.
1337
1338  case $ac_dashdash$ac_option in
1339  --)
1340    ac_dashdash=yes ;;
1341
1342  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1343    ac_prev=bindir ;;
1344  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1345    bindir=$ac_optarg ;;
1346
1347  -build | --build | --buil | --bui | --bu)
1348    ac_prev=build_alias ;;
1349  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1350    build_alias=$ac_optarg ;;
1351
1352  -cache-file | --cache-file | --cache-fil | --cache-fi \
1353  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1354    ac_prev=cache_file ;;
1355  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1356  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1357    cache_file=$ac_optarg ;;
1358
1359  --config-cache | -C)
1360    cache_file=config.cache ;;
1361
1362  -datadir | --datadir | --datadi | --datad)
1363    ac_prev=datadir ;;
1364  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1365    datadir=$ac_optarg ;;
1366
1367  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1368  | --dataroo | --dataro | --datar)
1369    ac_prev=datarootdir ;;
1370  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1371  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1372    datarootdir=$ac_optarg ;;
1373
1374  -disable-* | --disable-*)
1375    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1376    # Reject names that are not valid shell variable names.
1377    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1378      as_fn_error $? "invalid feature name: $ac_useropt"
1379    ac_useropt_orig=$ac_useropt
1380    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1381    case $ac_user_opts in
1382      *"
1383"enable_$ac_useropt"
1384"*) ;;
1385      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1386	 ac_unrecognized_sep=', ';;
1387    esac
1388    eval enable_$ac_useropt=no ;;
1389
1390  -docdir | --docdir | --docdi | --doc | --do)
1391    ac_prev=docdir ;;
1392  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1393    docdir=$ac_optarg ;;
1394
1395  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1396    ac_prev=dvidir ;;
1397  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1398    dvidir=$ac_optarg ;;
1399
1400  -enable-* | --enable-*)
1401    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1402    # Reject names that are not valid shell variable names.
1403    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1404      as_fn_error $? "invalid feature name: $ac_useropt"
1405    ac_useropt_orig=$ac_useropt
1406    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1407    case $ac_user_opts in
1408      *"
1409"enable_$ac_useropt"
1410"*) ;;
1411      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1412	 ac_unrecognized_sep=', ';;
1413    esac
1414    eval enable_$ac_useropt=\$ac_optarg ;;
1415
1416  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1417  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1418  | --exec | --exe | --ex)
1419    ac_prev=exec_prefix ;;
1420  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1421  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1422  | --exec=* | --exe=* | --ex=*)
1423    exec_prefix=$ac_optarg ;;
1424
1425  -gas | --gas | --ga | --g)
1426    # Obsolete; use --with-gas.
1427    with_gas=yes ;;
1428
1429  -help | --help | --hel | --he | -h)
1430    ac_init_help=long ;;
1431  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1432    ac_init_help=recursive ;;
1433  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1434    ac_init_help=short ;;
1435
1436  -host | --host | --hos | --ho)
1437    ac_prev=host_alias ;;
1438  -host=* | --host=* | --hos=* | --ho=*)
1439    host_alias=$ac_optarg ;;
1440
1441  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1442    ac_prev=htmldir ;;
1443  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1444  | --ht=*)
1445    htmldir=$ac_optarg ;;
1446
1447  -includedir | --includedir | --includedi | --included | --include \
1448  | --includ | --inclu | --incl | --inc)
1449    ac_prev=includedir ;;
1450  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1451  | --includ=* | --inclu=* | --incl=* | --inc=*)
1452    includedir=$ac_optarg ;;
1453
1454  -infodir | --infodir | --infodi | --infod | --info | --inf)
1455    ac_prev=infodir ;;
1456  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1457    infodir=$ac_optarg ;;
1458
1459  -libdir | --libdir | --libdi | --libd)
1460    ac_prev=libdir ;;
1461  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1462    libdir=$ac_optarg ;;
1463
1464  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1465  | --libexe | --libex | --libe)
1466    ac_prev=libexecdir ;;
1467  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1468  | --libexe=* | --libex=* | --libe=*)
1469    libexecdir=$ac_optarg ;;
1470
1471  -localedir | --localedir | --localedi | --localed | --locale)
1472    ac_prev=localedir ;;
1473  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1474    localedir=$ac_optarg ;;
1475
1476  -localstatedir | --localstatedir | --localstatedi | --localstated \
1477  | --localstate | --localstat | --localsta | --localst | --locals)
1478    ac_prev=localstatedir ;;
1479  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1480  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1481    localstatedir=$ac_optarg ;;
1482
1483  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1484    ac_prev=mandir ;;
1485  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1486    mandir=$ac_optarg ;;
1487
1488  -nfp | --nfp | --nf)
1489    # Obsolete; use --without-fp.
1490    with_fp=no ;;
1491
1492  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1493  | --no-cr | --no-c | -n)
1494    no_create=yes ;;
1495
1496  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1497  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1498    no_recursion=yes ;;
1499
1500  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1501  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1502  | --oldin | --oldi | --old | --ol | --o)
1503    ac_prev=oldincludedir ;;
1504  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1505  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1506  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1507    oldincludedir=$ac_optarg ;;
1508
1509  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1510    ac_prev=prefix ;;
1511  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1512    prefix=$ac_optarg ;;
1513
1514  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1515  | --program-pre | --program-pr | --program-p)
1516    ac_prev=program_prefix ;;
1517  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1518  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1519    program_prefix=$ac_optarg ;;
1520
1521  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1522  | --program-suf | --program-su | --program-s)
1523    ac_prev=program_suffix ;;
1524  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1525  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1526    program_suffix=$ac_optarg ;;
1527
1528  -program-transform-name | --program-transform-name \
1529  | --program-transform-nam | --program-transform-na \
1530  | --program-transform-n | --program-transform- \
1531  | --program-transform | --program-transfor \
1532  | --program-transfo | --program-transf \
1533  | --program-trans | --program-tran \
1534  | --progr-tra | --program-tr | --program-t)
1535    ac_prev=program_transform_name ;;
1536  -program-transform-name=* | --program-transform-name=* \
1537  | --program-transform-nam=* | --program-transform-na=* \
1538  | --program-transform-n=* | --program-transform-=* \
1539  | --program-transform=* | --program-transfor=* \
1540  | --program-transfo=* | --program-transf=* \
1541  | --program-trans=* | --program-tran=* \
1542  | --progr-tra=* | --program-tr=* | --program-t=*)
1543    program_transform_name=$ac_optarg ;;
1544
1545  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1546    ac_prev=pdfdir ;;
1547  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1548    pdfdir=$ac_optarg ;;
1549
1550  -psdir | --psdir | --psdi | --psd | --ps)
1551    ac_prev=psdir ;;
1552  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1553    psdir=$ac_optarg ;;
1554
1555  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1556  | -silent | --silent | --silen | --sile | --sil)
1557    silent=yes ;;
1558
1559  -runstatedir | --runstatedir | --runstatedi | --runstated \
1560  | --runstate | --runstat | --runsta | --runst | --runs \
1561  | --run | --ru | --r)
1562    ac_prev=runstatedir ;;
1563  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1564  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1565  | --run=* | --ru=* | --r=*)
1566    runstatedir=$ac_optarg ;;
1567
1568  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1569    ac_prev=sbindir ;;
1570  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1571  | --sbi=* | --sb=*)
1572    sbindir=$ac_optarg ;;
1573
1574  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1575  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1576  | --sharedst | --shareds | --shared | --share | --shar \
1577  | --sha | --sh)
1578    ac_prev=sharedstatedir ;;
1579  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1580  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1581  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1582  | --sha=* | --sh=*)
1583    sharedstatedir=$ac_optarg ;;
1584
1585  -site | --site | --sit)
1586    ac_prev=site ;;
1587  -site=* | --site=* | --sit=*)
1588    site=$ac_optarg ;;
1589
1590  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1591    ac_prev=srcdir ;;
1592  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1593    srcdir=$ac_optarg ;;
1594
1595  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1596  | --syscon | --sysco | --sysc | --sys | --sy)
1597    ac_prev=sysconfdir ;;
1598  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1599  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1600    sysconfdir=$ac_optarg ;;
1601
1602  -target | --target | --targe | --targ | --tar | --ta | --t)
1603    ac_prev=target_alias ;;
1604  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1605    target_alias=$ac_optarg ;;
1606
1607  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1608    verbose=yes ;;
1609
1610  -version | --version | --versio | --versi | --vers | -V)
1611    ac_init_version=: ;;
1612
1613  -with-* | --with-*)
1614    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1615    # Reject names that are not valid shell variable names.
1616    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1617      as_fn_error $? "invalid package name: $ac_useropt"
1618    ac_useropt_orig=$ac_useropt
1619    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1620    case $ac_user_opts in
1621      *"
1622"with_$ac_useropt"
1623"*) ;;
1624      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1625	 ac_unrecognized_sep=', ';;
1626    esac
1627    eval with_$ac_useropt=\$ac_optarg ;;
1628
1629  -without-* | --without-*)
1630    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1631    # Reject names that are not valid shell variable names.
1632    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1633      as_fn_error $? "invalid package name: $ac_useropt"
1634    ac_useropt_orig=$ac_useropt
1635    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1636    case $ac_user_opts in
1637      *"
1638"with_$ac_useropt"
1639"*) ;;
1640      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1641	 ac_unrecognized_sep=', ';;
1642    esac
1643    eval with_$ac_useropt=no ;;
1644
1645  --x)
1646    # Obsolete; use --with-x.
1647    with_x=yes ;;
1648
1649  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1650  | --x-incl | --x-inc | --x-in | --x-i)
1651    ac_prev=x_includes ;;
1652  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1653  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1654    x_includes=$ac_optarg ;;
1655
1656  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1657  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1658    ac_prev=x_libraries ;;
1659  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1660  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1661    x_libraries=$ac_optarg ;;
1662
1663  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1664Try \`$0 --help' for more information"
1665    ;;
1666
1667  *=*)
1668    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1669    # Reject names that are not valid shell variable names.
1670    case $ac_envvar in #(
1671      '' | [0-9]* | *[!_$as_cr_alnum]* )
1672      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1673    esac
1674    eval $ac_envvar=\$ac_optarg
1675    export $ac_envvar ;;
1676
1677  *)
1678    # FIXME: should be removed in autoconf 3.0.
1679    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1680    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1681      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1682    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1683    ;;
1684
1685  esac
1686done
1687
1688if test -n "$ac_prev"; then
1689  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1690  as_fn_error $? "missing argument to $ac_option"
1691fi
1692
1693if test -n "$ac_unrecognized_opts"; then
1694  case $enable_option_checking in
1695    no) ;;
1696    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1697    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1698  esac
1699fi
1700
1701# Check all directory arguments for consistency.
1702for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1703		datadir sysconfdir sharedstatedir localstatedir includedir \
1704		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1705		libdir localedir mandir runstatedir
1706do
1707  eval ac_val=\$$ac_var
1708  # Remove trailing slashes.
1709  case $ac_val in
1710    */ )
1711      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1712      eval $ac_var=\$ac_val;;
1713  esac
1714  # Be sure to have absolute directory names.
1715  case $ac_val in
1716    [\\/$]* | ?:[\\/]* )  continue;;
1717    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1718  esac
1719  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1720done
1721
1722# There might be people who depend on the old broken behavior: `$host'
1723# used to hold the argument of --host etc.
1724# FIXME: To remove some day.
1725build=$build_alias
1726host=$host_alias
1727target=$target_alias
1728
1729# FIXME: To remove some day.
1730if test "x$host_alias" != x; then
1731  if test "x$build_alias" = x; then
1732    cross_compiling=maybe
1733  elif test "x$build_alias" != "x$host_alias"; then
1734    cross_compiling=yes
1735  fi
1736fi
1737
1738ac_tool_prefix=
1739test -n "$host_alias" && ac_tool_prefix=$host_alias-
1740
1741test "$silent" = yes && exec 6>/dev/null
1742
1743
1744ac_pwd=`pwd` && test -n "$ac_pwd" &&
1745ac_ls_di=`ls -di .` &&
1746ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1747  as_fn_error $? "working directory cannot be determined"
1748test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1749  as_fn_error $? "pwd does not report name of working directory"
1750
1751
1752# Find the source files, if location was not specified.
1753if test -z "$srcdir"; then
1754  ac_srcdir_defaulted=yes
1755  # Try the directory containing this script, then the parent directory.
1756  ac_confdir=`$as_dirname -- "$as_myself" ||
1757$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1758	 X"$as_myself" : 'X\(//\)[^/]' \| \
1759	 X"$as_myself" : 'X\(//\)$' \| \
1760	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1761$as_echo X"$as_myself" |
1762    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1763	    s//\1/
1764	    q
1765	  }
1766	  /^X\(\/\/\)[^/].*/{
1767	    s//\1/
1768	    q
1769	  }
1770	  /^X\(\/\/\)$/{
1771	    s//\1/
1772	    q
1773	  }
1774	  /^X\(\/\).*/{
1775	    s//\1/
1776	    q
1777	  }
1778	  s/.*/./; q'`
1779  srcdir=$ac_confdir
1780  if test ! -r "$srcdir/$ac_unique_file"; then
1781    srcdir=..
1782  fi
1783else
1784  ac_srcdir_defaulted=no
1785fi
1786if test ! -r "$srcdir/$ac_unique_file"; then
1787  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1788  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1789fi
1790ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1791ac_abs_confdir=`(
1792	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1793	pwd)`
1794# When building in place, set srcdir=.
1795if test "$ac_abs_confdir" = "$ac_pwd"; then
1796  srcdir=.
1797fi
1798# Remove unnecessary trailing slashes from srcdir.
1799# Double slashes in file names in object file debugging info
1800# mess up M-x gdb in Emacs.
1801case $srcdir in
1802*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1803esac
1804for ac_var in $ac_precious_vars; do
1805  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1806  eval ac_env_${ac_var}_value=\$${ac_var}
1807  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1808  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1809done
1810
1811#
1812# Report the --help message.
1813#
1814if test "$ac_init_help" = "long"; then
1815  # Omit some internal or obsolete options to make the list less imposing.
1816  # This message is too long to be a string in the A/UX 3.1 sh.
1817  cat <<_ACEOF
1818\`configure' configures this package to adapt to many kinds of systems.
1819
1820Usage: $0 [OPTION]... [VAR=VALUE]...
1821
1822To assign environment variables (e.g., CC, CFLAGS...), specify them as
1823VAR=VALUE.  See below for descriptions of some of the useful variables.
1824
1825Defaults for the options are specified in brackets.
1826
1827Configuration:
1828  -h, --help              display this help and exit
1829      --help=short        display options specific to this package
1830      --help=recursive    display the short help of all the included packages
1831  -V, --version           display version information and exit
1832  -q, --quiet, --silent   do not print \`checking ...' messages
1833      --cache-file=FILE   cache test results in FILE [disabled]
1834  -C, --config-cache      alias for \`--cache-file=config.cache'
1835  -n, --no-create         do not create output files
1836      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1837
1838Installation directories:
1839  --prefix=PREFIX         install architecture-independent files in PREFIX
1840                          [$ac_default_prefix]
1841  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1842                          [PREFIX]
1843
1844By default, \`make install' will install all the files in
1845\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1846an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1847for instance \`--prefix=\$HOME'.
1848
1849For better control, use the options below.
1850
1851Fine tuning of the installation directories:
1852  --bindir=DIR            user executables [EPREFIX/bin]
1853  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1854  --libexecdir=DIR        program executables [EPREFIX/libexec]
1855  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1856  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1857  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1858  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1859  --libdir=DIR            object code libraries [EPREFIX/lib]
1860  --includedir=DIR        C header files [PREFIX/include]
1861  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1862  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1863  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1864  --infodir=DIR           info documentation [DATAROOTDIR/info]
1865  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1866  --mandir=DIR            man documentation [DATAROOTDIR/man]
1867  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1868  --htmldir=DIR           html documentation [DOCDIR]
1869  --dvidir=DIR            dvi documentation [DOCDIR]
1870  --pdfdir=DIR            pdf documentation [DOCDIR]
1871  --psdir=DIR             ps documentation [DOCDIR]
1872_ACEOF
1873
1874  cat <<\_ACEOF
1875
1876System types:
1877  --build=BUILD     configure for building on BUILD [guessed]
1878  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1879_ACEOF
1880fi
1881
1882if test -n "$ac_init_help"; then
1883
1884  cat <<\_ACEOF
1885
1886Optional Features:
1887  --disable-option-checking  ignore unrecognized --enable/--with options
1888  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1889  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1890  --enable-shared[=PKGS]  build shared libraries [default=yes]
1891  --enable-static[=PKGS]  build static libraries [default=yes]
1892  --enable-fast-install[=PKGS]
1893                          optimize for fast installation [default=yes]
1894  --disable-libtool-lock  avoid locking (might break parallel builds)
1895  --enable-debug          enable debugging (disabled by default)
1896  --enable-lto            enable LTO(link time optimization) (disabled by
1897                          default)
1898  --disable-rpath         do not hardcode runtime library paths
1899  --disable-all-optional-drivers
1900                          disable all non-mandatory internal drivers.
1901                          Individual drivers can be added with
1902                          --enable-driver-XXX
1903  --disable-driver-aaigrid
1904                          disable aaigrid driver support (enabled by default)
1905  --disable-driver-adrg   disable adrg driver support (enabled by default)
1906  --disable-driver-aigrid disable aigrid driver support (enabled by default)
1907  --disable-driver-airsar disable airsar driver support (enabled by default)
1908  --disable-driver-arg    disable arg driver support (enabled by default)
1909  --disable-driver-blx    disable blx driver support (enabled by default)
1910  --disable-driver-bmp    disable bmp driver support (enabled by default)
1911  --disable-driver-bsb    disable bsb driver support (enabled by default)
1912  --disable-driver-cals   disable cals driver support (enabled by default)
1913  --disable-driver-ceos   disable ceos driver support (enabled by default)
1914  --disable-driver-ceos2  disable ceos2 driver support (enabled by default)
1915  --disable-driver-coasp  disable coasp driver support (enabled by default)
1916  --disable-driver-cosar  disable cosar driver support (enabled by default)
1917  --disable-driver-ctg    disable ctg driver support (enabled by default)
1918  --disable-driver-dimap  disable dimap driver support (enabled by default)
1919  --disable-driver-dted   disable dted driver support (enabled by default)
1920  --disable-driver-elas   disable elas driver support (enabled by default)
1921  --disable-driver-envisat
1922                          disable envisat driver support (enabled by default)
1923  --disable-driver-ers    disable ers driver support (enabled by default)
1924  --disable-driver-esric  disable esric driver support (enabled by default)
1925  --disable-driver-fit    disable fit driver support (enabled by default)
1926  --disable-driver-gff    disable gff driver support (enabled by default)
1927  --disable-driver-gsg    disable gsg driver support (enabled by default)
1928  --disable-driver-gxf    disable gxf driver support (enabled by default)
1929  --disable-driver-hf2    disable hf2 driver support (enabled by default)
1930  --disable-driver-idrisi disable idrisi driver support (enabled by default)
1931  --disable-driver-ilwis  disable ilwis driver support (enabled by default)
1932  --disable-driver-ingr   disable ingr driver support (enabled by default)
1933  --disable-driver-iris   disable iris driver support (enabled by default)
1934  --disable-driver-iso8211
1935                          disable iso8211 driver support (enabled by default)
1936  --disable-driver-jaxapalsar
1937                          disable jaxapalsar driver support (enabled by default)
1938  --disable-driver-jdem   disable jdem driver support (enabled by default)
1939  --disable-driver-kmlsuperoverlay
1940                          disable kmlsuperoverlay driver support (enabled by default)
1941  --disable-driver-l1b    disable l1b driver support (enabled by default)
1942  --disable-driver-leveller
1943                          disable leveller driver support (enabled by default)
1944  --disable-driver-map    disable map driver support (enabled by default)
1945  --disable-driver-mrf    disable mrf driver support (enabled by default)
1946  --disable-driver-msgn   disable msgn driver support (enabled by default)
1947  --disable-driver-ngsgeoid
1948                          disable ngsgeoid driver support (enabled by default)
1949  --disable-driver-nitf   disable nitf driver support (enabled by default)
1950  --disable-driver-northwood
1951                          disable northwood driver support (enabled by default)
1952  --disable-driver-pds    disable pds driver support (enabled by default)
1953  --disable-driver-prf    disable prf driver support (enabled by default)
1954  --disable-driver-r      disable r driver support (enabled by default)
1955  --disable-driver-raw    disable raw driver support (enabled by default)
1956  --disable-driver-rmf    disable rmf driver support (enabled by default)
1957  --disable-driver-rs2    disable rs2 driver support (enabled by default)
1958  --disable-driver-safe   disable safe driver support (enabled by default)
1959  --disable-driver-saga   disable saga driver support (enabled by default)
1960  --disable-driver-sdts   disable sdts driver support (enabled by default)
1961  --disable-driver-sentinel2
1962                          disable sentinel2 driver support (enabled by default)
1963  --disable-driver-sgi    disable sgi driver support (enabled by default)
1964  --disable-driver-sigdem disable sigdem driver support (enabled by default)
1965  --disable-driver-srtmhgt
1966                          disable srtmhgt driver support (enabled by default)
1967  --disable-driver-stacta disable stacta driver support (enabled by default)
1968  --disable-driver-terragen
1969                          disable terragen driver support (enabled by default)
1970  --disable-driver-tga    disable tga driver support (enabled by default)
1971  --disable-driver-til    disable til driver support (enabled by default)
1972  --disable-driver-tsx    disable tsx driver support (enabled by default)
1973  --disable-driver-usgsdem
1974                          disable usgsdem driver support (enabled by default)
1975  --disable-driver-xpm    disable xpm driver support (enabled by default)
1976  --disable-driver-xyz    disable xyz driver support (enabled by default)
1977  --disable-driver-zmap   disable zmap driver support (enabled by default)
1978  --disable-driver-grib   disable grib format support (enabled by default,
1979                          requires dependency)
1980  --disable-driver-ozi    disable ozi format support (enabled by default,
1981                          requires dependency)
1982  --disable-driver-pdf    disable pdf format support (enabled by default,
1983                          requires dependency)
1984  --disable-driver-rik    disable rik format support (enabled by default,
1985                          requires dependency)
1986  --disable-driver-arcgen disable arcgen driver support (enabled by default)
1987  --disable-driver-avc    disable avc driver support (enabled by default)
1988  --disable-driver-cad    disable cad driver support (enabled by default)
1989  --disable-driver-csv    disable csv driver support (enabled by default)
1990  --disable-driver-dgn    disable dgn driver support (enabled by default)
1991  --disable-driver-dxf    disable dxf driver support (enabled by default)
1992  --disable-driver-edigeo disable edigeo driver support (enabled by default)
1993  --disable-driver-flatgeobuf
1994                          disable flatgeobuf driver support (enabled by default)
1995  --disable-driver-geoconcept
1996                          disable geoconcept driver support (enabled by default)
1997  --disable-driver-georss disable georss driver support (enabled by default)
1998  --disable-driver-gml    disable gml driver support (enabled by default)
1999  --disable-driver-gmt    disable gmt driver support (enabled by default)
2000  --disable-driver-gpsbabel
2001                          disable gpsbabel driver support (enabled by default)
2002  --disable-driver-gpx    disable gpx driver support (enabled by default)
2003  --disable-driver-gtm    disable gtm driver support (enabled by default)
2004  --disable-driver-jml    disable jml driver support (enabled by default)
2005  --disable-driver-mapml  disable mapml driver support (enabled by default)
2006  --disable-driver-mvt    disable mvt driver support (enabled by default)
2007  --disable-driver-ntf    disable ntf driver support (enabled by default)
2008  --disable-driver-openfilegdb
2009                          disable openfilegdb driver support (enabled by default)
2010  --disable-driver-pgdump disable pgdump driver support (enabled by default)
2011  --disable-driver-rec    disable rec driver support (enabled by default)
2012  --disable-driver-s57    disable s57 driver support (enabled by default)
2013  --disable-driver-selafin
2014                          disable selafin driver support (enabled by default)
2015  --disable-driver-shape  disable shape driver support (enabled by default)
2016  --disable-driver-svg    disable svg driver support (enabled by default)
2017  --disable-driver-sxf    disable sxf driver support (enabled by default)
2018  --disable-driver-tiger  disable tiger driver support (enabled by default)
2019  --disable-driver-vdv    disable vdv driver support (enabled by default)
2020  --disable-driver-wasp   disable wasp driver support (enabled by default)
2021  --disable-driver-eeda   disable eeda format support (enabled by default,
2022                          requires curl)
2023  --disable-driver-plmosaic
2024                          disable plmosaic format support (enabled by default,
2025                          requires curl)
2026  --disable-driver-rda    disable rda format support (enabled by default,
2027                          requires curl)
2028  --disable-driver-wcs    disable wcs format support (enabled by default,
2029                          requires curl)
2030  --disable-driver-wms    disable wms format support (enabled by default,
2031                          requires curl)
2032  --disable-driver-wmts   disable wmts format support (enabled by default,
2033                          requires curl)
2034  --disable-driver-daas   disable daas format support (enabled by default,
2035                          requires curl)
2036  --disable-driver-ogcapi disable ogcapi format support (enabled by default,
2037                          requires curl)
2038  --disable-driver-amigocloud
2039                          disable amigocloud driver support (enabled by default,
2040                          requires curl)
2041  --disable-driver-carto  disable carto driver support (enabled by default,
2042                          requires curl)
2043  --disable-driver-cloudant
2044                          disable cloudant driver support (enabled by default,
2045                          requires curl)
2046  --disable-driver-couchdb
2047                          disable couchdb driver support (enabled by default,
2048                          requires curl)
2049  --disable-driver-csw    disable csw driver support (enabled by default,
2050                          requires curl)
2051  --disable-driver-elastic
2052                          disable elastic driver support (enabled by default,
2053                          requires curl)
2054  --disable-driver-ngw    disable ngw driver support (enabled by default,
2055                          requires curl)
2056  --disable-driver-plscenes
2057                          disable plscenes driver support (enabled by default,
2058                          requires curl)
2059  --disable-driver-wfs    disable wfs driver support (enabled by default,
2060                          requires curl)
2061  --disable-driver-rasterlite
2062                          disable rasterlite format support (enabled by default,
2063                          requires sqlite3)
2064  --disable-driver-mbtiles
2065                          disable mbtiles format support (enabled by default,
2066                          requires sqlite3)
2067  --disable-driver-gpkg   disable gpkg driver support (enabled by default,
2068                          requires sqlite3)
2069  --disable-driver-vfk    disable vfk driver support (enabled by default,
2070                          requires sqlite3)
2071  --disable-driver-osm    disable osm driver support (enabled by default,
2072                          requires sqlite3)
2073  --disable-driver-ods    disable ods driver support (enabled by default,
2074                          requires expat)
2075  --disable-driver-xlsx   disable xlsx driver support (enabled by default,
2076                          requires expat)
2077  --disable-driver-lvbag  disable lvbag driver support (enabled by default,
2078                          requires expat)
2079  --disable-driver-nas    disable nas driver support (enabled by default,
2080                          requires xerces-c)
2081  --disable-driver-ili    disable ili driver support (enabled by default,
2082                          requires xerces-c)
2083  --disable-driver-gmlas  disable gmlas driver support (enabled by default,
2084                          requires xerces-c)
2085  --disable-driver-odbc   disable odbc driver support (enabled by default,
2086                          requires odbc)
2087  --disable-driver-pgeo   disable pgeo driver support (enabled by default,
2088                          requires odbc)
2089  --disable-driver-mssqlspatial
2090                          disable mssqlspatial driver support (enabled by default,
2091                          requires odbc)
2092  --disable-driver-geomedia
2093                          disable geomedia driver support (enabled by default,
2094                          requires odbc)
2095  --disable-driver-walk   disable walk driver support (enabled by default,
2096                          requires odbc)
2097  --enable-pdf-plugin     enable PDF driver as a plugin (included in libgdal
2098                          by default)
2099
2100Optional Packages:
2101  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2102  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2103  --with-cpp14            Enable C++14 compiler options
2104  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
2105                          both]
2106  --with-aix-soname=aix|svr4|both
2107                          shared library versioning (aka "SONAME") variant to
2108                          provide on AIX, [default=aix].
2109  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2110  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
2111                          compiler's sysroot if not specified).
2112  --without-libtool     Don't use libtool to build the library
2113  --without-ld-shared   Disable shared library support
2114  --with-unix-stdio-64=ARG Utilize 64 stdio api (yes/no)
2115  --with-sse=ARG        Detect SSE availability for some optimized routines (ARG=yes(default), no)
2116  --with-ssse3=ARG        Detect SSSE3 availability for some optimized routines (ARG=yes(default), no)
2117  --with-avx=ARG        Detect AVX availability for some optimized routines (ARG=yes(default), no)
2118  --with-hide-internal-symbols=ARG Try to hide internal symbols (ARG=yes/no)
2119  --with-rename-internal-libtiff-symbols=ARG Prefix internal libtiff symbols with gdal_ (ARG=yes/no)
2120  --with-rename-internal-libgeotiff-symbols=ARG Prefix internal libgeotiff symbols with gdal_ (ARG=yes/no)
2121  --with-rename-internal-shapelib-symbols=ARG Prefix internal shapelib symbols with gdal_ (ARG=yes/no)
2122  --with-local=dir      Include /usr/local or other local tree for INCLUDE/LIBS
2123  --with-threads=ARG    Include thread safe support (ARG=yes(default), no or linkopt)
2124  --with-libz=ARG       Include libz support (ARG=internal or libz directory)
2125  --with-libdeflate       enable libdeflate usage (optional for faster Deflate
2126                          support (still requires zlib) (ARG=yes/no/prefix),
2127                          enabled by default)
2128  --with-gnu-ld           assume the C compiler uses GNU ld default=no
2129  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2130  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2131  --with-bash-completion=ARG
2132                          Install Bash completions (ARG=yes or path)
2133  --with-jpeg=ARG       Include JPEG support (ARG=internal, no or path)
2134  --with-libtiff=ARG    Libtiff library to use (ARG=internal, yes or path)
2135  --with-curl=ARG       Include curl (ARG=path to curl-config.)
2136  --with-sqlite3=[ARG]    use SQLite 3 library [default=yes], optionally
2137                          specify the prefix for sqlite3 library
2138  --with-proj=ARG Compile with PROJ.x (ARG=yes or path)
2139  --with-proj-extra-lib-for-test=ARG   Additional libraries to pass the detection test, but not used for libgdal linking (i.e. -lcurl -ltiff ...). Mainly for static libproj
2140  --with-spatialite=ARG Include SpatiaLite support (ARG=no(default), yes, dlopen (only supported for Spatialite >= 4.1.2) or path)
2141  --with-spatialite-soname=ARG Spatialite shared object name (e.g. libspatialite.so), only used if --with-spatialite=dlopen
2142  --with-liblzma=ARG       Include liblzma support (ARG=yes/no)
2143  --with-zstd=ARG       Include zstd support (ARG=yes/no/installation_prefix)
2144  --with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=yes,no)
2145  --with-grass=ARG      Include GRASS support (GRASS 5.7+, ARG=GRASS install tree dir)
2146  --with-libgrass=ARG   Include GRASS support based on libgrass (GRASS 5.0+)
2147  --with-cfitsio=ARG    Include FITS support (ARG=no or libcfitsio path)
2148  --with-pcraster=ARG   Include PCRaster (libcsf) support (ARG=internal, no or path)
2149  --with-png=ARG        Include PNG support (ARG=internal, no or path)
2150  --with-dds=ARG        Include DDS support (ARG=no, or path)
2151  --with-gta=ARG        Include GTA support (ARG=no or libgta tree prefix)
2152  --with-pcidsk=ARG     Path to external PCIDSK SDK or internal (default)
2153  --with-geotiff=ARG    Libgeotiff library to use (ARG=internal, yes or path)
2154  --with-charls           Include JPEG-Lossless support
2155  --without-jpeg12        Disable JPEG 8/12bit TIFF support
2156  --with-gif=ARG        Include GIF support (ARG=internal, no or path)
2157  --with-ogdi=ARG       Include OGDI support (ARG=path)
2158  --with-fme=ARG        Include FMEObjects support (ARG=FME_HOME path)
2159  --with-sosi=ARG        Include SOSI support (ARG=SOSI lib Path, yes or no)
2160  --with-mongocxx=ARG        Include MongoCXX support (ARG=Path, yes or no)
2161  --with-boost-lib-path=ARG   Path to boost libraries for mongocxx client
2162  --with-mongocxxv3=ARG        Include MongoCXXv3 support (ARG=yes or no)
2163  --with-hdf4=ARG       Include HDF4 support (ARG=path)
2164  --with-hdf5=ARG       Include HDF5 support (ARG=path)
2165  --with-kea=ARG      Include kealib (ARG=path to kea-config) [default=yes]
2166  --with-netcdf=ARG     Include netCDF support (ARG=no or netCDF tree prefix)
2167  --with-jasper=ARG     Include JPEG-2000 support via JasPer library (ARG=path)
2168  --with-openjpeg     Include JPEG-2000 support via OpenJPEG 2.x library
2169  --with-fgdb=ARG        Include ESRI File Geodatabase support (ARG=FGDP API Path, yes or no)
2170  --with-ecw=ARG        Include ECW support (ARG=ECW SDK Path, yes or no)
2171  --with-kakadu=ARG     Include Kakadu/JPEG2000 support
2172  --with-mrsid=ARG      Include MrSID support (ARG=path to MrSID DSDK or no)
2173  --with-jp2mrsid=ARG   Enable MrSID JPEG2000 support (ARG=yes/no)
2174  --with-mrsid_lidar=ARG      Include MrSID/MG4 LiDAR support (ARG=path to LizardTech LiDAR SDK or no)
2175  --with-j2lura=ARG    Include JP2Lua support (ARG=no, lura SDK install path)
2176  --with-msg=ARG          Enable MSG driver (ARG=yes or no)
2177  --with-oci=[ARG]        use Oracle OCI API from given Oracle home
2178                          (ARG=path); use existing ORACLE_HOME (ARG=yes);
2179                          disable Oracle OCI support (ARG=no)
2180  --with-oci-include=[DIR]
2181                          use Oracle OCI API headers from given path
2182  --with-oci-lib=[DIR]    use Oracle OCI API libraries from given path
2183  --with-gnm            Build GNM into shared library
2184  --with-mysql=ARG      Include MySQL (ARG=path to mysql_config) [default=no]
2185  --with-ingres=ARG     Include Ingres (ARG=$II_SYSTEM)
2186  --with-xerces=[ARG]     use Xerces C++ Parser from given prefix (ARG=path);
2187                          check standard prefixes (ARG=yes); disable (ARG=no)
2188  --with-xerces-inc=[DIR] path to Xerces C++ Parser headers
2189  --with-xerces-lib=[ARG] link options for Xerces C++ Parser libraries
2190  --with-expat=[ARG]      use Expat XML Parser from given prefix (ARG=path);
2191                          check standard prefixes (ARG=yes); disable (ARG=no)
2192  --with-expat-inc=[DIR]  path to Expat XML Parser headers
2193  --with-expat-lib=[ARG]  link options for Expat XML Parser libraries
2194  --with-libkml=[ARG]     use Google libkml from given prefix (ARG=path);
2195                          check standard prefixes (ARG=yes); disable (ARG=no)
2196  --with-libkml-inc=[DIR] path to Google libkml headers
2197  --with-libkml-lib=[ARG] link options for Google libkml libraries
2198  --with-odbc=ARG       Include ODBC support (ARG=no or path)
2199  --with-dods-root=ARG  Include DODS support (ARG=no or absolute path)
2200  --with-xml2=ARG       Include libxml2 (ARG=yes/no)
2201  --with-rasterlite2=ARG Include RasterLite2 support (ARG=no(default), yes or path)
2202  --with-pcre             Include libpcre support (REGEXP support for SQLite)
2203  --with-teigha=path Include Teigha DWG/DGN support
2204  --with-teigha-plt=platform Teigha platform
2205  --with-idb=DIR        Include Informix DataBlade support (DIR points to Informix root)
2206  --with-webp=ARG    Include WEBP support (ARG=no, yes or libwebp install root path)
2207  --with-geos=ARG         Include GEOS support (ARG=yes, no or geos-config
2208                          path)
2209  --with-sfcgal=ARG       Include SFCGAL support (ARG=yes, no or sfcgal-config
2210                          path)
2211  --with-qhull=ARG     Include QHull support (ARG=no, yes, internal)
2212  --with-opencl=ARG       Include OpenCL (GPU) support
2213  --with-opencl-include=ARG OpenCL Include directory (with a CL subdirectory)
2214  --with-opencl-lib=ARG   OpenCL Link Flags (i.e. -L/xxx -lOpenCL)
2215  --with-freexl=ARG    Include freexl support (ARG=no, yes (default) or libfreexl install path)
2216  --with-libjson-c=ARG       Include libjson-c support (ARG=internal or libjson-c directory)
2217  --without-pam         Disable PAM (.aux.xml) support
2218  --with-poppler=ARG    Include poppler(for PDF) support (ARG=no(default), yes or poppler install path)
2219  --with-podofo=ARG    Include podofo(for PDF) support (ARG=no(default), yes or podofo install path)
2220  --with-podofo-lib=ARG   podofo Link Flags (i.e. -L/xxx -lpodofo ...). Mainly for static libpodofo
2221  --with-podofo-extra-lib-for-test=ARG   Additional libraries to pass the detection test, but not used for libgdal linking (i.e. -ljpeg ...). Mainly for static libpodofo
2222  --with-pdfium=ARG    Include pdfium (for PDF) support (ARG=no(default), yes or pdfium install path)
2223  --with-gdal-ver=ARG   Override GDAL version
2224  --with-macosx-framework         Build and install GDAL as a Mac OS X Framework
2225  --with-perl           Enable perl bindings
2226  --with-python=ARG   Enable python bindings (ARG=yes, no, or path to python binary)
2227  --with-java       Include Java support (ARG=yes, no or JDK home path)  [default=no]
2228  --with-hdfs=ARG        Include HDFS support (ARG=Path or no)
2229  --with-tiledb=ARG    Include TileDB support (ARG=no, yes or tiledb install root path)
2230  --with-mdb       Include MDB driver
2231  --with-jvm-lib=ARG        ARG is dlopen or points to Java libjvm path
2232  --with-jvm-lib-add-rpath    Add the libjvm path to the RPATH (no by default)
2233  --with-rasdaman=DIR        Include rasdaman support (DIR is rasdaman's install dir).
2234  --with-rdb=ARG    Include RDB support (ARG=no, yes or RDB SDK root path)
2235  --with-armadillo=ARG       Include Armadillo support for faster TPS transform computation (ARG=yes/no/path to armadillo install root) [default=no]
2236  --with-cryptopp=ARG       Include cryptopp support (ARG=yes, no or path)
2237  --with-crypto=ARG       Include crypto (from openssl) support (ARG=yes, no or path)
2238  --with-lerc=ARG         Include libLerc support(ARG=yes/no/internal/path). Internal liblerc is required for MRF Lerc support. Internal or external libLerc may be used for internal libtiff Lerc support.
2239  --with-null             Enable NULL driver (only useful for development
2240                          purposes
2241  --with-exr            Include EXR support via OpenEXR library
2242  --with-heif            Include HEIF support via libheif library
2243
2244Some influential environment variables:
2245  CC          C compiler command
2246  CFLAGS      C compiler flags
2247  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2248              nonstandard directory <lib dir>
2249  LIBS        libraries to pass to the linker, e.g. -l<library>
2250  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2251              you have headers in a nonstandard directory <include dir>
2252  CXX         C++ compiler command
2253  CXXFLAGS    C++ compiler flags
2254  LT_SYS_LIBRARY_PATH
2255              User-defined run-time library search path.
2256  CPP         C preprocessor
2257  CXXCPP      C++ preprocessor
2258  PKG_CONFIG  path to pkg-config utility
2259  bashcompdir value of completionsdir for bash-completion, overriding
2260              pkg-config
2261  PQ_CFLAGS   C compiler flags for PQ, overriding pkg-config
2262  PQ_LIBS     linker flags for PQ, overriding pkg-config
2263  OGDI_CFLAGS C compiler flags for OGDI, overriding pkg-config
2264  OGDI_LIBS   linker flags for OGDI, overriding pkg-config
2265  MONGOCXXV3_CFLAGS
2266              C compiler flags for MONGOCXXV3, overriding pkg-config
2267  MONGOCXXV3_LIBS
2268              linker flags for MONGOCXXV3, overriding pkg-config
2269  HDF5_CFLAGS C compiler flags for HDF5, overriding pkg-config
2270  HDF5_LIBS   linker flags for HDF5, overriding pkg-config
2271  OPENJPEG_CFLAGS
2272              C compiler flags for OPENJPEG, overriding pkg-config
2273  OPENJPEG_LIBS
2274              linker flags for OPENJPEG, overriding pkg-config
2275  LIBKML_CFLAGS
2276              C compiler flags for LIBKML, overriding pkg-config
2277  LIBKML_LIBS linker flags for LIBKML, overriding pkg-config
2278  LIBDAP_CFLAGS
2279              C compiler flags for LIBDAP, overriding pkg-config
2280  LIBDAP_LIBS linker flags for LIBDAP, overriding pkg-config
2281  LIBXML2_CFLAGS
2282              C compiler flags for LIBXML2, overriding pkg-config
2283  LIBXML2_LIBS
2284              linker flags for LIBXML2, overriding pkg-config
2285  POPPLER_CFLAGS
2286              C compiler flags for POPPLER, overriding pkg-config
2287  POPPLER_LIBS
2288              linker flags for POPPLER, overriding pkg-config
2289  EXR_CFLAGS  C compiler flags for EXR, overriding pkg-config
2290  EXR_LIBS    linker flags for EXR, overriding pkg-config
2291  HEIF_CFLAGS C compiler flags for HEIF, overriding pkg-config
2292  HEIF_LIBS   linker flags for HEIF, overriding pkg-config
2293
2294Use these variables to override the choices made by `configure' or to help
2295it to find libraries and programs with nonstandard names/locations.
2296
2297Report bugs to the package provider.
2298_ACEOF
2299ac_status=$?
2300fi
2301
2302if test "$ac_init_help" = "recursive"; then
2303  # If there are subdirs, report their specific --help.
2304  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2305    test -d "$ac_dir" ||
2306      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2307      continue
2308    ac_builddir=.
2309
2310case "$ac_dir" in
2311.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2312*)
2313  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2314  # A ".." for each directory in $ac_dir_suffix.
2315  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2316  case $ac_top_builddir_sub in
2317  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2319  esac ;;
2320esac
2321ac_abs_top_builddir=$ac_pwd
2322ac_abs_builddir=$ac_pwd$ac_dir_suffix
2323# for backward compatibility:
2324ac_top_builddir=$ac_top_build_prefix
2325
2326case $srcdir in
2327  .)  # We are building in place.
2328    ac_srcdir=.
2329    ac_top_srcdir=$ac_top_builddir_sub
2330    ac_abs_top_srcdir=$ac_pwd ;;
2331  [\\/]* | ?:[\\/]* )  # Absolute name.
2332    ac_srcdir=$srcdir$ac_dir_suffix;
2333    ac_top_srcdir=$srcdir
2334    ac_abs_top_srcdir=$srcdir ;;
2335  *) # Relative name.
2336    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2337    ac_top_srcdir=$ac_top_build_prefix$srcdir
2338    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2339esac
2340ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2341
2342    cd "$ac_dir" || { ac_status=$?; continue; }
2343    # Check for guested configure.
2344    if test -f "$ac_srcdir/configure.gnu"; then
2345      echo &&
2346      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2347    elif test -f "$ac_srcdir/configure"; then
2348      echo &&
2349      $SHELL "$ac_srcdir/configure" --help=recursive
2350    else
2351      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2352    fi || ac_status=$?
2353    cd "$ac_pwd" || { ac_status=$?; break; }
2354  done
2355fi
2356
2357test -n "$ac_init_help" && exit $ac_status
2358if $ac_init_version; then
2359  cat <<\_ACEOF
2360configure
2361generated by GNU Autoconf 2.69
2362
2363Copyright (C) 2012 Free Software Foundation, Inc.
2364This configure script is free software; the Free Software Foundation
2365gives unlimited permission to copy, distribute and modify it.
2366_ACEOF
2367  exit
2368fi
2369
2370## ------------------------ ##
2371## Autoconf initialization. ##
2372## ------------------------ ##
2373
2374# ac_fn_c_try_compile LINENO
2375# --------------------------
2376# Try to compile conftest.$ac_ext, and return whether this succeeded.
2377ac_fn_c_try_compile ()
2378{
2379  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380  rm -f conftest.$ac_objext
2381  if { { ac_try="$ac_compile"
2382case "(($ac_try" in
2383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2384  *) ac_try_echo=$ac_try;;
2385esac
2386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2387$as_echo "$ac_try_echo"; } >&5
2388  (eval "$ac_compile") 2>conftest.err
2389  ac_status=$?
2390  if test -s conftest.err; then
2391    grep -v '^ *+' conftest.err >conftest.er1
2392    cat conftest.er1 >&5
2393    mv -f conftest.er1 conftest.err
2394  fi
2395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2396  test $ac_status = 0; } && {
2397	 test -z "$ac_c_werror_flag" ||
2398	 test ! -s conftest.err
2399       } && test -s conftest.$ac_objext; then :
2400  ac_retval=0
2401else
2402  $as_echo "$as_me: failed program was:" >&5
2403sed 's/^/| /' conftest.$ac_ext >&5
2404
2405	ac_retval=1
2406fi
2407  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408  as_fn_set_status $ac_retval
2409
2410} # ac_fn_c_try_compile
2411
2412# ac_fn_cxx_try_compile LINENO
2413# ----------------------------
2414# Try to compile conftest.$ac_ext, and return whether this succeeded.
2415ac_fn_cxx_try_compile ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  rm -f conftest.$ac_objext
2419  if { { ac_try="$ac_compile"
2420case "(($ac_try" in
2421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422  *) ac_try_echo=$ac_try;;
2423esac
2424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425$as_echo "$ac_try_echo"; } >&5
2426  (eval "$ac_compile") 2>conftest.err
2427  ac_status=$?
2428  if test -s conftest.err; then
2429    grep -v '^ *+' conftest.err >conftest.er1
2430    cat conftest.er1 >&5
2431    mv -f conftest.er1 conftest.err
2432  fi
2433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434  test $ac_status = 0; } && {
2435	 test -z "$ac_cxx_werror_flag" ||
2436	 test ! -s conftest.err
2437       } && test -s conftest.$ac_objext; then :
2438  ac_retval=0
2439else
2440  $as_echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443	ac_retval=1
2444fi
2445  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_cxx_try_compile
2449
2450# ac_fn_c_try_link LINENO
2451# -----------------------
2452# Try to link conftest.$ac_ext, and return whether this succeeded.
2453ac_fn_c_try_link ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  rm -f conftest.$ac_objext conftest$ac_exeext
2457  if { { ac_try="$ac_link"
2458case "(($ac_try" in
2459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460  *) ac_try_echo=$ac_try;;
2461esac
2462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463$as_echo "$ac_try_echo"; } >&5
2464  (eval "$ac_link") 2>conftest.err
2465  ac_status=$?
2466  if test -s conftest.err; then
2467    grep -v '^ *+' conftest.err >conftest.er1
2468    cat conftest.er1 >&5
2469    mv -f conftest.er1 conftest.err
2470  fi
2471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472  test $ac_status = 0; } && {
2473	 test -z "$ac_c_werror_flag" ||
2474	 test ! -s conftest.err
2475       } && test -s conftest$ac_exeext && {
2476	 test "$cross_compiling" = yes ||
2477	 test -x conftest$ac_exeext
2478       }; then :
2479  ac_retval=0
2480else
2481  $as_echo "$as_me: failed program was:" >&5
2482sed 's/^/| /' conftest.$ac_ext >&5
2483
2484	ac_retval=1
2485fi
2486  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2487  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2488  # interfere with the next link command; also delete a directory that is
2489  # left behind by Apple's compiler.  We do this before executing the actions.
2490  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2491  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2492  as_fn_set_status $ac_retval
2493
2494} # ac_fn_c_try_link
2495
2496# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2497# -------------------------------------------------------
2498# Tests whether HEADER exists and can be compiled using the include files in
2499# INCLUDES, setting the cache variable VAR accordingly.
2500ac_fn_c_check_header_compile ()
2501{
2502  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2504$as_echo_n "checking for $2... " >&6; }
2505if eval \${$3+:} false; then :
2506  $as_echo_n "(cached) " >&6
2507else
2508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509/* end confdefs.h.  */
2510$4
2511#include <$2>
2512_ACEOF
2513if ac_fn_c_try_compile "$LINENO"; then :
2514  eval "$3=yes"
2515else
2516  eval "$3=no"
2517fi
2518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2519fi
2520eval ac_res=\$$3
2521	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2522$as_echo "$ac_res" >&6; }
2523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524
2525} # ac_fn_c_check_header_compile
2526
2527# ac_fn_c_try_cpp LINENO
2528# ----------------------
2529# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2530ac_fn_c_try_cpp ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  if { { ac_try="$ac_cpp conftest.$ac_ext"
2534case "(($ac_try" in
2535  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536  *) ac_try_echo=$ac_try;;
2537esac
2538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539$as_echo "$ac_try_echo"; } >&5
2540  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2541  ac_status=$?
2542  if test -s conftest.err; then
2543    grep -v '^ *+' conftest.err >conftest.er1
2544    cat conftest.er1 >&5
2545    mv -f conftest.er1 conftest.err
2546  fi
2547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2548  test $ac_status = 0; } > conftest.i && {
2549	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2550	 test ! -s conftest.err
2551       }; then :
2552  ac_retval=0
2553else
2554  $as_echo "$as_me: failed program was:" >&5
2555sed 's/^/| /' conftest.$ac_ext >&5
2556
2557    ac_retval=1
2558fi
2559  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560  as_fn_set_status $ac_retval
2561
2562} # ac_fn_c_try_cpp
2563
2564# ac_fn_c_try_run LINENO
2565# ----------------------
2566# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2567# that executables *can* be run.
2568ac_fn_c_try_run ()
2569{
2570  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571  if { { ac_try="$ac_link"
2572case "(($ac_try" in
2573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574  *) ac_try_echo=$ac_try;;
2575esac
2576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2577$as_echo "$ac_try_echo"; } >&5
2578  (eval "$ac_link") 2>&5
2579  ac_status=$?
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2582  { { case "(($ac_try" in
2583  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2584  *) ac_try_echo=$ac_try;;
2585esac
2586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2587$as_echo "$ac_try_echo"; } >&5
2588  (eval "$ac_try") 2>&5
2589  ac_status=$?
2590  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2591  test $ac_status = 0; }; }; then :
2592  ac_retval=0
2593else
2594  $as_echo "$as_me: program exited with status $ac_status" >&5
2595       $as_echo "$as_me: failed program was:" >&5
2596sed 's/^/| /' conftest.$ac_ext >&5
2597
2598       ac_retval=$ac_status
2599fi
2600  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2601  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602  as_fn_set_status $ac_retval
2603
2604} # ac_fn_c_try_run
2605
2606# ac_fn_c_check_func LINENO FUNC VAR
2607# ----------------------------------
2608# Tests whether FUNC exists, setting the cache variable VAR accordingly
2609ac_fn_c_check_func ()
2610{
2611  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613$as_echo_n "checking for $2... " >&6; }
2614if eval \${$3+:} false; then :
2615  $as_echo_n "(cached) " >&6
2616else
2617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2620   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2621#define $2 innocuous_$2
2622
2623/* System header to define __stub macros and hopefully few prototypes,
2624    which can conflict with char $2 (); below.
2625    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2626    <limits.h> exists even on freestanding compilers.  */
2627
2628#ifdef __STDC__
2629# include <limits.h>
2630#else
2631# include <assert.h>
2632#endif
2633
2634#undef $2
2635
2636/* Override any GCC internal prototype to avoid an error.
2637   Use char because int might match the return type of a GCC
2638   builtin and then its argument prototype would still apply.  */
2639#ifdef __cplusplus
2640extern "C"
2641#endif
2642char $2 ();
2643/* The GNU C library defines this for functions which it implements
2644    to always fail with ENOSYS.  Some functions are actually named
2645    something starting with __ and the normal name is an alias.  */
2646#if defined __stub_$2 || defined __stub___$2
2647choke me
2648#endif
2649
2650int
2651main ()
2652{
2653return $2 ();
2654  ;
2655  return 0;
2656}
2657_ACEOF
2658if ac_fn_c_try_link "$LINENO"; then :
2659  eval "$3=yes"
2660else
2661  eval "$3=no"
2662fi
2663rm -f core conftest.err conftest.$ac_objext \
2664    conftest$ac_exeext conftest.$ac_ext
2665fi
2666eval ac_res=\$$3
2667	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2670
2671} # ac_fn_c_check_func
2672
2673# ac_fn_cxx_try_cpp LINENO
2674# ------------------------
2675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2676ac_fn_cxx_try_cpp ()
2677{
2678  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2679  if { { ac_try="$ac_cpp conftest.$ac_ext"
2680case "(($ac_try" in
2681  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2682  *) ac_try_echo=$ac_try;;
2683esac
2684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2685$as_echo "$ac_try_echo"; } >&5
2686  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2687  ac_status=$?
2688  if test -s conftest.err; then
2689    grep -v '^ *+' conftest.err >conftest.er1
2690    cat conftest.er1 >&5
2691    mv -f conftest.er1 conftest.err
2692  fi
2693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2694  test $ac_status = 0; } > conftest.i && {
2695	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2696	 test ! -s conftest.err
2697       }; then :
2698  ac_retval=0
2699else
2700  $as_echo "$as_me: failed program was:" >&5
2701sed 's/^/| /' conftest.$ac_ext >&5
2702
2703    ac_retval=1
2704fi
2705  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2706  as_fn_set_status $ac_retval
2707
2708} # ac_fn_cxx_try_cpp
2709
2710# ac_fn_cxx_try_link LINENO
2711# -------------------------
2712# Try to link conftest.$ac_ext, and return whether this succeeded.
2713ac_fn_cxx_try_link ()
2714{
2715  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2716  rm -f conftest.$ac_objext conftest$ac_exeext
2717  if { { ac_try="$ac_link"
2718case "(($ac_try" in
2719  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2720  *) ac_try_echo=$ac_try;;
2721esac
2722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2723$as_echo "$ac_try_echo"; } >&5
2724  (eval "$ac_link") 2>conftest.err
2725  ac_status=$?
2726  if test -s conftest.err; then
2727    grep -v '^ *+' conftest.err >conftest.er1
2728    cat conftest.er1 >&5
2729    mv -f conftest.er1 conftest.err
2730  fi
2731  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2732  test $ac_status = 0; } && {
2733	 test -z "$ac_cxx_werror_flag" ||
2734	 test ! -s conftest.err
2735       } && test -s conftest$ac_exeext && {
2736	 test "$cross_compiling" = yes ||
2737	 test -x conftest$ac_exeext
2738       }; then :
2739  ac_retval=0
2740else
2741  $as_echo "$as_me: failed program was:" >&5
2742sed 's/^/| /' conftest.$ac_ext >&5
2743
2744	ac_retval=1
2745fi
2746  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2747  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2748  # interfere with the next link command; also delete a directory that is
2749  # left behind by Apple's compiler.  We do this before executing the actions.
2750  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2751  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2752  as_fn_set_status $ac_retval
2753
2754} # ac_fn_cxx_try_link
2755
2756# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2757# -------------------------------------------------------
2758# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2759# the include files in INCLUDES and setting the cache variable VAR
2760# accordingly.
2761ac_fn_c_check_header_mongrel ()
2762{
2763  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2764  if eval \${$3+:} false; then :
2765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2766$as_echo_n "checking for $2... " >&6; }
2767if eval \${$3+:} false; then :
2768  $as_echo_n "(cached) " >&6
2769fi
2770eval ac_res=\$$3
2771	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2772$as_echo "$ac_res" >&6; }
2773else
2774  # Is the header compilable?
2775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2776$as_echo_n "checking $2 usability... " >&6; }
2777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2778/* end confdefs.h.  */
2779$4
2780#include <$2>
2781_ACEOF
2782if ac_fn_c_try_compile "$LINENO"; then :
2783  ac_header_compiler=yes
2784else
2785  ac_header_compiler=no
2786fi
2787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2789$as_echo "$ac_header_compiler" >&6; }
2790
2791# Is the header present?
2792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2793$as_echo_n "checking $2 presence... " >&6; }
2794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2795/* end confdefs.h.  */
2796#include <$2>
2797_ACEOF
2798if ac_fn_c_try_cpp "$LINENO"; then :
2799  ac_header_preproc=yes
2800else
2801  ac_header_preproc=no
2802fi
2803rm -f conftest.err conftest.i conftest.$ac_ext
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2805$as_echo "$ac_header_preproc" >&6; }
2806
2807# So?  What about this header?
2808case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2809  yes:no: )
2810    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2811$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2812    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2813$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2814    ;;
2815  no:yes:* )
2816    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2817$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2818    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2819$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2820    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2821$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2822    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2823$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2824    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2826    ;;
2827esac
2828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2829$as_echo_n "checking for $2... " >&6; }
2830if eval \${$3+:} false; then :
2831  $as_echo_n "(cached) " >&6
2832else
2833  eval "$3=\$ac_header_compiler"
2834fi
2835eval ac_res=\$$3
2836	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2837$as_echo "$ac_res" >&6; }
2838fi
2839  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2840
2841} # ac_fn_c_check_header_mongrel
2842
2843# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2844# -------------------------------------------
2845# Tests whether TYPE exists after having included INCLUDES, setting cache
2846# variable VAR accordingly.
2847ac_fn_c_check_type ()
2848{
2849  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2851$as_echo_n "checking for $2... " >&6; }
2852if eval \${$3+:} false; then :
2853  $as_echo_n "(cached) " >&6
2854else
2855  eval "$3=no"
2856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2857/* end confdefs.h.  */
2858$4
2859int
2860main ()
2861{
2862if (sizeof ($2))
2863	 return 0;
2864  ;
2865  return 0;
2866}
2867_ACEOF
2868if ac_fn_c_try_compile "$LINENO"; then :
2869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2870/* end confdefs.h.  */
2871$4
2872int
2873main ()
2874{
2875if (sizeof (($2)))
2876	    return 0;
2877  ;
2878  return 0;
2879}
2880_ACEOF
2881if ac_fn_c_try_compile "$LINENO"; then :
2882
2883else
2884  eval "$3=yes"
2885fi
2886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887fi
2888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2889fi
2890eval ac_res=\$$3
2891	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2892$as_echo "$ac_res" >&6; }
2893  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2894
2895} # ac_fn_c_check_type
2896
2897# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2898# --------------------------------------------
2899# Tries to find the compile-time value of EXPR in a program that includes
2900# INCLUDES, setting VAR accordingly. Returns whether the value could be
2901# computed
2902ac_fn_c_compute_int ()
2903{
2904  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2905  if test "$cross_compiling" = yes; then
2906    # Depending upon the size, compute the lo and hi bounds.
2907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908/* end confdefs.h.  */
2909$4
2910int
2911main ()
2912{
2913static int test_array [1 - 2 * !(($2) >= 0)];
2914test_array [0] = 0;
2915return test_array [0];
2916
2917  ;
2918  return 0;
2919}
2920_ACEOF
2921if ac_fn_c_try_compile "$LINENO"; then :
2922  ac_lo=0 ac_mid=0
2923  while :; do
2924    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2925/* end confdefs.h.  */
2926$4
2927int
2928main ()
2929{
2930static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2931test_array [0] = 0;
2932return test_array [0];
2933
2934  ;
2935  return 0;
2936}
2937_ACEOF
2938if ac_fn_c_try_compile "$LINENO"; then :
2939  ac_hi=$ac_mid; break
2940else
2941  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2942			if test $ac_lo -le $ac_mid; then
2943			  ac_lo= ac_hi=
2944			  break
2945			fi
2946			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2947fi
2948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2949  done
2950else
2951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2952/* end confdefs.h.  */
2953$4
2954int
2955main ()
2956{
2957static int test_array [1 - 2 * !(($2) < 0)];
2958test_array [0] = 0;
2959return test_array [0];
2960
2961  ;
2962  return 0;
2963}
2964_ACEOF
2965if ac_fn_c_try_compile "$LINENO"; then :
2966  ac_hi=-1 ac_mid=-1
2967  while :; do
2968    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2969/* end confdefs.h.  */
2970$4
2971int
2972main ()
2973{
2974static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2975test_array [0] = 0;
2976return test_array [0];
2977
2978  ;
2979  return 0;
2980}
2981_ACEOF
2982if ac_fn_c_try_compile "$LINENO"; then :
2983  ac_lo=$ac_mid; break
2984else
2985  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2986			if test $ac_mid -le $ac_hi; then
2987			  ac_lo= ac_hi=
2988			  break
2989			fi
2990			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2991fi
2992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2993  done
2994else
2995  ac_lo= ac_hi=
2996fi
2997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2998fi
2999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3000# Binary search between lo and hi bounds.
3001while test "x$ac_lo" != "x$ac_hi"; do
3002  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3004/* end confdefs.h.  */
3005$4
3006int
3007main ()
3008{
3009static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3010test_array [0] = 0;
3011return test_array [0];
3012
3013  ;
3014  return 0;
3015}
3016_ACEOF
3017if ac_fn_c_try_compile "$LINENO"; then :
3018  ac_hi=$ac_mid
3019else
3020  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3021fi
3022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3023done
3024case $ac_lo in #((
3025?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3026'') ac_retval=1 ;;
3027esac
3028  else
3029    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3030/* end confdefs.h.  */
3031$4
3032static long int longval () { return $2; }
3033static unsigned long int ulongval () { return $2; }
3034#include <stdio.h>
3035#include <stdlib.h>
3036int
3037main ()
3038{
3039
3040  FILE *f = fopen ("conftest.val", "w");
3041  if (! f)
3042    return 1;
3043  if (($2) < 0)
3044    {
3045      long int i = longval ();
3046      if (i != ($2))
3047	return 1;
3048      fprintf (f, "%ld", i);
3049    }
3050  else
3051    {
3052      unsigned long int i = ulongval ();
3053      if (i != ($2))
3054	return 1;
3055      fprintf (f, "%lu", i);
3056    }
3057  /* Do not output a trailing newline, as this causes \r\n confusion
3058     on some platforms.  */
3059  return ferror (f) || fclose (f) != 0;
3060
3061  ;
3062  return 0;
3063}
3064_ACEOF
3065if ac_fn_c_try_run "$LINENO"; then :
3066  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3067else
3068  ac_retval=1
3069fi
3070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3071  conftest.$ac_objext conftest.beam conftest.$ac_ext
3072rm -f conftest.val
3073
3074  fi
3075  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3076  as_fn_set_status $ac_retval
3077
3078} # ac_fn_c_compute_int
3079
3080# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3081# ---------------------------------------------
3082# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3083# accordingly.
3084ac_fn_c_check_decl ()
3085{
3086  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3087  as_decl_name=`echo $2|sed 's/ *(.*//'`
3088  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3090$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3091if eval \${$3+:} false; then :
3092  $as_echo_n "(cached) " >&6
3093else
3094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3095/* end confdefs.h.  */
3096$4
3097int
3098main ()
3099{
3100#ifndef $as_decl_name
3101#ifdef __cplusplus
3102  (void) $as_decl_use;
3103#else
3104  (void) $as_decl_name;
3105#endif
3106#endif
3107
3108  ;
3109  return 0;
3110}
3111_ACEOF
3112if ac_fn_c_try_compile "$LINENO"; then :
3113  eval "$3=yes"
3114else
3115  eval "$3=no"
3116fi
3117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3118fi
3119eval ac_res=\$$3
3120	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3121$as_echo "$ac_res" >&6; }
3122  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3123
3124} # ac_fn_c_check_decl
3125cat >config.log <<_ACEOF
3126This file contains any messages produced by compilers while
3127running configure, to aid debugging if configure makes a mistake.
3128
3129It was created by $as_me, which was
3130generated by GNU Autoconf 2.69.  Invocation command line was
3131
3132  $ $0 $@
3133
3134_ACEOF
3135exec 5>>config.log
3136{
3137cat <<_ASUNAME
3138## --------- ##
3139## Platform. ##
3140## --------- ##
3141
3142hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3143uname -m = `(uname -m) 2>/dev/null || echo unknown`
3144uname -r = `(uname -r) 2>/dev/null || echo unknown`
3145uname -s = `(uname -s) 2>/dev/null || echo unknown`
3146uname -v = `(uname -v) 2>/dev/null || echo unknown`
3147
3148/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3149/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3150
3151/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3152/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3153/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3154/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3155/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3156/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3157/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3158
3159_ASUNAME
3160
3161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3162for as_dir in $PATH
3163do
3164  IFS=$as_save_IFS
3165  test -z "$as_dir" && as_dir=.
3166    $as_echo "PATH: $as_dir"
3167  done
3168IFS=$as_save_IFS
3169
3170} >&5
3171
3172cat >&5 <<_ACEOF
3173
3174
3175## ----------- ##
3176## Core tests. ##
3177## ----------- ##
3178
3179_ACEOF
3180
3181
3182# Keep a trace of the command line.
3183# Strip out --no-create and --no-recursion so they do not pile up.
3184# Strip out --silent because we don't want to record it for future runs.
3185# Also quote any args containing shell meta-characters.
3186# Make two passes to allow for proper duplicate-argument suppression.
3187ac_configure_args=
3188ac_configure_args0=
3189ac_configure_args1=
3190ac_must_keep_next=false
3191for ac_pass in 1 2
3192do
3193  for ac_arg
3194  do
3195    case $ac_arg in
3196    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3197    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3198    | -silent | --silent | --silen | --sile | --sil)
3199      continue ;;
3200    *\'*)
3201      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3202    esac
3203    case $ac_pass in
3204    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3205    2)
3206      as_fn_append ac_configure_args1 " '$ac_arg'"
3207      if test $ac_must_keep_next = true; then
3208	ac_must_keep_next=false # Got value, back to normal.
3209      else
3210	case $ac_arg in
3211	  *=* | --config-cache | -C | -disable-* | --disable-* \
3212	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3213	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3214	  | -with-* | --with-* | -without-* | --without-* | --x)
3215	    case "$ac_configure_args0 " in
3216	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3217	    esac
3218	    ;;
3219	  -* ) ac_must_keep_next=true ;;
3220	esac
3221      fi
3222      as_fn_append ac_configure_args " '$ac_arg'"
3223      ;;
3224    esac
3225  done
3226done
3227{ ac_configure_args0=; unset ac_configure_args0;}
3228{ ac_configure_args1=; unset ac_configure_args1;}
3229
3230# When interrupted or exit'd, cleanup temporary files, and complete
3231# config.log.  We remove comments because anyway the quotes in there
3232# would cause problems or look ugly.
3233# WARNING: Use '\'' to represent an apostrophe within the trap.
3234# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3235trap 'exit_status=$?
3236  # Save into config.log some information that might help in debugging.
3237  {
3238    echo
3239
3240    $as_echo "## ---------------- ##
3241## Cache variables. ##
3242## ---------------- ##"
3243    echo
3244    # The following way of writing the cache mishandles newlines in values,
3245(
3246  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3247    eval ac_val=\$$ac_var
3248    case $ac_val in #(
3249    *${as_nl}*)
3250      case $ac_var in #(
3251      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3252$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3253      esac
3254      case $ac_var in #(
3255      _ | IFS | as_nl) ;; #(
3256      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3257      *) { eval $ac_var=; unset $ac_var;} ;;
3258      esac ;;
3259    esac
3260  done
3261  (set) 2>&1 |
3262    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3263    *${as_nl}ac_space=\ *)
3264      sed -n \
3265	"s/'\''/'\''\\\\'\'''\''/g;
3266	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3267      ;; #(
3268    *)
3269      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3270      ;;
3271    esac |
3272    sort
3273)
3274    echo
3275
3276    $as_echo "## ----------------- ##
3277## Output variables. ##
3278## ----------------- ##"
3279    echo
3280    for ac_var in $ac_subst_vars
3281    do
3282      eval ac_val=\$$ac_var
3283      case $ac_val in
3284      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3285      esac
3286      $as_echo "$ac_var='\''$ac_val'\''"
3287    done | sort
3288    echo
3289
3290    if test -n "$ac_subst_files"; then
3291      $as_echo "## ------------------- ##
3292## File substitutions. ##
3293## ------------------- ##"
3294      echo
3295      for ac_var in $ac_subst_files
3296      do
3297	eval ac_val=\$$ac_var
3298	case $ac_val in
3299	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3300	esac
3301	$as_echo "$ac_var='\''$ac_val'\''"
3302      done | sort
3303      echo
3304    fi
3305
3306    if test -s confdefs.h; then
3307      $as_echo "## ----------- ##
3308## confdefs.h. ##
3309## ----------- ##"
3310      echo
3311      cat confdefs.h
3312      echo
3313    fi
3314    test "$ac_signal" != 0 &&
3315      $as_echo "$as_me: caught signal $ac_signal"
3316    $as_echo "$as_me: exit $exit_status"
3317  } >&5
3318  rm -f core *.core core.conftest.* &&
3319    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3320    exit $exit_status
3321' 0
3322for ac_signal in 1 2 13 15; do
3323  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3324done
3325ac_signal=0
3326
3327# confdefs.h avoids OS command line length limits that DEFS can exceed.
3328rm -f -r conftest* confdefs.h
3329
3330$as_echo "/* confdefs.h */" > confdefs.h
3331
3332# Predefined preprocessor variables.
3333
3334cat >>confdefs.h <<_ACEOF
3335#define PACKAGE_NAME "$PACKAGE_NAME"
3336_ACEOF
3337
3338cat >>confdefs.h <<_ACEOF
3339#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3340_ACEOF
3341
3342cat >>confdefs.h <<_ACEOF
3343#define PACKAGE_VERSION "$PACKAGE_VERSION"
3344_ACEOF
3345
3346cat >>confdefs.h <<_ACEOF
3347#define PACKAGE_STRING "$PACKAGE_STRING"
3348_ACEOF
3349
3350cat >>confdefs.h <<_ACEOF
3351#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3352_ACEOF
3353
3354cat >>confdefs.h <<_ACEOF
3355#define PACKAGE_URL "$PACKAGE_URL"
3356_ACEOF
3357
3358
3359# Let the site file select an alternate cache file if it wants to.
3360# Prefer an explicitly selected file to automatically selected ones.
3361ac_site_file1=NONE
3362ac_site_file2=NONE
3363if test -n "$CONFIG_SITE"; then
3364  # We do not want a PATH search for config.site.
3365  case $CONFIG_SITE in #((
3366    -*)  ac_site_file1=./$CONFIG_SITE;;
3367    */*) ac_site_file1=$CONFIG_SITE;;
3368    *)   ac_site_file1=./$CONFIG_SITE;;
3369  esac
3370elif test "x$prefix" != xNONE; then
3371  ac_site_file1=$prefix/share/config.site
3372  ac_site_file2=$prefix/etc/config.site
3373else
3374  ac_site_file1=$ac_default_prefix/share/config.site
3375  ac_site_file2=$ac_default_prefix/etc/config.site
3376fi
3377for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3378do
3379  test "x$ac_site_file" = xNONE && continue
3380  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3381    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3382$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3383    sed 's/^/| /' "$ac_site_file" >&5
3384    . "$ac_site_file" \
3385      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3387as_fn_error $? "failed to load site script $ac_site_file
3388See \`config.log' for more details" "$LINENO" 5; }
3389  fi
3390done
3391
3392
3393# Check that the precious variables saved in the cache have kept the same
3394# value.
3395ac_cache_corrupted=false
3396for ac_var in $ac_precious_vars; do
3397  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3398  eval ac_new_set=\$ac_env_${ac_var}_set
3399  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3400  eval ac_new_val=\$ac_env_${ac_var}_value
3401  case $ac_old_set,$ac_new_set in
3402    set,)
3403      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3404$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3405      ac_cache_corrupted=: ;;
3406    ,set)
3407      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3408$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3409      ac_cache_corrupted=: ;;
3410    ,);;
3411    *)
3412      if test "x$ac_old_val" != "x$ac_new_val"; then
3413	# differences in whitespace do not lead to failure.
3414	ac_old_val_w=`echo x $ac_old_val`
3415	ac_new_val_w=`echo x $ac_new_val`
3416	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3417	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3418$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3419	  ac_cache_corrupted=:
3420	else
3421	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3422$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3423	  eval $ac_var=\$ac_old_val
3424	fi
3425	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3426$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3427	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3428$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3429      fi;;
3430  esac
3431  # Pass precious variables to config.status.
3432  if test "$ac_new_set" = set; then
3433    case $ac_new_val in
3434    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3435    *) ac_arg=$ac_var=$ac_new_val ;;
3436    esac
3437    case " $ac_configure_args " in
3438      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3439      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3440    esac
3441  fi
3442done
3443if $ac_cache_corrupted; then
3444  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3446  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3447$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3448  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3449fi
3450## -------------------- ##
3451## Main body of script. ##
3452## -------------------- ##
3453
3454ac_ext=c
3455ac_cpp='$CPP $CPPFLAGS'
3456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3458ac_compiler_gnu=$ac_cv_c_compiler_gnu
3459
3460
3461PACKAGE=gdal
3462
3463
3464ac_config_headers="$ac_config_headers port/cpl_config.h:port/cpl_config.h.in"
3465
3466
3467
3468
3469
3470ac_aux_dir=
3471for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3472  if test -f "$ac_dir/install-sh"; then
3473    ac_aux_dir=$ac_dir
3474    ac_install_sh="$ac_aux_dir/install-sh -c"
3475    break
3476  elif test -f "$ac_dir/install.sh"; then
3477    ac_aux_dir=$ac_dir
3478    ac_install_sh="$ac_aux_dir/install.sh -c"
3479    break
3480  elif test -f "$ac_dir/shtool"; then
3481    ac_aux_dir=$ac_dir
3482    ac_install_sh="$ac_aux_dir/shtool install -c"
3483    break
3484  fi
3485done
3486if test -z "$ac_aux_dir"; then
3487  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3488fi
3489
3490# These three variables are undocumented and unsupported,
3491# and are intended to be withdrawn in a future Autoconf release.
3492# They can cause serious problems if a builder's source tree is in a directory
3493# whose full name contains unusual characters.
3494ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3495ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3496ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3497
3498
3499# Make sure we can run config.sub.
3500$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3501  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3502
3503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3504$as_echo_n "checking build system type... " >&6; }
3505if ${ac_cv_build+:} false; then :
3506  $as_echo_n "(cached) " >&6
3507else
3508  ac_build_alias=$build_alias
3509test "x$ac_build_alias" = x &&
3510  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3511test "x$ac_build_alias" = x &&
3512  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3513ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3514  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3515
3516fi
3517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3518$as_echo "$ac_cv_build" >&6; }
3519case $ac_cv_build in
3520*-*-*) ;;
3521*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3522esac
3523build=$ac_cv_build
3524ac_save_IFS=$IFS; IFS='-'
3525set x $ac_cv_build
3526shift
3527build_cpu=$1
3528build_vendor=$2
3529shift; shift
3530# Remember, the first character of IFS is used to create $*,
3531# except with old shells:
3532build_os=$*
3533IFS=$ac_save_IFS
3534case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3535
3536
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3538$as_echo_n "checking host system type... " >&6; }
3539if ${ac_cv_host+:} false; then :
3540  $as_echo_n "(cached) " >&6
3541else
3542  if test "x$host_alias" = x; then
3543  ac_cv_host=$ac_cv_build
3544else
3545  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3546    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3547fi
3548
3549fi
3550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3551$as_echo "$ac_cv_host" >&6; }
3552case $ac_cv_host in
3553*-*-*) ;;
3554*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3555esac
3556host=$ac_cv_host
3557ac_save_IFS=$IFS; IFS='-'
3558set x $ac_cv_host
3559shift
3560host_cpu=$1
3561host_vendor=$2
3562shift; shift
3563# Remember, the first character of IFS is used to create $*,
3564# except with old shells:
3565host_os=$*
3566IFS=$ac_save_IFS
3567case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3568
3569
3570
3571ac_ext=c
3572ac_cpp='$CPP $CPPFLAGS'
3573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3575ac_compiler_gnu=$ac_cv_c_compiler_gnu
3576if test -n "$ac_tool_prefix"; then
3577  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3578set dummy ${ac_tool_prefix}gcc; ac_word=$2
3579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
3581if ${ac_cv_prog_CC+:} false; then :
3582  $as_echo_n "(cached) " >&6
3583else
3584  if test -n "$CC"; then
3585  ac_cv_prog_CC="$CC" # Let the user override the test.
3586else
3587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588for as_dir in $PATH
3589do
3590  IFS=$as_save_IFS
3591  test -z "$as_dir" && as_dir=.
3592    for ac_exec_ext in '' $ac_executable_extensions; do
3593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3594    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3596    break 2
3597  fi
3598done
3599  done
3600IFS=$as_save_IFS
3601
3602fi
3603fi
3604CC=$ac_cv_prog_CC
3605if test -n "$CC"; then
3606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3607$as_echo "$CC" >&6; }
3608else
3609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3610$as_echo "no" >&6; }
3611fi
3612
3613
3614fi
3615if test -z "$ac_cv_prog_CC"; then
3616  ac_ct_CC=$CC
3617  # Extract the first word of "gcc", so it can be a program name with args.
3618set dummy gcc; ac_word=$2
3619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3620$as_echo_n "checking for $ac_word... " >&6; }
3621if ${ac_cv_prog_ac_ct_CC+:} false; then :
3622  $as_echo_n "(cached) " >&6
3623else
3624  if test -n "$ac_ct_CC"; then
3625  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3626else
3627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628for as_dir in $PATH
3629do
3630  IFS=$as_save_IFS
3631  test -z "$as_dir" && as_dir=.
3632    for ac_exec_ext in '' $ac_executable_extensions; do
3633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3634    ac_cv_prog_ac_ct_CC="gcc"
3635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3636    break 2
3637  fi
3638done
3639  done
3640IFS=$as_save_IFS
3641
3642fi
3643fi
3644ac_ct_CC=$ac_cv_prog_ac_ct_CC
3645if test -n "$ac_ct_CC"; then
3646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3647$as_echo "$ac_ct_CC" >&6; }
3648else
3649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
3651fi
3652
3653  if test "x$ac_ct_CC" = x; then
3654    CC=""
3655  else
3656    case $cross_compiling:$ac_tool_warned in
3657yes:)
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3660ac_tool_warned=yes ;;
3661esac
3662    CC=$ac_ct_CC
3663  fi
3664else
3665  CC="$ac_cv_prog_CC"
3666fi
3667
3668if test -z "$CC"; then
3669          if test -n "$ac_tool_prefix"; then
3670    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3671set dummy ${ac_tool_prefix}cc; ac_word=$2
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
3674if ${ac_cv_prog_CC+:} false; then :
3675  $as_echo_n "(cached) " >&6
3676else
3677  if test -n "$CC"; then
3678  ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
3680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683  IFS=$as_save_IFS
3684  test -z "$as_dir" && as_dir=.
3685    for ac_exec_ext in '' $ac_executable_extensions; do
3686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3687    ac_cv_prog_CC="${ac_tool_prefix}cc"
3688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3689    break 2
3690  fi
3691done
3692  done
3693IFS=$as_save_IFS
3694
3695fi
3696fi
3697CC=$ac_cv_prog_CC
3698if test -n "$CC"; then
3699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3700$as_echo "$CC" >&6; }
3701else
3702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
3704fi
3705
3706
3707  fi
3708fi
3709if test -z "$CC"; then
3710  # Extract the first word of "cc", so it can be a program name with args.
3711set dummy cc; ac_word=$2
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
3714if ${ac_cv_prog_CC+:} false; then :
3715  $as_echo_n "(cached) " >&6
3716else
3717  if test -n "$CC"; then
3718  ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
3720  ac_prog_rejected=no
3721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724  IFS=$as_save_IFS
3725  test -z "$as_dir" && as_dir=.
3726    for ac_exec_ext in '' $ac_executable_extensions; do
3727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3728    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3729       ac_prog_rejected=yes
3730       continue
3731     fi
3732    ac_cv_prog_CC="cc"
3733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3734    break 2
3735  fi
3736done
3737  done
3738IFS=$as_save_IFS
3739
3740if test $ac_prog_rejected = yes; then
3741  # We found a bogon in the path, so make sure we never use it.
3742  set dummy $ac_cv_prog_CC
3743  shift
3744  if test $# != 0; then
3745    # We chose a different compiler from the bogus one.
3746    # However, it has the same basename, so the bogon will be chosen
3747    # first if we set CC to just the basename; use the full file name.
3748    shift
3749    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3750  fi
3751fi
3752fi
3753fi
3754CC=$ac_cv_prog_CC
3755if test -n "$CC"; then
3756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
3758else
3759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
3761fi
3762
3763
3764fi
3765if test -z "$CC"; then
3766  if test -n "$ac_tool_prefix"; then
3767  for ac_prog in cl.exe
3768  do
3769    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
3773if ${ac_cv_prog_CC+:} false; then :
3774  $as_echo_n "(cached) " >&6
3775else
3776  if test -n "$CC"; then
3777  ac_cv_prog_CC="$CC" # Let the user override the test.
3778else
3779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782  IFS=$as_save_IFS
3783  test -z "$as_dir" && as_dir=.
3784    for ac_exec_ext in '' $ac_executable_extensions; do
3785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3786    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3788    break 2
3789  fi
3790done
3791  done
3792IFS=$as_save_IFS
3793
3794fi
3795fi
3796CC=$ac_cv_prog_CC
3797if test -n "$CC"; then
3798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
3800else
3801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
3803fi
3804
3805
3806    test -n "$CC" && break
3807  done
3808fi
3809if test -z "$CC"; then
3810  ac_ct_CC=$CC
3811  for ac_prog in cl.exe
3812do
3813  # Extract the first word of "$ac_prog", so it can be a program name with args.
3814set dummy $ac_prog; ac_word=$2
3815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3816$as_echo_n "checking for $ac_word... " >&6; }
3817if ${ac_cv_prog_ac_ct_CC+:} false; then :
3818  $as_echo_n "(cached) " >&6
3819else
3820  if test -n "$ac_ct_CC"; then
3821  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3822else
3823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824for as_dir in $PATH
3825do
3826  IFS=$as_save_IFS
3827  test -z "$as_dir" && as_dir=.
3828    for ac_exec_ext in '' $ac_executable_extensions; do
3829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3830    ac_cv_prog_ac_ct_CC="$ac_prog"
3831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3832    break 2
3833  fi
3834done
3835  done
3836IFS=$as_save_IFS
3837
3838fi
3839fi
3840ac_ct_CC=$ac_cv_prog_ac_ct_CC
3841if test -n "$ac_ct_CC"; then
3842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3843$as_echo "$ac_ct_CC" >&6; }
3844else
3845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846$as_echo "no" >&6; }
3847fi
3848
3849
3850  test -n "$ac_ct_CC" && break
3851done
3852
3853  if test "x$ac_ct_CC" = x; then
3854    CC=""
3855  else
3856    case $cross_compiling:$ac_tool_warned in
3857yes:)
3858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3860ac_tool_warned=yes ;;
3861esac
3862    CC=$ac_ct_CC
3863  fi
3864fi
3865
3866fi
3867
3868
3869test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3871as_fn_error $? "no acceptable C compiler found in \$PATH
3872See \`config.log' for more details" "$LINENO" 5; }
3873
3874# Provide some information about the compiler.
3875$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3876set X $ac_compile
3877ac_compiler=$2
3878for ac_option in --version -v -V -qversion; do
3879  { { ac_try="$ac_compiler $ac_option >&5"
3880case "(($ac_try" in
3881  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3882  *) ac_try_echo=$ac_try;;
3883esac
3884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3885$as_echo "$ac_try_echo"; } >&5
3886  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3887  ac_status=$?
3888  if test -s conftest.err; then
3889    sed '10a\
3890... rest of stderr output deleted ...
3891         10q' conftest.err >conftest.er1
3892    cat conftest.er1 >&5
3893  fi
3894  rm -f conftest.er1 conftest.err
3895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896  test $ac_status = 0; }
3897done
3898
3899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3900/* end confdefs.h.  */
3901
3902int
3903main ()
3904{
3905
3906  ;
3907  return 0;
3908}
3909_ACEOF
3910ac_clean_files_save=$ac_clean_files
3911ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3912# Try to create an executable without -o first, disregard a.out.
3913# It will help us diagnose broken compilers, and finding out an intuition
3914# of exeext.
3915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3916$as_echo_n "checking whether the C compiler works... " >&6; }
3917ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3918
3919# The possible output files:
3920ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3921
3922ac_rmfiles=
3923for ac_file in $ac_files
3924do
3925  case $ac_file in
3926    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3927    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3928  esac
3929done
3930rm -f $ac_rmfiles
3931
3932if { { ac_try="$ac_link_default"
3933case "(($ac_try" in
3934  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935  *) ac_try_echo=$ac_try;;
3936esac
3937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938$as_echo "$ac_try_echo"; } >&5
3939  (eval "$ac_link_default") 2>&5
3940  ac_status=$?
3941  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942  test $ac_status = 0; }; then :
3943  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3944# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3945# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3946# so that the user can short-circuit this test for compilers unknown to
3947# Autoconf.
3948for ac_file in $ac_files ''
3949do
3950  test -f "$ac_file" || continue
3951  case $ac_file in
3952    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3953	;;
3954    [ab].out )
3955	# We found the default executable, but exeext='' is most
3956	# certainly right.
3957	break;;
3958    *.* )
3959	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3960	then :; else
3961	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3962	fi
3963	# We set ac_cv_exeext here because the later test for it is not
3964	# safe: cross compilers may not add the suffix if given an `-o'
3965	# argument, so we may need to know it at that point already.
3966	# Even if this section looks crufty: it has the advantage of
3967	# actually working.
3968	break;;
3969    * )
3970	break;;
3971  esac
3972done
3973test "$ac_cv_exeext" = no && ac_cv_exeext=
3974
3975else
3976  ac_file=''
3977fi
3978if test -z "$ac_file"; then :
3979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3980$as_echo "no" >&6; }
3981$as_echo "$as_me: failed program was:" >&5
3982sed 's/^/| /' conftest.$ac_ext >&5
3983
3984{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3986as_fn_error 77 "C compiler cannot create executables
3987See \`config.log' for more details" "$LINENO" 5; }
3988else
3989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3990$as_echo "yes" >&6; }
3991fi
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3993$as_echo_n "checking for C compiler default output file name... " >&6; }
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3995$as_echo "$ac_file" >&6; }
3996ac_exeext=$ac_cv_exeext
3997
3998rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3999ac_clean_files=$ac_clean_files_save
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4001$as_echo_n "checking for suffix of executables... " >&6; }
4002if { { ac_try="$ac_link"
4003case "(($ac_try" in
4004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005  *) ac_try_echo=$ac_try;;
4006esac
4007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008$as_echo "$ac_try_echo"; } >&5
4009  (eval "$ac_link") 2>&5
4010  ac_status=$?
4011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012  test $ac_status = 0; }; then :
4013  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4014# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4015# work properly (i.e., refer to `conftest.exe'), while it won't with
4016# `rm'.
4017for ac_file in conftest.exe conftest conftest.*; do
4018  test -f "$ac_file" || continue
4019  case $ac_file in
4020    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4021    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4022	  break;;
4023    * ) break;;
4024  esac
4025done
4026else
4027  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4029as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4030See \`config.log' for more details" "$LINENO" 5; }
4031fi
4032rm -f conftest conftest$ac_cv_exeext
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4034$as_echo "$ac_cv_exeext" >&6; }
4035
4036rm -f conftest.$ac_ext
4037EXEEXT=$ac_cv_exeext
4038ac_exeext=$EXEEXT
4039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4040/* end confdefs.h.  */
4041#include <stdio.h>
4042int
4043main ()
4044{
4045FILE *f = fopen ("conftest.out", "w");
4046 return ferror (f) || fclose (f) != 0;
4047
4048  ;
4049  return 0;
4050}
4051_ACEOF
4052ac_clean_files="$ac_clean_files conftest.out"
4053# Check that the compiler produces executables we can run.  If not, either
4054# the compiler is broken, or we cross compile.
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4056$as_echo_n "checking whether we are cross compiling... " >&6; }
4057if test "$cross_compiling" != yes; then
4058  { { ac_try="$ac_link"
4059case "(($ac_try" in
4060  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4061  *) ac_try_echo=$ac_try;;
4062esac
4063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4064$as_echo "$ac_try_echo"; } >&5
4065  (eval "$ac_link") 2>&5
4066  ac_status=$?
4067  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4068  test $ac_status = 0; }
4069  if { ac_try='./conftest$ac_cv_exeext'
4070  { { case "(($ac_try" in
4071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072  *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076  (eval "$ac_try") 2>&5
4077  ac_status=$?
4078  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079  test $ac_status = 0; }; }; then
4080    cross_compiling=no
4081  else
4082    if test "$cross_compiling" = maybe; then
4083	cross_compiling=yes
4084    else
4085	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4087as_fn_error $? "cannot run C compiled programs.
4088If you meant to cross compile, use \`--host'.
4089See \`config.log' for more details" "$LINENO" 5; }
4090    fi
4091  fi
4092fi
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4094$as_echo "$cross_compiling" >&6; }
4095
4096rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4097ac_clean_files=$ac_clean_files_save
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4099$as_echo_n "checking for suffix of object files... " >&6; }
4100if ${ac_cv_objext+:} false; then :
4101  $as_echo_n "(cached) " >&6
4102else
4103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4104/* end confdefs.h.  */
4105
4106int
4107main ()
4108{
4109
4110  ;
4111  return 0;
4112}
4113_ACEOF
4114rm -f conftest.o conftest.obj
4115if { { ac_try="$ac_compile"
4116case "(($ac_try" in
4117  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118  *) ac_try_echo=$ac_try;;
4119esac
4120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
4122  (eval "$ac_compile") 2>&5
4123  ac_status=$?
4124  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125  test $ac_status = 0; }; then :
4126  for ac_file in conftest.o conftest.obj conftest.*; do
4127  test -f "$ac_file" || continue;
4128  case $ac_file in
4129    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4130    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4131       break;;
4132  esac
4133done
4134else
4135  $as_echo "$as_me: failed program was:" >&5
4136sed 's/^/| /' conftest.$ac_ext >&5
4137
4138{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4140as_fn_error $? "cannot compute suffix of object files: cannot compile
4141See \`config.log' for more details" "$LINENO" 5; }
4142fi
4143rm -f conftest.$ac_cv_objext conftest.$ac_ext
4144fi
4145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4146$as_echo "$ac_cv_objext" >&6; }
4147OBJEXT=$ac_cv_objext
4148ac_objext=$OBJEXT
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4150$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4151if ${ac_cv_c_compiler_gnu+:} false; then :
4152  $as_echo_n "(cached) " >&6
4153else
4154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4155/* end confdefs.h.  */
4156
4157int
4158main ()
4159{
4160#ifndef __GNUC__
4161       choke me
4162#endif
4163
4164  ;
4165  return 0;
4166}
4167_ACEOF
4168if ac_fn_c_try_compile "$LINENO"; then :
4169  ac_compiler_gnu=yes
4170else
4171  ac_compiler_gnu=no
4172fi
4173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4174ac_cv_c_compiler_gnu=$ac_compiler_gnu
4175
4176fi
4177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4178$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4179if test $ac_compiler_gnu = yes; then
4180  GCC=yes
4181else
4182  GCC=
4183fi
4184ac_test_CFLAGS=${CFLAGS+set}
4185ac_save_CFLAGS=$CFLAGS
4186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4187$as_echo_n "checking whether $CC accepts -g... " >&6; }
4188if ${ac_cv_prog_cc_g+:} false; then :
4189  $as_echo_n "(cached) " >&6
4190else
4191  ac_save_c_werror_flag=$ac_c_werror_flag
4192   ac_c_werror_flag=yes
4193   ac_cv_prog_cc_g=no
4194   CFLAGS="-g"
4195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4196/* end confdefs.h.  */
4197
4198int
4199main ()
4200{
4201
4202  ;
4203  return 0;
4204}
4205_ACEOF
4206if ac_fn_c_try_compile "$LINENO"; then :
4207  ac_cv_prog_cc_g=yes
4208else
4209  CFLAGS=""
4210      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4211/* end confdefs.h.  */
4212
4213int
4214main ()
4215{
4216
4217  ;
4218  return 0;
4219}
4220_ACEOF
4221if ac_fn_c_try_compile "$LINENO"; then :
4222
4223else
4224  ac_c_werror_flag=$ac_save_c_werror_flag
4225	 CFLAGS="-g"
4226	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h.  */
4228
4229int
4230main ()
4231{
4232
4233  ;
4234  return 0;
4235}
4236_ACEOF
4237if ac_fn_c_try_compile "$LINENO"; then :
4238  ac_cv_prog_cc_g=yes
4239fi
4240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241fi
4242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243fi
4244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245   ac_c_werror_flag=$ac_save_c_werror_flag
4246fi
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4248$as_echo "$ac_cv_prog_cc_g" >&6; }
4249if test "$ac_test_CFLAGS" = set; then
4250  CFLAGS=$ac_save_CFLAGS
4251elif test $ac_cv_prog_cc_g = yes; then
4252  if test "$GCC" = yes; then
4253    CFLAGS="-g -O2"
4254  else
4255    CFLAGS="-g"
4256  fi
4257else
4258  if test "$GCC" = yes; then
4259    CFLAGS="-O2"
4260  else
4261    CFLAGS=
4262  fi
4263fi
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4265$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4266if ${ac_cv_prog_cc_c89+:} false; then :
4267  $as_echo_n "(cached) " >&6
4268else
4269  ac_cv_prog_cc_c89=no
4270ac_save_CC=$CC
4271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4272/* end confdefs.h.  */
4273#include <stdarg.h>
4274#include <stdio.h>
4275struct stat;
4276/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4277struct buf { int x; };
4278FILE * (*rcsopen) (struct buf *, struct stat *, int);
4279static char *e (p, i)
4280     char **p;
4281     int i;
4282{
4283  return p[i];
4284}
4285static char *f (char * (*g) (char **, int), char **p, ...)
4286{
4287  char *s;
4288  va_list v;
4289  va_start (v,p);
4290  s = g (p, va_arg (v,int));
4291  va_end (v);
4292  return s;
4293}
4294
4295/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4296   function prototypes and stuff, but not '\xHH' hex character constants.
4297   These don't provoke an error unfortunately, instead are silently treated
4298   as 'x'.  The following induces an error, until -std is added to get
4299   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4300   array size at least.  It's necessary to write '\x00'==0 to get something
4301   that's true only with -std.  */
4302int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4303
4304/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4305   inside strings and character constants.  */
4306#define FOO(x) 'x'
4307int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4308
4309int test (int i, double x);
4310struct s1 {int (*f) (int a);};
4311struct s2 {int (*f) (double a);};
4312int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4313int argc;
4314char **argv;
4315int
4316main ()
4317{
4318return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4319  ;
4320  return 0;
4321}
4322_ACEOF
4323for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4324	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4325do
4326  CC="$ac_save_CC $ac_arg"
4327  if ac_fn_c_try_compile "$LINENO"; then :
4328  ac_cv_prog_cc_c89=$ac_arg
4329fi
4330rm -f core conftest.err conftest.$ac_objext
4331  test "x$ac_cv_prog_cc_c89" != "xno" && break
4332done
4333rm -f conftest.$ac_ext
4334CC=$ac_save_CC
4335
4336fi
4337# AC_CACHE_VAL
4338case "x$ac_cv_prog_cc_c89" in
4339  x)
4340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; } ;;
4342  xno)
4343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4344$as_echo "unsupported" >&6; } ;;
4345  *)
4346    CC="$CC $ac_cv_prog_cc_c89"
4347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4348$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4349esac
4350if test "x$ac_cv_prog_cc_c89" != xno; then :
4351
4352fi
4353
4354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
4359
4360
4361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking C_WFLAGS for maximum warnings" >&5
4362$as_echo_n "checking C_WFLAGS for maximum warnings... " >&6; }
4363if ${ac_cv_cflags_warn_all+:} false; then :
4364  $as_echo_n "(cached) " >&6
4365else
4366  ac_cv_cflags_warn_all="no, unknown"
4367
4368 ac_ext=c
4369ac_cpp='$CPP $CPPFLAGS'
4370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4372ac_compiler_gnu=$ac_cv_c_compiler_gnu
4373
4374 ac_save_CFLAGS="$CFLAGS"
4375for ac_arg in "-pedantic -Wdeclaration-after-statement %        -Wall -Wdeclaration-after-statement"    "-pedantic  % -Wall"          "-xstrconst % -v"             "-std1      % -verbose -w0 -warnprotos"    "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"    "-ansi -ansiE % -fullwarn"    "+ESlit     % +w1"            "-Xc        % -pvctl,fullmsg"    "-h conform % -h msglevel 2"    #
4376do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
4377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4378/* end confdefs.h.  */
4379
4380int
4381main ()
4382{
4383return 0;
4384  ;
4385  return 0;
4386}
4387_ACEOF
4388if ac_fn_c_try_compile "$LINENO"; then :
4389  ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
4390fi
4391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4392done
4393 CFLAGS="$ac_save_CFLAGS"
4394 ac_ext=c
4395ac_cpp='$CPP $CPPFLAGS'
4396ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4397ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4398ac_compiler_gnu=$ac_cv_c_compiler_gnu
4399
4400
4401fi
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
4403$as_echo "$ac_cv_cflags_warn_all" >&6; }
4404case ".$ac_cv_cflags_warn_all" in
4405     .ok|.ok,*)  ;;
4406   .|.no|.no,*)
4407 ;;
4408   *)
4409   if echo " $C_WFLAGS " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null
4410   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : C_WFLAGS does contain \$ac_cv_cflags_warn_all"; } >&5
4411  (: C_WFLAGS does contain $ac_cv_cflags_warn_all) 2>&5
4412  ac_status=$?
4413  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4414  test $ac_status = 0; }
4415   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : C_WFLAGS=\"\$C_WFLAGS \$ac_cv_cflags_warn_all\""; } >&5
4416  (: C_WFLAGS="$C_WFLAGS $ac_cv_cflags_warn_all") 2>&5
4417  ac_status=$?
4418  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4419  test $ac_status = 0; }
4420                      C_WFLAGS="$C_WFLAGS $ac_cv_cflags_warn_all"
4421   fi
4422 ;;
4423esac
4424
4425ac_ext=cpp
4426ac_cpp='$CXXCPP $CPPFLAGS'
4427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4430if test -z "$CXX"; then
4431  if test -n "$CCC"; then
4432    CXX=$CCC
4433  else
4434    if test -n "$ac_tool_prefix"; then
4435  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4436  do
4437    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4438set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4440$as_echo_n "checking for $ac_word... " >&6; }
4441if ${ac_cv_prog_CXX+:} false; then :
4442  $as_echo_n "(cached) " >&6
4443else
4444  if test -n "$CXX"; then
4445  ac_cv_prog_CXX="$CXX" # Let the user override the test.
4446else
4447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4448for as_dir in $PATH
4449do
4450  IFS=$as_save_IFS
4451  test -z "$as_dir" && as_dir=.
4452    for ac_exec_ext in '' $ac_executable_extensions; do
4453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4454    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4456    break 2
4457  fi
4458done
4459  done
4460IFS=$as_save_IFS
4461
4462fi
4463fi
4464CXX=$ac_cv_prog_CXX
4465if test -n "$CXX"; then
4466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4467$as_echo "$CXX" >&6; }
4468else
4469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4470$as_echo "no" >&6; }
4471fi
4472
4473
4474    test -n "$CXX" && break
4475  done
4476fi
4477if test -z "$CXX"; then
4478  ac_ct_CXX=$CXX
4479  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4480do
4481  # Extract the first word of "$ac_prog", so it can be a program name with args.
4482set dummy $ac_prog; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
4485if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4486  $as_echo_n "(cached) " >&6
4487else
4488  if test -n "$ac_ct_CXX"; then
4489  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4490else
4491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4492for as_dir in $PATH
4493do
4494  IFS=$as_save_IFS
4495  test -z "$as_dir" && as_dir=.
4496    for ac_exec_ext in '' $ac_executable_extensions; do
4497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4498    ac_cv_prog_ac_ct_CXX="$ac_prog"
4499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4500    break 2
4501  fi
4502done
4503  done
4504IFS=$as_save_IFS
4505
4506fi
4507fi
4508ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4509if test -n "$ac_ct_CXX"; then
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4511$as_echo "$ac_ct_CXX" >&6; }
4512else
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
4515fi
4516
4517
4518  test -n "$ac_ct_CXX" && break
4519done
4520
4521  if test "x$ac_ct_CXX" = x; then
4522    CXX="g++"
4523  else
4524    case $cross_compiling:$ac_tool_warned in
4525yes:)
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4528ac_tool_warned=yes ;;
4529esac
4530    CXX=$ac_ct_CXX
4531  fi
4532fi
4533
4534  fi
4535fi
4536# Provide some information about the compiler.
4537$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4538set X $ac_compile
4539ac_compiler=$2
4540for ac_option in --version -v -V -qversion; do
4541  { { ac_try="$ac_compiler $ac_option >&5"
4542case "(($ac_try" in
4543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4544  *) ac_try_echo=$ac_try;;
4545esac
4546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4547$as_echo "$ac_try_echo"; } >&5
4548  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4549  ac_status=$?
4550  if test -s conftest.err; then
4551    sed '10a\
4552... rest of stderr output deleted ...
4553         10q' conftest.err >conftest.er1
4554    cat conftest.er1 >&5
4555  fi
4556  rm -f conftest.er1 conftest.err
4557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4558  test $ac_status = 0; }
4559done
4560
4561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4562$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4563if ${ac_cv_cxx_compiler_gnu+:} false; then :
4564  $as_echo_n "(cached) " >&6
4565else
4566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4567/* end confdefs.h.  */
4568
4569int
4570main ()
4571{
4572#ifndef __GNUC__
4573       choke me
4574#endif
4575
4576  ;
4577  return 0;
4578}
4579_ACEOF
4580if ac_fn_cxx_try_compile "$LINENO"; then :
4581  ac_compiler_gnu=yes
4582else
4583  ac_compiler_gnu=no
4584fi
4585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4586ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4587
4588fi
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4590$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4591if test $ac_compiler_gnu = yes; then
4592  GXX=yes
4593else
4594  GXX=
4595fi
4596ac_test_CXXFLAGS=${CXXFLAGS+set}
4597ac_save_CXXFLAGS=$CXXFLAGS
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4599$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4600if ${ac_cv_prog_cxx_g+:} false; then :
4601  $as_echo_n "(cached) " >&6
4602else
4603  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4604   ac_cxx_werror_flag=yes
4605   ac_cv_prog_cxx_g=no
4606   CXXFLAGS="-g"
4607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4608/* end confdefs.h.  */
4609
4610int
4611main ()
4612{
4613
4614  ;
4615  return 0;
4616}
4617_ACEOF
4618if ac_fn_cxx_try_compile "$LINENO"; then :
4619  ac_cv_prog_cxx_g=yes
4620else
4621  CXXFLAGS=""
4622      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4623/* end confdefs.h.  */
4624
4625int
4626main ()
4627{
4628
4629  ;
4630  return 0;
4631}
4632_ACEOF
4633if ac_fn_cxx_try_compile "$LINENO"; then :
4634
4635else
4636  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4637	 CXXFLAGS="-g"
4638	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4639/* end confdefs.h.  */
4640
4641int
4642main ()
4643{
4644
4645  ;
4646  return 0;
4647}
4648_ACEOF
4649if ac_fn_cxx_try_compile "$LINENO"; then :
4650  ac_cv_prog_cxx_g=yes
4651fi
4652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4653fi
4654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4655fi
4656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4657   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4658fi
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4660$as_echo "$ac_cv_prog_cxx_g" >&6; }
4661if test "$ac_test_CXXFLAGS" = set; then
4662  CXXFLAGS=$ac_save_CXXFLAGS
4663elif test $ac_cv_prog_cxx_g = yes; then
4664  if test "$GXX" = yes; then
4665    CXXFLAGS="-g -O2"
4666  else
4667    CXXFLAGS="-g"
4668  fi
4669else
4670  if test "$GXX" = yes; then
4671    CXXFLAGS="-O2"
4672  else
4673    CXXFLAGS=
4674  fi
4675fi
4676ac_ext=cpp
4677ac_cpp='$CXXCPP $CPPFLAGS'
4678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4681
4682
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_WFLAGS for maximum warnings" >&5
4684$as_echo_n "checking CXX_WFLAGS for maximum warnings... " >&6; }
4685if ${ac_cv_cxxflags_warn_all+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  ac_cv_cxxflags_warn_all="no, unknown"
4689
4690 ac_ext=cpp
4691ac_cpp='$CXXCPP $CPPFLAGS'
4692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4695
4696 ac_save_CXXFLAGS="$CXXFLAGS"
4697for ac_arg in "-pedantic  % -Wall"          "-xstrconst % -v"             "-std1      % -verbose -w0 -warnprotos"    "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"    "-ansi -ansiE % -fullwarn"    "+ESlit     % +w1"            "-Xc        % -pvctl,fullmsg"    "-h conform % -h msglevel 2"    #
4698do CXXFLAGS="$ac_save_CXXFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
4699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4700/* end confdefs.h.  */
4701
4702int
4703main ()
4704{
4705return 0;
4706  ;
4707  return 0;
4708}
4709_ACEOF
4710if ac_fn_cxx_try_compile "$LINENO"; then :
4711  ac_cv_cxxflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
4712fi
4713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4714done
4715 CXXFLAGS="$ac_save_CXXFLAGS"
4716 ac_ext=c
4717ac_cpp='$CPP $CPPFLAGS'
4718ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4719ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4720ac_compiler_gnu=$ac_cv_c_compiler_gnu
4721
4722
4723fi
4724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxxflags_warn_all" >&5
4725$as_echo "$ac_cv_cxxflags_warn_all" >&6; }
4726case ".$ac_cv_cxxflags_warn_all" in
4727     .ok|.ok,*)  ;;
4728   .|.no|.no,*)
4729 ;;
4730   *)
4731   if echo " $CXX_WFLAGS " | grep " $ac_cv_cxxflags_warn_all " 2>&1 >/dev/null
4732   then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXX_WFLAGS does contain \$ac_cv_cxxflags_warn_all"; } >&5
4733  (: CXX_WFLAGS does contain $ac_cv_cxxflags_warn_all) 2>&5
4734  ac_status=$?
4735  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4736  test $ac_status = 0; }
4737   else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXX_WFLAGS=\"\$CXX_WFLAGS \$ac_cv_cxxflags_warn_all\""; } >&5
4738  (: CXX_WFLAGS="$CXX_WFLAGS $ac_cv_cxxflags_warn_all") 2>&5
4739  ac_status=$?
4740  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4741  test $ac_status = 0; }
4742                      CXX_WFLAGS="$CXX_WFLAGS $ac_cv_cxxflags_warn_all"
4743   fi
4744 ;;
4745esac
4746
4747
4748C_WFLAGS=`echo "$C_WFLAGS " | sed "s/-Wdeclaration-after-statement //"`
4749
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror -we10006" >&5
4751$as_echo_n "checking whether C compiler accepts -Werror -we10006... " >&6; }
4752if ${ax_cv_check_cflags___Werror__we10006+:} false; then :
4753  $as_echo_n "(cached) " >&6
4754else
4755
4756  ax_check_save_flags=$CFLAGS
4757  CFLAGS="$CFLAGS  -Werror -we10006"
4758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4759/* end confdefs.h.  */
4760
4761int
4762main ()
4763{
4764
4765  ;
4766  return 0;
4767}
4768_ACEOF
4769if ac_fn_c_try_compile "$LINENO"; then :
4770  ax_cv_check_cflags___Werror__we10006=yes
4771else
4772  ax_cv_check_cflags___Werror__we10006=no
4773fi
4774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4775  CFLAGS=$ax_check_save_flags
4776fi
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror__we10006" >&5
4778$as_echo "$ax_cv_check_cflags___Werror__we10006" >&6; }
4779if test "x$ax_cv_check_cflags___Werror__we10006" = xyes; then :
4780  ERROR_ON_UNKNOWN_OPTIONS="-Werror -we10006"
4781else
4782  ERROR_ON_UNKNOWN_OPTIONS="-Werror"
4783fi
4784
4785
4786as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-diag-disable 188,1684,2259,2304,3280,11074,11076" | $as_tr_sh`
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -diag-disable 188,1684,2259,2304,3280,11074,11076" >&5
4788$as_echo_n "checking whether C compiler accepts -diag-disable 188,1684,2259,2304,3280,11074,11076... " >&6; }
4789if eval \${$as_CACHEVAR+:} false; then :
4790  $as_echo_n "(cached) " >&6
4791else
4792
4793  ax_check_save_flags=$CFLAGS
4794  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -diag-disable 188,1684,2259,2304,3280,11074,11076"
4795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796/* end confdefs.h.  */
4797
4798int
4799main ()
4800{
4801
4802  ;
4803  return 0;
4804}
4805_ACEOF
4806if ac_fn_c_try_compile "$LINENO"; then :
4807  eval "$as_CACHEVAR=yes"
4808else
4809  eval "$as_CACHEVAR=no"
4810fi
4811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4812  CFLAGS=$ax_check_save_flags
4813fi
4814eval ac_res=\$$as_CACHEVAR
4815	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4816$as_echo "$ac_res" >&6; }
4817if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
4818  C_WFLAGS="$C_WFLAGS -diag-disable 188,1684,2259,2304,3280,11074,11076" CXX_WFLAGS="$CXX_WFLAGS -diag-disable 188,1684,2259,2304,3280,11074,11076"
4819else
4820  :
4821fi
4822
4823
4824as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wextra" | $as_tr_sh`
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wextra" >&5
4826$as_echo_n "checking whether C compiler accepts -Wextra... " >&6; }
4827if eval \${$as_CACHEVAR+:} false; then :
4828  $as_echo_n "(cached) " >&6
4829else
4830
4831  ax_check_save_flags=$CFLAGS
4832  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wextra"
4833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4834/* end confdefs.h.  */
4835
4836int
4837main ()
4838{
4839
4840  ;
4841  return 0;
4842}
4843_ACEOF
4844if ac_fn_c_try_compile "$LINENO"; then :
4845  eval "$as_CACHEVAR=yes"
4846else
4847  eval "$as_CACHEVAR=no"
4848fi
4849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4850  CFLAGS=$ax_check_save_flags
4851fi
4852eval ac_res=\$$as_CACHEVAR
4853	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4854$as_echo "$ac_res" >&6; }
4855if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
4856  C_WFLAGS="$C_WFLAGS -Wextra" CXX_WFLAGS="$CXX_WFLAGS -Wextra"
4857else
4858  :
4859fi
4860
4861as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Winit-self" | $as_tr_sh`
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Winit-self" >&5
4863$as_echo_n "checking whether C compiler accepts -Winit-self... " >&6; }
4864if eval \${$as_CACHEVAR+:} false; then :
4865  $as_echo_n "(cached) " >&6
4866else
4867
4868  ax_check_save_flags=$CFLAGS
4869  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Winit-self"
4870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4871/* end confdefs.h.  */
4872
4873int
4874main ()
4875{
4876
4877  ;
4878  return 0;
4879}
4880_ACEOF
4881if ac_fn_c_try_compile "$LINENO"; then :
4882  eval "$as_CACHEVAR=yes"
4883else
4884  eval "$as_CACHEVAR=no"
4885fi
4886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4887  CFLAGS=$ax_check_save_flags
4888fi
4889eval ac_res=\$$as_CACHEVAR
4890	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4891$as_echo "$ac_res" >&6; }
4892if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
4893  C_WFLAGS="$C_WFLAGS -Winit-self" CXX_WFLAGS="$CXX_WFLAGS -Winit-self"
4894else
4895  :
4896fi
4897
4898as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wunused-parameter" | $as_tr_sh`
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-parameter" >&5
4900$as_echo_n "checking whether C compiler accepts -Wunused-parameter... " >&6; }
4901if eval \${$as_CACHEVAR+:} false; then :
4902  $as_echo_n "(cached) " >&6
4903else
4904
4905  ax_check_save_flags=$CFLAGS
4906  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wunused-parameter"
4907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4908/* end confdefs.h.  */
4909
4910int
4911main ()
4912{
4913
4914  ;
4915  return 0;
4916}
4917_ACEOF
4918if ac_fn_c_try_compile "$LINENO"; then :
4919  eval "$as_CACHEVAR=yes"
4920else
4921  eval "$as_CACHEVAR=no"
4922fi
4923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4924  CFLAGS=$ax_check_save_flags
4925fi
4926eval ac_res=\$$as_CACHEVAR
4927	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4928$as_echo "$ac_res" >&6; }
4929if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
4930  C_WFLAGS="$C_WFLAGS -Wunused-parameter" CXX_WFLAGS="$CXX_WFLAGS -Wunused-parameter" NO_UNUSED_PARAMETER_FLAG="-Wno-unused-parameter"
4931else
4932  :
4933fi
4934
4935as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wmissing-prototypes" | $as_tr_sh`
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wmissing-prototypes" >&5
4937$as_echo_n "checking whether C compiler accepts -Wmissing-prototypes... " >&6; }
4938if eval \${$as_CACHEVAR+:} false; then :
4939  $as_echo_n "(cached) " >&6
4940else
4941
4942  ax_check_save_flags=$CFLAGS
4943  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wmissing-prototypes"
4944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4945/* end confdefs.h.  */
4946
4947int
4948main ()
4949{
4950
4951  ;
4952  return 0;
4953}
4954_ACEOF
4955if ac_fn_c_try_compile "$LINENO"; then :
4956  eval "$as_CACHEVAR=yes"
4957else
4958  eval "$as_CACHEVAR=no"
4959fi
4960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4961  CFLAGS=$ax_check_save_flags
4962fi
4963eval ac_res=\$$as_CACHEVAR
4964	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4965$as_echo "$ac_res" >&6; }
4966if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
4967  C_WFLAGS="$C_WFLAGS -Wmissing-prototypes"
4968else
4969  :
4970fi
4971
4972as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wmissing-declarations" | $as_tr_sh`
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wmissing-declarations" >&5
4974$as_echo_n "checking whether C compiler accepts -Wmissing-declarations... " >&6; }
4975if eval \${$as_CACHEVAR+:} false; then :
4976  $as_echo_n "(cached) " >&6
4977else
4978
4979  ax_check_save_flags=$CFLAGS
4980  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wmissing-declarations"
4981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4982/* end confdefs.h.  */
4983
4984int
4985main ()
4986{
4987
4988  ;
4989  return 0;
4990}
4991_ACEOF
4992if ac_fn_c_try_compile "$LINENO"; then :
4993  eval "$as_CACHEVAR=yes"
4994else
4995  eval "$as_CACHEVAR=no"
4996fi
4997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4998  CFLAGS=$ax_check_save_flags
4999fi
5000eval ac_res=\$$as_CACHEVAR
5001	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5002$as_echo "$ac_res" >&6; }
5003if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5004  C_WFLAGS="$C_WFLAGS -Wmissing-declarations"
5005else
5006  :
5007fi
5008
5009as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wformat" | $as_tr_sh`
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat" >&5
5011$as_echo_n "checking whether C compiler accepts -Wformat... " >&6; }
5012if eval \${$as_CACHEVAR+:} false; then :
5013  $as_echo_n "(cached) " >&6
5014else
5015
5016  ax_check_save_flags=$CFLAGS
5017  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wformat"
5018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5019/* end confdefs.h.  */
5020
5021int
5022main ()
5023{
5024
5025  ;
5026  return 0;
5027}
5028_ACEOF
5029if ac_fn_c_try_compile "$LINENO"; then :
5030  eval "$as_CACHEVAR=yes"
5031else
5032  eval "$as_CACHEVAR=no"
5033fi
5034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5035  CFLAGS=$ax_check_save_flags
5036fi
5037eval ac_res=\$$as_CACHEVAR
5038	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5039$as_echo "$ac_res" >&6; }
5040if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5041  C_WFLAGS="$C_WFLAGS -Wformat" CXX_WFLAGS="$CXX_WFLAGS -Wformat"
5042else
5043  :
5044fi
5045
5046as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wformat -Werror=format-security -Wno-format-nonliteral" | $as_tr_sh`
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wformat -Werror=format-security -Wno-format-nonliteral" >&5
5048$as_echo_n "checking whether C compiler accepts -Wformat -Werror=format-security -Wno-format-nonliteral... " >&6; }
5049if eval \${$as_CACHEVAR+:} false; then :
5050  $as_echo_n "(cached) " >&6
5051else
5052
5053  ax_check_save_flags=$CFLAGS
5054  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wformat -Werror=format-security -Wno-format-nonliteral"
5055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h.  */
5057
5058int
5059main ()
5060{
5061
5062  ;
5063  return 0;
5064}
5065_ACEOF
5066if ac_fn_c_try_compile "$LINENO"; then :
5067  eval "$as_CACHEVAR=yes"
5068else
5069  eval "$as_CACHEVAR=no"
5070fi
5071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5072  CFLAGS=$ax_check_save_flags
5073fi
5074eval ac_res=\$$as_CACHEVAR
5075	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5076$as_echo "$ac_res" >&6; }
5077if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5078  C_WFLAGS="$C_WFLAGS -Werror=format-security -Wno-format-nonliteral" CXX_WFLAGS="$CXX_WFLAGS -Werror=format-security -Wno-format-nonliteral"
5079else
5080  :
5081fi
5082
5083as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wshorten-64-to-32" | $as_tr_sh`
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wshorten-64-to-32" >&5
5085$as_echo_n "checking whether C compiler accepts -Wshorten-64-to-32... " >&6; }
5086if eval \${$as_CACHEVAR+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089
5090  ax_check_save_flags=$CFLAGS
5091  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wshorten-64-to-32"
5092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5093/* end confdefs.h.  */
5094
5095int
5096main ()
5097{
5098
5099  ;
5100  return 0;
5101}
5102_ACEOF
5103if ac_fn_c_try_compile "$LINENO"; then :
5104  eval "$as_CACHEVAR=yes"
5105else
5106  eval "$as_CACHEVAR=no"
5107fi
5108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5109  CFLAGS=$ax_check_save_flags
5110fi
5111eval ac_res=\$$as_CACHEVAR
5112	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5113$as_echo "$ac_res" >&6; }
5114if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5115  C_WFLAGS="$C_WFLAGS -Wshorten-64-to-32" CXX_WFLAGS="$CXX_WFLAGS -Wshorten-64-to-32"
5116else
5117  :
5118fi
5119
5120as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wlogical-op" | $as_tr_sh`
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wlogical-op" >&5
5122$as_echo_n "checking whether C compiler accepts -Wlogical-op... " >&6; }
5123if eval \${$as_CACHEVAR+:} false; then :
5124  $as_echo_n "(cached) " >&6
5125else
5126
5127  ax_check_save_flags=$CFLAGS
5128  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wlogical-op"
5129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5130/* end confdefs.h.  */
5131
5132int
5133main ()
5134{
5135
5136  ;
5137  return 0;
5138}
5139_ACEOF
5140if ac_fn_c_try_compile "$LINENO"; then :
5141  eval "$as_CACHEVAR=yes"
5142else
5143  eval "$as_CACHEVAR=no"
5144fi
5145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5146  CFLAGS=$ax_check_save_flags
5147fi
5148eval ac_res=\$$as_CACHEVAR
5149	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5150$as_echo "$ac_res" >&6; }
5151if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5152  C_WFLAGS="$C_WFLAGS -Wlogical-op" CXX_WFLAGS="$CXX_WFLAGS -Wlogical-op" NO_LOGICAL_OP_FLAG="-Wno-logical-op"
5153else
5154  :
5155fi
5156
5157as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wshadow" | $as_tr_sh`
5158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wshadow" >&5
5159$as_echo_n "checking whether C compiler accepts -Wshadow... " >&6; }
5160if eval \${$as_CACHEVAR+:} false; then :
5161  $as_echo_n "(cached) " >&6
5162else
5163
5164  ax_check_save_flags=$CFLAGS
5165  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wshadow"
5166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5167/* end confdefs.h.  */
5168
5169int
5170main ()
5171{
5172
5173  ;
5174  return 0;
5175}
5176_ACEOF
5177if ac_fn_c_try_compile "$LINENO"; then :
5178  eval "$as_CACHEVAR=yes"
5179else
5180  eval "$as_CACHEVAR=no"
5181fi
5182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5183  CFLAGS=$ax_check_save_flags
5184fi
5185eval ac_res=\$$as_CACHEVAR
5186	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5187$as_echo "$ac_res" >&6; }
5188if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5189  C_WFLAGS="$C_WFLAGS -Wshadow" CXX_WFLAGS="$CXX_WFLAGS -Wshadow"
5190else
5191  :
5192fi
5193
5194as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wmissing-include-dirs" | $as_tr_sh`
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wmissing-include-dirs" >&5
5196$as_echo_n "checking whether C compiler accepts -Wmissing-include-dirs... " >&6; }
5197if eval \${$as_CACHEVAR+:} false; then :
5198  $as_echo_n "(cached) " >&6
5199else
5200
5201  ax_check_save_flags=$CFLAGS
5202  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wmissing-include-dirs"
5203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204/* end confdefs.h.  */
5205
5206int
5207main ()
5208{
5209
5210  ;
5211  return 0;
5212}
5213_ACEOF
5214if ac_fn_c_try_compile "$LINENO"; then :
5215  eval "$as_CACHEVAR=yes"
5216else
5217  eval "$as_CACHEVAR=no"
5218fi
5219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5220  CFLAGS=$ax_check_save_flags
5221fi
5222eval ac_res=\$$as_CACHEVAR
5223	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5224$as_echo "$ac_res" >&6; }
5225if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5226  C_WFLAGS="$C_WFLAGS -Wmissing-include-dirs" CXX_WFLAGS="$CXX_WFLAGS -Wmissing-include-dirs"
5227else
5228  :
5229fi
5230
5231
5232as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Werror=vla" | $as_tr_sh`
5233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=vla" >&5
5234$as_echo_n "checking whether C compiler accepts -Werror=vla... " >&6; }
5235if eval \${$as_CACHEVAR+:} false; then :
5236  $as_echo_n "(cached) " >&6
5237else
5238
5239  ax_check_save_flags=$CFLAGS
5240  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Werror=vla"
5241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5242/* end confdefs.h.  */
5243
5244int
5245main ()
5246{
5247
5248  ;
5249  return 0;
5250}
5251_ACEOF
5252if ac_fn_c_try_compile "$LINENO"; then :
5253  eval "$as_CACHEVAR=yes"
5254else
5255  eval "$as_CACHEVAR=no"
5256fi
5257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5258  CFLAGS=$ax_check_save_flags
5259fi
5260eval ac_res=\$$as_CACHEVAR
5261	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5262$as_echo "$ac_res" >&6; }
5263if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5264  C_WFLAGS="$C_WFLAGS -Werror=vla" CXX_WFLAGS="$CXX_WFLAGS -Werror=vla"
5265else
5266  :
5267fi
5268
5269
5270
5271as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wdate-time" | $as_tr_sh`
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wdate-time" >&5
5273$as_echo_n "checking whether C compiler accepts -Wdate-time... " >&6; }
5274if eval \${$as_CACHEVAR+:} false; then :
5275  $as_echo_n "(cached) " >&6
5276else
5277
5278  ax_check_save_flags=$CFLAGS
5279  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wdate-time"
5280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281/* end confdefs.h.  */
5282
5283int
5284main ()
5285{
5286
5287  ;
5288  return 0;
5289}
5290_ACEOF
5291if ac_fn_c_try_compile "$LINENO"; then :
5292  eval "$as_CACHEVAR=yes"
5293else
5294  eval "$as_CACHEVAR=no"
5295fi
5296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5297  CFLAGS=$ax_check_save_flags
5298fi
5299eval ac_res=\$$as_CACHEVAR
5300	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5301$as_echo "$ac_res" >&6; }
5302if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5303  C_WFLAGS="$C_WFLAGS -Wdate-time" CXX_WFLAGS="$CXX_WFLAGS -Wdate-time"
5304else
5305  :
5306fi
5307
5308
5309as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wnull-dereference" | $as_tr_sh`
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wnull-dereference" >&5
5311$as_echo_n "checking whether C compiler accepts -Wnull-dereference... " >&6; }
5312if eval \${$as_CACHEVAR+:} false; then :
5313  $as_echo_n "(cached) " >&6
5314else
5315
5316  ax_check_save_flags=$CFLAGS
5317  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wnull-dereference"
5318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319/* end confdefs.h.  */
5320
5321int
5322main ()
5323{
5324
5325  ;
5326  return 0;
5327}
5328_ACEOF
5329if ac_fn_c_try_compile "$LINENO"; then :
5330  eval "$as_CACHEVAR=yes"
5331else
5332  eval "$as_CACHEVAR=no"
5333fi
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335  CFLAGS=$ax_check_save_flags
5336fi
5337eval ac_res=\$$as_CACHEVAR
5338	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5339$as_echo "$ac_res" >&6; }
5340if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5341  C_WFLAGS="$C_WFLAGS -Wnull-dereference" CXX_WFLAGS="$CXX_WFLAGS -Wnull-dereference"
5342else
5343  :
5344fi
5345
5346as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wduplicated-cond" | $as_tr_sh`
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wduplicated-cond" >&5
5348$as_echo_n "checking whether C compiler accepts -Wduplicated-cond... " >&6; }
5349if eval \${$as_CACHEVAR+:} false; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352
5353  ax_check_save_flags=$CFLAGS
5354  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wduplicated-cond"
5355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h.  */
5357
5358int
5359main ()
5360{
5361
5362  ;
5363  return 0;
5364}
5365_ACEOF
5366if ac_fn_c_try_compile "$LINENO"; then :
5367  eval "$as_CACHEVAR=yes"
5368else
5369  eval "$as_CACHEVAR=no"
5370fi
5371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5372  CFLAGS=$ax_check_save_flags
5373fi
5374eval ac_res=\$$as_CACHEVAR
5375	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5376$as_echo "$ac_res" >&6; }
5377if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5378  C_WFLAGS="$C_WFLAGS -Wduplicated-cond" CXX_WFLAGS="$CXX_WFLAGS -Wduplicated-cond"
5379else
5380  :
5381fi
5382
5383
5384
5385ac_ext=cpp
5386ac_cpp='$CXXCPP $CPPFLAGS'
5387ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5388ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5389ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5390
5391as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wextra-semi" | $as_tr_sh`
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wextra-semi" >&5
5393$as_echo_n "checking whether C++ compiler accepts -Wextra-semi... " >&6; }
5394if eval \${$as_CACHEVAR+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397
5398  ax_check_save_flags=$CXXFLAGS
5399  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wextra-semi"
5400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5401/* end confdefs.h.  */
5402
5403int
5404main ()
5405{
5406
5407  ;
5408  return 0;
5409}
5410_ACEOF
5411if ac_fn_cxx_try_compile "$LINENO"; then :
5412  eval "$as_CACHEVAR=yes"
5413else
5414  eval "$as_CACHEVAR=no"
5415fi
5416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5417  CXXFLAGS=$ax_check_save_flags
5418fi
5419eval ac_res=\$$as_CACHEVAR
5420	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5421$as_echo "$ac_res" >&6; }
5422if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5423  CXX_WFLAGS="$CXX_WFLAGS -Wextra-semi"
5424else
5425  :
5426fi
5427
5428ac_ext=c
5429ac_cpp='$CPP $CPPFLAGS'
5430ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5431ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5432ac_compiler_gnu=$ac_cv_c_compiler_gnu
5433
5434
5435as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wno-sign-compare" | $as_tr_sh`
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wno-sign-compare" >&5
5437$as_echo_n "checking whether C compiler accepts -Wno-sign-compare... " >&6; }
5438if eval \${$as_CACHEVAR+:} false; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441
5442  ax_check_save_flags=$CFLAGS
5443  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wno-sign-compare"
5444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445/* end confdefs.h.  */
5446
5447int
5448main ()
5449{
5450
5451  ;
5452  return 0;
5453}
5454_ACEOF
5455if ac_fn_c_try_compile "$LINENO"; then :
5456  eval "$as_CACHEVAR=yes"
5457else
5458  eval "$as_CACHEVAR=no"
5459fi
5460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461  CFLAGS=$ax_check_save_flags
5462fi
5463eval ac_res=\$$as_CACHEVAR
5464	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5465$as_echo "$ac_res" >&6; }
5466if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5467  NO_SIGN_COMPARE="-Wno-sign-compare"
5468else
5469  :
5470fi
5471
5472
5473as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wcomma" | $as_tr_sh`
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wcomma" >&5
5475$as_echo_n "checking whether C compiler accepts -Wcomma... " >&6; }
5476if eval \${$as_CACHEVAR+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479
5480  ax_check_save_flags=$CFLAGS
5481  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wcomma"
5482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483/* end confdefs.h.  */
5484
5485int
5486main ()
5487{
5488
5489  ;
5490  return 0;
5491}
5492_ACEOF
5493if ac_fn_c_try_compile "$LINENO"; then :
5494  eval "$as_CACHEVAR=yes"
5495else
5496  eval "$as_CACHEVAR=no"
5497fi
5498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5499  CFLAGS=$ax_check_save_flags
5500fi
5501eval ac_res=\$$as_CACHEVAR
5502	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5503$as_echo "$ac_res" >&6; }
5504if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5505  C_WFLAGS="$C_WFLAGS -Wcomma" CXX_WFLAGS="$CXX_WFLAGS -Wcomma"
5506else
5507  :
5508fi
5509
5510
5511as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wfloat-conversion" | $as_tr_sh`
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wfloat-conversion" >&5
5513$as_echo_n "checking whether C compiler accepts -Wfloat-conversion... " >&6; }
5514if eval \${$as_CACHEVAR+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517
5518  ax_check_save_flags=$CFLAGS
5519  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wfloat-conversion"
5520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h.  */
5522
5523int
5524main ()
5525{
5526
5527  ;
5528  return 0;
5529}
5530_ACEOF
5531if ac_fn_c_try_compile "$LINENO"; then :
5532  eval "$as_CACHEVAR=yes"
5533else
5534  eval "$as_CACHEVAR=no"
5535fi
5536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5537  CFLAGS=$ax_check_save_flags
5538fi
5539eval ac_res=\$$as_CACHEVAR
5540	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5541$as_echo "$ac_res" >&6; }
5542if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5543  C_WFLAGS="$C_WFLAGS -Wfloat-conversion" CXX_WFLAGS="$CXX_WFLAGS -Wfloat-conversion"
5544else
5545  :
5546fi
5547
5548
5549as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wdocumentation -Wno-documentation-deprecated-sync" | $as_tr_sh`
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wdocumentation -Wno-documentation-deprecated-sync" >&5
5551$as_echo_n "checking whether C compiler accepts -Wdocumentation -Wno-documentation-deprecated-sync... " >&6; }
5552if eval \${$as_CACHEVAR+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555
5556  ax_check_save_flags=$CFLAGS
5557  CFLAGS="$CFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wdocumentation -Wno-documentation-deprecated-sync"
5558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559/* end confdefs.h.  */
5560
5561int
5562main ()
5563{
5564
5565  ;
5566  return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_compile "$LINENO"; then :
5570  eval "$as_CACHEVAR=yes"
5571else
5572  eval "$as_CACHEVAR=no"
5573fi
5574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5575  CFLAGS=$ax_check_save_flags
5576fi
5577eval ac_res=\$$as_CACHEVAR
5578	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5579$as_echo "$ac_res" >&6; }
5580if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5581  C_WFLAGS="$C_WFLAGS -Wdocumentation -Wno-documentation-deprecated-sync" CXX_WFLAGS="$CXX_WFLAGS -Wdocumentation -Wno-documentation-deprecated-sync"
5582else
5583  :
5584fi
5585
5586
5587
5588ac_ext=cpp
5589ac_cpp='$CXXCPP $CPPFLAGS'
5590ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5591ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5592ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5593
5594as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wunused-private-field" | $as_tr_sh`
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wunused-private-field" >&5
5596$as_echo_n "checking whether C++ compiler accepts -Wunused-private-field... " >&6; }
5597if eval \${$as_CACHEVAR+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600
5601  ax_check_save_flags=$CXXFLAGS
5602  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wunused-private-field"
5603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5604/* end confdefs.h.  */
5605
5606int
5607main ()
5608{
5609
5610  ;
5611  return 0;
5612}
5613_ACEOF
5614if ac_fn_cxx_try_compile "$LINENO"; then :
5615  eval "$as_CACHEVAR=yes"
5616else
5617  eval "$as_CACHEVAR=no"
5618fi
5619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5620  CXXFLAGS=$ax_check_save_flags
5621fi
5622eval ac_res=\$$as_CACHEVAR
5623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5624$as_echo "$ac_res" >&6; }
5625if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5626  CXX_WFLAGS="$CXX_WFLAGS -Wunused-private-field"
5627else
5628  :
5629fi
5630
5631as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wmissing-declarations" | $as_tr_sh`
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wmissing-declarations" >&5
5633$as_echo_n "checking whether C++ compiler accepts -Wmissing-declarations... " >&6; }
5634if eval \${$as_CACHEVAR+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637
5638  ax_check_save_flags=$CXXFLAGS
5639  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wmissing-declarations"
5640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5641/* end confdefs.h.  */
5642
5643int
5644main ()
5645{
5646
5647  ;
5648  return 0;
5649}
5650_ACEOF
5651if ac_fn_cxx_try_compile "$LINENO"; then :
5652  eval "$as_CACHEVAR=yes"
5653else
5654  eval "$as_CACHEVAR=no"
5655fi
5656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5657  CXXFLAGS=$ax_check_save_flags
5658fi
5659eval ac_res=\$$as_CACHEVAR
5660	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5661$as_echo "$ac_res" >&6; }
5662if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5663  CXX_WFLAGS="$CXX_WFLAGS -Wmissing-declarations"
5664else
5665  :
5666fi
5667
5668as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wnon-virtual-dtor" | $as_tr_sh`
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wnon-virtual-dtor" >&5
5670$as_echo_n "checking whether C++ compiler accepts -Wnon-virtual-dtor... " >&6; }
5671if eval \${$as_CACHEVAR+:} false; then :
5672  $as_echo_n "(cached) " >&6
5673else
5674
5675  ax_check_save_flags=$CXXFLAGS
5676  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wnon-virtual-dtor"
5677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5678/* end confdefs.h.  */
5679
5680int
5681main ()
5682{
5683
5684  ;
5685  return 0;
5686}
5687_ACEOF
5688if ac_fn_cxx_try_compile "$LINENO"; then :
5689  eval "$as_CACHEVAR=yes"
5690else
5691  eval "$as_CACHEVAR=no"
5692fi
5693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5694  CXXFLAGS=$ax_check_save_flags
5695fi
5696eval ac_res=\$$as_CACHEVAR
5697	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5698$as_echo "$ac_res" >&6; }
5699if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5700  CXX_WFLAGS="$CXX_WFLAGS -Wnon-virtual-dtor" NO_NON_VIRTUAL_DTOR_FLAG="-Wno-non-virtual-dtor"
5701else
5702  :
5703fi
5704
5705as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wold-style-cast" | $as_tr_sh`
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wold-style-cast" >&5
5707$as_echo_n "checking whether C++ compiler accepts -Wold-style-cast... " >&6; }
5708if eval \${$as_CACHEVAR+:} false; then :
5709  $as_echo_n "(cached) " >&6
5710else
5711
5712  ax_check_save_flags=$CXXFLAGS
5713  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wold-style-cast"
5714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5715/* end confdefs.h.  */
5716
5717int
5718main ()
5719{
5720
5721  ;
5722  return 0;
5723}
5724_ACEOF
5725if ac_fn_cxx_try_compile "$LINENO"; then :
5726  eval "$as_CACHEVAR=yes"
5727else
5728  eval "$as_CACHEVAR=no"
5729fi
5730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5731  CXXFLAGS=$ax_check_save_flags
5732fi
5733eval ac_res=\$$as_CACHEVAR
5734	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5735$as_echo "$ac_res" >&6; }
5736if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5737  WARN_OLD_STYLE_CAST="-Wold-style-cast"
5738else
5739  :
5740fi
5741
5742as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Weffc++" | $as_tr_sh`
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Weffc++" >&5
5744$as_echo_n "checking whether C++ compiler accepts -Weffc++... " >&6; }
5745if eval \${$as_CACHEVAR+:} false; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748
5749  ax_check_save_flags=$CXXFLAGS
5750  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Weffc++"
5751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5752/* end confdefs.h.  */
5753
5754int
5755main ()
5756{
5757
5758  ;
5759  return 0;
5760}
5761_ACEOF
5762if ac_fn_cxx_try_compile "$LINENO"; then :
5763  eval "$as_CACHEVAR=yes"
5764else
5765  eval "$as_CACHEVAR=no"
5766fi
5767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5768  CXXFLAGS=$ax_check_save_flags
5769fi
5770eval ac_res=\$$as_CACHEVAR
5771	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5772$as_echo "$ac_res" >&6; }
5773if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5774  WARN_EFFCPLUSPLUS="-Weffc++"
5775else
5776  :
5777fi
5778
5779
5780if test "$WARN_EFFCPLUSPLUS" != ""; then
5781    SAVED_CXXFLAGS=$CXXFLAGS
5782    CXXFLAGS="$CXXFLAGS $WARN_EFFCPLUSPLUS -Werror"
5783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Weffc++ should be enabled" >&5
5784$as_echo_n "checking if -Weffc++ should be enabled... " >&6; }
5785    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5786/* end confdefs.h.  */
5787
5788    class Base {};
5789    class A: public Base {};
5790
5791int
5792main ()
5793{
5794
5795  ;
5796  return 0;
5797}
5798_ACEOF
5799if ac_fn_cxx_try_compile "$LINENO"; then :
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5801$as_echo "yes" >&6; }
5802else
5803  WARN_EFFCPLUSPLUS=""
5804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805$as_echo "no" >&6; }
5806fi
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5808    CXXFLAGS=$SAVED_CXXFLAGS
5809fi
5810
5811as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Woverloaded-virtual" | $as_tr_sh`
5812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Woverloaded-virtual" >&5
5813$as_echo_n "checking whether C++ compiler accepts -Woverloaded-virtual... " >&6; }
5814if eval \${$as_CACHEVAR+:} false; then :
5815  $as_echo_n "(cached) " >&6
5816else
5817
5818  ax_check_save_flags=$CXXFLAGS
5819  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Woverloaded-virtual"
5820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5821/* end confdefs.h.  */
5822
5823int
5824main ()
5825{
5826
5827  ;
5828  return 0;
5829}
5830_ACEOF
5831if ac_fn_cxx_try_compile "$LINENO"; then :
5832  eval "$as_CACHEVAR=yes"
5833else
5834  eval "$as_CACHEVAR=no"
5835fi
5836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5837  CXXFLAGS=$ax_check_save_flags
5838fi
5839eval ac_res=\$$as_CACHEVAR
5840	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5841$as_echo "$ac_res" >&6; }
5842if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5843  CXX_WFLAGS="$CXX_WFLAGS -Woverloaded-virtual"
5844else
5845  :
5846fi
5847
5848
5849as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-fno-operator-names" | $as_tr_sh`
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -fno-operator-names" >&5
5851$as_echo_n "checking whether C++ compiler accepts -fno-operator-names... " >&6; }
5852if eval \${$as_CACHEVAR+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855
5856  ax_check_save_flags=$CXXFLAGS
5857  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -fno-operator-names"
5858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5859/* end confdefs.h.  */
5860
5861int
5862main ()
5863{
5864
5865  ;
5866  return 0;
5867}
5868_ACEOF
5869if ac_fn_cxx_try_compile "$LINENO"; then :
5870  eval "$as_CACHEVAR=yes"
5871else
5872  eval "$as_CACHEVAR=no"
5873fi
5874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5875  CXXFLAGS=$ax_check_save_flags
5876fi
5877eval ac_res=\$$as_CACHEVAR
5878	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5879$as_echo "$ac_res" >&6; }
5880if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5881  CXX_WFLAGS="$CXX_WFLAGS -fno-operator-names"
5882else
5883  :
5884fi
5885
5886
5887HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT=no
5888as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wzero-as-null-pointer-constant" | $as_tr_sh`
5889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wzero-as-null-pointer-constant" >&5
5890$as_echo_n "checking whether C++ compiler accepts -Wzero-as-null-pointer-constant... " >&6; }
5891if eval \${$as_CACHEVAR+:} false; then :
5892  $as_echo_n "(cached) " >&6
5893else
5894
5895  ax_check_save_flags=$CXXFLAGS
5896  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wzero-as-null-pointer-constant"
5897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5898/* end confdefs.h.  */
5899
5900int
5901main ()
5902{
5903
5904  ;
5905  return 0;
5906}
5907_ACEOF
5908if ac_fn_cxx_try_compile "$LINENO"; then :
5909  eval "$as_CACHEVAR=yes"
5910else
5911  eval "$as_CACHEVAR=no"
5912fi
5913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5914  CXXFLAGS=$ax_check_save_flags
5915fi
5916eval ac_res=\$$as_CACHEVAR
5917	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5918$as_echo "$ac_res" >&6; }
5919if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
5920  CXX_WFLAGS="$CXX_WFLAGS -Wzero-as-null-pointer-constant" HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT=yes
5921else
5922  :
5923fi
5924
5925if test "$HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT" = "yes"; then
5926
5927cat >>confdefs.h <<_ACEOF
5928#define HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT 1
5929_ACEOF
5930
5931fi
5932
5933ac_ext=c
5934ac_cpp='$CPP $CPPFLAGS'
5935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5937ac_compiler_gnu=$ac_cv_c_compiler_gnu
5938
5939
5940CXX14_SUPPORT=no
5941
5942# Check whether --with-cpp14 was given.
5943if test "${with_cpp14+set}" = set; then :
5944  withval=$with_cpp14;
5945fi
5946
5947
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if use C++14 compiler options" >&5
5949$as_echo_n "checking if use C++14 compiler options... " >&6; }
5950if test "$with_cpp14" = "yes"; then
5951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler compatibility with C++14" >&5
5952$as_echo_n "checking C++ compiler compatibility with C++14... " >&6; }
5953          ax_cxx_compile_cxx14_required=false
5954  ac_ext=cpp
5955ac_cpp='$CXXCPP $CPPFLAGS'
5956ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5957ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5958ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5959  ac_success=no
5960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features by default" >&5
5961$as_echo_n "checking whether $CXX supports C++14 features by default... " >&6; }
5962if ${ax_cv_cxx_compile_cxx14+:} false; then :
5963  $as_echo_n "(cached) " >&6
5964else
5965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966/* end confdefs.h.  */
5967
5968
5969// If the compiler admits that it is not ready for C++11, why torture it?
5970// Hopefully, this will speed up the test.
5971
5972#ifndef __cplusplus
5973
5974#error "This is not a C++ compiler"
5975
5976#elif __cplusplus < 201103L
5977
5978#error "This is not a C++11 compiler"
5979
5980#else
5981
5982namespace cxx11
5983{
5984
5985  namespace test_static_assert
5986  {
5987
5988    template <typename T>
5989    struct check
5990    {
5991      static_assert(sizeof(int) <= sizeof(T), "not big enough");
5992    };
5993
5994  }
5995
5996  namespace test_final_override
5997  {
5998
5999    struct Base
6000    {
6001      virtual void f() {}
6002    };
6003
6004    struct Derived : public Base
6005    {
6006      virtual void f() override {}
6007    };
6008
6009  }
6010
6011  namespace test_double_right_angle_brackets
6012  {
6013
6014    template < typename T >
6015    struct check {};
6016
6017    typedef check<void> single_type;
6018    typedef check<check<void>> double_type;
6019    typedef check<check<check<void>>> triple_type;
6020    typedef check<check<check<check<void>>>> quadruple_type;
6021
6022  }
6023
6024  namespace test_decltype
6025  {
6026
6027    int
6028    f()
6029    {
6030      int a = 1;
6031      decltype(a) b = 2;
6032      return a + b;
6033    }
6034
6035  }
6036
6037  namespace test_type_deduction
6038  {
6039
6040    template < typename T1, typename T2 >
6041    struct is_same
6042    {
6043      static const bool value = false;
6044    };
6045
6046    template < typename T >
6047    struct is_same<T, T>
6048    {
6049      static const bool value = true;
6050    };
6051
6052    template < typename T1, typename T2 >
6053    auto
6054    add(T1 a1, T2 a2) -> decltype(a1 + a2)
6055    {
6056      return a1 + a2;
6057    }
6058
6059    int
6060    test(const int c, volatile int v)
6061    {
6062      static_assert(is_same<int, decltype(0)>::value == true, "");
6063      static_assert(is_same<int, decltype(c)>::value == false, "");
6064      static_assert(is_same<int, decltype(v)>::value == false, "");
6065      auto ac = c;
6066      auto av = v;
6067      auto sumi = ac + av + 'x';
6068      auto sumf = ac + av + 1.0;
6069      static_assert(is_same<int, decltype(ac)>::value == true, "");
6070      static_assert(is_same<int, decltype(av)>::value == true, "");
6071      static_assert(is_same<int, decltype(sumi)>::value == true, "");
6072      static_assert(is_same<int, decltype(sumf)>::value == false, "");
6073      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6074      return (sumf > 0.0) ? sumi : add(c, v);
6075    }
6076
6077  }
6078
6079  namespace test_noexcept
6080  {
6081
6082    int f() { return 0; }
6083    int g() noexcept { return 0; }
6084
6085    static_assert(noexcept(f()) == false, "");
6086    static_assert(noexcept(g()) == true, "");
6087
6088  }
6089
6090  namespace test_constexpr
6091  {
6092
6093    template < typename CharT >
6094    unsigned long constexpr
6095    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6096    {
6097      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6098    }
6099
6100    template < typename CharT >
6101    unsigned long constexpr
6102    strlen_c(const CharT *const s) noexcept
6103    {
6104      return strlen_c_r(s, 0UL);
6105    }
6106
6107    static_assert(strlen_c("") == 0UL, "");
6108    static_assert(strlen_c("1") == 1UL, "");
6109    static_assert(strlen_c("example") == 7UL, "");
6110    static_assert(strlen_c("another\0example") == 7UL, "");
6111
6112  }
6113
6114  namespace test_rvalue_references
6115  {
6116
6117    template < int N >
6118    struct answer
6119    {
6120      static constexpr int value = N;
6121    };
6122
6123    answer<1> f(int&)       { return answer<1>(); }
6124    answer<2> f(const int&) { return answer<2>(); }
6125    answer<3> f(int&&)      { return answer<3>(); }
6126
6127    void
6128    test()
6129    {
6130      int i = 0;
6131      const int c = 0;
6132      static_assert(decltype(f(i))::value == 1, "");
6133      static_assert(decltype(f(c))::value == 2, "");
6134      static_assert(decltype(f(0))::value == 3, "");
6135    }
6136
6137  }
6138
6139  namespace test_uniform_initialization
6140  {
6141
6142    struct test
6143    {
6144      static const int zero {};
6145      static const int one {1};
6146    };
6147
6148    static_assert(test::zero == 0, "");
6149    static_assert(test::one == 1, "");
6150
6151  }
6152
6153  namespace test_lambdas
6154  {
6155
6156    void
6157    test1()
6158    {
6159      auto lambda1 = [](){};
6160      auto lambda2 = lambda1;
6161      lambda1();
6162      lambda2();
6163    }
6164
6165    int
6166    test2()
6167    {
6168      auto a = [](int i, int j){ return i + j; }(1, 2);
6169      auto b = []() -> int { return '0'; }();
6170      auto c = [=](){ return a + b; }();
6171      auto d = [&](){ return c; }();
6172      auto e = [a, &b](int x) mutable {
6173        const auto identity = [](int y){ return y; };
6174        for (auto i = 0; i < a; ++i)
6175          a += b--;
6176        return x + identity(a + b);
6177      }(0);
6178      return a + b + c + d + e;
6179    }
6180
6181    int
6182    test3()
6183    {
6184      const auto nullary = [](){ return 0; };
6185      const auto unary = [](int x){ return x; };
6186      using nullary_t = decltype(nullary);
6187      using unary_t = decltype(unary);
6188      const auto higher1st = [](nullary_t f){ return f(); };
6189      const auto higher2nd = [unary](nullary_t f1){
6190        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6191      };
6192      return higher1st(nullary) + higher2nd(nullary)(unary);
6193    }
6194
6195  }
6196
6197  namespace test_variadic_templates
6198  {
6199
6200    template <int...>
6201    struct sum;
6202
6203    template <int N0, int... N1toN>
6204    struct sum<N0, N1toN...>
6205    {
6206      static constexpr auto value = N0 + sum<N1toN...>::value;
6207    };
6208
6209    template <>
6210    struct sum<>
6211    {
6212      static constexpr auto value = 0;
6213    };
6214
6215    static_assert(sum<>::value == 0, "");
6216    static_assert(sum<1>::value == 1, "");
6217    static_assert(sum<23>::value == 23, "");
6218    static_assert(sum<1, 2>::value == 3, "");
6219    static_assert(sum<5, 5, 11>::value == 21, "");
6220    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6221
6222  }
6223
6224  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6225  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6226  // because of this.
6227  namespace test_template_alias_sfinae
6228  {
6229
6230    struct foo {};
6231
6232    template<typename T>
6233    using member = typename T::member_type;
6234
6235    template<typename T>
6236    void func(...) {}
6237
6238    template<typename T>
6239    void func(member<T>*) {}
6240
6241    void test();
6242
6243    void test() { func<foo>(0); }
6244
6245  }
6246
6247}  // namespace cxx11
6248
6249#endif  // __cplusplus >= 201103L
6250
6251
6252
6253
6254// If the compiler admits that it is not ready for C++14, why torture it?
6255// Hopefully, this will speed up the test.
6256
6257#ifndef __cplusplus
6258
6259#error "This is not a C++ compiler"
6260
6261#elif __cplusplus < 201402L
6262
6263#error "This is not a C++14 compiler"
6264
6265#else
6266
6267namespace cxx14
6268{
6269
6270  namespace test_polymorphic_lambdas
6271  {
6272
6273    int
6274    test()
6275    {
6276      const auto lambda = [](auto&&... args){
6277        const auto istiny = [](auto x){
6278          return (sizeof(x) == 1UL) ? 1 : 0;
6279        };
6280        const int aretiny[] = { istiny(args)... };
6281        return aretiny[0];
6282      };
6283      return lambda(1, 1L, 1.0f, '1');
6284    }
6285
6286  }
6287
6288  namespace test_binary_literals
6289  {
6290
6291    constexpr auto ivii = 0b0000000000101010;
6292    static_assert(ivii == 42, "wrong value");
6293
6294  }
6295
6296  namespace test_generalized_constexpr
6297  {
6298
6299    template < typename CharT >
6300    constexpr unsigned long
6301    strlen_c(const CharT *const s) noexcept
6302    {
6303      auto length = 0UL;
6304      for (auto p = s; *p; ++p)
6305        ++length;
6306      return length;
6307    }
6308
6309    static_assert(strlen_c("") == 0UL, "");
6310    static_assert(strlen_c("x") == 1UL, "");
6311    static_assert(strlen_c("test") == 4UL, "");
6312    static_assert(strlen_c("another\0test") == 7UL, "");
6313
6314  }
6315
6316  namespace test_lambda_init_capture
6317  {
6318
6319    int
6320    test()
6321    {
6322      auto x = 0;
6323      const auto lambda1 = [a = x](int b){ return a + b; };
6324      const auto lambda2 = [a = lambda1(x)](){ return a; };
6325      return lambda2();
6326    }
6327
6328  }
6329
6330  namespace test_digit_seperators
6331  {
6332
6333    constexpr auto ten_million = 100'000'000;
6334    static_assert(ten_million == 100000000, "");
6335
6336  }
6337
6338  namespace test_return_type_deduction
6339  {
6340
6341    auto f(int& x) { return x; }
6342    decltype(auto) g(int& x) { return x; }
6343
6344    template < typename T1, typename T2 >
6345    struct is_same
6346    {
6347      static constexpr auto value = false;
6348    };
6349
6350    template < typename T >
6351    struct is_same<T, T>
6352    {
6353      static constexpr auto value = true;
6354    };
6355
6356    int
6357    test()
6358    {
6359      auto x = 0;
6360      static_assert(is_same<int, decltype(f(x))>::value, "");
6361      static_assert(is_same<int&, decltype(g(x))>::value, "");
6362      return x;
6363    }
6364
6365  }
6366
6367}  // namespace cxx14
6368
6369#endif  // __cplusplus >= 201402L
6370
6371
6372
6373_ACEOF
6374if ac_fn_cxx_try_compile "$LINENO"; then :
6375  ax_cv_cxx_compile_cxx14=yes
6376else
6377  ax_cv_cxx_compile_cxx14=no
6378fi
6379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380fi
6381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx14" >&5
6382$as_echo "$ax_cv_cxx_compile_cxx14" >&6; }
6383  if test x$ax_cv_cxx_compile_cxx14 = xyes; then
6384    ac_success=yes
6385  fi
6386
6387
6388
6389    if test x$ac_success = xno; then
6390                for switch in -std=c++14 -std=c++0x +std=c++14 "-h std=c++14"; do
6391      cachevar=`$as_echo "ax_cv_cxx_compile_cxx14_$switch" | $as_tr_sh`
6392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features with $switch" >&5
6393$as_echo_n "checking whether $CXX supports C++14 features with $switch... " >&6; }
6394if eval \${$cachevar+:} false; then :
6395  $as_echo_n "(cached) " >&6
6396else
6397  ac_save_CXX="$CXX"
6398         CXX="$CXX $switch"
6399         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400/* end confdefs.h.  */
6401
6402
6403// If the compiler admits that it is not ready for C++11, why torture it?
6404// Hopefully, this will speed up the test.
6405
6406#ifndef __cplusplus
6407
6408#error "This is not a C++ compiler"
6409
6410#elif __cplusplus < 201103L
6411
6412#error "This is not a C++11 compiler"
6413
6414#else
6415
6416namespace cxx11
6417{
6418
6419  namespace test_static_assert
6420  {
6421
6422    template <typename T>
6423    struct check
6424    {
6425      static_assert(sizeof(int) <= sizeof(T), "not big enough");
6426    };
6427
6428  }
6429
6430  namespace test_final_override
6431  {
6432
6433    struct Base
6434    {
6435      virtual void f() {}
6436    };
6437
6438    struct Derived : public Base
6439    {
6440      virtual void f() override {}
6441    };
6442
6443  }
6444
6445  namespace test_double_right_angle_brackets
6446  {
6447
6448    template < typename T >
6449    struct check {};
6450
6451    typedef check<void> single_type;
6452    typedef check<check<void>> double_type;
6453    typedef check<check<check<void>>> triple_type;
6454    typedef check<check<check<check<void>>>> quadruple_type;
6455
6456  }
6457
6458  namespace test_decltype
6459  {
6460
6461    int
6462    f()
6463    {
6464      int a = 1;
6465      decltype(a) b = 2;
6466      return a + b;
6467    }
6468
6469  }
6470
6471  namespace test_type_deduction
6472  {
6473
6474    template < typename T1, typename T2 >
6475    struct is_same
6476    {
6477      static const bool value = false;
6478    };
6479
6480    template < typename T >
6481    struct is_same<T, T>
6482    {
6483      static const bool value = true;
6484    };
6485
6486    template < typename T1, typename T2 >
6487    auto
6488    add(T1 a1, T2 a2) -> decltype(a1 + a2)
6489    {
6490      return a1 + a2;
6491    }
6492
6493    int
6494    test(const int c, volatile int v)
6495    {
6496      static_assert(is_same<int, decltype(0)>::value == true, "");
6497      static_assert(is_same<int, decltype(c)>::value == false, "");
6498      static_assert(is_same<int, decltype(v)>::value == false, "");
6499      auto ac = c;
6500      auto av = v;
6501      auto sumi = ac + av + 'x';
6502      auto sumf = ac + av + 1.0;
6503      static_assert(is_same<int, decltype(ac)>::value == true, "");
6504      static_assert(is_same<int, decltype(av)>::value == true, "");
6505      static_assert(is_same<int, decltype(sumi)>::value == true, "");
6506      static_assert(is_same<int, decltype(sumf)>::value == false, "");
6507      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6508      return (sumf > 0.0) ? sumi : add(c, v);
6509    }
6510
6511  }
6512
6513  namespace test_noexcept
6514  {
6515
6516    int f() { return 0; }
6517    int g() noexcept { return 0; }
6518
6519    static_assert(noexcept(f()) == false, "");
6520    static_assert(noexcept(g()) == true, "");
6521
6522  }
6523
6524  namespace test_constexpr
6525  {
6526
6527    template < typename CharT >
6528    unsigned long constexpr
6529    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6530    {
6531      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6532    }
6533
6534    template < typename CharT >
6535    unsigned long constexpr
6536    strlen_c(const CharT *const s) noexcept
6537    {
6538      return strlen_c_r(s, 0UL);
6539    }
6540
6541    static_assert(strlen_c("") == 0UL, "");
6542    static_assert(strlen_c("1") == 1UL, "");
6543    static_assert(strlen_c("example") == 7UL, "");
6544    static_assert(strlen_c("another\0example") == 7UL, "");
6545
6546  }
6547
6548  namespace test_rvalue_references
6549  {
6550
6551    template < int N >
6552    struct answer
6553    {
6554      static constexpr int value = N;
6555    };
6556
6557    answer<1> f(int&)       { return answer<1>(); }
6558    answer<2> f(const int&) { return answer<2>(); }
6559    answer<3> f(int&&)      { return answer<3>(); }
6560
6561    void
6562    test()
6563    {
6564      int i = 0;
6565      const int c = 0;
6566      static_assert(decltype(f(i))::value == 1, "");
6567      static_assert(decltype(f(c))::value == 2, "");
6568      static_assert(decltype(f(0))::value == 3, "");
6569    }
6570
6571  }
6572
6573  namespace test_uniform_initialization
6574  {
6575
6576    struct test
6577    {
6578      static const int zero {};
6579      static const int one {1};
6580    };
6581
6582    static_assert(test::zero == 0, "");
6583    static_assert(test::one == 1, "");
6584
6585  }
6586
6587  namespace test_lambdas
6588  {
6589
6590    void
6591    test1()
6592    {
6593      auto lambda1 = [](){};
6594      auto lambda2 = lambda1;
6595      lambda1();
6596      lambda2();
6597    }
6598
6599    int
6600    test2()
6601    {
6602      auto a = [](int i, int j){ return i + j; }(1, 2);
6603      auto b = []() -> int { return '0'; }();
6604      auto c = [=](){ return a + b; }();
6605      auto d = [&](){ return c; }();
6606      auto e = [a, &b](int x) mutable {
6607        const auto identity = [](int y){ return y; };
6608        for (auto i = 0; i < a; ++i)
6609          a += b--;
6610        return x + identity(a + b);
6611      }(0);
6612      return a + b + c + d + e;
6613    }
6614
6615    int
6616    test3()
6617    {
6618      const auto nullary = [](){ return 0; };
6619      const auto unary = [](int x){ return x; };
6620      using nullary_t = decltype(nullary);
6621      using unary_t = decltype(unary);
6622      const auto higher1st = [](nullary_t f){ return f(); };
6623      const auto higher2nd = [unary](nullary_t f1){
6624        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6625      };
6626      return higher1st(nullary) + higher2nd(nullary)(unary);
6627    }
6628
6629  }
6630
6631  namespace test_variadic_templates
6632  {
6633
6634    template <int...>
6635    struct sum;
6636
6637    template <int N0, int... N1toN>
6638    struct sum<N0, N1toN...>
6639    {
6640      static constexpr auto value = N0 + sum<N1toN...>::value;
6641    };
6642
6643    template <>
6644    struct sum<>
6645    {
6646      static constexpr auto value = 0;
6647    };
6648
6649    static_assert(sum<>::value == 0, "");
6650    static_assert(sum<1>::value == 1, "");
6651    static_assert(sum<23>::value == 23, "");
6652    static_assert(sum<1, 2>::value == 3, "");
6653    static_assert(sum<5, 5, 11>::value == 21, "");
6654    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6655
6656  }
6657
6658  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6659  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6660  // because of this.
6661  namespace test_template_alias_sfinae
6662  {
6663
6664    struct foo {};
6665
6666    template<typename T>
6667    using member = typename T::member_type;
6668
6669    template<typename T>
6670    void func(...) {}
6671
6672    template<typename T>
6673    void func(member<T>*) {}
6674
6675    void test();
6676
6677    void test() { func<foo>(0); }
6678
6679  }
6680
6681}  // namespace cxx11
6682
6683#endif  // __cplusplus >= 201103L
6684
6685
6686
6687
6688// If the compiler admits that it is not ready for C++14, why torture it?
6689// Hopefully, this will speed up the test.
6690
6691#ifndef __cplusplus
6692
6693#error "This is not a C++ compiler"
6694
6695#elif __cplusplus < 201402L
6696
6697#error "This is not a C++14 compiler"
6698
6699#else
6700
6701namespace cxx14
6702{
6703
6704  namespace test_polymorphic_lambdas
6705  {
6706
6707    int
6708    test()
6709    {
6710      const auto lambda = [](auto&&... args){
6711        const auto istiny = [](auto x){
6712          return (sizeof(x) == 1UL) ? 1 : 0;
6713        };
6714        const int aretiny[] = { istiny(args)... };
6715        return aretiny[0];
6716      };
6717      return lambda(1, 1L, 1.0f, '1');
6718    }
6719
6720  }
6721
6722  namespace test_binary_literals
6723  {
6724
6725    constexpr auto ivii = 0b0000000000101010;
6726    static_assert(ivii == 42, "wrong value");
6727
6728  }
6729
6730  namespace test_generalized_constexpr
6731  {
6732
6733    template < typename CharT >
6734    constexpr unsigned long
6735    strlen_c(const CharT *const s) noexcept
6736    {
6737      auto length = 0UL;
6738      for (auto p = s; *p; ++p)
6739        ++length;
6740      return length;
6741    }
6742
6743    static_assert(strlen_c("") == 0UL, "");
6744    static_assert(strlen_c("x") == 1UL, "");
6745    static_assert(strlen_c("test") == 4UL, "");
6746    static_assert(strlen_c("another\0test") == 7UL, "");
6747
6748  }
6749
6750  namespace test_lambda_init_capture
6751  {
6752
6753    int
6754    test()
6755    {
6756      auto x = 0;
6757      const auto lambda1 = [a = x](int b){ return a + b; };
6758      const auto lambda2 = [a = lambda1(x)](){ return a; };
6759      return lambda2();
6760    }
6761
6762  }
6763
6764  namespace test_digit_seperators
6765  {
6766
6767    constexpr auto ten_million = 100'000'000;
6768    static_assert(ten_million == 100000000, "");
6769
6770  }
6771
6772  namespace test_return_type_deduction
6773  {
6774
6775    auto f(int& x) { return x; }
6776    decltype(auto) g(int& x) { return x; }
6777
6778    template < typename T1, typename T2 >
6779    struct is_same
6780    {
6781      static constexpr auto value = false;
6782    };
6783
6784    template < typename T >
6785    struct is_same<T, T>
6786    {
6787      static constexpr auto value = true;
6788    };
6789
6790    int
6791    test()
6792    {
6793      auto x = 0;
6794      static_assert(is_same<int, decltype(f(x))>::value, "");
6795      static_assert(is_same<int&, decltype(g(x))>::value, "");
6796      return x;
6797    }
6798
6799  }
6800
6801}  // namespace cxx14
6802
6803#endif  // __cplusplus >= 201402L
6804
6805
6806
6807_ACEOF
6808if ac_fn_cxx_try_compile "$LINENO"; then :
6809  eval $cachevar=yes
6810else
6811  eval $cachevar=no
6812fi
6813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6814         CXX="$ac_save_CXX"
6815fi
6816eval ac_res=\$$cachevar
6817	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6818$as_echo "$ac_res" >&6; }
6819      if eval test x\$$cachevar = xyes; then
6820        CXX="$CXX $switch"
6821        if test -n "$CXXCPP" ; then
6822          CXXCPP="$CXXCPP $switch"
6823        fi
6824        ac_success=yes
6825        break
6826      fi
6827    done
6828  fi
6829  ac_ext=c
6830ac_cpp='$CPP $CPPFLAGS'
6831ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6832ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6833ac_compiler_gnu=$ac_cv_c_compiler_gnu
6834
6835  if test x$ax_cxx_compile_cxx14_required = xtrue; then
6836    if test x$ac_success = xno; then
6837      as_fn_error $? "*** A compiler with support for C++14 language features is required." "$LINENO" 5
6838    fi
6839  fi
6840  if test x$ac_success = xno; then
6841    HAVE_CXX14=0
6842    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++14 support was found" >&5
6843$as_echo "$as_me: No compiler with C++14 support was found" >&6;}
6844  else
6845    HAVE_CXX14=1
6846
6847$as_echo "#define HAVE_CXX14 1" >>confdefs.h
6848
6849  fi
6850
6851
6852
6853    if test "$HAVE_CXX14" = "1"; then
6854        CXX14_SUPPORT=yes
6855    fi
6856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
6857$as_echo "enabled" >&6; }
6858else
6859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled by user" >&5
6860$as_echo "disabled by user" >&6; }
6861fi
6862CXX14_SUPPORT=$CXX14_SUPPORT
6863
6864
6865if test "$CXX14_SUPPORT" = "no"; then
6866          ax_cxx_compile_cxx11_required=true
6867  ac_ext=cpp
6868ac_cpp='$CXXCPP $CPPFLAGS'
6869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6872  ac_success=no
6873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
6874$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
6875if ${ax_cv_cxx_compile_cxx11+:} false; then :
6876  $as_echo_n "(cached) " >&6
6877else
6878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6879/* end confdefs.h.  */
6880
6881
6882// If the compiler admits that it is not ready for C++11, why torture it?
6883// Hopefully, this will speed up the test.
6884
6885#ifndef __cplusplus
6886
6887#error "This is not a C++ compiler"
6888
6889#elif __cplusplus < 201103L
6890
6891#error "This is not a C++11 compiler"
6892
6893#else
6894
6895namespace cxx11
6896{
6897
6898  namespace test_static_assert
6899  {
6900
6901    template <typename T>
6902    struct check
6903    {
6904      static_assert(sizeof(int) <= sizeof(T), "not big enough");
6905    };
6906
6907  }
6908
6909  namespace test_final_override
6910  {
6911
6912    struct Base
6913    {
6914      virtual void f() {}
6915    };
6916
6917    struct Derived : public Base
6918    {
6919      virtual void f() override {}
6920    };
6921
6922  }
6923
6924  namespace test_double_right_angle_brackets
6925  {
6926
6927    template < typename T >
6928    struct check {};
6929
6930    typedef check<void> single_type;
6931    typedef check<check<void>> double_type;
6932    typedef check<check<check<void>>> triple_type;
6933    typedef check<check<check<check<void>>>> quadruple_type;
6934
6935  }
6936
6937  namespace test_decltype
6938  {
6939
6940    int
6941    f()
6942    {
6943      int a = 1;
6944      decltype(a) b = 2;
6945      return a + b;
6946    }
6947
6948  }
6949
6950  namespace test_type_deduction
6951  {
6952
6953    template < typename T1, typename T2 >
6954    struct is_same
6955    {
6956      static const bool value = false;
6957    };
6958
6959    template < typename T >
6960    struct is_same<T, T>
6961    {
6962      static const bool value = true;
6963    };
6964
6965    template < typename T1, typename T2 >
6966    auto
6967    add(T1 a1, T2 a2) -> decltype(a1 + a2)
6968    {
6969      return a1 + a2;
6970    }
6971
6972    int
6973    test(const int c, volatile int v)
6974    {
6975      static_assert(is_same<int, decltype(0)>::value == true, "");
6976      static_assert(is_same<int, decltype(c)>::value == false, "");
6977      static_assert(is_same<int, decltype(v)>::value == false, "");
6978      auto ac = c;
6979      auto av = v;
6980      auto sumi = ac + av + 'x';
6981      auto sumf = ac + av + 1.0;
6982      static_assert(is_same<int, decltype(ac)>::value == true, "");
6983      static_assert(is_same<int, decltype(av)>::value == true, "");
6984      static_assert(is_same<int, decltype(sumi)>::value == true, "");
6985      static_assert(is_same<int, decltype(sumf)>::value == false, "");
6986      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6987      return (sumf > 0.0) ? sumi : add(c, v);
6988    }
6989
6990  }
6991
6992  namespace test_noexcept
6993  {
6994
6995    int f() { return 0; }
6996    int g() noexcept { return 0; }
6997
6998    static_assert(noexcept(f()) == false, "");
6999    static_assert(noexcept(g()) == true, "");
7000
7001  }
7002
7003  namespace test_constexpr
7004  {
7005
7006    template < typename CharT >
7007    unsigned long constexpr
7008    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7009    {
7010      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7011    }
7012
7013    template < typename CharT >
7014    unsigned long constexpr
7015    strlen_c(const CharT *const s) noexcept
7016    {
7017      return strlen_c_r(s, 0UL);
7018    }
7019
7020    static_assert(strlen_c("") == 0UL, "");
7021    static_assert(strlen_c("1") == 1UL, "");
7022    static_assert(strlen_c("example") == 7UL, "");
7023    static_assert(strlen_c("another\0example") == 7UL, "");
7024
7025  }
7026
7027  namespace test_rvalue_references
7028  {
7029
7030    template < int N >
7031    struct answer
7032    {
7033      static constexpr int value = N;
7034    };
7035
7036    answer<1> f(int&)       { return answer<1>(); }
7037    answer<2> f(const int&) { return answer<2>(); }
7038    answer<3> f(int&&)      { return answer<3>(); }
7039
7040    void
7041    test()
7042    {
7043      int i = 0;
7044      const int c = 0;
7045      static_assert(decltype(f(i))::value == 1, "");
7046      static_assert(decltype(f(c))::value == 2, "");
7047      static_assert(decltype(f(0))::value == 3, "");
7048    }
7049
7050  }
7051
7052  namespace test_uniform_initialization
7053  {
7054
7055    struct test
7056    {
7057      static const int zero {};
7058      static const int one {1};
7059    };
7060
7061    static_assert(test::zero == 0, "");
7062    static_assert(test::one == 1, "");
7063
7064  }
7065
7066  namespace test_lambdas
7067  {
7068
7069    void
7070    test1()
7071    {
7072      auto lambda1 = [](){};
7073      auto lambda2 = lambda1;
7074      lambda1();
7075      lambda2();
7076    }
7077
7078    int
7079    test2()
7080    {
7081      auto a = [](int i, int j){ return i + j; }(1, 2);
7082      auto b = []() -> int { return '0'; }();
7083      auto c = [=](){ return a + b; }();
7084      auto d = [&](){ return c; }();
7085      auto e = [a, &b](int x) mutable {
7086        const auto identity = [](int y){ return y; };
7087        for (auto i = 0; i < a; ++i)
7088          a += b--;
7089        return x + identity(a + b);
7090      }(0);
7091      return a + b + c + d + e;
7092    }
7093
7094    int
7095    test3()
7096    {
7097      const auto nullary = [](){ return 0; };
7098      const auto unary = [](int x){ return x; };
7099      using nullary_t = decltype(nullary);
7100      using unary_t = decltype(unary);
7101      const auto higher1st = [](nullary_t f){ return f(); };
7102      const auto higher2nd = [unary](nullary_t f1){
7103        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7104      };
7105      return higher1st(nullary) + higher2nd(nullary)(unary);
7106    }
7107
7108  }
7109
7110  namespace test_variadic_templates
7111  {
7112
7113    template <int...>
7114    struct sum;
7115
7116    template <int N0, int... N1toN>
7117    struct sum<N0, N1toN...>
7118    {
7119      static constexpr auto value = N0 + sum<N1toN...>::value;
7120    };
7121
7122    template <>
7123    struct sum<>
7124    {
7125      static constexpr auto value = 0;
7126    };
7127
7128    static_assert(sum<>::value == 0, "");
7129    static_assert(sum<1>::value == 1, "");
7130    static_assert(sum<23>::value == 23, "");
7131    static_assert(sum<1, 2>::value == 3, "");
7132    static_assert(sum<5, 5, 11>::value == 21, "");
7133    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7134
7135  }
7136
7137  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7138  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7139  // because of this.
7140  namespace test_template_alias_sfinae
7141  {
7142
7143    struct foo {};
7144
7145    template<typename T>
7146    using member = typename T::member_type;
7147
7148    template<typename T>
7149    void func(...) {}
7150
7151    template<typename T>
7152    void func(member<T>*) {}
7153
7154    void test();
7155
7156    void test() { func<foo>(0); }
7157
7158  }
7159
7160}  // namespace cxx11
7161
7162#endif  // __cplusplus >= 201103L
7163
7164
7165
7166_ACEOF
7167if ac_fn_cxx_try_compile "$LINENO"; then :
7168  ax_cv_cxx_compile_cxx11=yes
7169else
7170  ax_cv_cxx_compile_cxx11=no
7171fi
7172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173fi
7174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
7175$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
7176  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
7177    ac_success=yes
7178  fi
7179
7180
7181
7182    if test x$ac_success = xno; then
7183                for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
7184      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
7185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
7186$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
7187if eval \${$cachevar+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  ac_save_CXX="$CXX"
7191         CXX="$CXX $switch"
7192         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7193/* end confdefs.h.  */
7194
7195
7196// If the compiler admits that it is not ready for C++11, why torture it?
7197// Hopefully, this will speed up the test.
7198
7199#ifndef __cplusplus
7200
7201#error "This is not a C++ compiler"
7202
7203#elif __cplusplus < 201103L
7204
7205#error "This is not a C++11 compiler"
7206
7207#else
7208
7209namespace cxx11
7210{
7211
7212  namespace test_static_assert
7213  {
7214
7215    template <typename T>
7216    struct check
7217    {
7218      static_assert(sizeof(int) <= sizeof(T), "not big enough");
7219    };
7220
7221  }
7222
7223  namespace test_final_override
7224  {
7225
7226    struct Base
7227    {
7228      virtual void f() {}
7229    };
7230
7231    struct Derived : public Base
7232    {
7233      virtual void f() override {}
7234    };
7235
7236  }
7237
7238  namespace test_double_right_angle_brackets
7239  {
7240
7241    template < typename T >
7242    struct check {};
7243
7244    typedef check<void> single_type;
7245    typedef check<check<void>> double_type;
7246    typedef check<check<check<void>>> triple_type;
7247    typedef check<check<check<check<void>>>> quadruple_type;
7248
7249  }
7250
7251  namespace test_decltype
7252  {
7253
7254    int
7255    f()
7256    {
7257      int a = 1;
7258      decltype(a) b = 2;
7259      return a + b;
7260    }
7261
7262  }
7263
7264  namespace test_type_deduction
7265  {
7266
7267    template < typename T1, typename T2 >
7268    struct is_same
7269    {
7270      static const bool value = false;
7271    };
7272
7273    template < typename T >
7274    struct is_same<T, T>
7275    {
7276      static const bool value = true;
7277    };
7278
7279    template < typename T1, typename T2 >
7280    auto
7281    add(T1 a1, T2 a2) -> decltype(a1 + a2)
7282    {
7283      return a1 + a2;
7284    }
7285
7286    int
7287    test(const int c, volatile int v)
7288    {
7289      static_assert(is_same<int, decltype(0)>::value == true, "");
7290      static_assert(is_same<int, decltype(c)>::value == false, "");
7291      static_assert(is_same<int, decltype(v)>::value == false, "");
7292      auto ac = c;
7293      auto av = v;
7294      auto sumi = ac + av + 'x';
7295      auto sumf = ac + av + 1.0;
7296      static_assert(is_same<int, decltype(ac)>::value == true, "");
7297      static_assert(is_same<int, decltype(av)>::value == true, "");
7298      static_assert(is_same<int, decltype(sumi)>::value == true, "");
7299      static_assert(is_same<int, decltype(sumf)>::value == false, "");
7300      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
7301      return (sumf > 0.0) ? sumi : add(c, v);
7302    }
7303
7304  }
7305
7306  namespace test_noexcept
7307  {
7308
7309    int f() { return 0; }
7310    int g() noexcept { return 0; }
7311
7312    static_assert(noexcept(f()) == false, "");
7313    static_assert(noexcept(g()) == true, "");
7314
7315  }
7316
7317  namespace test_constexpr
7318  {
7319
7320    template < typename CharT >
7321    unsigned long constexpr
7322    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
7323    {
7324      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
7325    }
7326
7327    template < typename CharT >
7328    unsigned long constexpr
7329    strlen_c(const CharT *const s) noexcept
7330    {
7331      return strlen_c_r(s, 0UL);
7332    }
7333
7334    static_assert(strlen_c("") == 0UL, "");
7335    static_assert(strlen_c("1") == 1UL, "");
7336    static_assert(strlen_c("example") == 7UL, "");
7337    static_assert(strlen_c("another\0example") == 7UL, "");
7338
7339  }
7340
7341  namespace test_rvalue_references
7342  {
7343
7344    template < int N >
7345    struct answer
7346    {
7347      static constexpr int value = N;
7348    };
7349
7350    answer<1> f(int&)       { return answer<1>(); }
7351    answer<2> f(const int&) { return answer<2>(); }
7352    answer<3> f(int&&)      { return answer<3>(); }
7353
7354    void
7355    test()
7356    {
7357      int i = 0;
7358      const int c = 0;
7359      static_assert(decltype(f(i))::value == 1, "");
7360      static_assert(decltype(f(c))::value == 2, "");
7361      static_assert(decltype(f(0))::value == 3, "");
7362    }
7363
7364  }
7365
7366  namespace test_uniform_initialization
7367  {
7368
7369    struct test
7370    {
7371      static const int zero {};
7372      static const int one {1};
7373    };
7374
7375    static_assert(test::zero == 0, "");
7376    static_assert(test::one == 1, "");
7377
7378  }
7379
7380  namespace test_lambdas
7381  {
7382
7383    void
7384    test1()
7385    {
7386      auto lambda1 = [](){};
7387      auto lambda2 = lambda1;
7388      lambda1();
7389      lambda2();
7390    }
7391
7392    int
7393    test2()
7394    {
7395      auto a = [](int i, int j){ return i + j; }(1, 2);
7396      auto b = []() -> int { return '0'; }();
7397      auto c = [=](){ return a + b; }();
7398      auto d = [&](){ return c; }();
7399      auto e = [a, &b](int x) mutable {
7400        const auto identity = [](int y){ return y; };
7401        for (auto i = 0; i < a; ++i)
7402          a += b--;
7403        return x + identity(a + b);
7404      }(0);
7405      return a + b + c + d + e;
7406    }
7407
7408    int
7409    test3()
7410    {
7411      const auto nullary = [](){ return 0; };
7412      const auto unary = [](int x){ return x; };
7413      using nullary_t = decltype(nullary);
7414      using unary_t = decltype(unary);
7415      const auto higher1st = [](nullary_t f){ return f(); };
7416      const auto higher2nd = [unary](nullary_t f1){
7417        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
7418      };
7419      return higher1st(nullary) + higher2nd(nullary)(unary);
7420    }
7421
7422  }
7423
7424  namespace test_variadic_templates
7425  {
7426
7427    template <int...>
7428    struct sum;
7429
7430    template <int N0, int... N1toN>
7431    struct sum<N0, N1toN...>
7432    {
7433      static constexpr auto value = N0 + sum<N1toN...>::value;
7434    };
7435
7436    template <>
7437    struct sum<>
7438    {
7439      static constexpr auto value = 0;
7440    };
7441
7442    static_assert(sum<>::value == 0, "");
7443    static_assert(sum<1>::value == 1, "");
7444    static_assert(sum<23>::value == 23, "");
7445    static_assert(sum<1, 2>::value == 3, "");
7446    static_assert(sum<5, 5, 11>::value == 21, "");
7447    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
7448
7449  }
7450
7451  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
7452  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
7453  // because of this.
7454  namespace test_template_alias_sfinae
7455  {
7456
7457    struct foo {};
7458
7459    template<typename T>
7460    using member = typename T::member_type;
7461
7462    template<typename T>
7463    void func(...) {}
7464
7465    template<typename T>
7466    void func(member<T>*) {}
7467
7468    void test();
7469
7470    void test() { func<foo>(0); }
7471
7472  }
7473
7474}  // namespace cxx11
7475
7476#endif  // __cplusplus >= 201103L
7477
7478
7479
7480_ACEOF
7481if ac_fn_cxx_try_compile "$LINENO"; then :
7482  eval $cachevar=yes
7483else
7484  eval $cachevar=no
7485fi
7486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7487         CXX="$ac_save_CXX"
7488fi
7489eval ac_res=\$$cachevar
7490	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7491$as_echo "$ac_res" >&6; }
7492      if eval test x\$$cachevar = xyes; then
7493        CXX="$CXX $switch"
7494        if test -n "$CXXCPP" ; then
7495          CXXCPP="$CXXCPP $switch"
7496        fi
7497        ac_success=yes
7498        break
7499      fi
7500    done
7501  fi
7502  ac_ext=c
7503ac_cpp='$CPP $CPPFLAGS'
7504ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7505ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7506ac_compiler_gnu=$ac_cv_c_compiler_gnu
7507
7508  if test x$ax_cxx_compile_cxx11_required = xtrue; then
7509    if test x$ac_success = xno; then
7510      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
7511    fi
7512  fi
7513  if test x$ac_success = xno; then
7514    HAVE_CXX11=0
7515    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
7516$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
7517  else
7518    HAVE_CXX11=1
7519
7520$as_echo "#define HAVE_CXX11 1" >>confdefs.h
7521
7522  fi
7523
7524
7525fi
7526
7527ac_ext=cpp
7528ac_cpp='$CXXCPP $CPPFLAGS'
7529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7532
7533    as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_$ERROR_ON_UNKNOWN_OPTIONS_-Wsuggest-override" | $as_tr_sh`
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -Wsuggest-override" >&5
7535$as_echo_n "checking whether C++ compiler accepts -Wsuggest-override... " >&6; }
7536if eval \${$as_CACHEVAR+:} false; then :
7537  $as_echo_n "(cached) " >&6
7538else
7539
7540  ax_check_save_flags=$CXXFLAGS
7541  CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wsuggest-override"
7542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7543/* end confdefs.h.  */
7544
7545int
7546main ()
7547{
7548
7549  ;
7550  return 0;
7551}
7552_ACEOF
7553if ac_fn_cxx_try_compile "$LINENO"; then :
7554  eval "$as_CACHEVAR=yes"
7555else
7556  eval "$as_CACHEVAR=no"
7557fi
7558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7559  CXXFLAGS=$ax_check_save_flags
7560fi
7561eval ac_res=\$$as_CACHEVAR
7562	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7563$as_echo "$ac_res" >&6; }
7564if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
7565  CXX_WFLAGS="$CXX_WFLAGS -Wsuggest-override"
7566else
7567  :
7568fi
7569
7570ac_ext=c
7571ac_cpp='$CPP $CPPFLAGS'
7572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7574ac_compiler_gnu=$ac_cv_c_compiler_gnu
7575
7576
7577ac_ext=cpp
7578ac_cpp='$CXXCPP $CPPFLAGS'
7579ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7580ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7581ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7582
7583SAVED_CXXFLAGS=$CXXFLAGS
7584CXXFLAGS="$CXXFLAGS $ERROR_ON_UNKNOWN_OPTIONS -Wimplicit-fallthrough"
7585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wimplicit-fallthrough can be enabled" >&5
7586$as_echo_n "checking if -Wimplicit-fallthrough can be enabled... " >&6; }
7587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7588/* end confdefs.h.  */
7589#if !(__cplusplus >= 201103L && ( (defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >=7))) || ((defined(__GNUC__) && __GNUC__ >= 7)) ) )
7590    #error "not (C++11 and (clang >= 3.7 or gcc >= 7))"
7591    #endif
7592int
7593main ()
7594{
7595
7596  ;
7597  return 0;
7598}
7599_ACEOF
7600if ac_fn_cxx_try_compile "$LINENO"; then :
7601  CXX_WFLAGS="$CXX_WFLAGS -Wimplicit-fallthrough"
7602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7603$as_echo "yes" >&6; }
7604else
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7606$as_echo "no" >&6; }
7607fi
7608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7609CXXFLAGS=$SAVED_CXXFLAGS
7610ac_ext=c
7611ac_cpp='$CPP $CPPFLAGS'
7612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7614ac_compiler_gnu=$ac_cv_c_compiler_gnu
7615
7616
7617CXX_WFLAGS=$CXX_WFLAGS
7618
7619C_WFLAGS=$C_WFLAGS
7620
7621NO_UNUSED_PARAMETER_FLAG=$NO_UNUSED_PARAMETER_FLAG
7622
7623NO_SIGN_COMPARE=$NO_SIGN_COMPARE
7624
7625NO_NON_VIRTUAL_DTOR_FLAG=$NO_NON_VIRTUAL_DTOR_FLAG
7626
7627NO_LOGICAL_OP_FLAG=$NO_LOGICAL_OP_FLAG
7628
7629WARN_OLD_STYLE_CAST=$WARN_OLD_STYLE_CAST
7630
7631WARN_EFFCPLUSPLUS=$WARN_EFFCPLUSPLUS
7632
7633
7634ac_ext=c
7635ac_cpp='$CPP $CPPFLAGS'
7636ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7637ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7638ac_compiler_gnu=$ac_cv_c_compiler_gnu
7639if test -n "$ac_tool_prefix"; then
7640  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
7641set dummy ${ac_tool_prefix}gcc; ac_word=$2
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7643$as_echo_n "checking for $ac_word... " >&6; }
7644if ${ac_cv_prog_CC+:} false; then :
7645  $as_echo_n "(cached) " >&6
7646else
7647  if test -n "$CC"; then
7648  ac_cv_prog_CC="$CC" # Let the user override the test.
7649else
7650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7651for as_dir in $PATH
7652do
7653  IFS=$as_save_IFS
7654  test -z "$as_dir" && as_dir=.
7655    for ac_exec_ext in '' $ac_executable_extensions; do
7656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7657    ac_cv_prog_CC="${ac_tool_prefix}gcc"
7658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7659    break 2
7660  fi
7661done
7662  done
7663IFS=$as_save_IFS
7664
7665fi
7666fi
7667CC=$ac_cv_prog_CC
7668if test -n "$CC"; then
7669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7670$as_echo "$CC" >&6; }
7671else
7672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673$as_echo "no" >&6; }
7674fi
7675
7676
7677fi
7678if test -z "$ac_cv_prog_CC"; then
7679  ac_ct_CC=$CC
7680  # Extract the first word of "gcc", so it can be a program name with args.
7681set dummy gcc; ac_word=$2
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7683$as_echo_n "checking for $ac_word... " >&6; }
7684if ${ac_cv_prog_ac_ct_CC+:} false; then :
7685  $as_echo_n "(cached) " >&6
7686else
7687  if test -n "$ac_ct_CC"; then
7688  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7689else
7690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7691for as_dir in $PATH
7692do
7693  IFS=$as_save_IFS
7694  test -z "$as_dir" && as_dir=.
7695    for ac_exec_ext in '' $ac_executable_extensions; do
7696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7697    ac_cv_prog_ac_ct_CC="gcc"
7698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7699    break 2
7700  fi
7701done
7702  done
7703IFS=$as_save_IFS
7704
7705fi
7706fi
7707ac_ct_CC=$ac_cv_prog_ac_ct_CC
7708if test -n "$ac_ct_CC"; then
7709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
7710$as_echo "$ac_ct_CC" >&6; }
7711else
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7713$as_echo "no" >&6; }
7714fi
7715
7716  if test "x$ac_ct_CC" = x; then
7717    CC=""
7718  else
7719    case $cross_compiling:$ac_tool_warned in
7720yes:)
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7723ac_tool_warned=yes ;;
7724esac
7725    CC=$ac_ct_CC
7726  fi
7727else
7728  CC="$ac_cv_prog_CC"
7729fi
7730
7731if test -z "$CC"; then
7732          if test -n "$ac_tool_prefix"; then
7733    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
7734set dummy ${ac_tool_prefix}cc; ac_word=$2
7735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7736$as_echo_n "checking for $ac_word... " >&6; }
7737if ${ac_cv_prog_CC+:} false; then :
7738  $as_echo_n "(cached) " >&6
7739else
7740  if test -n "$CC"; then
7741  ac_cv_prog_CC="$CC" # Let the user override the test.
7742else
7743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7744for as_dir in $PATH
7745do
7746  IFS=$as_save_IFS
7747  test -z "$as_dir" && as_dir=.
7748    for ac_exec_ext in '' $ac_executable_extensions; do
7749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7750    ac_cv_prog_CC="${ac_tool_prefix}cc"
7751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7752    break 2
7753  fi
7754done
7755  done
7756IFS=$as_save_IFS
7757
7758fi
7759fi
7760CC=$ac_cv_prog_CC
7761if test -n "$CC"; then
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7763$as_echo "$CC" >&6; }
7764else
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7766$as_echo "no" >&6; }
7767fi
7768
7769
7770  fi
7771fi
7772if test -z "$CC"; then
7773  # Extract the first word of "cc", so it can be a program name with args.
7774set dummy cc; ac_word=$2
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7776$as_echo_n "checking for $ac_word... " >&6; }
7777if ${ac_cv_prog_CC+:} false; then :
7778  $as_echo_n "(cached) " >&6
7779else
7780  if test -n "$CC"; then
7781  ac_cv_prog_CC="$CC" # Let the user override the test.
7782else
7783  ac_prog_rejected=no
7784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7785for as_dir in $PATH
7786do
7787  IFS=$as_save_IFS
7788  test -z "$as_dir" && as_dir=.
7789    for ac_exec_ext in '' $ac_executable_extensions; do
7790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7791    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
7792       ac_prog_rejected=yes
7793       continue
7794     fi
7795    ac_cv_prog_CC="cc"
7796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7797    break 2
7798  fi
7799done
7800  done
7801IFS=$as_save_IFS
7802
7803if test $ac_prog_rejected = yes; then
7804  # We found a bogon in the path, so make sure we never use it.
7805  set dummy $ac_cv_prog_CC
7806  shift
7807  if test $# != 0; then
7808    # We chose a different compiler from the bogus one.
7809    # However, it has the same basename, so the bogon will be chosen
7810    # first if we set CC to just the basename; use the full file name.
7811    shift
7812    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
7813  fi
7814fi
7815fi
7816fi
7817CC=$ac_cv_prog_CC
7818if test -n "$CC"; then
7819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7820$as_echo "$CC" >&6; }
7821else
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
7824fi
7825
7826
7827fi
7828if test -z "$CC"; then
7829  if test -n "$ac_tool_prefix"; then
7830  for ac_prog in cl.exe
7831  do
7832    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7833set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7835$as_echo_n "checking for $ac_word... " >&6; }
7836if ${ac_cv_prog_CC+:} false; then :
7837  $as_echo_n "(cached) " >&6
7838else
7839  if test -n "$CC"; then
7840  ac_cv_prog_CC="$CC" # Let the user override the test.
7841else
7842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7843for as_dir in $PATH
7844do
7845  IFS=$as_save_IFS
7846  test -z "$as_dir" && as_dir=.
7847    for ac_exec_ext in '' $ac_executable_extensions; do
7848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7849    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
7850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7851    break 2
7852  fi
7853done
7854  done
7855IFS=$as_save_IFS
7856
7857fi
7858fi
7859CC=$ac_cv_prog_CC
7860if test -n "$CC"; then
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7862$as_echo "$CC" >&6; }
7863else
7864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7865$as_echo "no" >&6; }
7866fi
7867
7868
7869    test -n "$CC" && break
7870  done
7871fi
7872if test -z "$CC"; then
7873  ac_ct_CC=$CC
7874  for ac_prog in cl.exe
7875do
7876  # Extract the first word of "$ac_prog", so it can be a program name with args.
7877set dummy $ac_prog; ac_word=$2
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879$as_echo_n "checking for $ac_word... " >&6; }
7880if ${ac_cv_prog_ac_ct_CC+:} false; then :
7881  $as_echo_n "(cached) " >&6
7882else
7883  if test -n "$ac_ct_CC"; then
7884  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7885else
7886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_prog_ac_ct_CC="$ac_prog"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901fi
7902fi
7903ac_ct_CC=$ac_cv_prog_ac_ct_CC
7904if test -n "$ac_ct_CC"; then
7905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
7906$as_echo "$ac_ct_CC" >&6; }
7907else
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7909$as_echo "no" >&6; }
7910fi
7911
7912
7913  test -n "$ac_ct_CC" && break
7914done
7915
7916  if test "x$ac_ct_CC" = x; then
7917    CC=""
7918  else
7919    case $cross_compiling:$ac_tool_warned in
7920yes:)
7921{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7922$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7923ac_tool_warned=yes ;;
7924esac
7925    CC=$ac_ct_CC
7926  fi
7927fi
7928
7929fi
7930
7931
7932test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7934as_fn_error $? "no acceptable C compiler found in \$PATH
7935See \`config.log' for more details" "$LINENO" 5; }
7936
7937# Provide some information about the compiler.
7938$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
7939set X $ac_compile
7940ac_compiler=$2
7941for ac_option in --version -v -V -qversion; do
7942  { { ac_try="$ac_compiler $ac_option >&5"
7943case "(($ac_try" in
7944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7945  *) ac_try_echo=$ac_try;;
7946esac
7947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7948$as_echo "$ac_try_echo"; } >&5
7949  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7950  ac_status=$?
7951  if test -s conftest.err; then
7952    sed '10a\
7953... rest of stderr output deleted ...
7954         10q' conftest.err >conftest.er1
7955    cat conftest.er1 >&5
7956  fi
7957  rm -f conftest.er1 conftest.err
7958  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7959  test $ac_status = 0; }
7960done
7961
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
7963$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
7964if ${ac_cv_c_compiler_gnu+:} false; then :
7965  $as_echo_n "(cached) " >&6
7966else
7967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7968/* end confdefs.h.  */
7969
7970int
7971main ()
7972{
7973#ifndef __GNUC__
7974       choke me
7975#endif
7976
7977  ;
7978  return 0;
7979}
7980_ACEOF
7981if ac_fn_c_try_compile "$LINENO"; then :
7982  ac_compiler_gnu=yes
7983else
7984  ac_compiler_gnu=no
7985fi
7986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7987ac_cv_c_compiler_gnu=$ac_compiler_gnu
7988
7989fi
7990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
7991$as_echo "$ac_cv_c_compiler_gnu" >&6; }
7992if test $ac_compiler_gnu = yes; then
7993  GCC=yes
7994else
7995  GCC=
7996fi
7997ac_test_CFLAGS=${CFLAGS+set}
7998ac_save_CFLAGS=$CFLAGS
7999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
8000$as_echo_n "checking whether $CC accepts -g... " >&6; }
8001if ${ac_cv_prog_cc_g+:} false; then :
8002  $as_echo_n "(cached) " >&6
8003else
8004  ac_save_c_werror_flag=$ac_c_werror_flag
8005   ac_c_werror_flag=yes
8006   ac_cv_prog_cc_g=no
8007   CFLAGS="-g"
8008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8009/* end confdefs.h.  */
8010
8011int
8012main ()
8013{
8014
8015  ;
8016  return 0;
8017}
8018_ACEOF
8019if ac_fn_c_try_compile "$LINENO"; then :
8020  ac_cv_prog_cc_g=yes
8021else
8022  CFLAGS=""
8023      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8024/* end confdefs.h.  */
8025
8026int
8027main ()
8028{
8029
8030  ;
8031  return 0;
8032}
8033_ACEOF
8034if ac_fn_c_try_compile "$LINENO"; then :
8035
8036else
8037  ac_c_werror_flag=$ac_save_c_werror_flag
8038	 CFLAGS="-g"
8039	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8040/* end confdefs.h.  */
8041
8042int
8043main ()
8044{
8045
8046  ;
8047  return 0;
8048}
8049_ACEOF
8050if ac_fn_c_try_compile "$LINENO"; then :
8051  ac_cv_prog_cc_g=yes
8052fi
8053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8054fi
8055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8056fi
8057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8058   ac_c_werror_flag=$ac_save_c_werror_flag
8059fi
8060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
8061$as_echo "$ac_cv_prog_cc_g" >&6; }
8062if test "$ac_test_CFLAGS" = set; then
8063  CFLAGS=$ac_save_CFLAGS
8064elif test $ac_cv_prog_cc_g = yes; then
8065  if test "$GCC" = yes; then
8066    CFLAGS="-g -O2"
8067  else
8068    CFLAGS="-g"
8069  fi
8070else
8071  if test "$GCC" = yes; then
8072    CFLAGS="-O2"
8073  else
8074    CFLAGS=
8075  fi
8076fi
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
8078$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
8079if ${ac_cv_prog_cc_c89+:} false; then :
8080  $as_echo_n "(cached) " >&6
8081else
8082  ac_cv_prog_cc_c89=no
8083ac_save_CC=$CC
8084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8085/* end confdefs.h.  */
8086#include <stdarg.h>
8087#include <stdio.h>
8088struct stat;
8089/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8090struct buf { int x; };
8091FILE * (*rcsopen) (struct buf *, struct stat *, int);
8092static char *e (p, i)
8093     char **p;
8094     int i;
8095{
8096  return p[i];
8097}
8098static char *f (char * (*g) (char **, int), char **p, ...)
8099{
8100  char *s;
8101  va_list v;
8102  va_start (v,p);
8103  s = g (p, va_arg (v,int));
8104  va_end (v);
8105  return s;
8106}
8107
8108/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
8109   function prototypes and stuff, but not '\xHH' hex character constants.
8110   These don't provoke an error unfortunately, instead are silently treated
8111   as 'x'.  The following induces an error, until -std is added to get
8112   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
8113   array size at least.  It's necessary to write '\x00'==0 to get something
8114   that's true only with -std.  */
8115int osf4_cc_array ['\x00' == 0 ? 1 : -1];
8116
8117/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
8118   inside strings and character constants.  */
8119#define FOO(x) 'x'
8120int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
8121
8122int test (int i, double x);
8123struct s1 {int (*f) (int a);};
8124struct s2 {int (*f) (double a);};
8125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8126int argc;
8127char **argv;
8128int
8129main ()
8130{
8131return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8132  ;
8133  return 0;
8134}
8135_ACEOF
8136for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
8137	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8138do
8139  CC="$ac_save_CC $ac_arg"
8140  if ac_fn_c_try_compile "$LINENO"; then :
8141  ac_cv_prog_cc_c89=$ac_arg
8142fi
8143rm -f core conftest.err conftest.$ac_objext
8144  test "x$ac_cv_prog_cc_c89" != "xno" && break
8145done
8146rm -f conftest.$ac_ext
8147CC=$ac_save_CC
8148
8149fi
8150# AC_CACHE_VAL
8151case "x$ac_cv_prog_cc_c89" in
8152  x)
8153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8154$as_echo "none needed" >&6; } ;;
8155  xno)
8156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8157$as_echo "unsupported" >&6; } ;;
8158  *)
8159    CC="$CC $ac_cv_prog_cc_c89"
8160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
8161$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
8162esac
8163if test "x$ac_cv_prog_cc_c89" != xno; then :
8164
8165fi
8166
8167ac_ext=c
8168ac_cpp='$CPP $CPPFLAGS'
8169ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8170ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8171ac_compiler_gnu=$ac_cv_c_compiler_gnu
8172
8173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
8174$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
8175if ${ac_cv_prog_cc_c99+:} false; then :
8176  $as_echo_n "(cached) " >&6
8177else
8178  ac_cv_prog_cc_c99=no
8179ac_save_CC=$CC
8180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181/* end confdefs.h.  */
8182#include <stdarg.h>
8183#include <stdbool.h>
8184#include <stdlib.h>
8185#include <wchar.h>
8186#include <stdio.h>
8187
8188// Check varargs macros.  These examples are taken from C99 6.10.3.5.
8189#define debug(...) fprintf (stderr, __VA_ARGS__)
8190#define showlist(...) puts (#__VA_ARGS__)
8191#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
8192static void
8193test_varargs_macros (void)
8194{
8195  int x = 1234;
8196  int y = 5678;
8197  debug ("Flag");
8198  debug ("X = %d\n", x);
8199  showlist (The first, second, and third items.);
8200  report (x>y, "x is %d but y is %d", x, y);
8201}
8202
8203// Check long long types.
8204#define BIG64 18446744073709551615ull
8205#define BIG32 4294967295ul
8206#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
8207#if !BIG_OK
8208  your preprocessor is broken;
8209#endif
8210#if BIG_OK
8211#else
8212  your preprocessor is broken;
8213#endif
8214static long long int bignum = -9223372036854775807LL;
8215static unsigned long long int ubignum = BIG64;
8216
8217struct incomplete_array
8218{
8219  int datasize;
8220  double data[];
8221};
8222
8223struct named_init {
8224  int number;
8225  const wchar_t *name;
8226  double average;
8227};
8228
8229typedef const char *ccp;
8230
8231static inline int
8232test_restrict (ccp restrict text)
8233{
8234  // See if C++-style comments work.
8235  // Iterate through items via the restricted pointer.
8236  // Also check for declarations in for loops.
8237  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
8238    continue;
8239  return 0;
8240}
8241
8242// Check varargs and va_copy.
8243static void
8244test_varargs (const char *format, ...)
8245{
8246  va_list args;
8247  va_start (args, format);
8248  va_list args_copy;
8249  va_copy (args_copy, args);
8250
8251  const char *str;
8252  int number;
8253  float fnumber;
8254
8255  while (*format)
8256    {
8257      switch (*format++)
8258	{
8259	case 's': // string
8260	  str = va_arg (args_copy, const char *);
8261	  break;
8262	case 'd': // int
8263	  number = va_arg (args_copy, int);
8264	  break;
8265	case 'f': // float
8266	  fnumber = va_arg (args_copy, double);
8267	  break;
8268	default:
8269	  break;
8270	}
8271    }
8272  va_end (args_copy);
8273  va_end (args);
8274}
8275
8276int
8277main ()
8278{
8279
8280  // Check bool.
8281  _Bool success = false;
8282
8283  // Check restrict.
8284  if (test_restrict ("String literal") == 0)
8285    success = true;
8286  char *restrict newvar = "Another string";
8287
8288  // Check varargs.
8289  test_varargs ("s, d' f .", "string", 65, 34.234);
8290  test_varargs_macros ();
8291
8292  // Check flexible array members.
8293  struct incomplete_array *ia =
8294    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
8295  ia->datasize = 10;
8296  for (int i = 0; i < ia->datasize; ++i)
8297    ia->data[i] = i * 1.234;
8298
8299  // Check named initializers.
8300  struct named_init ni = {
8301    .number = 34,
8302    .name = L"Test wide string",
8303    .average = 543.34343,
8304  };
8305
8306  ni.number = 58;
8307
8308  int dynamic_array[ni.number];
8309  dynamic_array[ni.number - 1] = 543;
8310
8311  // work around unused variable warnings
8312  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
8313	  || dynamic_array[ni.number - 1] != 543);
8314
8315  ;
8316  return 0;
8317}
8318_ACEOF
8319for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
8320do
8321  CC="$ac_save_CC $ac_arg"
8322  if ac_fn_c_try_compile "$LINENO"; then :
8323  ac_cv_prog_cc_c99=$ac_arg
8324fi
8325rm -f core conftest.err conftest.$ac_objext
8326  test "x$ac_cv_prog_cc_c99" != "xno" && break
8327done
8328rm -f conftest.$ac_ext
8329CC=$ac_save_CC
8330
8331fi
8332# AC_CACHE_VAL
8333case "x$ac_cv_prog_cc_c99" in
8334  x)
8335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8336$as_echo "none needed" >&6; } ;;
8337  xno)
8338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8339$as_echo "unsupported" >&6; } ;;
8340  *)
8341    CC="$CC $ac_cv_prog_cc_c99"
8342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
8343$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
8344esac
8345if test "x$ac_cv_prog_cc_c99" != xno; then :
8346
8347fi
8348
8349
8350ac_ext=cpp
8351ac_cpp='$CXXCPP $CPPFLAGS'
8352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8355if test -z "$CXX"; then
8356  if test -n "$CCC"; then
8357    CXX=$CCC
8358  else
8359    if test -n "$ac_tool_prefix"; then
8360  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
8361  do
8362    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8363set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365$as_echo_n "checking for $ac_word... " >&6; }
8366if ${ac_cv_prog_CXX+:} false; then :
8367  $as_echo_n "(cached) " >&6
8368else
8369  if test -n "$CXX"; then
8370  ac_cv_prog_CXX="$CXX" # Let the user override the test.
8371else
8372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8373for as_dir in $PATH
8374do
8375  IFS=$as_save_IFS
8376  test -z "$as_dir" && as_dir=.
8377    for ac_exec_ext in '' $ac_executable_extensions; do
8378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8379    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
8380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8381    break 2
8382  fi
8383done
8384  done
8385IFS=$as_save_IFS
8386
8387fi
8388fi
8389CXX=$ac_cv_prog_CXX
8390if test -n "$CXX"; then
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
8392$as_echo "$CXX" >&6; }
8393else
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
8397
8398
8399    test -n "$CXX" && break
8400  done
8401fi
8402if test -z "$CXX"; then
8403  ac_ct_CXX=$CXX
8404  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
8405do
8406  # Extract the first word of "$ac_prog", so it can be a program name with args.
8407set dummy $ac_prog; ac_word=$2
8408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8409$as_echo_n "checking for $ac_word... " >&6; }
8410if ${ac_cv_prog_ac_ct_CXX+:} false; then :
8411  $as_echo_n "(cached) " >&6
8412else
8413  if test -n "$ac_ct_CXX"; then
8414  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
8415else
8416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_prog_ac_ct_CXX="$ac_prog"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431fi
8432fi
8433ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
8434if test -n "$ac_ct_CXX"; then
8435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
8436$as_echo "$ac_ct_CXX" >&6; }
8437else
8438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8439$as_echo "no" >&6; }
8440fi
8441
8442
8443  test -n "$ac_ct_CXX" && break
8444done
8445
8446  if test "x$ac_ct_CXX" = x; then
8447    CXX="g++"
8448  else
8449    case $cross_compiling:$ac_tool_warned in
8450yes:)
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8452$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8453ac_tool_warned=yes ;;
8454esac
8455    CXX=$ac_ct_CXX
8456  fi
8457fi
8458
8459  fi
8460fi
8461# Provide some information about the compiler.
8462$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
8463set X $ac_compile
8464ac_compiler=$2
8465for ac_option in --version -v -V -qversion; do
8466  { { ac_try="$ac_compiler $ac_option >&5"
8467case "(($ac_try" in
8468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8469  *) ac_try_echo=$ac_try;;
8470esac
8471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8472$as_echo "$ac_try_echo"; } >&5
8473  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8474  ac_status=$?
8475  if test -s conftest.err; then
8476    sed '10a\
8477... rest of stderr output deleted ...
8478         10q' conftest.err >conftest.er1
8479    cat conftest.er1 >&5
8480  fi
8481  rm -f conftest.er1 conftest.err
8482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8483  test $ac_status = 0; }
8484done
8485
8486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
8487$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
8488if ${ac_cv_cxx_compiler_gnu+:} false; then :
8489  $as_echo_n "(cached) " >&6
8490else
8491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8492/* end confdefs.h.  */
8493
8494int
8495main ()
8496{
8497#ifndef __GNUC__
8498       choke me
8499#endif
8500
8501  ;
8502  return 0;
8503}
8504_ACEOF
8505if ac_fn_cxx_try_compile "$LINENO"; then :
8506  ac_compiler_gnu=yes
8507else
8508  ac_compiler_gnu=no
8509fi
8510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8511ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
8512
8513fi
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
8515$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
8516if test $ac_compiler_gnu = yes; then
8517  GXX=yes
8518else
8519  GXX=
8520fi
8521ac_test_CXXFLAGS=${CXXFLAGS+set}
8522ac_save_CXXFLAGS=$CXXFLAGS
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
8524$as_echo_n "checking whether $CXX accepts -g... " >&6; }
8525if ${ac_cv_prog_cxx_g+:} false; then :
8526  $as_echo_n "(cached) " >&6
8527else
8528  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
8529   ac_cxx_werror_flag=yes
8530   ac_cv_prog_cxx_g=no
8531   CXXFLAGS="-g"
8532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8533/* end confdefs.h.  */
8534
8535int
8536main ()
8537{
8538
8539  ;
8540  return 0;
8541}
8542_ACEOF
8543if ac_fn_cxx_try_compile "$LINENO"; then :
8544  ac_cv_prog_cxx_g=yes
8545else
8546  CXXFLAGS=""
8547      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8548/* end confdefs.h.  */
8549
8550int
8551main ()
8552{
8553
8554  ;
8555  return 0;
8556}
8557_ACEOF
8558if ac_fn_cxx_try_compile "$LINENO"; then :
8559
8560else
8561  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
8562	 CXXFLAGS="-g"
8563	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8564/* end confdefs.h.  */
8565
8566int
8567main ()
8568{
8569
8570  ;
8571  return 0;
8572}
8573_ACEOF
8574if ac_fn_cxx_try_compile "$LINENO"; then :
8575  ac_cv_prog_cxx_g=yes
8576fi
8577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8578fi
8579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8580fi
8581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8582   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
8583fi
8584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
8585$as_echo "$ac_cv_prog_cxx_g" >&6; }
8586if test "$ac_test_CXXFLAGS" = set; then
8587  CXXFLAGS=$ac_save_CXXFLAGS
8588elif test $ac_cv_prog_cxx_g = yes; then
8589  if test "$GXX" = yes; then
8590    CXXFLAGS="-g -O2"
8591  else
8592    CXXFLAGS="-g"
8593  fi
8594else
8595  if test "$GXX" = yes; then
8596    CXXFLAGS="-O2"
8597  else
8598    CXXFLAGS=
8599  fi
8600fi
8601ac_ext=c
8602ac_cpp='$CPP $CPPFLAGS'
8603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8605ac_compiler_gnu=$ac_cv_c_compiler_gnu
8606
8607enable_win32_dll=yes
8608
8609case $host in
8610*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8611  if test -n "$ac_tool_prefix"; then
8612  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
8613set dummy ${ac_tool_prefix}as; ac_word=$2
8614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8615$as_echo_n "checking for $ac_word... " >&6; }
8616if ${ac_cv_prog_AS+:} false; then :
8617  $as_echo_n "(cached) " >&6
8618else
8619  if test -n "$AS"; then
8620  ac_cv_prog_AS="$AS" # Let the user override the test.
8621else
8622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8623for as_dir in $PATH
8624do
8625  IFS=$as_save_IFS
8626  test -z "$as_dir" && as_dir=.
8627    for ac_exec_ext in '' $ac_executable_extensions; do
8628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8629    ac_cv_prog_AS="${ac_tool_prefix}as"
8630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8631    break 2
8632  fi
8633done
8634  done
8635IFS=$as_save_IFS
8636
8637fi
8638fi
8639AS=$ac_cv_prog_AS
8640if test -n "$AS"; then
8641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
8642$as_echo "$AS" >&6; }
8643else
8644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8645$as_echo "no" >&6; }
8646fi
8647
8648
8649fi
8650if test -z "$ac_cv_prog_AS"; then
8651  ac_ct_AS=$AS
8652  # Extract the first word of "as", so it can be a program name with args.
8653set dummy as; ac_word=$2
8654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8655$as_echo_n "checking for $ac_word... " >&6; }
8656if ${ac_cv_prog_ac_ct_AS+:} false; then :
8657  $as_echo_n "(cached) " >&6
8658else
8659  if test -n "$ac_ct_AS"; then
8660  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
8661else
8662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8663for as_dir in $PATH
8664do
8665  IFS=$as_save_IFS
8666  test -z "$as_dir" && as_dir=.
8667    for ac_exec_ext in '' $ac_executable_extensions; do
8668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8669    ac_cv_prog_ac_ct_AS="as"
8670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8671    break 2
8672  fi
8673done
8674  done
8675IFS=$as_save_IFS
8676
8677fi
8678fi
8679ac_ct_AS=$ac_cv_prog_ac_ct_AS
8680if test -n "$ac_ct_AS"; then
8681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
8682$as_echo "$ac_ct_AS" >&6; }
8683else
8684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8685$as_echo "no" >&6; }
8686fi
8687
8688  if test "x$ac_ct_AS" = x; then
8689    AS="false"
8690  else
8691    case $cross_compiling:$ac_tool_warned in
8692yes:)
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8695ac_tool_warned=yes ;;
8696esac
8697    AS=$ac_ct_AS
8698  fi
8699else
8700  AS="$ac_cv_prog_AS"
8701fi
8702
8703  if test -n "$ac_tool_prefix"; then
8704  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8705set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8707$as_echo_n "checking for $ac_word... " >&6; }
8708if ${ac_cv_prog_DLLTOOL+:} false; then :
8709  $as_echo_n "(cached) " >&6
8710else
8711  if test -n "$DLLTOOL"; then
8712  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8713else
8714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8715for as_dir in $PATH
8716do
8717  IFS=$as_save_IFS
8718  test -z "$as_dir" && as_dir=.
8719    for ac_exec_ext in '' $ac_executable_extensions; do
8720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8721    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8723    break 2
8724  fi
8725done
8726  done
8727IFS=$as_save_IFS
8728
8729fi
8730fi
8731DLLTOOL=$ac_cv_prog_DLLTOOL
8732if test -n "$DLLTOOL"; then
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8734$as_echo "$DLLTOOL" >&6; }
8735else
8736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8737$as_echo "no" >&6; }
8738fi
8739
8740
8741fi
8742if test -z "$ac_cv_prog_DLLTOOL"; then
8743  ac_ct_DLLTOOL=$DLLTOOL
8744  # Extract the first word of "dlltool", so it can be a program name with args.
8745set dummy dlltool; ac_word=$2
8746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8747$as_echo_n "checking for $ac_word... " >&6; }
8748if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8749  $as_echo_n "(cached) " >&6
8750else
8751  if test -n "$ac_ct_DLLTOOL"; then
8752  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8753else
8754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755for as_dir in $PATH
8756do
8757  IFS=$as_save_IFS
8758  test -z "$as_dir" && as_dir=.
8759    for ac_exec_ext in '' $ac_executable_extensions; do
8760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8761    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8763    break 2
8764  fi
8765done
8766  done
8767IFS=$as_save_IFS
8768
8769fi
8770fi
8771ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8772if test -n "$ac_ct_DLLTOOL"; then
8773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8774$as_echo "$ac_ct_DLLTOOL" >&6; }
8775else
8776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777$as_echo "no" >&6; }
8778fi
8779
8780  if test "x$ac_ct_DLLTOOL" = x; then
8781    DLLTOOL="false"
8782  else
8783    case $cross_compiling:$ac_tool_warned in
8784yes:)
8785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8787ac_tool_warned=yes ;;
8788esac
8789    DLLTOOL=$ac_ct_DLLTOOL
8790  fi
8791else
8792  DLLTOOL="$ac_cv_prog_DLLTOOL"
8793fi
8794
8795  if test -n "$ac_tool_prefix"; then
8796  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8797set dummy ${ac_tool_prefix}objdump; ac_word=$2
8798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8799$as_echo_n "checking for $ac_word... " >&6; }
8800if ${ac_cv_prog_OBJDUMP+:} false; then :
8801  $as_echo_n "(cached) " >&6
8802else
8803  if test -n "$OBJDUMP"; then
8804  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8805else
8806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8807for as_dir in $PATH
8808do
8809  IFS=$as_save_IFS
8810  test -z "$as_dir" && as_dir=.
8811    for ac_exec_ext in '' $ac_executable_extensions; do
8812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8813    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8815    break 2
8816  fi
8817done
8818  done
8819IFS=$as_save_IFS
8820
8821fi
8822fi
8823OBJDUMP=$ac_cv_prog_OBJDUMP
8824if test -n "$OBJDUMP"; then
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8826$as_echo "$OBJDUMP" >&6; }
8827else
8828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8829$as_echo "no" >&6; }
8830fi
8831
8832
8833fi
8834if test -z "$ac_cv_prog_OBJDUMP"; then
8835  ac_ct_OBJDUMP=$OBJDUMP
8836  # Extract the first word of "objdump", so it can be a program name with args.
8837set dummy objdump; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
8841  $as_echo_n "(cached) " >&6
8842else
8843  if test -n "$ac_ct_OBJDUMP"; then
8844  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8845else
8846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847for as_dir in $PATH
8848do
8849  IFS=$as_save_IFS
8850  test -z "$as_dir" && as_dir=.
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861fi
8862fi
8863ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8864if test -n "$ac_ct_OBJDUMP"; then
8865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8866$as_echo "$ac_ct_OBJDUMP" >&6; }
8867else
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869$as_echo "no" >&6; }
8870fi
8871
8872  if test "x$ac_ct_OBJDUMP" = x; then
8873    OBJDUMP="false"
8874  else
8875    case $cross_compiling:$ac_tool_warned in
8876yes:)
8877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8879ac_tool_warned=yes ;;
8880esac
8881    OBJDUMP=$ac_ct_OBJDUMP
8882  fi
8883else
8884  OBJDUMP="$ac_cv_prog_OBJDUMP"
8885fi
8886
8887  ;;
8888esac
8889
8890test -z "$AS" && AS=as
8891
8892
8893
8894
8895
8896test -z "$DLLTOOL" && DLLTOOL=dlltool
8897
8898
8899
8900
8901
8902test -z "$OBJDUMP" && OBJDUMP=objdump
8903
8904
8905
8906
8907
8908
8909
8910case `pwd` in
8911  *\ * | *\	*)
8912    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
8913$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
8914esac
8915
8916
8917
8918macro_version='2.4.6'
8919macro_revision='2.4.6'
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933ltmain=$ac_aux_dir/ltmain.sh
8934
8935# Backslashify metacharacters that are still active within
8936# double-quoted strings.
8937sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
8938
8939# Same as above, but do not quote variable references.
8940double_quote_subst='s/\(["`\\]\)/\\\1/g'
8941
8942# Sed substitution to delay expansion of an escaped shell variable in a
8943# double_quote_subst'ed string.
8944delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8945
8946# Sed substitution to delay expansion of an escaped single quote.
8947delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
8948
8949# Sed substitution to avoid accidental globbing in evaled expressions
8950no_glob_subst='s/\*/\\\*/g'
8951
8952ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8953ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
8954ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
8955
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
8957$as_echo_n "checking how to print strings... " >&6; }
8958# Test print first, because it will be a builtin if present.
8959if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
8960   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
8961  ECHO='print -r --'
8962elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
8963  ECHO='printf %s\n'
8964else
8965  # Use this function as a fallback that always works.
8966  func_fallback_echo ()
8967  {
8968    eval 'cat <<_LTECHO_EOF
8969$1
8970_LTECHO_EOF'
8971  }
8972  ECHO='func_fallback_echo'
8973fi
8974
8975# func_echo_all arg...
8976# Invoke $ECHO with all args, space-separated.
8977func_echo_all ()
8978{
8979    $ECHO ""
8980}
8981
8982case $ECHO in
8983  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
8984$as_echo "printf" >&6; } ;;
8985  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
8986$as_echo "print -r" >&6; } ;;
8987  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
8988$as_echo "cat" >&6; } ;;
8989esac
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9005$as_echo_n "checking for a sed that does not truncate output... " >&6; }
9006if ${ac_cv_path_SED+:} false; then :
9007  $as_echo_n "(cached) " >&6
9008else
9009            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9010     for ac_i in 1 2 3 4 5 6 7; do
9011       ac_script="$ac_script$as_nl$ac_script"
9012     done
9013     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9014     { ac_script=; unset ac_script;}
9015     if test -z "$SED"; then
9016  ac_path_SED_found=false
9017  # Loop through the user's path and test for each of PROGNAME-LIST
9018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9019for as_dir in $PATH
9020do
9021  IFS=$as_save_IFS
9022  test -z "$as_dir" && as_dir=.
9023    for ac_prog in sed gsed; do
9024    for ac_exec_ext in '' $ac_executable_extensions; do
9025      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
9026      as_fn_executable_p "$ac_path_SED" || continue
9027# Check for GNU ac_path_SED and select it if it is found.
9028  # Check for GNU $ac_path_SED
9029case `"$ac_path_SED" --version 2>&1` in
9030*GNU*)
9031  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
9032*)
9033  ac_count=0
9034  $as_echo_n 0123456789 >"conftest.in"
9035  while :
9036  do
9037    cat "conftest.in" "conftest.in" >"conftest.tmp"
9038    mv "conftest.tmp" "conftest.in"
9039    cp "conftest.in" "conftest.nl"
9040    $as_echo '' >> "conftest.nl"
9041    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
9042    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9043    as_fn_arith $ac_count + 1 && ac_count=$as_val
9044    if test $ac_count -gt ${ac_path_SED_max-0}; then
9045      # Best one so far, save it but keep looking for a better one
9046      ac_cv_path_SED="$ac_path_SED"
9047      ac_path_SED_max=$ac_count
9048    fi
9049    # 10*(2^10) chars as input seems more than enough
9050    test $ac_count -gt 10 && break
9051  done
9052  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9053esac
9054
9055      $ac_path_SED_found && break 3
9056    done
9057  done
9058  done
9059IFS=$as_save_IFS
9060  if test -z "$ac_cv_path_SED"; then
9061    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
9062  fi
9063else
9064  ac_cv_path_SED=$SED
9065fi
9066
9067fi
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
9069$as_echo "$ac_cv_path_SED" >&6; }
9070 SED="$ac_cv_path_SED"
9071  rm -f conftest.sed
9072
9073test -z "$SED" && SED=sed
9074Xsed="$SED -e 1s/^X//"
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
9087$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
9088if ${ac_cv_path_GREP+:} false; then :
9089  $as_echo_n "(cached) " >&6
9090else
9091  if test -z "$GREP"; then
9092  ac_path_GREP_found=false
9093  # Loop through the user's path and test for each of PROGNAME-LIST
9094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9096do
9097  IFS=$as_save_IFS
9098  test -z "$as_dir" && as_dir=.
9099    for ac_prog in grep ggrep; do
9100    for ac_exec_ext in '' $ac_executable_extensions; do
9101      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
9102      as_fn_executable_p "$ac_path_GREP" || continue
9103# Check for GNU ac_path_GREP and select it if it is found.
9104  # Check for GNU $ac_path_GREP
9105case `"$ac_path_GREP" --version 2>&1` in
9106*GNU*)
9107  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
9108*)
9109  ac_count=0
9110  $as_echo_n 0123456789 >"conftest.in"
9111  while :
9112  do
9113    cat "conftest.in" "conftest.in" >"conftest.tmp"
9114    mv "conftest.tmp" "conftest.in"
9115    cp "conftest.in" "conftest.nl"
9116    $as_echo 'GREP' >> "conftest.nl"
9117    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
9118    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9119    as_fn_arith $ac_count + 1 && ac_count=$as_val
9120    if test $ac_count -gt ${ac_path_GREP_max-0}; then
9121      # Best one so far, save it but keep looking for a better one
9122      ac_cv_path_GREP="$ac_path_GREP"
9123      ac_path_GREP_max=$ac_count
9124    fi
9125    # 10*(2^10) chars as input seems more than enough
9126    test $ac_count -gt 10 && break
9127  done
9128  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9129esac
9130
9131      $ac_path_GREP_found && break 3
9132    done
9133  done
9134  done
9135IFS=$as_save_IFS
9136  if test -z "$ac_cv_path_GREP"; then
9137    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
9138  fi
9139else
9140  ac_cv_path_GREP=$GREP
9141fi
9142
9143fi
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
9145$as_echo "$ac_cv_path_GREP" >&6; }
9146 GREP="$ac_cv_path_GREP"
9147
9148
9149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
9150$as_echo_n "checking for egrep... " >&6; }
9151if ${ac_cv_path_EGREP+:} false; then :
9152  $as_echo_n "(cached) " >&6
9153else
9154  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
9155   then ac_cv_path_EGREP="$GREP -E"
9156   else
9157     if test -z "$EGREP"; then
9158  ac_path_EGREP_found=false
9159  # Loop through the user's path and test for each of PROGNAME-LIST
9160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9161for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9162do
9163  IFS=$as_save_IFS
9164  test -z "$as_dir" && as_dir=.
9165    for ac_prog in egrep; do
9166    for ac_exec_ext in '' $ac_executable_extensions; do
9167      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
9168      as_fn_executable_p "$ac_path_EGREP" || continue
9169# Check for GNU ac_path_EGREP and select it if it is found.
9170  # Check for GNU $ac_path_EGREP
9171case `"$ac_path_EGREP" --version 2>&1` in
9172*GNU*)
9173  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
9174*)
9175  ac_count=0
9176  $as_echo_n 0123456789 >"conftest.in"
9177  while :
9178  do
9179    cat "conftest.in" "conftest.in" >"conftest.tmp"
9180    mv "conftest.tmp" "conftest.in"
9181    cp "conftest.in" "conftest.nl"
9182    $as_echo 'EGREP' >> "conftest.nl"
9183    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
9184    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9185    as_fn_arith $ac_count + 1 && ac_count=$as_val
9186    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
9187      # Best one so far, save it but keep looking for a better one
9188      ac_cv_path_EGREP="$ac_path_EGREP"
9189      ac_path_EGREP_max=$ac_count
9190    fi
9191    # 10*(2^10) chars as input seems more than enough
9192    test $ac_count -gt 10 && break
9193  done
9194  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9195esac
9196
9197      $ac_path_EGREP_found && break 3
9198    done
9199  done
9200  done
9201IFS=$as_save_IFS
9202  if test -z "$ac_cv_path_EGREP"; then
9203    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
9204  fi
9205else
9206  ac_cv_path_EGREP=$EGREP
9207fi
9208
9209   fi
9210fi
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
9212$as_echo "$ac_cv_path_EGREP" >&6; }
9213 EGREP="$ac_cv_path_EGREP"
9214
9215
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
9217$as_echo_n "checking for fgrep... " >&6; }
9218if ${ac_cv_path_FGREP+:} false; then :
9219  $as_echo_n "(cached) " >&6
9220else
9221  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
9222   then ac_cv_path_FGREP="$GREP -F"
9223   else
9224     if test -z "$FGREP"; then
9225  ac_path_FGREP_found=false
9226  # Loop through the user's path and test for each of PROGNAME-LIST
9227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9228for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9229do
9230  IFS=$as_save_IFS
9231  test -z "$as_dir" && as_dir=.
9232    for ac_prog in fgrep; do
9233    for ac_exec_ext in '' $ac_executable_extensions; do
9234      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
9235      as_fn_executable_p "$ac_path_FGREP" || continue
9236# Check for GNU ac_path_FGREP and select it if it is found.
9237  # Check for GNU $ac_path_FGREP
9238case `"$ac_path_FGREP" --version 2>&1` in
9239*GNU*)
9240  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
9241*)
9242  ac_count=0
9243  $as_echo_n 0123456789 >"conftest.in"
9244  while :
9245  do
9246    cat "conftest.in" "conftest.in" >"conftest.tmp"
9247    mv "conftest.tmp" "conftest.in"
9248    cp "conftest.in" "conftest.nl"
9249    $as_echo 'FGREP' >> "conftest.nl"
9250    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
9251    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9252    as_fn_arith $ac_count + 1 && ac_count=$as_val
9253    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
9254      # Best one so far, save it but keep looking for a better one
9255      ac_cv_path_FGREP="$ac_path_FGREP"
9256      ac_path_FGREP_max=$ac_count
9257    fi
9258    # 10*(2^10) chars as input seems more than enough
9259    test $ac_count -gt 10 && break
9260  done
9261  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9262esac
9263
9264      $ac_path_FGREP_found && break 3
9265    done
9266  done
9267  done
9268IFS=$as_save_IFS
9269  if test -z "$ac_cv_path_FGREP"; then
9270    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
9271  fi
9272else
9273  ac_cv_path_FGREP=$FGREP
9274fi
9275
9276   fi
9277fi
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
9279$as_echo "$ac_cv_path_FGREP" >&6; }
9280 FGREP="$ac_cv_path_FGREP"
9281
9282
9283test -z "$GREP" && GREP=grep
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303# Check whether --with-gnu-ld was given.
9304if test "${with_gnu_ld+set}" = set; then :
9305  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
9306else
9307  with_gnu_ld=no
9308fi
9309
9310ac_prog=ld
9311if test yes = "$GCC"; then
9312  # Check if gcc -print-prog-name=ld gives a path.
9313  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
9314$as_echo_n "checking for ld used by $CC... " >&6; }
9315  case $host in
9316  *-*-mingw*)
9317    # gcc leaves a trailing carriage return, which upsets mingw
9318    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9319  *)
9320    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9321  esac
9322  case $ac_prog in
9323    # Accept absolute paths.
9324    [\\/]* | ?:[\\/]*)
9325      re_direlt='/[^/][^/]*/\.\./'
9326      # Canonicalize the pathname of ld
9327      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
9328      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
9329	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
9330      done
9331      test -z "$LD" && LD=$ac_prog
9332      ;;
9333  "")
9334    # If it fails, then pretend we aren't using GCC.
9335    ac_prog=ld
9336    ;;
9337  *)
9338    # If it is relative, then search for the first ld in PATH.
9339    with_gnu_ld=unknown
9340    ;;
9341  esac
9342elif test yes = "$with_gnu_ld"; then
9343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9344$as_echo_n "checking for GNU ld... " >&6; }
9345else
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9347$as_echo_n "checking for non-GNU ld... " >&6; }
9348fi
9349if ${lt_cv_path_LD+:} false; then :
9350  $as_echo_n "(cached) " >&6
9351else
9352  if test -z "$LD"; then
9353  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9354  for ac_dir in $PATH; do
9355    IFS=$lt_save_ifs
9356    test -z "$ac_dir" && ac_dir=.
9357    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9358      lt_cv_path_LD=$ac_dir/$ac_prog
9359      # Check to see if the program is GNU ld.  I'd rather use --version,
9360      # but apparently some variants of GNU ld only accept -v.
9361      # Break only if it was the GNU/non-GNU ld that we prefer.
9362      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
9363      *GNU* | *'with BFD'*)
9364	test no != "$with_gnu_ld" && break
9365	;;
9366      *)
9367	test yes != "$with_gnu_ld" && break
9368	;;
9369      esac
9370    fi
9371  done
9372  IFS=$lt_save_ifs
9373else
9374  lt_cv_path_LD=$LD # Let the user override the test with a path.
9375fi
9376fi
9377
9378LD=$lt_cv_path_LD
9379if test -n "$LD"; then
9380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9381$as_echo "$LD" >&6; }
9382else
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
9385fi
9386test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9388$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9389if ${lt_cv_prog_gnu_ld+:} false; then :
9390  $as_echo_n "(cached) " >&6
9391else
9392  # I'd rather use --version here, but apparently some GNU lds only accept -v.
9393case `$LD -v 2>&1 </dev/null` in
9394*GNU* | *'with BFD'*)
9395  lt_cv_prog_gnu_ld=yes
9396  ;;
9397*)
9398  lt_cv_prog_gnu_ld=no
9399  ;;
9400esac
9401fi
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
9403$as_echo "$lt_cv_prog_gnu_ld" >&6; }
9404with_gnu_ld=$lt_cv_prog_gnu_ld
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
9415$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
9416if ${lt_cv_path_NM+:} false; then :
9417  $as_echo_n "(cached) " >&6
9418else
9419  if test -n "$NM"; then
9420  # Let the user override the test.
9421  lt_cv_path_NM=$NM
9422else
9423  lt_nm_to_check=${ac_tool_prefix}nm
9424  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
9425    lt_nm_to_check="$lt_nm_to_check nm"
9426  fi
9427  for lt_tmp_nm in $lt_nm_to_check; do
9428    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9429    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
9430      IFS=$lt_save_ifs
9431      test -z "$ac_dir" && ac_dir=.
9432      tmp_nm=$ac_dir/$lt_tmp_nm
9433      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
9434	# Check to see if the nm accepts a BSD-compat flag.
9435	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
9436	#   nm: unknown option "B" ignored
9437	# Tru64's nm complains that /dev/null is an invalid object file
9438	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
9439	case $build_os in
9440	mingw*) lt_bad_file=conftest.nm/nofile ;;
9441	*) lt_bad_file=/dev/null ;;
9442	esac
9443	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
9444	*$lt_bad_file* | *'Invalid file or object type'*)
9445	  lt_cv_path_NM="$tmp_nm -B"
9446	  break 2
9447	  ;;
9448	*)
9449	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
9450	  */dev/null*)
9451	    lt_cv_path_NM="$tmp_nm -p"
9452	    break 2
9453	    ;;
9454	  *)
9455	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
9456	    continue # so that we can try to find one that supports BSD flags
9457	    ;;
9458	  esac
9459	  ;;
9460	esac
9461      fi
9462    done
9463    IFS=$lt_save_ifs
9464  done
9465  : ${lt_cv_path_NM=no}
9466fi
9467fi
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
9469$as_echo "$lt_cv_path_NM" >&6; }
9470if test no != "$lt_cv_path_NM"; then
9471  NM=$lt_cv_path_NM
9472else
9473  # Didn't find any BSD compatible name lister, look for dumpbin.
9474  if test -n "$DUMPBIN"; then :
9475    # Let the user override the test.
9476  else
9477    if test -n "$ac_tool_prefix"; then
9478  for ac_prog in dumpbin "link -dump"
9479  do
9480    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9481set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9483$as_echo_n "checking for $ac_word... " >&6; }
9484if ${ac_cv_prog_DUMPBIN+:} false; then :
9485  $as_echo_n "(cached) " >&6
9486else
9487  if test -n "$DUMPBIN"; then
9488  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
9489else
9490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9491for as_dir in $PATH
9492do
9493  IFS=$as_save_IFS
9494  test -z "$as_dir" && as_dir=.
9495    for ac_exec_ext in '' $ac_executable_extensions; do
9496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9497    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
9498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9499    break 2
9500  fi
9501done
9502  done
9503IFS=$as_save_IFS
9504
9505fi
9506fi
9507DUMPBIN=$ac_cv_prog_DUMPBIN
9508if test -n "$DUMPBIN"; then
9509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
9510$as_echo "$DUMPBIN" >&6; }
9511else
9512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513$as_echo "no" >&6; }
9514fi
9515
9516
9517    test -n "$DUMPBIN" && break
9518  done
9519fi
9520if test -z "$DUMPBIN"; then
9521  ac_ct_DUMPBIN=$DUMPBIN
9522  for ac_prog in dumpbin "link -dump"
9523do
9524  # Extract the first word of "$ac_prog", so it can be a program name with args.
9525set dummy $ac_prog; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  if test -n "$ac_ct_DUMPBIN"; then
9532  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
9533else
9534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9535for as_dir in $PATH
9536do
9537  IFS=$as_save_IFS
9538  test -z "$as_dir" && as_dir=.
9539    for ac_exec_ext in '' $ac_executable_extensions; do
9540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9541    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
9542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9543    break 2
9544  fi
9545done
9546  done
9547IFS=$as_save_IFS
9548
9549fi
9550fi
9551ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
9552if test -n "$ac_ct_DUMPBIN"; then
9553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
9554$as_echo "$ac_ct_DUMPBIN" >&6; }
9555else
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9557$as_echo "no" >&6; }
9558fi
9559
9560
9561  test -n "$ac_ct_DUMPBIN" && break
9562done
9563
9564  if test "x$ac_ct_DUMPBIN" = x; then
9565    DUMPBIN=":"
9566  else
9567    case $cross_compiling:$ac_tool_warned in
9568yes:)
9569{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9570$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9571ac_tool_warned=yes ;;
9572esac
9573    DUMPBIN=$ac_ct_DUMPBIN
9574  fi
9575fi
9576
9577    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
9578    *COFF*)
9579      DUMPBIN="$DUMPBIN -symbols -headers"
9580      ;;
9581    *)
9582      DUMPBIN=:
9583      ;;
9584    esac
9585  fi
9586
9587  if test : != "$DUMPBIN"; then
9588    NM=$DUMPBIN
9589  fi
9590fi
9591test -z "$NM" && NM=nm
9592
9593
9594
9595
9596
9597
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
9599$as_echo_n "checking the name lister ($NM) interface... " >&6; }
9600if ${lt_cv_nm_interface+:} false; then :
9601  $as_echo_n "(cached) " >&6
9602else
9603  lt_cv_nm_interface="BSD nm"
9604  echo "int some_variable = 0;" > conftest.$ac_ext
9605  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
9606  (eval "$ac_compile" 2>conftest.err)
9607  cat conftest.err >&5
9608  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
9609  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
9610  cat conftest.err >&5
9611  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
9612  cat conftest.out >&5
9613  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
9614    lt_cv_nm_interface="MS dumpbin"
9615  fi
9616  rm -f conftest*
9617fi
9618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
9619$as_echo "$lt_cv_nm_interface" >&6; }
9620
9621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9622$as_echo_n "checking whether ln -s works... " >&6; }
9623LN_S=$as_ln_s
9624if test "$LN_S" = "ln -s"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9626$as_echo "yes" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9629$as_echo "no, using $LN_S" >&6; }
9630fi
9631
9632# find the maximum length of command line arguments
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
9634$as_echo_n "checking the maximum length of command line arguments... " >&6; }
9635if ${lt_cv_sys_max_cmd_len+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638    i=0
9639  teststring=ABCD
9640
9641  case $build_os in
9642  msdosdjgpp*)
9643    # On DJGPP, this test can blow up pretty badly due to problems in libc
9644    # (any single argument exceeding 2000 bytes causes a buffer overrun
9645    # during glob expansion).  Even if it were fixed, the result of this
9646    # check would be larger than it should be.
9647    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
9648    ;;
9649
9650  gnu*)
9651    # Under GNU Hurd, this test is not required because there is
9652    # no limit to the length of command line arguments.
9653    # Libtool will interpret -1 as no limit whatsoever
9654    lt_cv_sys_max_cmd_len=-1;
9655    ;;
9656
9657  cygwin* | mingw* | cegcc*)
9658    # On Win9x/ME, this test blows up -- it succeeds, but takes
9659    # about 5 minutes as the teststring grows exponentially.
9660    # Worse, since 9x/ME are not pre-emptively multitasking,
9661    # you end up with a "frozen" computer, even though with patience
9662    # the test eventually succeeds (with a max line length of 256k).
9663    # Instead, let's just punt: use the minimum linelength reported by
9664    # all of the supported platforms: 8192 (on NT/2K/XP).
9665    lt_cv_sys_max_cmd_len=8192;
9666    ;;
9667
9668  mint*)
9669    # On MiNT this can take a long time and run out of memory.
9670    lt_cv_sys_max_cmd_len=8192;
9671    ;;
9672
9673  amigaos*)
9674    # On AmigaOS with pdksh, this test takes hours, literally.
9675    # So we just punt and use a minimum line length of 8192.
9676    lt_cv_sys_max_cmd_len=8192;
9677    ;;
9678
9679  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
9680    # This has been around since 386BSD, at least.  Likely further.
9681    if test -x /sbin/sysctl; then
9682      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
9683    elif test -x /usr/sbin/sysctl; then
9684      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
9685    else
9686      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
9687    fi
9688    # And add a safety zone
9689    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
9690    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
9691    ;;
9692
9693  interix*)
9694    # We know the value 262144 and hardcode it with a safety zone (like BSD)
9695    lt_cv_sys_max_cmd_len=196608
9696    ;;
9697
9698  os2*)
9699    # The test takes a long time on OS/2.
9700    lt_cv_sys_max_cmd_len=8192
9701    ;;
9702
9703  osf*)
9704    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
9705    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
9706    # nice to cause kernel panics so lets avoid the loop below.
9707    # First set a reasonable default.
9708    lt_cv_sys_max_cmd_len=16384
9709    #
9710    if test -x /sbin/sysconfig; then
9711      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
9712        *1*) lt_cv_sys_max_cmd_len=-1 ;;
9713      esac
9714    fi
9715    ;;
9716  sco3.2v5*)
9717    lt_cv_sys_max_cmd_len=102400
9718    ;;
9719  sysv5* | sco5v6* | sysv4.2uw2*)
9720    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
9721    if test -n "$kargmax"; then
9722      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
9723    else
9724      lt_cv_sys_max_cmd_len=32768
9725    fi
9726    ;;
9727  *)
9728    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
9729    if test -n "$lt_cv_sys_max_cmd_len" && \
9730       test undefined != "$lt_cv_sys_max_cmd_len"; then
9731      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
9732      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
9733    else
9734      # Make teststring a little bigger before we do anything with it.
9735      # a 1K string should be a reasonable start.
9736      for i in 1 2 3 4 5 6 7 8; do
9737        teststring=$teststring$teststring
9738      done
9739      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
9740      # If test is not a shell built-in, we'll probably end up computing a
9741      # maximum length that is only half of the actual maximum length, but
9742      # we can't tell.
9743      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
9744	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
9745	      test 17 != "$i" # 1/2 MB should be enough
9746      do
9747        i=`expr $i + 1`
9748        teststring=$teststring$teststring
9749      done
9750      # Only check the string length outside the loop.
9751      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
9752      teststring=
9753      # Add a significant safety factor because C++ compilers can tack on
9754      # massive amounts of additional arguments before passing them to the
9755      # linker.  It appears as though 1/2 is a usable value.
9756      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
9757    fi
9758    ;;
9759  esac
9760
9761fi
9762
9763if test -n "$lt_cv_sys_max_cmd_len"; then
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
9765$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
9766else
9767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
9768$as_echo "none" >&6; }
9769fi
9770max_cmd_len=$lt_cv_sys_max_cmd_len
9771
9772
9773
9774
9775
9776
9777: ${CP="cp -f"}
9778: ${MV="mv -f"}
9779: ${RM="rm -f"}
9780
9781if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9782  lt_unset=unset
9783else
9784  lt_unset=false
9785fi
9786
9787
9788
9789
9790
9791# test EBCDIC or ASCII
9792case `echo X|tr X '\101'` in
9793 A) # ASCII based system
9794    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9795  lt_SP2NL='tr \040 \012'
9796  lt_NL2SP='tr \015\012 \040\040'
9797  ;;
9798 *) # EBCDIC based system
9799  lt_SP2NL='tr \100 \n'
9800  lt_NL2SP='tr \r\n \100\100'
9801  ;;
9802esac
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
9813$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
9814if ${lt_cv_to_host_file_cmd+:} false; then :
9815  $as_echo_n "(cached) " >&6
9816else
9817  case $host in
9818  *-*-mingw* )
9819    case $build in
9820      *-*-mingw* ) # actually msys
9821        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9822        ;;
9823      *-*-cygwin* )
9824        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9825        ;;
9826      * ) # otherwise, assume *nix
9827        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9828        ;;
9829    esac
9830    ;;
9831  *-*-cygwin* )
9832    case $build in
9833      *-*-mingw* ) # actually msys
9834        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9835        ;;
9836      *-*-cygwin* )
9837        lt_cv_to_host_file_cmd=func_convert_file_noop
9838        ;;
9839      * ) # otherwise, assume *nix
9840        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9841        ;;
9842    esac
9843    ;;
9844  * ) # unhandled hosts (and "normal" native builds)
9845    lt_cv_to_host_file_cmd=func_convert_file_noop
9846    ;;
9847esac
9848
9849fi
9850
9851to_host_file_cmd=$lt_cv_to_host_file_cmd
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
9853$as_echo "$lt_cv_to_host_file_cmd" >&6; }
9854
9855
9856
9857
9858
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
9860$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
9861if ${lt_cv_to_tool_file_cmd+:} false; then :
9862  $as_echo_n "(cached) " >&6
9863else
9864  #assume ordinary cross tools, or native build.
9865lt_cv_to_tool_file_cmd=func_convert_file_noop
9866case $host in
9867  *-*-mingw* )
9868    case $build in
9869      *-*-mingw* ) # actually msys
9870        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9871        ;;
9872    esac
9873    ;;
9874esac
9875
9876fi
9877
9878to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
9880$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
9881
9882
9883
9884
9885
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
9887$as_echo_n "checking for $LD option to reload object files... " >&6; }
9888if ${lt_cv_ld_reload_flag+:} false; then :
9889  $as_echo_n "(cached) " >&6
9890else
9891  lt_cv_ld_reload_flag='-r'
9892fi
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
9894$as_echo "$lt_cv_ld_reload_flag" >&6; }
9895reload_flag=$lt_cv_ld_reload_flag
9896case $reload_flag in
9897"" | " "*) ;;
9898*) reload_flag=" $reload_flag" ;;
9899esac
9900reload_cmds='$LD$reload_flag -o $output$reload_objs'
9901case $host_os in
9902  cygwin* | mingw* | pw32* | cegcc*)
9903    if test yes != "$GCC"; then
9904      reload_cmds=false
9905    fi
9906    ;;
9907  darwin*)
9908    if test yes = "$GCC"; then
9909      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
9910    else
9911      reload_cmds='$LD$reload_flag -o $output$reload_objs'
9912    fi
9913    ;;
9914esac
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924if test -n "$ac_tool_prefix"; then
9925  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
9926set dummy ${ac_tool_prefix}objdump; ac_word=$2
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9928$as_echo_n "checking for $ac_word... " >&6; }
9929if ${ac_cv_prog_OBJDUMP+:} false; then :
9930  $as_echo_n "(cached) " >&6
9931else
9932  if test -n "$OBJDUMP"; then
9933  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
9934else
9935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9936for as_dir in $PATH
9937do
9938  IFS=$as_save_IFS
9939  test -z "$as_dir" && as_dir=.
9940    for ac_exec_ext in '' $ac_executable_extensions; do
9941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9942    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
9943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9944    break 2
9945  fi
9946done
9947  done
9948IFS=$as_save_IFS
9949
9950fi
9951fi
9952OBJDUMP=$ac_cv_prog_OBJDUMP
9953if test -n "$OBJDUMP"; then
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
9955$as_echo "$OBJDUMP" >&6; }
9956else
9957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
9959fi
9960
9961
9962fi
9963if test -z "$ac_cv_prog_OBJDUMP"; then
9964  ac_ct_OBJDUMP=$OBJDUMP
9965  # Extract the first word of "objdump", so it can be a program name with args.
9966set dummy objdump; ac_word=$2
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9968$as_echo_n "checking for $ac_word... " >&6; }
9969if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
9970  $as_echo_n "(cached) " >&6
9971else
9972  if test -n "$ac_ct_OBJDUMP"; then
9973  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
9974else
9975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978  IFS=$as_save_IFS
9979  test -z "$as_dir" && as_dir=.
9980    for ac_exec_ext in '' $ac_executable_extensions; do
9981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982    ac_cv_prog_ac_ct_OBJDUMP="objdump"
9983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984    break 2
9985  fi
9986done
9987  done
9988IFS=$as_save_IFS
9989
9990fi
9991fi
9992ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
9993if test -n "$ac_ct_OBJDUMP"; then
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
9995$as_echo "$ac_ct_OBJDUMP" >&6; }
9996else
9997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9998$as_echo "no" >&6; }
9999fi
10000
10001  if test "x$ac_ct_OBJDUMP" = x; then
10002    OBJDUMP="false"
10003  else
10004    case $cross_compiling:$ac_tool_warned in
10005yes:)
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10007$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10008ac_tool_warned=yes ;;
10009esac
10010    OBJDUMP=$ac_ct_OBJDUMP
10011  fi
10012else
10013  OBJDUMP="$ac_cv_prog_OBJDUMP"
10014fi
10015
10016test -z "$OBJDUMP" && OBJDUMP=objdump
10017
10018
10019
10020
10021
10022
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
10024$as_echo_n "checking how to recognize dependent libraries... " >&6; }
10025if ${lt_cv_deplibs_check_method+:} false; then :
10026  $as_echo_n "(cached) " >&6
10027else
10028  lt_cv_file_magic_cmd='$MAGIC_CMD'
10029lt_cv_file_magic_test_file=
10030lt_cv_deplibs_check_method='unknown'
10031# Need to set the preceding variable on all platforms that support
10032# interlibrary dependencies.
10033# 'none' -- dependencies not supported.
10034# 'unknown' -- same as none, but documents that we really don't know.
10035# 'pass_all' -- all dependencies passed with no checks.
10036# 'test_compile' -- check by making test program.
10037# 'file_magic [[regex]]' -- check by looking for files in library path
10038# that responds to the $file_magic_cmd with a given extended regex.
10039# If you have 'file' or equivalent on your system and you're not sure
10040# whether 'pass_all' will *always* work, you probably want this one.
10041
10042case $host_os in
10043aix[4-9]*)
10044  lt_cv_deplibs_check_method=pass_all
10045  ;;
10046
10047beos*)
10048  lt_cv_deplibs_check_method=pass_all
10049  ;;
10050
10051bsdi[45]*)
10052  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
10053  lt_cv_file_magic_cmd='/usr/bin/file -L'
10054  lt_cv_file_magic_test_file=/shlib/libc.so
10055  ;;
10056
10057cygwin*)
10058  # func_win32_libid is a shell function defined in ltmain.sh
10059  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
10060  lt_cv_file_magic_cmd='func_win32_libid'
10061  ;;
10062
10063mingw* | pw32*)
10064  # Base MSYS/MinGW do not provide the 'file' command needed by
10065  # func_win32_libid shell function, so use a weaker test based on 'objdump',
10066  # unless we find 'file', for example because we are cross-compiling.
10067  if ( file / ) >/dev/null 2>&1; then
10068    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
10069    lt_cv_file_magic_cmd='func_win32_libid'
10070  else
10071    # Keep this pattern in sync with the one in func_win32_libid.
10072    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
10073    lt_cv_file_magic_cmd='$OBJDUMP -f'
10074  fi
10075  ;;
10076
10077cegcc*)
10078  # use the weaker test based on 'objdump'. See mingw*.
10079  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
10080  lt_cv_file_magic_cmd='$OBJDUMP -f'
10081  ;;
10082
10083darwin* | rhapsody*)
10084  lt_cv_deplibs_check_method=pass_all
10085  ;;
10086
10087freebsd* | dragonfly*)
10088  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
10089    case $host_cpu in
10090    i*86 )
10091      # Not sure whether the presence of OpenBSD here was a mistake.
10092      # Let's accept both of them until this is cleared up.
10093      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
10094      lt_cv_file_magic_cmd=/usr/bin/file
10095      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
10096      ;;
10097    esac
10098  else
10099    lt_cv_deplibs_check_method=pass_all
10100  fi
10101  ;;
10102
10103haiku*)
10104  lt_cv_deplibs_check_method=pass_all
10105  ;;
10106
10107hpux10.20* | hpux11*)
10108  lt_cv_file_magic_cmd=/usr/bin/file
10109  case $host_cpu in
10110  ia64*)
10111    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
10112    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
10113    ;;
10114  hppa*64*)
10115    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
10116    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
10117    ;;
10118  *)
10119    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
10120    lt_cv_file_magic_test_file=/usr/lib/libc.sl
10121    ;;
10122  esac
10123  ;;
10124
10125interix[3-9]*)
10126  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
10127  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
10128  ;;
10129
10130irix5* | irix6* | nonstopux*)
10131  case $LD in
10132  *-32|*"-32 ") libmagic=32-bit;;
10133  *-n32|*"-n32 ") libmagic=N32;;
10134  *-64|*"-64 ") libmagic=64-bit;;
10135  *) libmagic=never-match;;
10136  esac
10137  lt_cv_deplibs_check_method=pass_all
10138  ;;
10139
10140# This must be glibc/ELF.
10141linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10142  lt_cv_deplibs_check_method=pass_all
10143  ;;
10144
10145netbsd* | netbsdelf*-gnu)
10146  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
10147    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
10148  else
10149    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
10150  fi
10151  ;;
10152
10153newos6*)
10154  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
10155  lt_cv_file_magic_cmd=/usr/bin/file
10156  lt_cv_file_magic_test_file=/usr/lib/libnls.so
10157  ;;
10158
10159*nto* | *qnx*)
10160  lt_cv_deplibs_check_method=pass_all
10161  ;;
10162
10163openbsd* | bitrig*)
10164  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
10165    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
10166  else
10167    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
10168  fi
10169  ;;
10170
10171osf3* | osf4* | osf5*)
10172  lt_cv_deplibs_check_method=pass_all
10173  ;;
10174
10175rdos*)
10176  lt_cv_deplibs_check_method=pass_all
10177  ;;
10178
10179solaris*)
10180  lt_cv_deplibs_check_method=pass_all
10181  ;;
10182
10183sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
10184  lt_cv_deplibs_check_method=pass_all
10185  ;;
10186
10187sysv4 | sysv4.3*)
10188  case $host_vendor in
10189  motorola)
10190    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
10191    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
10192    ;;
10193  ncr)
10194    lt_cv_deplibs_check_method=pass_all
10195    ;;
10196  sequent)
10197    lt_cv_file_magic_cmd='/bin/file'
10198    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
10199    ;;
10200  sni)
10201    lt_cv_file_magic_cmd='/bin/file'
10202    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
10203    lt_cv_file_magic_test_file=/lib/libc.so
10204    ;;
10205  siemens)
10206    lt_cv_deplibs_check_method=pass_all
10207    ;;
10208  pc)
10209    lt_cv_deplibs_check_method=pass_all
10210    ;;
10211  esac
10212  ;;
10213
10214tpf*)
10215  lt_cv_deplibs_check_method=pass_all
10216  ;;
10217os2*)
10218  lt_cv_deplibs_check_method=pass_all
10219  ;;
10220esac
10221
10222fi
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
10224$as_echo "$lt_cv_deplibs_check_method" >&6; }
10225
10226file_magic_glob=
10227want_nocaseglob=no
10228if test "$build" = "$host"; then
10229  case $host_os in
10230  mingw* | pw32*)
10231    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
10232      want_nocaseglob=yes
10233    else
10234      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
10235    fi
10236    ;;
10237  esac
10238fi
10239
10240file_magic_cmd=$lt_cv_file_magic_cmd
10241deplibs_check_method=$lt_cv_deplibs_check_method
10242test -z "$deplibs_check_method" && deplibs_check_method=unknown
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265if test -n "$ac_tool_prefix"; then
10266  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
10267set dummy ${ac_tool_prefix}dlltool; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if ${ac_cv_prog_DLLTOOL+:} false; then :
10271  $as_echo_n "(cached) " >&6
10272else
10273  if test -n "$DLLTOOL"; then
10274  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
10275else
10276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279  IFS=$as_save_IFS
10280  test -z "$as_dir" && as_dir=.
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
10284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291fi
10292fi
10293DLLTOOL=$ac_cv_prog_DLLTOOL
10294if test -n "$DLLTOOL"; then
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
10296$as_echo "$DLLTOOL" >&6; }
10297else
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302
10303fi
10304if test -z "$ac_cv_prog_DLLTOOL"; then
10305  ac_ct_DLLTOOL=$DLLTOOL
10306  # Extract the first word of "dlltool", so it can be a program name with args.
10307set dummy dlltool; ac_word=$2
10308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10309$as_echo_n "checking for $ac_word... " >&6; }
10310if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
10311  $as_echo_n "(cached) " >&6
10312else
10313  if test -n "$ac_ct_DLLTOOL"; then
10314  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
10315else
10316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10317for as_dir in $PATH
10318do
10319  IFS=$as_save_IFS
10320  test -z "$as_dir" && as_dir=.
10321    for ac_exec_ext in '' $ac_executable_extensions; do
10322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10323    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
10324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10325    break 2
10326  fi
10327done
10328  done
10329IFS=$as_save_IFS
10330
10331fi
10332fi
10333ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
10334if test -n "$ac_ct_DLLTOOL"; then
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
10336$as_echo "$ac_ct_DLLTOOL" >&6; }
10337else
10338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
10340fi
10341
10342  if test "x$ac_ct_DLLTOOL" = x; then
10343    DLLTOOL="false"
10344  else
10345    case $cross_compiling:$ac_tool_warned in
10346yes:)
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10348$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10349ac_tool_warned=yes ;;
10350esac
10351    DLLTOOL=$ac_ct_DLLTOOL
10352  fi
10353else
10354  DLLTOOL="$ac_cv_prog_DLLTOOL"
10355fi
10356
10357test -z "$DLLTOOL" && DLLTOOL=dlltool
10358
10359
10360
10361
10362
10363
10364
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
10366$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
10367if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  lt_cv_sharedlib_from_linklib_cmd='unknown'
10371
10372case $host_os in
10373cygwin* | mingw* | pw32* | cegcc*)
10374  # two different shell functions defined in ltmain.sh;
10375  # decide which one to use based on capabilities of $DLLTOOL
10376  case `$DLLTOOL --help 2>&1` in
10377  *--identify-strict*)
10378    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
10379    ;;
10380  *)
10381    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
10382    ;;
10383  esac
10384  ;;
10385*)
10386  # fallback: assume linklib IS sharedlib
10387  lt_cv_sharedlib_from_linklib_cmd=$ECHO
10388  ;;
10389esac
10390
10391fi
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
10393$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
10394sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
10395test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
10396
10397
10398
10399
10400
10401
10402
10403if test -n "$ac_tool_prefix"; then
10404  for ac_prog in ar
10405  do
10406    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10407set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_prog_AR+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  if test -n "$AR"; then
10414  ac_cv_prog_AR="$AR" # Let the user override the test.
10415else
10416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417for as_dir in $PATH
10418do
10419  IFS=$as_save_IFS
10420  test -z "$as_dir" && as_dir=.
10421    for ac_exec_ext in '' $ac_executable_extensions; do
10422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10423    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
10424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425    break 2
10426  fi
10427done
10428  done
10429IFS=$as_save_IFS
10430
10431fi
10432fi
10433AR=$ac_cv_prog_AR
10434if test -n "$AR"; then
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10436$as_echo "$AR" >&6; }
10437else
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440fi
10441
10442
10443    test -n "$AR" && break
10444  done
10445fi
10446if test -z "$AR"; then
10447  ac_ct_AR=$AR
10448  for ac_prog in ar
10449do
10450  # Extract the first word of "$ac_prog", so it can be a program name with args.
10451set dummy $ac_prog; ac_word=$2
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10453$as_echo_n "checking for $ac_word... " >&6; }
10454if ${ac_cv_prog_ac_ct_AR+:} false; then :
10455  $as_echo_n "(cached) " >&6
10456else
10457  if test -n "$ac_ct_AR"; then
10458  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10459else
10460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10461for as_dir in $PATH
10462do
10463  IFS=$as_save_IFS
10464  test -z "$as_dir" && as_dir=.
10465    for ac_exec_ext in '' $ac_executable_extensions; do
10466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10467    ac_cv_prog_ac_ct_AR="$ac_prog"
10468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10469    break 2
10470  fi
10471done
10472  done
10473IFS=$as_save_IFS
10474
10475fi
10476fi
10477ac_ct_AR=$ac_cv_prog_ac_ct_AR
10478if test -n "$ac_ct_AR"; then
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10480$as_echo "$ac_ct_AR" >&6; }
10481else
10482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10483$as_echo "no" >&6; }
10484fi
10485
10486
10487  test -n "$ac_ct_AR" && break
10488done
10489
10490  if test "x$ac_ct_AR" = x; then
10491    AR="false"
10492  else
10493    case $cross_compiling:$ac_tool_warned in
10494yes:)
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10496$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10497ac_tool_warned=yes ;;
10498esac
10499    AR=$ac_ct_AR
10500  fi
10501fi
10502
10503: ${AR=ar}
10504: ${AR_FLAGS=cru}
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
10517$as_echo_n "checking for archiver @FILE support... " >&6; }
10518if ${lt_cv_ar_at_file+:} false; then :
10519  $as_echo_n "(cached) " >&6
10520else
10521  lt_cv_ar_at_file=no
10522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10523/* end confdefs.h.  */
10524
10525int
10526main ()
10527{
10528
10529  ;
10530  return 0;
10531}
10532_ACEOF
10533if ac_fn_c_try_compile "$LINENO"; then :
10534  echo conftest.$ac_objext > conftest.lst
10535      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
10536      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
10537  (eval $lt_ar_try) 2>&5
10538  ac_status=$?
10539  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10540  test $ac_status = 0; }
10541      if test 0 -eq "$ac_status"; then
10542	# Ensure the archiver fails upon bogus file names.
10543	rm -f conftest.$ac_objext libconftest.a
10544	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
10545  (eval $lt_ar_try) 2>&5
10546  ac_status=$?
10547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10548  test $ac_status = 0; }
10549	if test 0 -ne "$ac_status"; then
10550          lt_cv_ar_at_file=@
10551        fi
10552      fi
10553      rm -f conftest.* libconftest.a
10554
10555fi
10556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10557
10558fi
10559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
10560$as_echo "$lt_cv_ar_at_file" >&6; }
10561
10562if test no = "$lt_cv_ar_at_file"; then
10563  archiver_list_spec=
10564else
10565  archiver_list_spec=$lt_cv_ar_at_file
10566fi
10567
10568
10569
10570
10571
10572
10573
10574if test -n "$ac_tool_prefix"; then
10575  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
10576set dummy ${ac_tool_prefix}strip; ac_word=$2
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10578$as_echo_n "checking for $ac_word... " >&6; }
10579if ${ac_cv_prog_STRIP+:} false; then :
10580  $as_echo_n "(cached) " >&6
10581else
10582  if test -n "$STRIP"; then
10583  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
10584else
10585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10586for as_dir in $PATH
10587do
10588  IFS=$as_save_IFS
10589  test -z "$as_dir" && as_dir=.
10590    for ac_exec_ext in '' $ac_executable_extensions; do
10591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10592    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
10593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10594    break 2
10595  fi
10596done
10597  done
10598IFS=$as_save_IFS
10599
10600fi
10601fi
10602STRIP=$ac_cv_prog_STRIP
10603if test -n "$STRIP"; then
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
10605$as_echo "$STRIP" >&6; }
10606else
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
10609fi
10610
10611
10612fi
10613if test -z "$ac_cv_prog_STRIP"; then
10614  ac_ct_STRIP=$STRIP
10615  # Extract the first word of "strip", so it can be a program name with args.
10616set dummy strip; ac_word=$2
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10618$as_echo_n "checking for $ac_word... " >&6; }
10619if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
10620  $as_echo_n "(cached) " >&6
10621else
10622  if test -n "$ac_ct_STRIP"; then
10623  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
10624else
10625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630    for ac_exec_ext in '' $ac_executable_extensions; do
10631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10632    ac_cv_prog_ac_ct_STRIP="strip"
10633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634    break 2
10635  fi
10636done
10637  done
10638IFS=$as_save_IFS
10639
10640fi
10641fi
10642ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
10643if test -n "$ac_ct_STRIP"; then
10644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
10645$as_echo "$ac_ct_STRIP" >&6; }
10646else
10647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
10649fi
10650
10651  if test "x$ac_ct_STRIP" = x; then
10652    STRIP=":"
10653  else
10654    case $cross_compiling:$ac_tool_warned in
10655yes:)
10656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10658ac_tool_warned=yes ;;
10659esac
10660    STRIP=$ac_ct_STRIP
10661  fi
10662else
10663  STRIP="$ac_cv_prog_STRIP"
10664fi
10665
10666test -z "$STRIP" && STRIP=:
10667
10668
10669
10670
10671
10672
10673if test -n "$ac_tool_prefix"; then
10674  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
10675set dummy ${ac_tool_prefix}ranlib; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if ${ac_cv_prog_RANLIB+:} false; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  if test -n "$RANLIB"; then
10682  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
10683else
10684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699fi
10700fi
10701RANLIB=$ac_cv_prog_RANLIB
10702if test -n "$RANLIB"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
10704$as_echo "$RANLIB" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711fi
10712if test -z "$ac_cv_prog_RANLIB"; then
10713  ac_ct_RANLIB=$RANLIB
10714  # Extract the first word of "ranlib", so it can be a program name with args.
10715set dummy ranlib; ac_word=$2
10716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10717$as_echo_n "checking for $ac_word... " >&6; }
10718if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
10719  $as_echo_n "(cached) " >&6
10720else
10721  if test -n "$ac_ct_RANLIB"; then
10722  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
10723else
10724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10725for as_dir in $PATH
10726do
10727  IFS=$as_save_IFS
10728  test -z "$as_dir" && as_dir=.
10729    for ac_exec_ext in '' $ac_executable_extensions; do
10730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10731    ac_cv_prog_ac_ct_RANLIB="ranlib"
10732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10733    break 2
10734  fi
10735done
10736  done
10737IFS=$as_save_IFS
10738
10739fi
10740fi
10741ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
10742if test -n "$ac_ct_RANLIB"; then
10743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
10744$as_echo "$ac_ct_RANLIB" >&6; }
10745else
10746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10747$as_echo "no" >&6; }
10748fi
10749
10750  if test "x$ac_ct_RANLIB" = x; then
10751    RANLIB=":"
10752  else
10753    case $cross_compiling:$ac_tool_warned in
10754yes:)
10755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10757ac_tool_warned=yes ;;
10758esac
10759    RANLIB=$ac_ct_RANLIB
10760  fi
10761else
10762  RANLIB="$ac_cv_prog_RANLIB"
10763fi
10764
10765test -z "$RANLIB" && RANLIB=:
10766
10767
10768
10769
10770
10771
10772# Determine commands to create old-style static archives.
10773old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
10774old_postinstall_cmds='chmod 644 $oldlib'
10775old_postuninstall_cmds=
10776
10777if test -n "$RANLIB"; then
10778  case $host_os in
10779  bitrig* | openbsd*)
10780    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
10781    ;;
10782  *)
10783    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
10784    ;;
10785  esac
10786  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
10787fi
10788
10789case $host_os in
10790  darwin*)
10791    lock_old_archive_extraction=yes ;;
10792  *)
10793    lock_old_archive_extraction=no ;;
10794esac
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816for ac_prog in gawk mawk nawk awk
10817do
10818  # Extract the first word of "$ac_prog", so it can be a program name with args.
10819set dummy $ac_prog; ac_word=$2
10820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10821$as_echo_n "checking for $ac_word... " >&6; }
10822if ${ac_cv_prog_AWK+:} false; then :
10823  $as_echo_n "(cached) " >&6
10824else
10825  if test -n "$AWK"; then
10826  ac_cv_prog_AWK="$AWK" # Let the user override the test.
10827else
10828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10829for as_dir in $PATH
10830do
10831  IFS=$as_save_IFS
10832  test -z "$as_dir" && as_dir=.
10833    for ac_exec_ext in '' $ac_executable_extensions; do
10834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10835    ac_cv_prog_AWK="$ac_prog"
10836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10837    break 2
10838  fi
10839done
10840  done
10841IFS=$as_save_IFS
10842
10843fi
10844fi
10845AWK=$ac_cv_prog_AWK
10846if test -n "$AWK"; then
10847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
10848$as_echo "$AWK" >&6; }
10849else
10850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10851$as_echo "no" >&6; }
10852fi
10853
10854
10855  test -n "$AWK" && break
10856done
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876# If no C compiler was specified, use CC.
10877LTCC=${LTCC-"$CC"}
10878
10879# If no C compiler flags were specified, use CFLAGS.
10880LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10881
10882# Allow CC to be a program name with arguments.
10883compiler=$CC
10884
10885
10886# Check for command to grab the raw symbol name followed by C symbol from nm.
10887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
10888$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
10889if ${lt_cv_sys_global_symbol_pipe+:} false; then :
10890  $as_echo_n "(cached) " >&6
10891else
10892
10893# These are sane defaults that work on at least a few old systems.
10894# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10895
10896# Character class describing NM global symbol codes.
10897symcode='[BCDEGRST]'
10898
10899# Regexp to match symbols that can be accessed directly from C.
10900sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
10901
10902# Define system-specific variables.
10903case $host_os in
10904aix*)
10905  symcode='[BCDT]'
10906  ;;
10907cygwin* | mingw* | pw32* | cegcc*)
10908  symcode='[ABCDGISTW]'
10909  ;;
10910hpux*)
10911  if test ia64 = "$host_cpu"; then
10912    symcode='[ABCDEGRST]'
10913  fi
10914  ;;
10915irix* | nonstopux*)
10916  symcode='[BCDEGRST]'
10917  ;;
10918osf*)
10919  symcode='[BCDEGQRST]'
10920  ;;
10921solaris*)
10922  symcode='[BDRT]'
10923  ;;
10924sco3.2v5*)
10925  symcode='[DT]'
10926  ;;
10927sysv4.2uw2*)
10928  symcode='[DT]'
10929  ;;
10930sysv5* | sco5v6* | unixware* | OpenUNIX*)
10931  symcode='[ABDT]'
10932  ;;
10933sysv4)
10934  symcode='[DFNSTU]'
10935  ;;
10936esac
10937
10938# If we're using GNU nm, then use its standard symbol codes.
10939case `$NM -V 2>&1` in
10940*GNU* | *'with BFD'*)
10941  symcode='[ABCDGIRSTW]' ;;
10942esac
10943
10944if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10945  # Gets list of data symbols to import.
10946  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
10947  # Adjust the below global symbol transforms to fixup imported variables.
10948  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
10949  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
10950  lt_c_name_lib_hook="\
10951  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
10952  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
10953else
10954  # Disable hooks by default.
10955  lt_cv_sys_global_symbol_to_import=
10956  lt_cdecl_hook=
10957  lt_c_name_hook=
10958  lt_c_name_lib_hook=
10959fi
10960
10961# Transform an extracted symbol line into a proper C declaration.
10962# Some systems (esp. on ia64) link data and code symbols differently,
10963# so use this general approach.
10964lt_cv_sys_global_symbol_to_cdecl="sed -n"\
10965$lt_cdecl_hook\
10966" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
10967" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
10968
10969# Transform an extracted symbol line into symbol name and symbol address
10970lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
10971$lt_c_name_hook\
10972" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
10973" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
10974
10975# Transform an extracted symbol line into symbol name with lib prefix and
10976# symbol address.
10977lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
10978$lt_c_name_lib_hook\
10979" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
10980" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
10981" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
10982
10983# Handle CRLF in mingw tool chain
10984opt_cr=
10985case $build_os in
10986mingw*)
10987  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10988  ;;
10989esac
10990
10991# Try without a prefix underscore, then with it.
10992for ac_symprfx in "" "_"; do
10993
10994  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10995  symxfrm="\\1 $ac_symprfx\\2 \\2"
10996
10997  # Write the raw and C identifiers.
10998  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10999    # Fake it for dumpbin and say T for any non-static function,
11000    # D for any global variable and I for any imported variable.
11001    # Also find C++ and __fastcall symbols from MSVC++,
11002    # which start with @ or ?.
11003    lt_cv_sys_global_symbol_pipe="$AWK '"\
11004"     {last_section=section; section=\$ 3};"\
11005"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
11006"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
11007"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
11008"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
11009"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
11010"     \$ 0!~/External *\|/{next};"\
11011"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
11012"     {if(hide[section]) next};"\
11013"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
11014"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
11015"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
11016"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
11017"     ' prfx=^$ac_symprfx"
11018  else
11019    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
11020  fi
11021  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
11022
11023  # Check to see that the pipe works correctly.
11024  pipe_works=no
11025
11026  rm -f conftest*
11027  cat > conftest.$ac_ext <<_LT_EOF
11028#ifdef __cplusplus
11029extern "C" {
11030#endif
11031char nm_test_var;
11032void nm_test_func(void);
11033void nm_test_func(void){}
11034#ifdef __cplusplus
11035}
11036#endif
11037int main(){nm_test_var='a';nm_test_func();return(0);}
11038_LT_EOF
11039
11040  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11041  (eval $ac_compile) 2>&5
11042  ac_status=$?
11043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11044  test $ac_status = 0; }; then
11045    # Now try to grab the symbols.
11046    nlist=conftest.nm
11047    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
11048  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
11049  ac_status=$?
11050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11051  test $ac_status = 0; } && test -s "$nlist"; then
11052      # Try sorting and uniquifying the output.
11053      if sort "$nlist" | uniq > "$nlist"T; then
11054	mv -f "$nlist"T "$nlist"
11055      else
11056	rm -f "$nlist"T
11057      fi
11058
11059      # Make sure that we snagged all the symbols we need.
11060      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
11061	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
11062	  cat <<_LT_EOF > conftest.$ac_ext
11063/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
11064#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
11065/* DATA imports from DLLs on WIN32 can't be const, because runtime
11066   relocations are performed -- see ld's documentation on pseudo-relocs.  */
11067# define LT_DLSYM_CONST
11068#elif defined __osf__
11069/* This system does not cope well with relocations in const data.  */
11070# define LT_DLSYM_CONST
11071#else
11072# define LT_DLSYM_CONST const
11073#endif
11074
11075#ifdef __cplusplus
11076extern "C" {
11077#endif
11078
11079_LT_EOF
11080	  # Now generate the symbol file.
11081	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
11082
11083	  cat <<_LT_EOF >> conftest.$ac_ext
11084
11085/* The mapping between symbol names and symbols.  */
11086LT_DLSYM_CONST struct {
11087  const char *name;
11088  void       *address;
11089}
11090lt__PROGRAM__LTX_preloaded_symbols[] =
11091{
11092  { "@PROGRAM@", (void *) 0 },
11093_LT_EOF
11094	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
11095	  cat <<\_LT_EOF >> conftest.$ac_ext
11096  {0, (void *) 0}
11097};
11098
11099/* This works around a problem in FreeBSD linker */
11100#ifdef FREEBSD_WORKAROUND
11101static const void *lt_preloaded_setup() {
11102  return lt__PROGRAM__LTX_preloaded_symbols;
11103}
11104#endif
11105
11106#ifdef __cplusplus
11107}
11108#endif
11109_LT_EOF
11110	  # Now try linking the two files.
11111	  mv conftest.$ac_objext conftstm.$ac_objext
11112	  lt_globsym_save_LIBS=$LIBS
11113	  lt_globsym_save_CFLAGS=$CFLAGS
11114	  LIBS=conftstm.$ac_objext
11115	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
11116	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11117  (eval $ac_link) 2>&5
11118  ac_status=$?
11119  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11120  test $ac_status = 0; } && test -s conftest$ac_exeext; then
11121	    pipe_works=yes
11122	  fi
11123	  LIBS=$lt_globsym_save_LIBS
11124	  CFLAGS=$lt_globsym_save_CFLAGS
11125	else
11126	  echo "cannot find nm_test_func in $nlist" >&5
11127	fi
11128      else
11129	echo "cannot find nm_test_var in $nlist" >&5
11130      fi
11131    else
11132      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
11133    fi
11134  else
11135    echo "$progname: failed program was:" >&5
11136    cat conftest.$ac_ext >&5
11137  fi
11138  rm -rf conftest* conftst*
11139
11140  # Do not use the global_symbol_pipe unless it works.
11141  if test yes = "$pipe_works"; then
11142    break
11143  else
11144    lt_cv_sys_global_symbol_pipe=
11145  fi
11146done
11147
11148fi
11149
11150if test -z "$lt_cv_sys_global_symbol_pipe"; then
11151  lt_cv_sys_global_symbol_to_cdecl=
11152fi
11153if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
11155$as_echo "failed" >&6; }
11156else
11157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
11158$as_echo "ok" >&6; }
11159fi
11160
11161# Response file support.
11162if test "$lt_cv_nm_interface" = "MS dumpbin"; then
11163  nm_file_list_spec='@'
11164elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
11165  nm_file_list_spec='@'
11166fi
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
11205$as_echo_n "checking for sysroot... " >&6; }
11206
11207# Check whether --with-sysroot was given.
11208if test "${with_sysroot+set}" = set; then :
11209  withval=$with_sysroot;
11210else
11211  with_sysroot=no
11212fi
11213
11214
11215lt_sysroot=
11216case $with_sysroot in #(
11217 yes)
11218   if test yes = "$GCC"; then
11219     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
11220   fi
11221   ;; #(
11222 /*)
11223   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
11224   ;; #(
11225 no|'')
11226   ;; #(
11227 *)
11228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
11229$as_echo "$with_sysroot" >&6; }
11230   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
11231   ;;
11232esac
11233
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
11235$as_echo "${lt_sysroot:-no}" >&6; }
11236
11237
11238
11239
11240
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
11242$as_echo_n "checking for a working dd... " >&6; }
11243if ${ac_cv_path_lt_DD+:} false; then :
11244  $as_echo_n "(cached) " >&6
11245else
11246  printf 0123456789abcdef0123456789abcdef >conftest.i
11247cat conftest.i conftest.i >conftest2.i
11248: ${lt_DD:=$DD}
11249if test -z "$lt_DD"; then
11250  ac_path_lt_DD_found=false
11251  # Loop through the user's path and test for each of PROGNAME-LIST
11252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11253for as_dir in $PATH
11254do
11255  IFS=$as_save_IFS
11256  test -z "$as_dir" && as_dir=.
11257    for ac_prog in dd; do
11258    for ac_exec_ext in '' $ac_executable_extensions; do
11259      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
11260      as_fn_executable_p "$ac_path_lt_DD" || continue
11261if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
11262  cmp -s conftest.i conftest.out \
11263  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
11264fi
11265      $ac_path_lt_DD_found && break 3
11266    done
11267  done
11268  done
11269IFS=$as_save_IFS
11270  if test -z "$ac_cv_path_lt_DD"; then
11271    :
11272  fi
11273else
11274  ac_cv_path_lt_DD=$lt_DD
11275fi
11276
11277rm -f conftest.i conftest2.i conftest.out
11278fi
11279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
11280$as_echo "$ac_cv_path_lt_DD" >&6; }
11281
11282
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
11284$as_echo_n "checking how to truncate binary pipes... " >&6; }
11285if ${lt_cv_truncate_bin+:} false; then :
11286  $as_echo_n "(cached) " >&6
11287else
11288  printf 0123456789abcdef0123456789abcdef >conftest.i
11289cat conftest.i conftest.i >conftest2.i
11290lt_cv_truncate_bin=
11291if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
11292  cmp -s conftest.i conftest.out \
11293  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
11294fi
11295rm -f conftest.i conftest2.i conftest.out
11296test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
11297fi
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
11299$as_echo "$lt_cv_truncate_bin" >&6; }
11300
11301
11302
11303
11304
11305
11306
11307# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
11308func_cc_basename ()
11309{
11310    for cc_temp in $*""; do
11311      case $cc_temp in
11312        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11313        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11314        \-*) ;;
11315        *) break;;
11316      esac
11317    done
11318    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
11319}
11320
11321# Check whether --enable-libtool-lock was given.
11322if test "${enable_libtool_lock+set}" = set; then :
11323  enableval=$enable_libtool_lock;
11324fi
11325
11326test no = "$enable_libtool_lock" || enable_libtool_lock=yes
11327
11328# Some flags need to be propagated to the compiler or linker for good
11329# libtool support.
11330case $host in
11331ia64-*-hpux*)
11332  # Find out what ABI is being produced by ac_compile, and set mode
11333  # options accordingly.
11334  echo 'int i;' > conftest.$ac_ext
11335  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11336  (eval $ac_compile) 2>&5
11337  ac_status=$?
11338  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11339  test $ac_status = 0; }; then
11340    case `/usr/bin/file conftest.$ac_objext` in
11341      *ELF-32*)
11342	HPUX_IA64_MODE=32
11343	;;
11344      *ELF-64*)
11345	HPUX_IA64_MODE=64
11346	;;
11347    esac
11348  fi
11349  rm -rf conftest*
11350  ;;
11351*-*-irix6*)
11352  # Find out what ABI is being produced by ac_compile, and set linker
11353  # options accordingly.
11354  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
11355  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11356  (eval $ac_compile) 2>&5
11357  ac_status=$?
11358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11359  test $ac_status = 0; }; then
11360    if test yes = "$lt_cv_prog_gnu_ld"; then
11361      case `/usr/bin/file conftest.$ac_objext` in
11362	*32-bit*)
11363	  LD="${LD-ld} -melf32bsmip"
11364	  ;;
11365	*N32*)
11366	  LD="${LD-ld} -melf32bmipn32"
11367	  ;;
11368	*64-bit*)
11369	  LD="${LD-ld} -melf64bmip"
11370	;;
11371      esac
11372    else
11373      case `/usr/bin/file conftest.$ac_objext` in
11374	*32-bit*)
11375	  LD="${LD-ld} -32"
11376	  ;;
11377	*N32*)
11378	  LD="${LD-ld} -n32"
11379	  ;;
11380	*64-bit*)
11381	  LD="${LD-ld} -64"
11382	  ;;
11383      esac
11384    fi
11385  fi
11386  rm -rf conftest*
11387  ;;
11388
11389mips64*-*linux*)
11390  # Find out what ABI is being produced by ac_compile, and set linker
11391  # options accordingly.
11392  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
11393  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11394  (eval $ac_compile) 2>&5
11395  ac_status=$?
11396  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11397  test $ac_status = 0; }; then
11398    emul=elf
11399    case `/usr/bin/file conftest.$ac_objext` in
11400      *32-bit*)
11401	emul="${emul}32"
11402	;;
11403      *64-bit*)
11404	emul="${emul}64"
11405	;;
11406    esac
11407    case `/usr/bin/file conftest.$ac_objext` in
11408      *MSB*)
11409	emul="${emul}btsmip"
11410	;;
11411      *LSB*)
11412	emul="${emul}ltsmip"
11413	;;
11414    esac
11415    case `/usr/bin/file conftest.$ac_objext` in
11416      *N32*)
11417	emul="${emul}n32"
11418	;;
11419    esac
11420    LD="${LD-ld} -m $emul"
11421  fi
11422  rm -rf conftest*
11423  ;;
11424
11425x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
11426s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
11427  # Find out what ABI is being produced by ac_compile, and set linker
11428  # options accordingly.  Note that the listed cases only cover the
11429  # situations where additional linker options are needed (such as when
11430  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
11431  # vice versa); the common cases where no linker options are needed do
11432  # not appear in the list.
11433  echo 'int i;' > conftest.$ac_ext
11434  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11435  (eval $ac_compile) 2>&5
11436  ac_status=$?
11437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11438  test $ac_status = 0; }; then
11439    case `/usr/bin/file conftest.o` in
11440      *32-bit*)
11441	case $host in
11442	  x86_64-*kfreebsd*-gnu)
11443	    LD="${LD-ld} -m elf_i386_fbsd"
11444	    ;;
11445	  x86_64-*linux*)
11446	    case `/usr/bin/file conftest.o` in
11447	      *x86-64*)
11448		LD="${LD-ld} -m elf32_x86_64"
11449		;;
11450	      *)
11451		LD="${LD-ld} -m elf_i386"
11452		;;
11453	    esac
11454	    ;;
11455	  powerpc64le-*linux*)
11456	    LD="${LD-ld} -m elf32lppclinux"
11457	    ;;
11458	  powerpc64-*linux*)
11459	    LD="${LD-ld} -m elf32ppclinux"
11460	    ;;
11461	  s390x-*linux*)
11462	    LD="${LD-ld} -m elf_s390"
11463	    ;;
11464	  sparc64-*linux*)
11465	    LD="${LD-ld} -m elf32_sparc"
11466	    ;;
11467	esac
11468	;;
11469      *64-bit*)
11470	case $host in
11471	  x86_64-*kfreebsd*-gnu)
11472	    LD="${LD-ld} -m elf_x86_64_fbsd"
11473	    ;;
11474	  x86_64-*linux*)
11475	    LD="${LD-ld} -m elf_x86_64"
11476	    ;;
11477	  powerpcle-*linux*)
11478	    LD="${LD-ld} -m elf64lppc"
11479	    ;;
11480	  powerpc-*linux*)
11481	    LD="${LD-ld} -m elf64ppc"
11482	    ;;
11483	  s390*-*linux*|s390*-*tpf*)
11484	    LD="${LD-ld} -m elf64_s390"
11485	    ;;
11486	  sparc*-*linux*)
11487	    LD="${LD-ld} -m elf64_sparc"
11488	    ;;
11489	esac
11490	;;
11491    esac
11492  fi
11493  rm -rf conftest*
11494  ;;
11495
11496*-*-sco3.2v5*)
11497  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
11498  SAVE_CFLAGS=$CFLAGS
11499  CFLAGS="$CFLAGS -belf"
11500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
11501$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
11502if ${lt_cv_cc_needs_belf+:} false; then :
11503  $as_echo_n "(cached) " >&6
11504else
11505  ac_ext=c
11506ac_cpp='$CPP $CPPFLAGS'
11507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11509ac_compiler_gnu=$ac_cv_c_compiler_gnu
11510
11511     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11512/* end confdefs.h.  */
11513
11514int
11515main ()
11516{
11517
11518  ;
11519  return 0;
11520}
11521_ACEOF
11522if ac_fn_c_try_link "$LINENO"; then :
11523  lt_cv_cc_needs_belf=yes
11524else
11525  lt_cv_cc_needs_belf=no
11526fi
11527rm -f core conftest.err conftest.$ac_objext \
11528    conftest$ac_exeext conftest.$ac_ext
11529     ac_ext=c
11530ac_cpp='$CPP $CPPFLAGS'
11531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11533ac_compiler_gnu=$ac_cv_c_compiler_gnu
11534
11535fi
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
11537$as_echo "$lt_cv_cc_needs_belf" >&6; }
11538  if test yes != "$lt_cv_cc_needs_belf"; then
11539    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
11540    CFLAGS=$SAVE_CFLAGS
11541  fi
11542  ;;
11543*-*solaris*)
11544  # Find out what ABI is being produced by ac_compile, and set linker
11545  # options accordingly.
11546  echo 'int i;' > conftest.$ac_ext
11547  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11548  (eval $ac_compile) 2>&5
11549  ac_status=$?
11550  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11551  test $ac_status = 0; }; then
11552    case `/usr/bin/file conftest.o` in
11553    *64-bit*)
11554      case $lt_cv_prog_gnu_ld in
11555      yes*)
11556        case $host in
11557        i?86-*-solaris*|x86_64-*-solaris*)
11558          LD="${LD-ld} -m elf_x86_64"
11559          ;;
11560        sparc*-*-solaris*)
11561          LD="${LD-ld} -m elf64_sparc"
11562          ;;
11563        esac
11564        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
11565        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
11566          LD=${LD-ld}_sol2
11567        fi
11568        ;;
11569      *)
11570	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
11571	  LD="${LD-ld} -64"
11572	fi
11573	;;
11574      esac
11575      ;;
11576    esac
11577  fi
11578  rm -rf conftest*
11579  ;;
11580esac
11581
11582need_locks=$enable_libtool_lock
11583
11584if test -n "$ac_tool_prefix"; then
11585  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
11586set dummy ${ac_tool_prefix}mt; ac_word=$2
11587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11588$as_echo_n "checking for $ac_word... " >&6; }
11589if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
11590  $as_echo_n "(cached) " >&6
11591else
11592  if test -n "$MANIFEST_TOOL"; then
11593  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
11594else
11595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11596for as_dir in $PATH
11597do
11598  IFS=$as_save_IFS
11599  test -z "$as_dir" && as_dir=.
11600    for ac_exec_ext in '' $ac_executable_extensions; do
11601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11602    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
11603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11604    break 2
11605  fi
11606done
11607  done
11608IFS=$as_save_IFS
11609
11610fi
11611fi
11612MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
11613if test -n "$MANIFEST_TOOL"; then
11614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
11615$as_echo "$MANIFEST_TOOL" >&6; }
11616else
11617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11618$as_echo "no" >&6; }
11619fi
11620
11621
11622fi
11623if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
11624  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
11625  # Extract the first word of "mt", so it can be a program name with args.
11626set dummy mt; ac_word=$2
11627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11628$as_echo_n "checking for $ac_word... " >&6; }
11629if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
11630  $as_echo_n "(cached) " >&6
11631else
11632  if test -n "$ac_ct_MANIFEST_TOOL"; then
11633  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
11634else
11635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650fi
11651fi
11652ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
11653if test -n "$ac_ct_MANIFEST_TOOL"; then
11654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
11655$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
11656else
11657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11658$as_echo "no" >&6; }
11659fi
11660
11661  if test "x$ac_ct_MANIFEST_TOOL" = x; then
11662    MANIFEST_TOOL=":"
11663  else
11664    case $cross_compiling:$ac_tool_warned in
11665yes:)
11666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11668ac_tool_warned=yes ;;
11669esac
11670    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
11671  fi
11672else
11673  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
11674fi
11675
11676test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
11678$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
11679if ${lt_cv_path_mainfest_tool+:} false; then :
11680  $as_echo_n "(cached) " >&6
11681else
11682  lt_cv_path_mainfest_tool=no
11683  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
11684  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
11685  cat conftest.err >&5
11686  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
11687    lt_cv_path_mainfest_tool=yes
11688  fi
11689  rm -f conftest*
11690fi
11691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
11692$as_echo "$lt_cv_path_mainfest_tool" >&6; }
11693if test yes != "$lt_cv_path_mainfest_tool"; then
11694  MANIFEST_TOOL=:
11695fi
11696
11697
11698
11699
11700
11701
11702  case $host_os in
11703    rhapsody* | darwin*)
11704    if test -n "$ac_tool_prefix"; then
11705  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
11706set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
11707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11708$as_echo_n "checking for $ac_word... " >&6; }
11709if ${ac_cv_prog_DSYMUTIL+:} false; then :
11710  $as_echo_n "(cached) " >&6
11711else
11712  if test -n "$DSYMUTIL"; then
11713  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
11714else
11715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11716for as_dir in $PATH
11717do
11718  IFS=$as_save_IFS
11719  test -z "$as_dir" && as_dir=.
11720    for ac_exec_ext in '' $ac_executable_extensions; do
11721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11722    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
11723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11724    break 2
11725  fi
11726done
11727  done
11728IFS=$as_save_IFS
11729
11730fi
11731fi
11732DSYMUTIL=$ac_cv_prog_DSYMUTIL
11733if test -n "$DSYMUTIL"; then
11734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
11735$as_echo "$DSYMUTIL" >&6; }
11736else
11737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11738$as_echo "no" >&6; }
11739fi
11740
11741
11742fi
11743if test -z "$ac_cv_prog_DSYMUTIL"; then
11744  ac_ct_DSYMUTIL=$DSYMUTIL
11745  # Extract the first word of "dsymutil", so it can be a program name with args.
11746set dummy dsymutil; ac_word=$2
11747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11748$as_echo_n "checking for $ac_word... " >&6; }
11749if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
11750  $as_echo_n "(cached) " >&6
11751else
11752  if test -n "$ac_ct_DSYMUTIL"; then
11753  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
11754else
11755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11756for as_dir in $PATH
11757do
11758  IFS=$as_save_IFS
11759  test -z "$as_dir" && as_dir=.
11760    for ac_exec_ext in '' $ac_executable_extensions; do
11761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11762    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
11763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11764    break 2
11765  fi
11766done
11767  done
11768IFS=$as_save_IFS
11769
11770fi
11771fi
11772ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
11773if test -n "$ac_ct_DSYMUTIL"; then
11774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
11775$as_echo "$ac_ct_DSYMUTIL" >&6; }
11776else
11777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11778$as_echo "no" >&6; }
11779fi
11780
11781  if test "x$ac_ct_DSYMUTIL" = x; then
11782    DSYMUTIL=":"
11783  else
11784    case $cross_compiling:$ac_tool_warned in
11785yes:)
11786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11788ac_tool_warned=yes ;;
11789esac
11790    DSYMUTIL=$ac_ct_DSYMUTIL
11791  fi
11792else
11793  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
11794fi
11795
11796    if test -n "$ac_tool_prefix"; then
11797  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
11798set dummy ${ac_tool_prefix}nmedit; ac_word=$2
11799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11800$as_echo_n "checking for $ac_word... " >&6; }
11801if ${ac_cv_prog_NMEDIT+:} false; then :
11802  $as_echo_n "(cached) " >&6
11803else
11804  if test -n "$NMEDIT"; then
11805  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
11806else
11807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11808for as_dir in $PATH
11809do
11810  IFS=$as_save_IFS
11811  test -z "$as_dir" && as_dir=.
11812    for ac_exec_ext in '' $ac_executable_extensions; do
11813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11814    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
11815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11816    break 2
11817  fi
11818done
11819  done
11820IFS=$as_save_IFS
11821
11822fi
11823fi
11824NMEDIT=$ac_cv_prog_NMEDIT
11825if test -n "$NMEDIT"; then
11826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
11827$as_echo "$NMEDIT" >&6; }
11828else
11829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11830$as_echo "no" >&6; }
11831fi
11832
11833
11834fi
11835if test -z "$ac_cv_prog_NMEDIT"; then
11836  ac_ct_NMEDIT=$NMEDIT
11837  # Extract the first word of "nmedit", so it can be a program name with args.
11838set dummy nmedit; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  if test -n "$ac_ct_NMEDIT"; then
11845  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
11846else
11847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11848for as_dir in $PATH
11849do
11850  IFS=$as_save_IFS
11851  test -z "$as_dir" && as_dir=.
11852    for ac_exec_ext in '' $ac_executable_extensions; do
11853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11854    ac_cv_prog_ac_ct_NMEDIT="nmedit"
11855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11856    break 2
11857  fi
11858done
11859  done
11860IFS=$as_save_IFS
11861
11862fi
11863fi
11864ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
11865if test -n "$ac_ct_NMEDIT"; then
11866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
11867$as_echo "$ac_ct_NMEDIT" >&6; }
11868else
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11870$as_echo "no" >&6; }
11871fi
11872
11873  if test "x$ac_ct_NMEDIT" = x; then
11874    NMEDIT=":"
11875  else
11876    case $cross_compiling:$ac_tool_warned in
11877yes:)
11878{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11879$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11880ac_tool_warned=yes ;;
11881esac
11882    NMEDIT=$ac_ct_NMEDIT
11883  fi
11884else
11885  NMEDIT="$ac_cv_prog_NMEDIT"
11886fi
11887
11888    if test -n "$ac_tool_prefix"; then
11889  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
11890set dummy ${ac_tool_prefix}lipo; ac_word=$2
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11892$as_echo_n "checking for $ac_word... " >&6; }
11893if ${ac_cv_prog_LIPO+:} false; then :
11894  $as_echo_n "(cached) " >&6
11895else
11896  if test -n "$LIPO"; then
11897  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
11898else
11899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11900for as_dir in $PATH
11901do
11902  IFS=$as_save_IFS
11903  test -z "$as_dir" && as_dir=.
11904    for ac_exec_ext in '' $ac_executable_extensions; do
11905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11906    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
11907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11908    break 2
11909  fi
11910done
11911  done
11912IFS=$as_save_IFS
11913
11914fi
11915fi
11916LIPO=$ac_cv_prog_LIPO
11917if test -n "$LIPO"; then
11918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
11919$as_echo "$LIPO" >&6; }
11920else
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11922$as_echo "no" >&6; }
11923fi
11924
11925
11926fi
11927if test -z "$ac_cv_prog_LIPO"; then
11928  ac_ct_LIPO=$LIPO
11929  # Extract the first word of "lipo", so it can be a program name with args.
11930set dummy lipo; ac_word=$2
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11932$as_echo_n "checking for $ac_word... " >&6; }
11933if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
11934  $as_echo_n "(cached) " >&6
11935else
11936  if test -n "$ac_ct_LIPO"; then
11937  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
11938else
11939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11940for as_dir in $PATH
11941do
11942  IFS=$as_save_IFS
11943  test -z "$as_dir" && as_dir=.
11944    for ac_exec_ext in '' $ac_executable_extensions; do
11945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11946    ac_cv_prog_ac_ct_LIPO="lipo"
11947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11948    break 2
11949  fi
11950done
11951  done
11952IFS=$as_save_IFS
11953
11954fi
11955fi
11956ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
11957if test -n "$ac_ct_LIPO"; then
11958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
11959$as_echo "$ac_ct_LIPO" >&6; }
11960else
11961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
11963fi
11964
11965  if test "x$ac_ct_LIPO" = x; then
11966    LIPO=":"
11967  else
11968    case $cross_compiling:$ac_tool_warned in
11969yes:)
11970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11972ac_tool_warned=yes ;;
11973esac
11974    LIPO=$ac_ct_LIPO
11975  fi
11976else
11977  LIPO="$ac_cv_prog_LIPO"
11978fi
11979
11980    if test -n "$ac_tool_prefix"; then
11981  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
11982set dummy ${ac_tool_prefix}otool; ac_word=$2
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11984$as_echo_n "checking for $ac_word... " >&6; }
11985if ${ac_cv_prog_OTOOL+:} false; then :
11986  $as_echo_n "(cached) " >&6
11987else
11988  if test -n "$OTOOL"; then
11989  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
11990else
11991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11992for as_dir in $PATH
11993do
11994  IFS=$as_save_IFS
11995  test -z "$as_dir" && as_dir=.
11996    for ac_exec_ext in '' $ac_executable_extensions; do
11997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11998    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
11999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12000    break 2
12001  fi
12002done
12003  done
12004IFS=$as_save_IFS
12005
12006fi
12007fi
12008OTOOL=$ac_cv_prog_OTOOL
12009if test -n "$OTOOL"; then
12010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
12011$as_echo "$OTOOL" >&6; }
12012else
12013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014$as_echo "no" >&6; }
12015fi
12016
12017
12018fi
12019if test -z "$ac_cv_prog_OTOOL"; then
12020  ac_ct_OTOOL=$OTOOL
12021  # Extract the first word of "otool", so it can be a program name with args.
12022set dummy otool; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  if test -n "$ac_ct_OTOOL"; then
12029  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
12030else
12031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032for as_dir in $PATH
12033do
12034  IFS=$as_save_IFS
12035  test -z "$as_dir" && as_dir=.
12036    for ac_exec_ext in '' $ac_executable_extensions; do
12037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12038    ac_cv_prog_ac_ct_OTOOL="otool"
12039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12040    break 2
12041  fi
12042done
12043  done
12044IFS=$as_save_IFS
12045
12046fi
12047fi
12048ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
12049if test -n "$ac_ct_OTOOL"; then
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
12051$as_echo "$ac_ct_OTOOL" >&6; }
12052else
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055fi
12056
12057  if test "x$ac_ct_OTOOL" = x; then
12058    OTOOL=":"
12059  else
12060    case $cross_compiling:$ac_tool_warned in
12061yes:)
12062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12064ac_tool_warned=yes ;;
12065esac
12066    OTOOL=$ac_ct_OTOOL
12067  fi
12068else
12069  OTOOL="$ac_cv_prog_OTOOL"
12070fi
12071
12072    if test -n "$ac_tool_prefix"; then
12073  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
12074set dummy ${ac_tool_prefix}otool64; ac_word=$2
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12076$as_echo_n "checking for $ac_word... " >&6; }
12077if ${ac_cv_prog_OTOOL64+:} false; then :
12078  $as_echo_n "(cached) " >&6
12079else
12080  if test -n "$OTOOL64"; then
12081  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
12082else
12083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12084for as_dir in $PATH
12085do
12086  IFS=$as_save_IFS
12087  test -z "$as_dir" && as_dir=.
12088    for ac_exec_ext in '' $ac_executable_extensions; do
12089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12090    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
12091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12092    break 2
12093  fi
12094done
12095  done
12096IFS=$as_save_IFS
12097
12098fi
12099fi
12100OTOOL64=$ac_cv_prog_OTOOL64
12101if test -n "$OTOOL64"; then
12102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
12103$as_echo "$OTOOL64" >&6; }
12104else
12105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12106$as_echo "no" >&6; }
12107fi
12108
12109
12110fi
12111if test -z "$ac_cv_prog_OTOOL64"; then
12112  ac_ct_OTOOL64=$OTOOL64
12113  # Extract the first word of "otool64", so it can be a program name with args.
12114set dummy otool64; ac_word=$2
12115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12116$as_echo_n "checking for $ac_word... " >&6; }
12117if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
12118  $as_echo_n "(cached) " >&6
12119else
12120  if test -n "$ac_ct_OTOOL64"; then
12121  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
12122else
12123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12124for as_dir in $PATH
12125do
12126  IFS=$as_save_IFS
12127  test -z "$as_dir" && as_dir=.
12128    for ac_exec_ext in '' $ac_executable_extensions; do
12129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12130    ac_cv_prog_ac_ct_OTOOL64="otool64"
12131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12132    break 2
12133  fi
12134done
12135  done
12136IFS=$as_save_IFS
12137
12138fi
12139fi
12140ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
12141if test -n "$ac_ct_OTOOL64"; then
12142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
12143$as_echo "$ac_ct_OTOOL64" >&6; }
12144else
12145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12146$as_echo "no" >&6; }
12147fi
12148
12149  if test "x$ac_ct_OTOOL64" = x; then
12150    OTOOL64=":"
12151  else
12152    case $cross_compiling:$ac_tool_warned in
12153yes:)
12154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12156ac_tool_warned=yes ;;
12157esac
12158    OTOOL64=$ac_ct_OTOOL64
12159  fi
12160else
12161  OTOOL64="$ac_cv_prog_OTOOL64"
12162fi
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
12191$as_echo_n "checking for -single_module linker flag... " >&6; }
12192if ${lt_cv_apple_cc_single_mod+:} false; then :
12193  $as_echo_n "(cached) " >&6
12194else
12195  lt_cv_apple_cc_single_mod=no
12196      if test -z "$LT_MULTI_MODULE"; then
12197	# By default we will add the -single_module flag. You can override
12198	# by either setting the environment variable LT_MULTI_MODULE
12199	# non-empty at configure time, or by adding -multi_module to the
12200	# link flags.
12201	rm -rf libconftest.dylib*
12202	echo "int foo(void){return 1;}" > conftest.c
12203	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
12204-dynamiclib -Wl,-single_module conftest.c" >&5
12205	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
12206	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
12207        _lt_result=$?
12208	# If there is a non-empty error log, and "single_module"
12209	# appears in it, assume the flag caused a linker warning
12210        if test -s conftest.err && $GREP single_module conftest.err; then
12211	  cat conftest.err >&5
12212	# Otherwise, if the output was created with a 0 exit code from
12213	# the compiler, it worked.
12214	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
12215	  lt_cv_apple_cc_single_mod=yes
12216	else
12217	  cat conftest.err >&5
12218	fi
12219	rm -rf libconftest.dylib*
12220	rm -f conftest.*
12221      fi
12222fi
12223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
12224$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
12225
12226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
12227$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
12228if ${lt_cv_ld_exported_symbols_list+:} false; then :
12229  $as_echo_n "(cached) " >&6
12230else
12231  lt_cv_ld_exported_symbols_list=no
12232      save_LDFLAGS=$LDFLAGS
12233      echo "_main" > conftest.sym
12234      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
12235      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236/* end confdefs.h.  */
12237
12238int
12239main ()
12240{
12241
12242  ;
12243  return 0;
12244}
12245_ACEOF
12246if ac_fn_c_try_link "$LINENO"; then :
12247  lt_cv_ld_exported_symbols_list=yes
12248else
12249  lt_cv_ld_exported_symbols_list=no
12250fi
12251rm -f core conftest.err conftest.$ac_objext \
12252    conftest$ac_exeext conftest.$ac_ext
12253	LDFLAGS=$save_LDFLAGS
12254
12255fi
12256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
12257$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
12258
12259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
12260$as_echo_n "checking for -force_load linker flag... " >&6; }
12261if ${lt_cv_ld_force_load+:} false; then :
12262  $as_echo_n "(cached) " >&6
12263else
12264  lt_cv_ld_force_load=no
12265      cat > conftest.c << _LT_EOF
12266int forced_loaded() { return 2;}
12267_LT_EOF
12268      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
12269      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
12270      echo "$AR cru libconftest.a conftest.o" >&5
12271      $AR cru libconftest.a conftest.o 2>&5
12272      echo "$RANLIB libconftest.a" >&5
12273      $RANLIB libconftest.a 2>&5
12274      cat > conftest.c << _LT_EOF
12275int main() { return 0;}
12276_LT_EOF
12277      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
12278      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
12279      _lt_result=$?
12280      if test -s conftest.err && $GREP force_load conftest.err; then
12281	cat conftest.err >&5
12282      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
12283	lt_cv_ld_force_load=yes
12284      else
12285	cat conftest.err >&5
12286      fi
12287        rm -f conftest.err libconftest.a conftest conftest.c
12288        rm -rf conftest.dSYM
12289
12290fi
12291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
12292$as_echo "$lt_cv_ld_force_load" >&6; }
12293    case $host_os in
12294    rhapsody* | darwin1.[012])
12295      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
12296    darwin1.*)
12297      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
12298    darwin*) # darwin 5.x on
12299      # if running on 10.5 or later, the deployment target defaults
12300      # to the OS version, if on x86, and 10.4, the deployment
12301      # target defaults to 10.4. Don't you love it?
12302      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
12303	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
12304	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
12305	10.[012][,.]*)
12306	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
12307	10.*)
12308	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
12309      esac
12310    ;;
12311  esac
12312    if test yes = "$lt_cv_apple_cc_single_mod"; then
12313      _lt_dar_single_mod='$single_module'
12314    fi
12315    if test yes = "$lt_cv_ld_exported_symbols_list"; then
12316      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
12317    else
12318      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
12319    fi
12320    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
12321      _lt_dsymutil='~$DSYMUTIL $lib || :'
12322    else
12323      _lt_dsymutil=
12324    fi
12325    ;;
12326  esac
12327
12328# func_munge_path_list VARIABLE PATH
12329# -----------------------------------
12330# VARIABLE is name of variable containing _space_ separated list of
12331# directories to be munged by the contents of PATH, which is string
12332# having a format:
12333# "DIR[:DIR]:"
12334#       string "DIR[ DIR]" will be prepended to VARIABLE
12335# ":DIR[:DIR]"
12336#       string "DIR[ DIR]" will be appended to VARIABLE
12337# "DIRP[:DIRP]::[DIRA:]DIRA"
12338#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
12339#       "DIRA[ DIRA]" will be appended to VARIABLE
12340# "DIR[:DIR]"
12341#       VARIABLE will be replaced by "DIR[ DIR]"
12342func_munge_path_list ()
12343{
12344    case x$2 in
12345    x)
12346        ;;
12347    *:)
12348        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
12349        ;;
12350    x:*)
12351        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
12352        ;;
12353    *::*)
12354        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
12355        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
12356        ;;
12357    *)
12358        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
12359        ;;
12360    esac
12361}
12362
12363ac_ext=c
12364ac_cpp='$CPP $CPPFLAGS'
12365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12367ac_compiler_gnu=$ac_cv_c_compiler_gnu
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12369$as_echo_n "checking how to run the C preprocessor... " >&6; }
12370# On Suns, sometimes $CPP names a directory.
12371if test -n "$CPP" && test -d "$CPP"; then
12372  CPP=
12373fi
12374if test -z "$CPP"; then
12375  if ${ac_cv_prog_CPP+:} false; then :
12376  $as_echo_n "(cached) " >&6
12377else
12378      # Double quotes because CPP needs to be expanded
12379    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12380    do
12381      ac_preproc_ok=false
12382for ac_c_preproc_warn_flag in '' yes
12383do
12384  # Use a header file that comes with gcc, so configuring glibc
12385  # with a fresh cross-compiler works.
12386  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12387  # <limits.h> exists even on freestanding compilers.
12388  # On the NeXT, cc -E runs the code through the compiler's parser,
12389  # not just through cpp. "Syntax error" is here to catch this case.
12390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391/* end confdefs.h.  */
12392#ifdef __STDC__
12393# include <limits.h>
12394#else
12395# include <assert.h>
12396#endif
12397		     Syntax error
12398_ACEOF
12399if ac_fn_c_try_cpp "$LINENO"; then :
12400
12401else
12402  # Broken: fails on valid input.
12403continue
12404fi
12405rm -f conftest.err conftest.i conftest.$ac_ext
12406
12407  # OK, works on sane cases.  Now check whether nonexistent headers
12408  # can be detected and how.
12409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410/* end confdefs.h.  */
12411#include <ac_nonexistent.h>
12412_ACEOF
12413if ac_fn_c_try_cpp "$LINENO"; then :
12414  # Broken: success on invalid input.
12415continue
12416else
12417  # Passes both tests.
12418ac_preproc_ok=:
12419break
12420fi
12421rm -f conftest.err conftest.i conftest.$ac_ext
12422
12423done
12424# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12425rm -f conftest.i conftest.err conftest.$ac_ext
12426if $ac_preproc_ok; then :
12427  break
12428fi
12429
12430    done
12431    ac_cv_prog_CPP=$CPP
12432
12433fi
12434  CPP=$ac_cv_prog_CPP
12435else
12436  ac_cv_prog_CPP=$CPP
12437fi
12438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12439$as_echo "$CPP" >&6; }
12440ac_preproc_ok=false
12441for ac_c_preproc_warn_flag in '' yes
12442do
12443  # Use a header file that comes with gcc, so configuring glibc
12444  # with a fresh cross-compiler works.
12445  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12446  # <limits.h> exists even on freestanding compilers.
12447  # On the NeXT, cc -E runs the code through the compiler's parser,
12448  # not just through cpp. "Syntax error" is here to catch this case.
12449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450/* end confdefs.h.  */
12451#ifdef __STDC__
12452# include <limits.h>
12453#else
12454# include <assert.h>
12455#endif
12456		     Syntax error
12457_ACEOF
12458if ac_fn_c_try_cpp "$LINENO"; then :
12459
12460else
12461  # Broken: fails on valid input.
12462continue
12463fi
12464rm -f conftest.err conftest.i conftest.$ac_ext
12465
12466  # OK, works on sane cases.  Now check whether nonexistent headers
12467  # can be detected and how.
12468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12469/* end confdefs.h.  */
12470#include <ac_nonexistent.h>
12471_ACEOF
12472if ac_fn_c_try_cpp "$LINENO"; then :
12473  # Broken: success on invalid input.
12474continue
12475else
12476  # Passes both tests.
12477ac_preproc_ok=:
12478break
12479fi
12480rm -f conftest.err conftest.i conftest.$ac_ext
12481
12482done
12483# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12484rm -f conftest.i conftest.err conftest.$ac_ext
12485if $ac_preproc_ok; then :
12486
12487else
12488  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12490as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
12491See \`config.log' for more details" "$LINENO" 5; }
12492fi
12493
12494ac_ext=c
12495ac_cpp='$CPP $CPPFLAGS'
12496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12498ac_compiler_gnu=$ac_cv_c_compiler_gnu
12499
12500
12501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12502$as_echo_n "checking for ANSI C header files... " >&6; }
12503if ${ac_cv_header_stdc+:} false; then :
12504  $as_echo_n "(cached) " >&6
12505else
12506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507/* end confdefs.h.  */
12508#include <stdlib.h>
12509#include <stdarg.h>
12510#include <string.h>
12511#include <float.h>
12512
12513int
12514main ()
12515{
12516
12517  ;
12518  return 0;
12519}
12520_ACEOF
12521if ac_fn_c_try_compile "$LINENO"; then :
12522  ac_cv_header_stdc=yes
12523else
12524  ac_cv_header_stdc=no
12525fi
12526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12527
12528if test $ac_cv_header_stdc = yes; then
12529  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531/* end confdefs.h.  */
12532#include <string.h>
12533
12534_ACEOF
12535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12536  $EGREP "memchr" >/dev/null 2>&1; then :
12537
12538else
12539  ac_cv_header_stdc=no
12540fi
12541rm -f conftest*
12542
12543fi
12544
12545if test $ac_cv_header_stdc = yes; then
12546  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548/* end confdefs.h.  */
12549#include <stdlib.h>
12550
12551_ACEOF
12552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12553  $EGREP "free" >/dev/null 2>&1; then :
12554
12555else
12556  ac_cv_header_stdc=no
12557fi
12558rm -f conftest*
12559
12560fi
12561
12562if test $ac_cv_header_stdc = yes; then
12563  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12564  if test "$cross_compiling" = yes; then :
12565  :
12566else
12567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12568/* end confdefs.h.  */
12569#include <ctype.h>
12570#include <stdlib.h>
12571#if ((' ' & 0x0FF) == 0x020)
12572# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12573# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12574#else
12575# define ISLOWER(c) \
12576		   (('a' <= (c) && (c) <= 'i') \
12577		     || ('j' <= (c) && (c) <= 'r') \
12578		     || ('s' <= (c) && (c) <= 'z'))
12579# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12580#endif
12581
12582#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12583int
12584main ()
12585{
12586  int i;
12587  for (i = 0; i < 256; i++)
12588    if (XOR (islower (i), ISLOWER (i))
12589	|| toupper (i) != TOUPPER (i))
12590      return 2;
12591  return 0;
12592}
12593_ACEOF
12594if ac_fn_c_try_run "$LINENO"; then :
12595
12596else
12597  ac_cv_header_stdc=no
12598fi
12599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12600  conftest.$ac_objext conftest.beam conftest.$ac_ext
12601fi
12602
12603fi
12604fi
12605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12606$as_echo "$ac_cv_header_stdc" >&6; }
12607if test $ac_cv_header_stdc = yes; then
12608
12609$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12610
12611fi
12612
12613# On IRIX 5.3, sys/types and inttypes.h are conflicting.
12614for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12615		  inttypes.h stdint.h unistd.h
12616do :
12617  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12618ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12619"
12620if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12621  cat >>confdefs.h <<_ACEOF
12622#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12623_ACEOF
12624
12625fi
12626
12627done
12628
12629
12630for ac_header in dlfcn.h
12631do :
12632  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
12633"
12634if test "x$ac_cv_header_dlfcn_h" = xyes; then :
12635  cat >>confdefs.h <<_ACEOF
12636#define HAVE_DLFCN_H 1
12637_ACEOF
12638
12639fi
12640
12641done
12642
12643
12644
12645func_stripname_cnf ()
12646{
12647  case $2 in
12648  .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
12649  *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
12650  esac
12651} # func_stripname_cnf
12652
12653
12654
12655
12656
12657# Set options
12658
12659
12660
12661        enable_dlopen=no
12662
12663
12664
12665            # Check whether --enable-shared was given.
12666if test "${enable_shared+set}" = set; then :
12667  enableval=$enable_shared; p=${PACKAGE-default}
12668    case $enableval in
12669    yes) enable_shared=yes ;;
12670    no) enable_shared=no ;;
12671    *)
12672      enable_shared=no
12673      # Look at the argument we got.  We use all the common list separators.
12674      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12675      for pkg in $enableval; do
12676	IFS=$lt_save_ifs
12677	if test "X$pkg" = "X$p"; then
12678	  enable_shared=yes
12679	fi
12680      done
12681      IFS=$lt_save_ifs
12682      ;;
12683    esac
12684else
12685  enable_shared=yes
12686fi
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696  # Check whether --enable-static was given.
12697if test "${enable_static+set}" = set; then :
12698  enableval=$enable_static; p=${PACKAGE-default}
12699    case $enableval in
12700    yes) enable_static=yes ;;
12701    no) enable_static=no ;;
12702    *)
12703     enable_static=no
12704      # Look at the argument we got.  We use all the common list separators.
12705      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12706      for pkg in $enableval; do
12707	IFS=$lt_save_ifs
12708	if test "X$pkg" = "X$p"; then
12709	  enable_static=yes
12710	fi
12711      done
12712      IFS=$lt_save_ifs
12713      ;;
12714    esac
12715else
12716  enable_static=yes
12717fi
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728# Check whether --with-pic was given.
12729if test "${with_pic+set}" = set; then :
12730  withval=$with_pic; lt_p=${PACKAGE-default}
12731    case $withval in
12732    yes|no) pic_mode=$withval ;;
12733    *)
12734      pic_mode=default
12735      # Look at the argument we got.  We use all the common list separators.
12736      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12737      for lt_pkg in $withval; do
12738	IFS=$lt_save_ifs
12739	if test "X$lt_pkg" = "X$lt_p"; then
12740	  pic_mode=yes
12741	fi
12742      done
12743      IFS=$lt_save_ifs
12744      ;;
12745    esac
12746else
12747  pic_mode=default
12748fi
12749
12750
12751
12752
12753
12754
12755
12756
12757  # Check whether --enable-fast-install was given.
12758if test "${enable_fast_install+set}" = set; then :
12759  enableval=$enable_fast_install; p=${PACKAGE-default}
12760    case $enableval in
12761    yes) enable_fast_install=yes ;;
12762    no) enable_fast_install=no ;;
12763    *)
12764      enable_fast_install=no
12765      # Look at the argument we got.  We use all the common list separators.
12766      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12767      for pkg in $enableval; do
12768	IFS=$lt_save_ifs
12769	if test "X$pkg" = "X$p"; then
12770	  enable_fast_install=yes
12771	fi
12772      done
12773      IFS=$lt_save_ifs
12774      ;;
12775    esac
12776else
12777  enable_fast_install=yes
12778fi
12779
12780
12781
12782
12783
12784
12785
12786
12787  shared_archive_member_spec=
12788case $host,$enable_shared in
12789power*-*-aix[5-9]*,yes)
12790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
12791$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
12792
12793# Check whether --with-aix-soname was given.
12794if test "${with_aix_soname+set}" = set; then :
12795  withval=$with_aix_soname; case $withval in
12796    aix|svr4|both)
12797      ;;
12798    *)
12799      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
12800      ;;
12801    esac
12802    lt_cv_with_aix_soname=$with_aix_soname
12803else
12804  if ${lt_cv_with_aix_soname+:} false; then :
12805  $as_echo_n "(cached) " >&6
12806else
12807  lt_cv_with_aix_soname=aix
12808fi
12809
12810    with_aix_soname=$lt_cv_with_aix_soname
12811fi
12812
12813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
12814$as_echo "$with_aix_soname" >&6; }
12815  if test aix != "$with_aix_soname"; then
12816    # For the AIX way of multilib, we name the shared archive member
12817    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
12818    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
12819    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
12820    # the AIX toolchain works better with OBJECT_MODE set (default 32).
12821    if test 64 = "${OBJECT_MODE-32}"; then
12822      shared_archive_member_spec=shr_64
12823    else
12824      shared_archive_member_spec=shr
12825    fi
12826  fi
12827  ;;
12828*)
12829  with_aix_soname=aix
12830  ;;
12831esac
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842# This can be used to rebuild libtool when needed
12843LIBTOOL_DEPS=$ltmain
12844
12845# Always use our own libtool.
12846LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877test -z "$LN_S" && LN_S="ln -s"
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892if test -n "${ZSH_VERSION+set}"; then
12893   setopt NO_GLOB_SUBST
12894fi
12895
12896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
12897$as_echo_n "checking for objdir... " >&6; }
12898if ${lt_cv_objdir+:} false; then :
12899  $as_echo_n "(cached) " >&6
12900else
12901  rm -f .libs 2>/dev/null
12902mkdir .libs 2>/dev/null
12903if test -d .libs; then
12904  lt_cv_objdir=.libs
12905else
12906  # MS-DOS does not allow filenames that begin with a dot.
12907  lt_cv_objdir=_libs
12908fi
12909rmdir .libs 2>/dev/null
12910fi
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
12912$as_echo "$lt_cv_objdir" >&6; }
12913objdir=$lt_cv_objdir
12914
12915
12916
12917
12918
12919cat >>confdefs.h <<_ACEOF
12920#define LT_OBJDIR "$lt_cv_objdir/"
12921_ACEOF
12922
12923
12924
12925
12926case $host_os in
12927aix3*)
12928  # AIX sometimes has problems with the GCC collect2 program.  For some
12929  # reason, if we set the COLLECT_NAMES environment variable, the problems
12930  # vanish in a puff of smoke.
12931  if test set != "${COLLECT_NAMES+set}"; then
12932    COLLECT_NAMES=
12933    export COLLECT_NAMES
12934  fi
12935  ;;
12936esac
12937
12938# Global variables:
12939ofile=libtool
12940can_build_shared=yes
12941
12942# All known linkers require a '.a' archive for static linking (except MSVC,
12943# which needs '.lib').
12944libext=a
12945
12946with_gnu_ld=$lt_cv_prog_gnu_ld
12947
12948old_CC=$CC
12949old_CFLAGS=$CFLAGS
12950
12951# Set sane defaults for various variables
12952test -z "$CC" && CC=cc
12953test -z "$LTCC" && LTCC=$CC
12954test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
12955test -z "$LD" && LD=ld
12956test -z "$ac_objext" && ac_objext=o
12957
12958func_cc_basename $compiler
12959cc_basename=$func_cc_basename_result
12960
12961
12962# Only perform the check for file, if the check method requires it
12963test -z "$MAGIC_CMD" && MAGIC_CMD=file
12964case $deplibs_check_method in
12965file_magic*)
12966  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
12967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
12968$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
12969if ${lt_cv_path_MAGIC_CMD+:} false; then :
12970  $as_echo_n "(cached) " >&6
12971else
12972  case $MAGIC_CMD in
12973[\\/*] |  ?:[\\/]*)
12974  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
12975  ;;
12976*)
12977  lt_save_MAGIC_CMD=$MAGIC_CMD
12978  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
12979  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
12980  for ac_dir in $ac_dummy; do
12981    IFS=$lt_save_ifs
12982    test -z "$ac_dir" && ac_dir=.
12983    if test -f "$ac_dir/${ac_tool_prefix}file"; then
12984      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
12985      if test -n "$file_magic_test_file"; then
12986	case $deplibs_check_method in
12987	"file_magic "*)
12988	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
12989	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
12990	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
12991	    $EGREP "$file_magic_regex" > /dev/null; then
12992	    :
12993	  else
12994	    cat <<_LT_EOF 1>&2
12995
12996*** Warning: the command libtool uses to detect shared libraries,
12997*** $file_magic_cmd, produces output that libtool cannot recognize.
12998*** The result is that libtool may fail to recognize shared libraries
12999*** as such.  This will affect the creation of libtool libraries that
13000*** depend on shared libraries, but programs linked with such libtool
13001*** libraries will work regardless of this problem.  Nevertheless, you
13002*** may want to report the problem to your system manager and/or to
13003*** bug-libtool@gnu.org
13004
13005_LT_EOF
13006	  fi ;;
13007	esac
13008      fi
13009      break
13010    fi
13011  done
13012  IFS=$lt_save_ifs
13013  MAGIC_CMD=$lt_save_MAGIC_CMD
13014  ;;
13015esac
13016fi
13017
13018MAGIC_CMD=$lt_cv_path_MAGIC_CMD
13019if test -n "$MAGIC_CMD"; then
13020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13021$as_echo "$MAGIC_CMD" >&6; }
13022else
13023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13024$as_echo "no" >&6; }
13025fi
13026
13027
13028
13029
13030
13031if test -z "$lt_cv_path_MAGIC_CMD"; then
13032  if test -n "$ac_tool_prefix"; then
13033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
13034$as_echo_n "checking for file... " >&6; }
13035if ${lt_cv_path_MAGIC_CMD+:} false; then :
13036  $as_echo_n "(cached) " >&6
13037else
13038  case $MAGIC_CMD in
13039[\\/*] |  ?:[\\/]*)
13040  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
13041  ;;
13042*)
13043  lt_save_MAGIC_CMD=$MAGIC_CMD
13044  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
13045  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13046  for ac_dir in $ac_dummy; do
13047    IFS=$lt_save_ifs
13048    test -z "$ac_dir" && ac_dir=.
13049    if test -f "$ac_dir/file"; then
13050      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
13051      if test -n "$file_magic_test_file"; then
13052	case $deplibs_check_method in
13053	"file_magic "*)
13054	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13055	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
13056	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13057	    $EGREP "$file_magic_regex" > /dev/null; then
13058	    :
13059	  else
13060	    cat <<_LT_EOF 1>&2
13061
13062*** Warning: the command libtool uses to detect shared libraries,
13063*** $file_magic_cmd, produces output that libtool cannot recognize.
13064*** The result is that libtool may fail to recognize shared libraries
13065*** as such.  This will affect the creation of libtool libraries that
13066*** depend on shared libraries, but programs linked with such libtool
13067*** libraries will work regardless of this problem.  Nevertheless, you
13068*** may want to report the problem to your system manager and/or to
13069*** bug-libtool@gnu.org
13070
13071_LT_EOF
13072	  fi ;;
13073	esac
13074      fi
13075      break
13076    fi
13077  done
13078  IFS=$lt_save_ifs
13079  MAGIC_CMD=$lt_save_MAGIC_CMD
13080  ;;
13081esac
13082fi
13083
13084MAGIC_CMD=$lt_cv_path_MAGIC_CMD
13085if test -n "$MAGIC_CMD"; then
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13087$as_echo "$MAGIC_CMD" >&6; }
13088else
13089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13090$as_echo "no" >&6; }
13091fi
13092
13093
13094  else
13095    MAGIC_CMD=:
13096  fi
13097fi
13098
13099  fi
13100  ;;
13101esac
13102
13103# Use C for the default configuration in the libtool script
13104
13105lt_save_CC=$CC
13106ac_ext=c
13107ac_cpp='$CPP $CPPFLAGS'
13108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13110ac_compiler_gnu=$ac_cv_c_compiler_gnu
13111
13112
13113# Source file extension for C test sources.
13114ac_ext=c
13115
13116# Object file extension for compiled C test sources.
13117objext=o
13118objext=$objext
13119
13120# Code to be used in simple compile tests
13121lt_simple_compile_test_code="int some_variable = 0;"
13122
13123# Code to be used in simple link tests
13124lt_simple_link_test_code='int main(){return(0);}'
13125
13126
13127
13128
13129
13130
13131
13132# If no C compiler was specified, use CC.
13133LTCC=${LTCC-"$CC"}
13134
13135# If no C compiler flags were specified, use CFLAGS.
13136LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13137
13138# Allow CC to be a program name with arguments.
13139compiler=$CC
13140
13141# Save the default compiler, since it gets overwritten when the other
13142# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
13143compiler_DEFAULT=$CC
13144
13145# save warnings/boilerplate of simple test code
13146ac_outfile=conftest.$ac_objext
13147echo "$lt_simple_compile_test_code" >conftest.$ac_ext
13148eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13149_lt_compiler_boilerplate=`cat conftest.err`
13150$RM conftest*
13151
13152ac_outfile=conftest.$ac_objext
13153echo "$lt_simple_link_test_code" >conftest.$ac_ext
13154eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13155_lt_linker_boilerplate=`cat conftest.err`
13156$RM -r conftest*
13157
13158
13159## CAVEAT EMPTOR:
13160## There is no encapsulation within the following macros, do not change
13161## the running order or otherwise move them around unless you know exactly
13162## what you are doing...
13163if test -n "$compiler"; then
13164
13165lt_prog_compiler_no_builtin_flag=
13166
13167if test yes = "$GCC"; then
13168  case $cc_basename in
13169  nvcc*)
13170    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
13171  *)
13172    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
13173  esac
13174
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
13176$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
13177if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
13178  $as_echo_n "(cached) " >&6
13179else
13180  lt_cv_prog_compiler_rtti_exceptions=no
13181   ac_outfile=conftest.$ac_objext
13182   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13183   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
13184   # Insert the option either (1) after the last *FLAGS variable, or
13185   # (2) before a word containing "conftest.", or (3) at the end.
13186   # Note that $ac_compile itself does not contain backslashes and begins
13187   # with a dollar sign (not a hyphen), so the echo should work correctly.
13188   # The option is referenced via a variable to avoid confusing sed.
13189   lt_compile=`echo "$ac_compile" | $SED \
13190   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13191   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13192   -e 's:$: $lt_compiler_flag:'`
13193   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13194   (eval "$lt_compile" 2>conftest.err)
13195   ac_status=$?
13196   cat conftest.err >&5
13197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13198   if (exit $ac_status) && test -s "$ac_outfile"; then
13199     # The compiler can only warn and ignore the option if not recognized
13200     # So say no if there are warnings other than the usual output.
13201     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
13202     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13203     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13204       lt_cv_prog_compiler_rtti_exceptions=yes
13205     fi
13206   fi
13207   $RM conftest*
13208
13209fi
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
13211$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
13212
13213if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
13214    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
13215else
13216    :
13217fi
13218
13219fi
13220
13221
13222
13223
13224
13225
13226  lt_prog_compiler_wl=
13227lt_prog_compiler_pic=
13228lt_prog_compiler_static=
13229
13230
13231  if test yes = "$GCC"; then
13232    lt_prog_compiler_wl='-Wl,'
13233    lt_prog_compiler_static='-static'
13234
13235    case $host_os in
13236      aix*)
13237      # All AIX code is PIC.
13238      if test ia64 = "$host_cpu"; then
13239	# AIX 5 now supports IA64 processor
13240	lt_prog_compiler_static='-Bstatic'
13241      fi
13242      lt_prog_compiler_pic='-fPIC'
13243      ;;
13244
13245    amigaos*)
13246      case $host_cpu in
13247      powerpc)
13248            # see comment about AmigaOS4 .so support
13249            lt_prog_compiler_pic='-fPIC'
13250        ;;
13251      m68k)
13252            # FIXME: we need at least 68020 code to build shared libraries, but
13253            # adding the '-m68020' flag to GCC prevents building anything better,
13254            # like '-m68040'.
13255            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
13256        ;;
13257      esac
13258      ;;
13259
13260    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13261      # PIC is the default for these OSes.
13262      ;;
13263
13264    mingw* | cygwin* | pw32* | os2* | cegcc*)
13265      # This hack is so that the source file can tell whether it is being
13266      # built for inclusion in a dll (and should export symbols for example).
13267      # Although the cygwin gcc ignores -fPIC, still need this for old-style
13268      # (--disable-auto-import) libraries
13269      lt_prog_compiler_pic='-DDLL_EXPORT'
13270      case $host_os in
13271      os2*)
13272	lt_prog_compiler_static='$wl-static'
13273	;;
13274      esac
13275      ;;
13276
13277    darwin* | rhapsody*)
13278      # PIC is the default on this platform
13279      # Common symbols not allowed in MH_DYLIB files
13280      lt_prog_compiler_pic='-fno-common'
13281      ;;
13282
13283    haiku*)
13284      # PIC is the default for Haiku.
13285      # The "-static" flag exists, but is broken.
13286      lt_prog_compiler_static=
13287      ;;
13288
13289    hpux*)
13290      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
13291      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
13292      # sets the default TLS model and affects inlining.
13293      case $host_cpu in
13294      hppa*64*)
13295	# +Z the default
13296	;;
13297      *)
13298	lt_prog_compiler_pic='-fPIC'
13299	;;
13300      esac
13301      ;;
13302
13303    interix[3-9]*)
13304      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
13305      # Instead, we relocate shared libraries at runtime.
13306      ;;
13307
13308    msdosdjgpp*)
13309      # Just because we use GCC doesn't mean we suddenly get shared libraries
13310      # on systems that don't support them.
13311      lt_prog_compiler_can_build_shared=no
13312      enable_shared=no
13313      ;;
13314
13315    *nto* | *qnx*)
13316      # QNX uses GNU C++, but need to define -shared option too, otherwise
13317      # it will coredump.
13318      lt_prog_compiler_pic='-fPIC -shared'
13319      ;;
13320
13321    sysv4*MP*)
13322      if test -d /usr/nec; then
13323	lt_prog_compiler_pic=-Kconform_pic
13324      fi
13325      ;;
13326
13327    *)
13328      lt_prog_compiler_pic='-fPIC'
13329      ;;
13330    esac
13331
13332    case $cc_basename in
13333    nvcc*) # Cuda Compiler Driver 2.2
13334      lt_prog_compiler_wl='-Xlinker '
13335      if test -n "$lt_prog_compiler_pic"; then
13336        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
13337      fi
13338      ;;
13339    esac
13340  else
13341    # PORTME Check for flag to pass linker flags through the system compiler.
13342    case $host_os in
13343    aix*)
13344      lt_prog_compiler_wl='-Wl,'
13345      if test ia64 = "$host_cpu"; then
13346	# AIX 5 now supports IA64 processor
13347	lt_prog_compiler_static='-Bstatic'
13348      else
13349	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
13350      fi
13351      ;;
13352
13353    darwin* | rhapsody*)
13354      # PIC is the default on this platform
13355      # Common symbols not allowed in MH_DYLIB files
13356      lt_prog_compiler_pic='-fno-common'
13357      case $cc_basename in
13358      nagfor*)
13359        # NAG Fortran compiler
13360        lt_prog_compiler_wl='-Wl,-Wl,,'
13361        lt_prog_compiler_pic='-PIC'
13362        lt_prog_compiler_static='-Bstatic'
13363        ;;
13364      esac
13365      ;;
13366
13367    mingw* | cygwin* | pw32* | os2* | cegcc*)
13368      # This hack is so that the source file can tell whether it is being
13369      # built for inclusion in a dll (and should export symbols for example).
13370      lt_prog_compiler_pic='-DDLL_EXPORT'
13371      case $host_os in
13372      os2*)
13373	lt_prog_compiler_static='$wl-static'
13374	;;
13375      esac
13376      ;;
13377
13378    hpux9* | hpux10* | hpux11*)
13379      lt_prog_compiler_wl='-Wl,'
13380      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
13381      # not for PA HP-UX.
13382      case $host_cpu in
13383      hppa*64*|ia64*)
13384	# +Z the default
13385	;;
13386      *)
13387	lt_prog_compiler_pic='+Z'
13388	;;
13389      esac
13390      # Is there a better lt_prog_compiler_static that works with the bundled CC?
13391      lt_prog_compiler_static='$wl-a ${wl}archive'
13392      ;;
13393
13394    irix5* | irix6* | nonstopux*)
13395      lt_prog_compiler_wl='-Wl,'
13396      # PIC (with -KPIC) is the default.
13397      lt_prog_compiler_static='-non_shared'
13398      ;;
13399
13400    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13401      case $cc_basename in
13402      # old Intel for x86_64, which still supported -KPIC.
13403      ecc*)
13404	lt_prog_compiler_wl='-Wl,'
13405	lt_prog_compiler_pic='-KPIC'
13406	lt_prog_compiler_static='-static'
13407        ;;
13408      # icc used to be incompatible with GCC.
13409      # ICC 10 doesn't accept -KPIC any more.
13410      icc* | ifort*)
13411	lt_prog_compiler_wl='-Wl,'
13412	lt_prog_compiler_pic='-fPIC'
13413	lt_prog_compiler_static='-static'
13414        ;;
13415      # Lahey Fortran 8.1.
13416      lf95*)
13417	lt_prog_compiler_wl='-Wl,'
13418	lt_prog_compiler_pic='--shared'
13419	lt_prog_compiler_static='--static'
13420	;;
13421      nagfor*)
13422	# NAG Fortran compiler
13423	lt_prog_compiler_wl='-Wl,-Wl,,'
13424	lt_prog_compiler_pic='-PIC'
13425	lt_prog_compiler_static='-Bstatic'
13426	;;
13427      tcc*)
13428	# Fabrice Bellard et al's Tiny C Compiler
13429	lt_prog_compiler_wl='-Wl,'
13430	lt_prog_compiler_pic='-fPIC'
13431	lt_prog_compiler_static='-static'
13432	;;
13433      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
13434        # Portland Group compilers (*not* the Pentium gcc compiler,
13435	# which looks to be a dead project)
13436	lt_prog_compiler_wl='-Wl,'
13437	lt_prog_compiler_pic='-fpic'
13438	lt_prog_compiler_static='-Bstatic'
13439        ;;
13440      ccc*)
13441        lt_prog_compiler_wl='-Wl,'
13442        # All Alpha code is PIC.
13443        lt_prog_compiler_static='-non_shared'
13444        ;;
13445      xl* | bgxl* | bgf* | mpixl*)
13446	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
13447	lt_prog_compiler_wl='-Wl,'
13448	lt_prog_compiler_pic='-qpic'
13449	lt_prog_compiler_static='-qstaticlink'
13450	;;
13451      *)
13452	case `$CC -V 2>&1 | sed 5q` in
13453	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
13454	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
13455	  lt_prog_compiler_pic='-KPIC'
13456	  lt_prog_compiler_static='-Bstatic'
13457	  lt_prog_compiler_wl=''
13458	  ;;
13459	*Sun\ F* | *Sun*Fortran*)
13460	  lt_prog_compiler_pic='-KPIC'
13461	  lt_prog_compiler_static='-Bstatic'
13462	  lt_prog_compiler_wl='-Qoption ld '
13463	  ;;
13464	*Sun\ C*)
13465	  # Sun C 5.9
13466	  lt_prog_compiler_pic='-KPIC'
13467	  lt_prog_compiler_static='-Bstatic'
13468	  lt_prog_compiler_wl='-Wl,'
13469	  ;;
13470        *Intel*\ [CF]*Compiler*)
13471	  lt_prog_compiler_wl='-Wl,'
13472	  lt_prog_compiler_pic='-fPIC'
13473	  lt_prog_compiler_static='-static'
13474	  ;;
13475	*Portland\ Group*)
13476	  lt_prog_compiler_wl='-Wl,'
13477	  lt_prog_compiler_pic='-fpic'
13478	  lt_prog_compiler_static='-Bstatic'
13479	  ;;
13480	esac
13481	;;
13482      esac
13483      ;;
13484
13485    newsos6)
13486      lt_prog_compiler_pic='-KPIC'
13487      lt_prog_compiler_static='-Bstatic'
13488      ;;
13489
13490    *nto* | *qnx*)
13491      # QNX uses GNU C++, but need to define -shared option too, otherwise
13492      # it will coredump.
13493      lt_prog_compiler_pic='-fPIC -shared'
13494      ;;
13495
13496    osf3* | osf4* | osf5*)
13497      lt_prog_compiler_wl='-Wl,'
13498      # All OSF/1 code is PIC.
13499      lt_prog_compiler_static='-non_shared'
13500      ;;
13501
13502    rdos*)
13503      lt_prog_compiler_static='-non_shared'
13504      ;;
13505
13506    solaris*)
13507      lt_prog_compiler_pic='-KPIC'
13508      lt_prog_compiler_static='-Bstatic'
13509      case $cc_basename in
13510      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
13511	lt_prog_compiler_wl='-Qoption ld ';;
13512      *)
13513	lt_prog_compiler_wl='-Wl,';;
13514      esac
13515      ;;
13516
13517    sunos4*)
13518      lt_prog_compiler_wl='-Qoption ld '
13519      lt_prog_compiler_pic='-PIC'
13520      lt_prog_compiler_static='-Bstatic'
13521      ;;
13522
13523    sysv4 | sysv4.2uw2* | sysv4.3*)
13524      lt_prog_compiler_wl='-Wl,'
13525      lt_prog_compiler_pic='-KPIC'
13526      lt_prog_compiler_static='-Bstatic'
13527      ;;
13528
13529    sysv4*MP*)
13530      if test -d /usr/nec; then
13531	lt_prog_compiler_pic='-Kconform_pic'
13532	lt_prog_compiler_static='-Bstatic'
13533      fi
13534      ;;
13535
13536    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
13537      lt_prog_compiler_wl='-Wl,'
13538      lt_prog_compiler_pic='-KPIC'
13539      lt_prog_compiler_static='-Bstatic'
13540      ;;
13541
13542    unicos*)
13543      lt_prog_compiler_wl='-Wl,'
13544      lt_prog_compiler_can_build_shared=no
13545      ;;
13546
13547    uts4*)
13548      lt_prog_compiler_pic='-pic'
13549      lt_prog_compiler_static='-Bstatic'
13550      ;;
13551
13552    *)
13553      lt_prog_compiler_can_build_shared=no
13554      ;;
13555    esac
13556  fi
13557
13558case $host_os in
13559  # For platforms that do not support PIC, -DPIC is meaningless:
13560  *djgpp*)
13561    lt_prog_compiler_pic=
13562    ;;
13563  *)
13564    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
13565    ;;
13566esac
13567
13568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13569$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
13570if ${lt_cv_prog_compiler_pic+:} false; then :
13571  $as_echo_n "(cached) " >&6
13572else
13573  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
13574fi
13575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
13576$as_echo "$lt_cv_prog_compiler_pic" >&6; }
13577lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
13578
13579#
13580# Check to make sure the PIC flag actually works.
13581#
13582if test -n "$lt_prog_compiler_pic"; then
13583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
13584$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
13585if ${lt_cv_prog_compiler_pic_works+:} false; then :
13586  $as_echo_n "(cached) " >&6
13587else
13588  lt_cv_prog_compiler_pic_works=no
13589   ac_outfile=conftest.$ac_objext
13590   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13591   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
13592   # Insert the option either (1) after the last *FLAGS variable, or
13593   # (2) before a word containing "conftest.", or (3) at the end.
13594   # Note that $ac_compile itself does not contain backslashes and begins
13595   # with a dollar sign (not a hyphen), so the echo should work correctly.
13596   # The option is referenced via a variable to avoid confusing sed.
13597   lt_compile=`echo "$ac_compile" | $SED \
13598   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13599   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13600   -e 's:$: $lt_compiler_flag:'`
13601   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13602   (eval "$lt_compile" 2>conftest.err)
13603   ac_status=$?
13604   cat conftest.err >&5
13605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13606   if (exit $ac_status) && test -s "$ac_outfile"; then
13607     # The compiler can only warn and ignore the option if not recognized
13608     # So say no if there are warnings other than the usual output.
13609     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
13610     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13611     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13612       lt_cv_prog_compiler_pic_works=yes
13613     fi
13614   fi
13615   $RM conftest*
13616
13617fi
13618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
13619$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
13620
13621if test yes = "$lt_cv_prog_compiler_pic_works"; then
13622    case $lt_prog_compiler_pic in
13623     "" | " "*) ;;
13624     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
13625     esac
13626else
13627    lt_prog_compiler_pic=
13628     lt_prog_compiler_can_build_shared=no
13629fi
13630
13631fi
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643#
13644# Check to make sure the static flag actually works.
13645#
13646wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
13647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
13648$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
13649if ${lt_cv_prog_compiler_static_works+:} false; then :
13650  $as_echo_n "(cached) " >&6
13651else
13652  lt_cv_prog_compiler_static_works=no
13653   save_LDFLAGS=$LDFLAGS
13654   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
13655   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13656   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13657     # The linker can only warn and ignore the option if not recognized
13658     # So say no if there are warnings
13659     if test -s conftest.err; then
13660       # Append any errors to the config.log.
13661       cat conftest.err 1>&5
13662       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13663       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13664       if diff conftest.exp conftest.er2 >/dev/null; then
13665         lt_cv_prog_compiler_static_works=yes
13666       fi
13667     else
13668       lt_cv_prog_compiler_static_works=yes
13669     fi
13670   fi
13671   $RM -r conftest*
13672   LDFLAGS=$save_LDFLAGS
13673
13674fi
13675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
13676$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
13677
13678if test yes = "$lt_cv_prog_compiler_static_works"; then
13679    :
13680else
13681    lt_prog_compiler_static=
13682fi
13683
13684
13685
13686
13687
13688
13689
13690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13691$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13692if ${lt_cv_prog_compiler_c_o+:} false; then :
13693  $as_echo_n "(cached) " >&6
13694else
13695  lt_cv_prog_compiler_c_o=no
13696   $RM -r conftest 2>/dev/null
13697   mkdir conftest
13698   cd conftest
13699   mkdir out
13700   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13701
13702   lt_compiler_flag="-o out/conftest2.$ac_objext"
13703   # Insert the option either (1) after the last *FLAGS variable, or
13704   # (2) before a word containing "conftest.", or (3) at the end.
13705   # Note that $ac_compile itself does not contain backslashes and begins
13706   # with a dollar sign (not a hyphen), so the echo should work correctly.
13707   lt_compile=`echo "$ac_compile" | $SED \
13708   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13709   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13710   -e 's:$: $lt_compiler_flag:'`
13711   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13712   (eval "$lt_compile" 2>out/conftest.err)
13713   ac_status=$?
13714   cat out/conftest.err >&5
13715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716   if (exit $ac_status) && test -s out/conftest2.$ac_objext
13717   then
13718     # The compiler can only warn and ignore the option if not recognized
13719     # So say no if there are warnings
13720     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13721     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13722     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13723       lt_cv_prog_compiler_c_o=yes
13724     fi
13725   fi
13726   chmod u+w . 2>&5
13727   $RM conftest*
13728   # SGI C++ compiler will create directory out/ii_files/ for
13729   # template instantiation
13730   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13731   $RM out/* && rmdir out
13732   cd ..
13733   $RM -r conftest
13734   $RM conftest*
13735
13736fi
13737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
13738$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
13739
13740
13741
13742
13743
13744
13745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13746$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13747if ${lt_cv_prog_compiler_c_o+:} false; then :
13748  $as_echo_n "(cached) " >&6
13749else
13750  lt_cv_prog_compiler_c_o=no
13751   $RM -r conftest 2>/dev/null
13752   mkdir conftest
13753   cd conftest
13754   mkdir out
13755   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13756
13757   lt_compiler_flag="-o out/conftest2.$ac_objext"
13758   # Insert the option either (1) after the last *FLAGS variable, or
13759   # (2) before a word containing "conftest.", or (3) at the end.
13760   # Note that $ac_compile itself does not contain backslashes and begins
13761   # with a dollar sign (not a hyphen), so the echo should work correctly.
13762   lt_compile=`echo "$ac_compile" | $SED \
13763   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13764   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13765   -e 's:$: $lt_compiler_flag:'`
13766   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13767   (eval "$lt_compile" 2>out/conftest.err)
13768   ac_status=$?
13769   cat out/conftest.err >&5
13770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771   if (exit $ac_status) && test -s out/conftest2.$ac_objext
13772   then
13773     # The compiler can only warn and ignore the option if not recognized
13774     # So say no if there are warnings
13775     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13776     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13777     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13778       lt_cv_prog_compiler_c_o=yes
13779     fi
13780   fi
13781   chmod u+w . 2>&5
13782   $RM conftest*
13783   # SGI C++ compiler will create directory out/ii_files/ for
13784   # template instantiation
13785   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13786   $RM out/* && rmdir out
13787   cd ..
13788   $RM -r conftest
13789   $RM conftest*
13790
13791fi
13792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
13793$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
13794
13795
13796
13797
13798hard_links=nottested
13799if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
13800  # do not overwrite the value of need_locks provided by the user
13801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
13802$as_echo_n "checking if we can lock with hard links... " >&6; }
13803  hard_links=yes
13804  $RM conftest*
13805  ln conftest.a conftest.b 2>/dev/null && hard_links=no
13806  touch conftest.a
13807  ln conftest.a conftest.b 2>&5 || hard_links=no
13808  ln conftest.a conftest.b 2>/dev/null && hard_links=no
13809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
13810$as_echo "$hard_links" >&6; }
13811  if test no = "$hard_links"; then
13812    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
13813$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
13814    need_locks=warn
13815  fi
13816else
13817  need_locks=no
13818fi
13819
13820
13821
13822
13823
13824
13825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13826$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
13827
13828  runpath_var=
13829  allow_undefined_flag=
13830  always_export_symbols=no
13831  archive_cmds=
13832  archive_expsym_cmds=
13833  compiler_needs_object=no
13834  enable_shared_with_static_runtimes=no
13835  export_dynamic_flag_spec=
13836  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13837  hardcode_automatic=no
13838  hardcode_direct=no
13839  hardcode_direct_absolute=no
13840  hardcode_libdir_flag_spec=
13841  hardcode_libdir_separator=
13842  hardcode_minus_L=no
13843  hardcode_shlibpath_var=unsupported
13844  inherit_rpath=no
13845  link_all_deplibs=unknown
13846  module_cmds=
13847  module_expsym_cmds=
13848  old_archive_from_new_cmds=
13849  old_archive_from_expsyms_cmds=
13850  thread_safe_flag_spec=
13851  whole_archive_flag_spec=
13852  # include_expsyms should be a list of space-separated symbols to be *always*
13853  # included in the symbol list
13854  include_expsyms=
13855  # exclude_expsyms can be an extended regexp of symbols to exclude
13856  # it will be wrapped by ' (' and ')$', so one must not match beginning or
13857  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
13858  # as well as any symbol that contains 'd'.
13859  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
13860  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
13861  # platforms (ab)use it in PIC code, but their linkers get confused if
13862  # the symbol is explicitly referenced.  Since portable code cannot
13863  # rely on this symbol name, it's probably fine to never include it in
13864  # preloaded symbol tables.
13865  # Exclude shared library initialization/finalization symbols.
13866  extract_expsyms_cmds=
13867
13868  case $host_os in
13869  cygwin* | mingw* | pw32* | cegcc*)
13870    # FIXME: the MSVC++ port hasn't been tested in a loooong time
13871    # When not using gcc, we currently assume that we are using
13872    # Microsoft Visual C++.
13873    if test yes != "$GCC"; then
13874      with_gnu_ld=no
13875    fi
13876    ;;
13877  interix*)
13878    # we just hope/assume this is gcc and not c89 (= MSVC++)
13879    with_gnu_ld=yes
13880    ;;
13881  openbsd* | bitrig*)
13882    with_gnu_ld=no
13883    ;;
13884  linux* | k*bsd*-gnu | gnu*)
13885    link_all_deplibs=no
13886    ;;
13887  esac
13888
13889  ld_shlibs=yes
13890
13891  # On some targets, GNU ld is compatible enough with the native linker
13892  # that we're better off using the native interface for both.
13893  lt_use_gnu_ld_interface=no
13894  if test yes = "$with_gnu_ld"; then
13895    case $host_os in
13896      aix*)
13897	# The AIX port of GNU ld has always aspired to compatibility
13898	# with the native linker.  However, as the warning in the GNU ld
13899	# block says, versions before 2.19.5* couldn't really create working
13900	# shared libraries, regardless of the interface used.
13901	case `$LD -v 2>&1` in
13902	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
13903	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
13904	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
13905	  *)
13906	    lt_use_gnu_ld_interface=yes
13907	    ;;
13908	esac
13909	;;
13910      *)
13911	lt_use_gnu_ld_interface=yes
13912	;;
13913    esac
13914  fi
13915
13916  if test yes = "$lt_use_gnu_ld_interface"; then
13917    # If archive_cmds runs LD, not CC, wlarc should be empty
13918    wlarc='$wl'
13919
13920    # Set some defaults for GNU ld with shared library support. These
13921    # are reset later if shared libraries are not supported. Putting them
13922    # here allows them to be overridden if necessary.
13923    runpath_var=LD_RUN_PATH
13924    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13925    export_dynamic_flag_spec='$wl--export-dynamic'
13926    # ancient GNU ld didn't support --whole-archive et. al.
13927    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
13928      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
13929    else
13930      whole_archive_flag_spec=
13931    fi
13932    supports_anon_versioning=no
13933    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
13934      *GNU\ gold*) supports_anon_versioning=yes ;;
13935      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
13936      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
13937      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
13938      *\ 2.11.*) ;; # other 2.11 versions
13939      *) supports_anon_versioning=yes ;;
13940    esac
13941
13942    # See if GNU ld supports shared libraries.
13943    case $host_os in
13944    aix[3-9]*)
13945      # On AIX/PPC, the GNU linker is very broken
13946      if test ia64 != "$host_cpu"; then
13947	ld_shlibs=no
13948	cat <<_LT_EOF 1>&2
13949
13950*** Warning: the GNU linker, at least up to release 2.19, is reported
13951*** to be unable to reliably create shared libraries on AIX.
13952*** Therefore, libtool is disabling shared libraries support.  If you
13953*** really care for shared libraries, you may want to install binutils
13954*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
13955*** You will then need to restart the configuration process.
13956
13957_LT_EOF
13958      fi
13959      ;;
13960
13961    amigaos*)
13962      case $host_cpu in
13963      powerpc)
13964            # see comment about AmigaOS4 .so support
13965            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13966            archive_expsym_cmds=''
13967        ;;
13968      m68k)
13969            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
13970            hardcode_libdir_flag_spec='-L$libdir'
13971            hardcode_minus_L=yes
13972        ;;
13973      esac
13974      ;;
13975
13976    beos*)
13977      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13978	allow_undefined_flag=unsupported
13979	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
13980	# support --undefined.  This deserves some investigation.  FIXME
13981	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13982      else
13983	ld_shlibs=no
13984      fi
13985      ;;
13986
13987    cygwin* | mingw* | pw32* | cegcc*)
13988      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
13989      # as there is no search path for DLLs.
13990      hardcode_libdir_flag_spec='-L$libdir'
13991      export_dynamic_flag_spec='$wl--export-all-symbols'
13992      allow_undefined_flag=unsupported
13993      always_export_symbols=no
13994      enable_shared_with_static_runtimes=yes
13995      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
13996      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
13997
13998      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
13999        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14000	# If the export-symbols file already is a .def file, use it as
14001	# is; otherwise, prepend EXPORTS...
14002	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
14003          cp $export_symbols $output_objdir/$soname.def;
14004        else
14005          echo EXPORTS > $output_objdir/$soname.def;
14006          cat $export_symbols >> $output_objdir/$soname.def;
14007        fi~
14008        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14009      else
14010	ld_shlibs=no
14011      fi
14012      ;;
14013
14014    haiku*)
14015      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14016      link_all_deplibs=yes
14017      ;;
14018
14019    os2*)
14020      hardcode_libdir_flag_spec='-L$libdir'
14021      hardcode_minus_L=yes
14022      allow_undefined_flag=unsupported
14023      shrext_cmds=.dll
14024      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14025	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14026	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14027	$ECHO EXPORTS >> $output_objdir/$libname.def~
14028	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14029	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14030	emximp -o $lib $output_objdir/$libname.def'
14031      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14032	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14033	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14034	$ECHO EXPORTS >> $output_objdir/$libname.def~
14035	prefix_cmds="$SED"~
14036	if test EXPORTS = "`$SED 1q $export_symbols`"; then
14037	  prefix_cmds="$prefix_cmds -e 1d";
14038	fi~
14039	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14040	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14041	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14042	emximp -o $lib $output_objdir/$libname.def'
14043      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14044      enable_shared_with_static_runtimes=yes
14045      ;;
14046
14047    interix[3-9]*)
14048      hardcode_direct=no
14049      hardcode_shlibpath_var=no
14050      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14051      export_dynamic_flag_spec='$wl-E'
14052      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14053      # Instead, shared libraries are loaded at an image base (0x10000000 by
14054      # default) and relocated if they conflict, which is a slow very memory
14055      # consuming and fragmenting process.  To avoid this, we pick a random,
14056      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14057      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
14058      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14059      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14060      ;;
14061
14062    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
14063      tmp_diet=no
14064      if test linux-dietlibc = "$host_os"; then
14065	case $cc_basename in
14066	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
14067	esac
14068      fi
14069      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
14070	 && test no = "$tmp_diet"
14071      then
14072	tmp_addflag=' $pic_flag'
14073	tmp_sharedflag='-shared'
14074	case $cc_basename,$host_cpu in
14075        pgcc*)				# Portland Group C compiler
14076	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
14077	  tmp_addflag=' $pic_flag'
14078	  ;;
14079	pgf77* | pgf90* | pgf95* | pgfortran*)
14080					# Portland Group f77 and f90 compilers
14081	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
14082	  tmp_addflag=' $pic_flag -Mnomain' ;;
14083	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
14084	  tmp_addflag=' -i_dynamic' ;;
14085	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
14086	  tmp_addflag=' -i_dynamic -nofor_main' ;;
14087	ifc* | ifort*)			# Intel Fortran compiler
14088	  tmp_addflag=' -nofor_main' ;;
14089	lf95*)				# Lahey Fortran 8.1
14090	  whole_archive_flag_spec=
14091	  tmp_sharedflag='--shared' ;;
14092        nagfor*)                        # NAGFOR 5.3
14093          tmp_sharedflag='-Wl,-shared' ;;
14094	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
14095	  tmp_sharedflag='-qmkshrobj'
14096	  tmp_addflag= ;;
14097	nvcc*)	# Cuda Compiler Driver 2.2
14098	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
14099	  compiler_needs_object=yes
14100	  ;;
14101	esac
14102	case `$CC -V 2>&1 | sed 5q` in
14103	*Sun\ C*)			# Sun C 5.9
14104	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
14105	  compiler_needs_object=yes
14106	  tmp_sharedflag='-G' ;;
14107	*Sun\ F*)			# Sun Fortran 8.3
14108	  tmp_sharedflag='-G' ;;
14109	esac
14110	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14111
14112        if test yes = "$supports_anon_versioning"; then
14113          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14114            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14115            echo "local: *; };" >> $output_objdir/$libname.ver~
14116            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
14117        fi
14118
14119	case $cc_basename in
14120	tcc*)
14121	  export_dynamic_flag_spec='-rdynamic'
14122	  ;;
14123	xlf* | bgf* | bgxlf* | mpixlf*)
14124	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
14125	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
14126	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14127	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
14128	  if test yes = "$supports_anon_versioning"; then
14129	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
14130              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14131              echo "local: *; };" >> $output_objdir/$libname.ver~
14132              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
14133	  fi
14134	  ;;
14135	esac
14136      else
14137        ld_shlibs=no
14138      fi
14139      ;;
14140
14141    netbsd* | netbsdelf*-gnu)
14142      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14143	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14144	wlarc=
14145      else
14146	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14147	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14148      fi
14149      ;;
14150
14151    solaris*)
14152      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
14153	ld_shlibs=no
14154	cat <<_LT_EOF 1>&2
14155
14156*** Warning: The releases 2.8.* of the GNU linker cannot reliably
14157*** create shared libraries on Solaris systems.  Therefore, libtool
14158*** is disabling shared libraries support.  We urge you to upgrade GNU
14159*** binutils to release 2.9.1 or newer.  Another option is to modify
14160*** your PATH or compiler configuration so that the native linker is
14161*** used, and then restart.
14162
14163_LT_EOF
14164      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14165	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14166	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14167      else
14168	ld_shlibs=no
14169      fi
14170      ;;
14171
14172    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
14173      case `$LD -v 2>&1` in
14174        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
14175	ld_shlibs=no
14176	cat <<_LT_EOF 1>&2
14177
14178*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
14179*** reliably create shared libraries on SCO systems.  Therefore, libtool
14180*** is disabling shared libraries support.  We urge you to upgrade GNU
14181*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
14182*** your PATH or compiler configuration so that the native linker is
14183*** used, and then restart.
14184
14185_LT_EOF
14186	;;
14187	*)
14188	  # For security reasons, it is highly recommended that you always
14189	  # use absolute paths for naming shared libraries, and exclude the
14190	  # DT_RUNPATH tag from executables and libraries.  But doing so
14191	  # requires that you compile everything twice, which is a pain.
14192	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14193	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14194	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14195	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14196	  else
14197	    ld_shlibs=no
14198	  fi
14199	;;
14200      esac
14201      ;;
14202
14203    sunos4*)
14204      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14205      wlarc=
14206      hardcode_direct=yes
14207      hardcode_shlibpath_var=no
14208      ;;
14209
14210    *)
14211      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14212	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14213	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14214      else
14215	ld_shlibs=no
14216      fi
14217      ;;
14218    esac
14219
14220    if test no = "$ld_shlibs"; then
14221      runpath_var=
14222      hardcode_libdir_flag_spec=
14223      export_dynamic_flag_spec=
14224      whole_archive_flag_spec=
14225    fi
14226  else
14227    # PORTME fill in a description of your system's linker (not GNU ld)
14228    case $host_os in
14229    aix3*)
14230      allow_undefined_flag=unsupported
14231      always_export_symbols=yes
14232      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
14233      # Note: this linker hardcodes the directories in LIBPATH if there
14234      # are no directories specified by -L.
14235      hardcode_minus_L=yes
14236      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
14237	# Neither direct hardcoding nor static linking is supported with a
14238	# broken collect2.
14239	hardcode_direct=unsupported
14240      fi
14241      ;;
14242
14243    aix[4-9]*)
14244      if test ia64 = "$host_cpu"; then
14245	# On IA64, the linker does run time linking by default, so we don't
14246	# have to do anything special.
14247	aix_use_runtimelinking=no
14248	exp_sym_flag='-Bexport'
14249	no_entry_flag=
14250      else
14251	# If we're using GNU nm, then we don't want the "-C" option.
14252	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
14253	# Without the "-l" option, or with the "-B" option, AIX nm treats
14254	# weak defined symbols like other global defined symbols, whereas
14255	# GNU nm marks them as "W".
14256	# While the 'weak' keyword is ignored in the Export File, we need
14257	# it in the Import File for the 'aix-soname' feature, so we have
14258	# to replace the "-B" option with "-P" for AIX nm.
14259	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
14260	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
14261	else
14262	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
14263	fi
14264	aix_use_runtimelinking=no
14265
14266	# Test if we are trying to use run time linking or normal
14267	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
14268	# have runtime linking enabled, and use it for executables.
14269	# For shared libraries, we enable/disable runtime linking
14270	# depending on the kind of the shared library created -
14271	# when "with_aix_soname,aix_use_runtimelinking" is:
14272	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
14273	# "aix,yes"  lib.so          shared, rtl:yes, for executables
14274	#            lib.a           static archive
14275	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
14276	#            lib.a(lib.so.V) shared, rtl:no,  for executables
14277	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
14278	#            lib.a(lib.so.V) shared, rtl:no
14279	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
14280	#            lib.a           static archive
14281	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
14282	  for ld_flag in $LDFLAGS; do
14283	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
14284	    aix_use_runtimelinking=yes
14285	    break
14286	  fi
14287	  done
14288	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
14289	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
14290	    # so we don't have lib.a shared libs to link our executables.
14291	    # We have to force runtime linking in this case.
14292	    aix_use_runtimelinking=yes
14293	    LDFLAGS="$LDFLAGS -Wl,-brtl"
14294	  fi
14295	  ;;
14296	esac
14297
14298	exp_sym_flag='-bexport'
14299	no_entry_flag='-bnoentry'
14300      fi
14301
14302      # When large executables or shared objects are built, AIX ld can
14303      # have problems creating the table of contents.  If linking a library
14304      # or program results in "error TOC overflow" add -mminimal-toc to
14305      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
14306      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
14307
14308      archive_cmds=''
14309      hardcode_direct=yes
14310      hardcode_direct_absolute=yes
14311      hardcode_libdir_separator=':'
14312      link_all_deplibs=yes
14313      file_list_spec='$wl-f,'
14314      case $with_aix_soname,$aix_use_runtimelinking in
14315      aix,*) ;; # traditional, no import file
14316      svr4,* | *,yes) # use import file
14317	# The Import File defines what to hardcode.
14318	hardcode_direct=no
14319	hardcode_direct_absolute=no
14320	;;
14321      esac
14322
14323      if test yes = "$GCC"; then
14324	case $host_os in aix4.[012]|aix4.[012].*)
14325	# We only want to do this on AIX 4.2 and lower, the check
14326	# below for broken collect2 doesn't work under 4.3+
14327	  collect2name=`$CC -print-prog-name=collect2`
14328	  if test -f "$collect2name" &&
14329	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
14330	  then
14331	  # We have reworked collect2
14332	  :
14333	  else
14334	  # We have old collect2
14335	  hardcode_direct=unsupported
14336	  # It fails to find uninstalled libraries when the uninstalled
14337	  # path is not listed in the libpath.  Setting hardcode_minus_L
14338	  # to unsupported forces relinking
14339	  hardcode_minus_L=yes
14340	  hardcode_libdir_flag_spec='-L$libdir'
14341	  hardcode_libdir_separator=
14342	  fi
14343	  ;;
14344	esac
14345	shared_flag='-shared'
14346	if test yes = "$aix_use_runtimelinking"; then
14347	  shared_flag="$shared_flag "'$wl-G'
14348	fi
14349	# Need to ensure runtime linking is disabled for the traditional
14350	# shared library, or the linker may eventually find shared libraries
14351	# /with/ Import File - we do not want to mix them.
14352	shared_flag_aix='-shared'
14353	shared_flag_svr4='-shared $wl-G'
14354      else
14355	# not using gcc
14356	if test ia64 = "$host_cpu"; then
14357	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
14358	# chokes on -Wl,-G. The following line is correct:
14359	  shared_flag='-G'
14360	else
14361	  if test yes = "$aix_use_runtimelinking"; then
14362	    shared_flag='$wl-G'
14363	  else
14364	    shared_flag='$wl-bM:SRE'
14365	  fi
14366	  shared_flag_aix='$wl-bM:SRE'
14367	  shared_flag_svr4='$wl-G'
14368	fi
14369      fi
14370
14371      export_dynamic_flag_spec='$wl-bexpall'
14372      # It seems that -bexpall does not export symbols beginning with
14373      # underscore (_), so it is better to generate a list of symbols to export.
14374      always_export_symbols=yes
14375      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
14376	# Warning - without using the other runtime loading flags (-brtl),
14377	# -berok will link without error, but may produce a broken library.
14378	allow_undefined_flag='-berok'
14379        # Determine the default libpath from the value encoded in an
14380        # empty executable.
14381        if test set = "${lt_cv_aix_libpath+set}"; then
14382  aix_libpath=$lt_cv_aix_libpath
14383else
14384  if ${lt_cv_aix_libpath_+:} false; then :
14385  $as_echo_n "(cached) " >&6
14386else
14387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388/* end confdefs.h.  */
14389
14390int
14391main ()
14392{
14393
14394  ;
14395  return 0;
14396}
14397_ACEOF
14398if ac_fn_c_try_link "$LINENO"; then :
14399
14400  lt_aix_libpath_sed='
14401      /Import File Strings/,/^$/ {
14402	  /^0/ {
14403	      s/^0  *\([^ ]*\) *$/\1/
14404	      p
14405	  }
14406      }'
14407  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14408  # Check for a 64-bit object if we didn't find anything.
14409  if test -z "$lt_cv_aix_libpath_"; then
14410    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14411  fi
14412fi
14413rm -f core conftest.err conftest.$ac_objext \
14414    conftest$ac_exeext conftest.$ac_ext
14415  if test -z "$lt_cv_aix_libpath_"; then
14416    lt_cv_aix_libpath_=/usr/lib:/lib
14417  fi
14418
14419fi
14420
14421  aix_libpath=$lt_cv_aix_libpath_
14422fi
14423
14424        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
14425        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
14426      else
14427	if test ia64 = "$host_cpu"; then
14428	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
14429	  allow_undefined_flag="-z nodefs"
14430	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
14431	else
14432	 # Determine the default libpath from the value encoded in an
14433	 # empty executable.
14434	 if test set = "${lt_cv_aix_libpath+set}"; then
14435  aix_libpath=$lt_cv_aix_libpath
14436else
14437  if ${lt_cv_aix_libpath_+:} false; then :
14438  $as_echo_n "(cached) " >&6
14439else
14440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441/* end confdefs.h.  */
14442
14443int
14444main ()
14445{
14446
14447  ;
14448  return 0;
14449}
14450_ACEOF
14451if ac_fn_c_try_link "$LINENO"; then :
14452
14453  lt_aix_libpath_sed='
14454      /Import File Strings/,/^$/ {
14455	  /^0/ {
14456	      s/^0  *\([^ ]*\) *$/\1/
14457	      p
14458	  }
14459      }'
14460  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14461  # Check for a 64-bit object if we didn't find anything.
14462  if test -z "$lt_cv_aix_libpath_"; then
14463    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14464  fi
14465fi
14466rm -f core conftest.err conftest.$ac_objext \
14467    conftest$ac_exeext conftest.$ac_ext
14468  if test -z "$lt_cv_aix_libpath_"; then
14469    lt_cv_aix_libpath_=/usr/lib:/lib
14470  fi
14471
14472fi
14473
14474  aix_libpath=$lt_cv_aix_libpath_
14475fi
14476
14477	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
14478	  # Warning - without using the other run time loading flags,
14479	  # -berok will link without error, but may produce a broken library.
14480	  no_undefined_flag=' $wl-bernotok'
14481	  allow_undefined_flag=' $wl-berok'
14482	  if test yes = "$with_gnu_ld"; then
14483	    # We only use this code for GNU lds that support --whole-archive.
14484	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
14485	  else
14486	    # Exported symbols can be pulled into shared objects from archives
14487	    whole_archive_flag_spec='$convenience'
14488	  fi
14489	  archive_cmds_need_lc=yes
14490	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
14491	  # -brtl affects multiple linker settings, -berok does not and is overridden later
14492	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
14493	  if test svr4 != "$with_aix_soname"; then
14494	    # This is similar to how AIX traditionally builds its shared libraries.
14495	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
14496	  fi
14497	  if test aix != "$with_aix_soname"; then
14498	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
14499	  else
14500	    # used by -dlpreopen to get the symbols
14501	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
14502	  fi
14503	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
14504	fi
14505      fi
14506      ;;
14507
14508    amigaos*)
14509      case $host_cpu in
14510      powerpc)
14511            # see comment about AmigaOS4 .so support
14512            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14513            archive_expsym_cmds=''
14514        ;;
14515      m68k)
14516            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
14517            hardcode_libdir_flag_spec='-L$libdir'
14518            hardcode_minus_L=yes
14519        ;;
14520      esac
14521      ;;
14522
14523    bsdi[45]*)
14524      export_dynamic_flag_spec=-rdynamic
14525      ;;
14526
14527    cygwin* | mingw* | pw32* | cegcc*)
14528      # When not using gcc, we currently assume that we are using
14529      # Microsoft Visual C++.
14530      # hardcode_libdir_flag_spec is actually meaningless, as there is
14531      # no search path for DLLs.
14532      case $cc_basename in
14533      cl*)
14534	# Native MSVC
14535	hardcode_libdir_flag_spec=' '
14536	allow_undefined_flag=unsupported
14537	always_export_symbols=yes
14538	file_list_spec='@'
14539	# Tell ltmain to make .lib files, not .a files.
14540	libext=lib
14541	# Tell ltmain to make .dll files, not .so files.
14542	shrext_cmds=.dll
14543	# FIXME: Setting linknames here is a bad hack.
14544	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
14545	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
14546            cp "$export_symbols" "$output_objdir/$soname.def";
14547            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
14548          else
14549            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
14550          fi~
14551          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
14552          linknames='
14553	# The linker will not automatically build a static lib if we build a DLL.
14554	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
14555	enable_shared_with_static_runtimes=yes
14556	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
14557	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
14558	# Don't use ranlib
14559	old_postinstall_cmds='chmod 644 $oldlib'
14560	postlink_cmds='lt_outputfile="@OUTPUT@"~
14561          lt_tool_outputfile="@TOOL_OUTPUT@"~
14562          case $lt_outputfile in
14563            *.exe|*.EXE) ;;
14564            *)
14565              lt_outputfile=$lt_outputfile.exe
14566              lt_tool_outputfile=$lt_tool_outputfile.exe
14567              ;;
14568          esac~
14569          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
14570            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
14571            $RM "$lt_outputfile.manifest";
14572          fi'
14573	;;
14574      *)
14575	# Assume MSVC wrapper
14576	hardcode_libdir_flag_spec=' '
14577	allow_undefined_flag=unsupported
14578	# Tell ltmain to make .lib files, not .a files.
14579	libext=lib
14580	# Tell ltmain to make .dll files, not .so files.
14581	shrext_cmds=.dll
14582	# FIXME: Setting linknames here is a bad hack.
14583	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
14584	# The linker will automatically build a .lib file if we build a DLL.
14585	old_archive_from_new_cmds='true'
14586	# FIXME: Should let the user specify the lib program.
14587	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
14588	enable_shared_with_static_runtimes=yes
14589	;;
14590      esac
14591      ;;
14592
14593    darwin* | rhapsody*)
14594
14595
14596  archive_cmds_need_lc=no
14597  hardcode_direct=no
14598  hardcode_automatic=yes
14599  hardcode_shlibpath_var=unsupported
14600  if test yes = "$lt_cv_ld_force_load"; then
14601    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
14602
14603  else
14604    whole_archive_flag_spec=''
14605  fi
14606  link_all_deplibs=yes
14607  allow_undefined_flag=$_lt_dar_allow_undefined
14608  case $cc_basename in
14609     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
14610     *) _lt_dar_can_shared=$GCC ;;
14611  esac
14612  if test yes = "$_lt_dar_can_shared"; then
14613    output_verbose_link_cmd=func_echo_all
14614    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
14615    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
14616    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
14617    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
14618
14619  else
14620  ld_shlibs=no
14621  fi
14622
14623      ;;
14624
14625    dgux*)
14626      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14627      hardcode_libdir_flag_spec='-L$libdir'
14628      hardcode_shlibpath_var=no
14629      ;;
14630
14631    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14632    # support.  Future versions do this automatically, but an explicit c++rt0.o
14633    # does not break anything, and helps significantly (at the cost of a little
14634    # extra space).
14635    freebsd2.2*)
14636      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
14637      hardcode_libdir_flag_spec='-R$libdir'
14638      hardcode_direct=yes
14639      hardcode_shlibpath_var=no
14640      ;;
14641
14642    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
14643    freebsd2.*)
14644      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14645      hardcode_direct=yes
14646      hardcode_minus_L=yes
14647      hardcode_shlibpath_var=no
14648      ;;
14649
14650    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
14651    freebsd* | dragonfly*)
14652      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14653      hardcode_libdir_flag_spec='-R$libdir'
14654      hardcode_direct=yes
14655      hardcode_shlibpath_var=no
14656      ;;
14657
14658    hpux9*)
14659      if test yes = "$GCC"; then
14660	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
14661      else
14662	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
14663      fi
14664      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
14665      hardcode_libdir_separator=:
14666      hardcode_direct=yes
14667
14668      # hardcode_minus_L: Not really in the search PATH,
14669      # but as the default location of the library.
14670      hardcode_minus_L=yes
14671      export_dynamic_flag_spec='$wl-E'
14672      ;;
14673
14674    hpux10*)
14675      if test yes,no = "$GCC,$with_gnu_ld"; then
14676	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14677      else
14678	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14679      fi
14680      if test no = "$with_gnu_ld"; then
14681	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
14682	hardcode_libdir_separator=:
14683	hardcode_direct=yes
14684	hardcode_direct_absolute=yes
14685	export_dynamic_flag_spec='$wl-E'
14686	# hardcode_minus_L: Not really in the search PATH,
14687	# but as the default location of the library.
14688	hardcode_minus_L=yes
14689      fi
14690      ;;
14691
14692    hpux11*)
14693      if test yes,no = "$GCC,$with_gnu_ld"; then
14694	case $host_cpu in
14695	hppa*64*)
14696	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14697	  ;;
14698	ia64*)
14699	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14700	  ;;
14701	*)
14702	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14703	  ;;
14704	esac
14705      else
14706	case $host_cpu in
14707	hppa*64*)
14708	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14709	  ;;
14710	ia64*)
14711	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14712	  ;;
14713	*)
14714
14715	  # Older versions of the 11.00 compiler do not understand -b yet
14716	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
14717	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
14718$as_echo_n "checking if $CC understands -b... " >&6; }
14719if ${lt_cv_prog_compiler__b+:} false; then :
14720  $as_echo_n "(cached) " >&6
14721else
14722  lt_cv_prog_compiler__b=no
14723   save_LDFLAGS=$LDFLAGS
14724   LDFLAGS="$LDFLAGS -b"
14725   echo "$lt_simple_link_test_code" > conftest.$ac_ext
14726   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14727     # The linker can only warn and ignore the option if not recognized
14728     # So say no if there are warnings
14729     if test -s conftest.err; then
14730       # Append any errors to the config.log.
14731       cat conftest.err 1>&5
14732       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
14733       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14734       if diff conftest.exp conftest.er2 >/dev/null; then
14735         lt_cv_prog_compiler__b=yes
14736       fi
14737     else
14738       lt_cv_prog_compiler__b=yes
14739     fi
14740   fi
14741   $RM -r conftest*
14742   LDFLAGS=$save_LDFLAGS
14743
14744fi
14745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
14746$as_echo "$lt_cv_prog_compiler__b" >&6; }
14747
14748if test yes = "$lt_cv_prog_compiler__b"; then
14749    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14750else
14751    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14752fi
14753
14754	  ;;
14755	esac
14756      fi
14757      if test no = "$with_gnu_ld"; then
14758	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
14759	hardcode_libdir_separator=:
14760
14761	case $host_cpu in
14762	hppa*64*|ia64*)
14763	  hardcode_direct=no
14764	  hardcode_shlibpath_var=no
14765	  ;;
14766	*)
14767	  hardcode_direct=yes
14768	  hardcode_direct_absolute=yes
14769	  export_dynamic_flag_spec='$wl-E'
14770
14771	  # hardcode_minus_L: Not really in the search PATH,
14772	  # but as the default location of the library.
14773	  hardcode_minus_L=yes
14774	  ;;
14775	esac
14776      fi
14777      ;;
14778
14779    irix5* | irix6* | nonstopux*)
14780      if test yes = "$GCC"; then
14781	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14782	# Try to use the -exported_symbol ld option, if it does not
14783	# work, assume that -exports_file does not work either and
14784	# implicitly export all symbols.
14785	# This should be the same for all languages, so no per-tag cache variable.
14786	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
14787$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
14788if ${lt_cv_irix_exported_symbol+:} false; then :
14789  $as_echo_n "(cached) " >&6
14790else
14791  save_LDFLAGS=$LDFLAGS
14792	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
14793	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14794/* end confdefs.h.  */
14795int foo (void) { return 0; }
14796_ACEOF
14797if ac_fn_c_try_link "$LINENO"; then :
14798  lt_cv_irix_exported_symbol=yes
14799else
14800  lt_cv_irix_exported_symbol=no
14801fi
14802rm -f core conftest.err conftest.$ac_objext \
14803    conftest$ac_exeext conftest.$ac_ext
14804           LDFLAGS=$save_LDFLAGS
14805fi
14806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
14807$as_echo "$lt_cv_irix_exported_symbol" >&6; }
14808	if test yes = "$lt_cv_irix_exported_symbol"; then
14809          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
14810	fi
14811	link_all_deplibs=no
14812      else
14813	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14814	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
14815      fi
14816      archive_cmds_need_lc='no'
14817      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14818      hardcode_libdir_separator=:
14819      inherit_rpath=yes
14820      link_all_deplibs=yes
14821      ;;
14822
14823    linux*)
14824      case $cc_basename in
14825      tcc*)
14826	# Fabrice Bellard et al's Tiny C Compiler
14827	ld_shlibs=yes
14828	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14829	;;
14830      esac
14831      ;;
14832
14833    netbsd* | netbsdelf*-gnu)
14834      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14835	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
14836      else
14837	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
14838      fi
14839      hardcode_libdir_flag_spec='-R$libdir'
14840      hardcode_direct=yes
14841      hardcode_shlibpath_var=no
14842      ;;
14843
14844    newsos6)
14845      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14846      hardcode_direct=yes
14847      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14848      hardcode_libdir_separator=:
14849      hardcode_shlibpath_var=no
14850      ;;
14851
14852    *nto* | *qnx*)
14853      ;;
14854
14855    openbsd* | bitrig*)
14856      if test -f /usr/libexec/ld.so; then
14857	hardcode_direct=yes
14858	hardcode_shlibpath_var=no
14859	hardcode_direct_absolute=yes
14860	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14861	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14862	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
14863	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14864	  export_dynamic_flag_spec='$wl-E'
14865	else
14866	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14867	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14868	fi
14869      else
14870	ld_shlibs=no
14871      fi
14872      ;;
14873
14874    os2*)
14875      hardcode_libdir_flag_spec='-L$libdir'
14876      hardcode_minus_L=yes
14877      allow_undefined_flag=unsupported
14878      shrext_cmds=.dll
14879      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14880	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14881	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14882	$ECHO EXPORTS >> $output_objdir/$libname.def~
14883	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14884	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14885	emximp -o $lib $output_objdir/$libname.def'
14886      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14887	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14888	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14889	$ECHO EXPORTS >> $output_objdir/$libname.def~
14890	prefix_cmds="$SED"~
14891	if test EXPORTS = "`$SED 1q $export_symbols`"; then
14892	  prefix_cmds="$prefix_cmds -e 1d";
14893	fi~
14894	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14895	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14896	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14897	emximp -o $lib $output_objdir/$libname.def'
14898      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14899      enable_shared_with_static_runtimes=yes
14900      ;;
14901
14902    osf3*)
14903      if test yes = "$GCC"; then
14904	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
14905	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14906      else
14907	allow_undefined_flag=' -expect_unresolved \*'
14908	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14909      fi
14910      archive_cmds_need_lc='no'
14911      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14912      hardcode_libdir_separator=:
14913      ;;
14914
14915    osf4* | osf5*)	# as osf3* with the addition of -msym flag
14916      if test yes = "$GCC"; then
14917	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
14918	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14919	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14920      else
14921	allow_undefined_flag=' -expect_unresolved \*'
14922	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14923	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
14924          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
14925
14926	# Both c and cxx compiler support -rpath directly
14927	hardcode_libdir_flag_spec='-rpath $libdir'
14928      fi
14929      archive_cmds_need_lc='no'
14930      hardcode_libdir_separator=:
14931      ;;
14932
14933    solaris*)
14934      no_undefined_flag=' -z defs'
14935      if test yes = "$GCC"; then
14936	wlarc='$wl'
14937	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
14938	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14939          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14940      else
14941	case `$CC -V 2>&1` in
14942	*"Compilers 5.0"*)
14943	  wlarc=''
14944	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
14945	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14946            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
14947	  ;;
14948	*)
14949	  wlarc='$wl'
14950	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
14951	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14952            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14953	  ;;
14954	esac
14955      fi
14956      hardcode_libdir_flag_spec='-R$libdir'
14957      hardcode_shlibpath_var=no
14958      case $host_os in
14959      solaris2.[0-5] | solaris2.[0-5].*) ;;
14960      *)
14961	# The compiler driver will combine and reorder linker options,
14962	# but understands '-z linker_flag'.  GCC discards it without '$wl',
14963	# but is careful enough not to reorder.
14964	# Supported since Solaris 2.6 (maybe 2.5.1?)
14965	if test yes = "$GCC"; then
14966	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
14967	else
14968	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
14969	fi
14970	;;
14971      esac
14972      link_all_deplibs=yes
14973      ;;
14974
14975    sunos4*)
14976      if test sequent = "$host_vendor"; then
14977	# Use $CC to link under sequent, because it throws in some extra .o
14978	# files that make .init and .fini sections work.
14979	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
14980      else
14981	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
14982      fi
14983      hardcode_libdir_flag_spec='-L$libdir'
14984      hardcode_direct=yes
14985      hardcode_minus_L=yes
14986      hardcode_shlibpath_var=no
14987      ;;
14988
14989    sysv4)
14990      case $host_vendor in
14991	sni)
14992	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14993	  hardcode_direct=yes # is this really true???
14994	;;
14995	siemens)
14996	  ## LD is ld it makes a PLAMLIB
14997	  ## CC just makes a GrossModule.
14998	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
14999	  reload_cmds='$CC -r -o $output$reload_objs'
15000	  hardcode_direct=no
15001        ;;
15002	motorola)
15003	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15004	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
15005	;;
15006      esac
15007      runpath_var='LD_RUN_PATH'
15008      hardcode_shlibpath_var=no
15009      ;;
15010
15011    sysv4.3*)
15012      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15013      hardcode_shlibpath_var=no
15014      export_dynamic_flag_spec='-Bexport'
15015      ;;
15016
15017    sysv4*MP*)
15018      if test -d /usr/nec; then
15019	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15020	hardcode_shlibpath_var=no
15021	runpath_var=LD_RUN_PATH
15022	hardcode_runpath_var=yes
15023	ld_shlibs=yes
15024      fi
15025      ;;
15026
15027    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15028      no_undefined_flag='$wl-z,text'
15029      archive_cmds_need_lc=no
15030      hardcode_shlibpath_var=no
15031      runpath_var='LD_RUN_PATH'
15032
15033      if test yes = "$GCC"; then
15034	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15035	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15036      else
15037	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15038	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15039      fi
15040      ;;
15041
15042    sysv5* | sco3.2v5* | sco5v6*)
15043      # Note: We CANNOT use -z defs as we might desire, because we do not
15044      # link with -lc, and that would cause any symbols used from libc to
15045      # always be unresolved, which means just about no library would
15046      # ever link correctly.  If we're not using GNU ld we use -z text
15047      # though, which does catch some bad symbols but isn't as heavy-handed
15048      # as -z defs.
15049      no_undefined_flag='$wl-z,text'
15050      allow_undefined_flag='$wl-z,nodefs'
15051      archive_cmds_need_lc=no
15052      hardcode_shlibpath_var=no
15053      hardcode_libdir_flag_spec='$wl-R,$libdir'
15054      hardcode_libdir_separator=':'
15055      link_all_deplibs=yes
15056      export_dynamic_flag_spec='$wl-Bexport'
15057      runpath_var='LD_RUN_PATH'
15058
15059      if test yes = "$GCC"; then
15060	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15061	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15062      else
15063	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15064	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15065      fi
15066      ;;
15067
15068    uts4*)
15069      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15070      hardcode_libdir_flag_spec='-L$libdir'
15071      hardcode_shlibpath_var=no
15072      ;;
15073
15074    *)
15075      ld_shlibs=no
15076      ;;
15077    esac
15078
15079    if test sni = "$host_vendor"; then
15080      case $host in
15081      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
15082	export_dynamic_flag_spec='$wl-Blargedynsym'
15083	;;
15084      esac
15085    fi
15086  fi
15087
15088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
15089$as_echo "$ld_shlibs" >&6; }
15090test no = "$ld_shlibs" && can_build_shared=no
15091
15092with_gnu_ld=$with_gnu_ld
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108#
15109# Do we need to explicitly link libc?
15110#
15111case "x$archive_cmds_need_lc" in
15112x|xyes)
15113  # Assume -lc should be added
15114  archive_cmds_need_lc=yes
15115
15116  if test yes,yes = "$GCC,$enable_shared"; then
15117    case $archive_cmds in
15118    *'~'*)
15119      # FIXME: we may have to deal with multi-command sequences.
15120      ;;
15121    '$CC '*)
15122      # Test whether the compiler implicitly links with -lc since on some
15123      # systems, -lgcc has to come before -lc. If gcc already passes -lc
15124      # to ld, don't add -lc before -lgcc.
15125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15126$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
15127if ${lt_cv_archive_cmds_need_lc+:} false; then :
15128  $as_echo_n "(cached) " >&6
15129else
15130  $RM conftest*
15131	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15132
15133	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15134  (eval $ac_compile) 2>&5
15135  ac_status=$?
15136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15137  test $ac_status = 0; } 2>conftest.err; then
15138	  soname=conftest
15139	  lib=conftest
15140	  libobjs=conftest.$ac_objext
15141	  deplibs=
15142	  wl=$lt_prog_compiler_wl
15143	  pic_flag=$lt_prog_compiler_pic
15144	  compiler_flags=-v
15145	  linker_flags=-v
15146	  verstring=
15147	  output_objdir=.
15148	  libname=conftest
15149	  lt_save_allow_undefined_flag=$allow_undefined_flag
15150	  allow_undefined_flag=
15151	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
15152  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15153  ac_status=$?
15154  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15155  test $ac_status = 0; }
15156	  then
15157	    lt_cv_archive_cmds_need_lc=no
15158	  else
15159	    lt_cv_archive_cmds_need_lc=yes
15160	  fi
15161	  allow_undefined_flag=$lt_save_allow_undefined_flag
15162	else
15163	  cat conftest.err 1>&5
15164	fi
15165	$RM conftest*
15166
15167fi
15168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
15169$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
15170      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
15171      ;;
15172    esac
15173  fi
15174  ;;
15175esac
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
15329$as_echo_n "checking dynamic linker characteristics... " >&6; }
15330
15331if test yes = "$GCC"; then
15332  case $host_os in
15333    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
15334    *) lt_awk_arg='/^libraries:/' ;;
15335  esac
15336  case $host_os in
15337    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
15338    *) lt_sed_strip_eq='s|=/|/|g' ;;
15339  esac
15340  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
15341  case $lt_search_path_spec in
15342  *\;*)
15343    # if the path contains ";" then we assume it to be the separator
15344    # otherwise default to the standard path separator (i.e. ":") - it is
15345    # assumed that no part of a normal pathname contains ";" but that should
15346    # okay in the real world where ";" in dirpaths is itself problematic.
15347    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
15348    ;;
15349  *)
15350    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
15351    ;;
15352  esac
15353  # Ok, now we have the path, separated by spaces, we can step through it
15354  # and add multilib dir if necessary...
15355  lt_tmp_lt_search_path_spec=
15356  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
15357  # ...but if some path component already ends with the multilib dir we assume
15358  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
15359  case "$lt_multi_os_dir; $lt_search_path_spec " in
15360  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
15361    lt_multi_os_dir=
15362    ;;
15363  esac
15364  for lt_sys_path in $lt_search_path_spec; do
15365    if test -d "$lt_sys_path$lt_multi_os_dir"; then
15366      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
15367    elif test -n "$lt_multi_os_dir"; then
15368      test -d "$lt_sys_path" && \
15369	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
15370    fi
15371  done
15372  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
15373BEGIN {RS = " "; FS = "/|\n";} {
15374  lt_foo = "";
15375  lt_count = 0;
15376  for (lt_i = NF; lt_i > 0; lt_i--) {
15377    if ($lt_i != "" && $lt_i != ".") {
15378      if ($lt_i == "..") {
15379        lt_count++;
15380      } else {
15381        if (lt_count == 0) {
15382          lt_foo = "/" $lt_i lt_foo;
15383        } else {
15384          lt_count--;
15385        }
15386      }
15387    }
15388  }
15389  if (lt_foo != "") { lt_freq[lt_foo]++; }
15390  if (lt_freq[lt_foo] == 1) { print lt_foo; }
15391}'`
15392  # AWK program above erroneously prepends '/' to C:/dos/paths
15393  # for these hosts.
15394  case $host_os in
15395    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
15396      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
15397  esac
15398  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
15399else
15400  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15401fi
15402library_names_spec=
15403libname_spec='lib$name'
15404soname_spec=
15405shrext_cmds=.so
15406postinstall_cmds=
15407postuninstall_cmds=
15408finish_cmds=
15409finish_eval=
15410shlibpath_var=
15411shlibpath_overrides_runpath=unknown
15412version_type=none
15413dynamic_linker="$host_os ld.so"
15414sys_lib_dlsearch_path_spec="/lib /usr/lib"
15415need_lib_prefix=unknown
15416hardcode_into_libs=no
15417
15418# when you set need_version to no, make sure it does not cause -set_version
15419# flags to be left without arguments
15420need_version=unknown
15421
15422
15423
15424case $host_os in
15425aix3*)
15426  version_type=linux # correct to gnu/linux during the next big refactor
15427  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
15428  shlibpath_var=LIBPATH
15429
15430  # AIX 3 has no versioning support, so we append a major version to the name.
15431  soname_spec='$libname$release$shared_ext$major'
15432  ;;
15433
15434aix[4-9]*)
15435  version_type=linux # correct to gnu/linux during the next big refactor
15436  need_lib_prefix=no
15437  need_version=no
15438  hardcode_into_libs=yes
15439  if test ia64 = "$host_cpu"; then
15440    # AIX 5 supports IA64
15441    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
15442    shlibpath_var=LD_LIBRARY_PATH
15443  else
15444    # With GCC up to 2.95.x, collect2 would create an import file
15445    # for dependence libraries.  The import file would start with
15446    # the line '#! .'.  This would cause the generated library to
15447    # depend on '.', always an invalid library.  This was fixed in
15448    # development snapshots of GCC prior to 3.0.
15449    case $host_os in
15450      aix4 | aix4.[01] | aix4.[01].*)
15451      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15452	   echo ' yes '
15453	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
15454	:
15455      else
15456	can_build_shared=no
15457      fi
15458      ;;
15459    esac
15460    # Using Import Files as archive members, it is possible to support
15461    # filename-based versioning of shared library archives on AIX. While
15462    # this would work for both with and without runtime linking, it will
15463    # prevent static linking of such archives. So we do filename-based
15464    # shared library versioning with .so extension only, which is used
15465    # when both runtime linking and shared linking is enabled.
15466    # Unfortunately, runtime linking may impact performance, so we do
15467    # not want this to be the default eventually. Also, we use the
15468    # versioned .so libs for executables only if there is the -brtl
15469    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
15470    # To allow for filename-based versioning support, we need to create
15471    # libNAME.so.V as an archive file, containing:
15472    # *) an Import File, referring to the versioned filename of the
15473    #    archive as well as the shared archive member, telling the
15474    #    bitwidth (32 or 64) of that shared object, and providing the
15475    #    list of exported symbols of that shared object, eventually
15476    #    decorated with the 'weak' keyword
15477    # *) the shared object with the F_LOADONLY flag set, to really avoid
15478    #    it being seen by the linker.
15479    # At run time we better use the real file rather than another symlink,
15480    # but for link time we create the symlink libNAME.so -> libNAME.so.V
15481
15482    case $with_aix_soname,$aix_use_runtimelinking in
15483    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
15484    # soname into executable. Probably we can add versioning support to
15485    # collect2, so additional links can be useful in future.
15486    aix,yes) # traditional libtool
15487      dynamic_linker='AIX unversionable lib.so'
15488      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15489      # instead of lib<name>.a to let people know that these are not
15490      # typical AIX shared libraries.
15491      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15492      ;;
15493    aix,no) # traditional AIX only
15494      dynamic_linker='AIX lib.a(lib.so.V)'
15495      # We preserve .a as extension for shared libraries through AIX4.2
15496      # and later when we are not doing run time linking.
15497      library_names_spec='$libname$release.a $libname.a'
15498      soname_spec='$libname$release$shared_ext$major'
15499      ;;
15500    svr4,*) # full svr4 only
15501      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
15502      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15503      # We do not specify a path in Import Files, so LIBPATH fires.
15504      shlibpath_overrides_runpath=yes
15505      ;;
15506    *,yes) # both, prefer svr4
15507      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
15508      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15509      # unpreferred sharedlib libNAME.a needs extra handling
15510      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
15511      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
15512      # We do not specify a path in Import Files, so LIBPATH fires.
15513      shlibpath_overrides_runpath=yes
15514      ;;
15515    *,no) # both, prefer aix
15516      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
15517      library_names_spec='$libname$release.a $libname.a'
15518      soname_spec='$libname$release$shared_ext$major'
15519      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
15520      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
15521      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
15522      ;;
15523    esac
15524    shlibpath_var=LIBPATH
15525  fi
15526  ;;
15527
15528amigaos*)
15529  case $host_cpu in
15530  powerpc)
15531    # Since July 2007 AmigaOS4 officially supports .so libraries.
15532    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
15533    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15534    ;;
15535  m68k)
15536    library_names_spec='$libname.ixlibrary $libname.a'
15537    # Create ${libname}_ixlibrary.a entries in /sys/libs.
15538    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
15539    ;;
15540  esac
15541  ;;
15542
15543beos*)
15544  library_names_spec='$libname$shared_ext'
15545  dynamic_linker="$host_os ld.so"
15546  shlibpath_var=LIBRARY_PATH
15547  ;;
15548
15549bsdi[45]*)
15550  version_type=linux # correct to gnu/linux during the next big refactor
15551  need_version=no
15552  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15553  soname_spec='$libname$release$shared_ext$major'
15554  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15555  shlibpath_var=LD_LIBRARY_PATH
15556  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15557  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15558  # the default ld.so.conf also contains /usr/contrib/lib and
15559  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15560  # libtool to hard-code these into programs
15561  ;;
15562
15563cygwin* | mingw* | pw32* | cegcc*)
15564  version_type=windows
15565  shrext_cmds=.dll
15566  need_version=no
15567  need_lib_prefix=no
15568
15569  case $GCC,$cc_basename in
15570  yes,*)
15571    # gcc
15572    library_names_spec='$libname.dll.a'
15573    # DLL is installed to $(libdir)/../bin by postinstall_cmds
15574    postinstall_cmds='base_file=`basename \$file`~
15575      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
15576      dldir=$destdir/`dirname \$dlpath`~
15577      test -d \$dldir || mkdir -p \$dldir~
15578      $install_prog $dir/$dlname \$dldir/$dlname~
15579      chmod a+x \$dldir/$dlname~
15580      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15581        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15582      fi'
15583    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15584      dlpath=$dir/\$dldll~
15585       $RM \$dlpath'
15586    shlibpath_overrides_runpath=yes
15587
15588    case $host_os in
15589    cygwin*)
15590      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15591      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15592
15593      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
15594      ;;
15595    mingw* | cegcc*)
15596      # MinGW DLLs use traditional 'lib' prefix
15597      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15598      ;;
15599    pw32*)
15600      # pw32 DLLs use 'pw' prefix rather than 'lib'
15601      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15602      ;;
15603    esac
15604    dynamic_linker='Win32 ld.exe'
15605    ;;
15606
15607  *,cl*)
15608    # Native MSVC
15609    libname_spec='$name'
15610    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15611    library_names_spec='$libname.dll.lib'
15612
15613    case $build_os in
15614    mingw*)
15615      sys_lib_search_path_spec=
15616      lt_save_ifs=$IFS
15617      IFS=';'
15618      for lt_path in $LIB
15619      do
15620        IFS=$lt_save_ifs
15621        # Let DOS variable expansion print the short 8.3 style file name.
15622        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
15623        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
15624      done
15625      IFS=$lt_save_ifs
15626      # Convert to MSYS style.
15627      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
15628      ;;
15629    cygwin*)
15630      # Convert to unix form, then to dos form, then back to unix form
15631      # but this time dos style (no spaces!) so that the unix form looks
15632      # like /cygdrive/c/PROGRA~1:/cygdr...
15633      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
15634      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
15635      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15636      ;;
15637    *)
15638      sys_lib_search_path_spec=$LIB
15639      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
15640        # It is most probably a Windows format PATH.
15641        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15642      else
15643        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15644      fi
15645      # FIXME: find the short name or the path components, as spaces are
15646      # common. (e.g. "Program Files" -> "PROGRA~1")
15647      ;;
15648    esac
15649
15650    # DLL is installed to $(libdir)/../bin by postinstall_cmds
15651    postinstall_cmds='base_file=`basename \$file`~
15652      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
15653      dldir=$destdir/`dirname \$dlpath`~
15654      test -d \$dldir || mkdir -p \$dldir~
15655      $install_prog $dir/$dlname \$dldir/$dlname'
15656    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15657      dlpath=$dir/\$dldll~
15658       $RM \$dlpath'
15659    shlibpath_overrides_runpath=yes
15660    dynamic_linker='Win32 link.exe'
15661    ;;
15662
15663  *)
15664    # Assume MSVC wrapper
15665    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
15666    dynamic_linker='Win32 ld.exe'
15667    ;;
15668  esac
15669  # FIXME: first we should search . and the directory the executable is in
15670  shlibpath_var=PATH
15671  ;;
15672
15673darwin* | rhapsody*)
15674  dynamic_linker="$host_os dyld"
15675  version_type=darwin
15676  need_lib_prefix=no
15677  need_version=no
15678  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
15679  soname_spec='$libname$release$major$shared_ext'
15680  shlibpath_overrides_runpath=yes
15681  shlibpath_var=DYLD_LIBRARY_PATH
15682  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15683
15684  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
15685  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15686  ;;
15687
15688dgux*)
15689  version_type=linux # correct to gnu/linux during the next big refactor
15690  need_lib_prefix=no
15691  need_version=no
15692  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15693  soname_spec='$libname$release$shared_ext$major'
15694  shlibpath_var=LD_LIBRARY_PATH
15695  ;;
15696
15697freebsd* | dragonfly*)
15698  # DragonFly does not have aout.  When/if they implement a new
15699  # versioning mechanism, adjust this.
15700  if test -x /usr/bin/objformat; then
15701    objformat=`/usr/bin/objformat`
15702  else
15703    case $host_os in
15704    freebsd[23].*) objformat=aout ;;
15705    *) objformat=elf ;;
15706    esac
15707  fi
15708  version_type=freebsd-$objformat
15709  case $version_type in
15710    freebsd-elf*)
15711      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15712      soname_spec='$libname$release$shared_ext$major'
15713      need_version=no
15714      need_lib_prefix=no
15715      ;;
15716    freebsd-*)
15717      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15718      need_version=yes
15719      ;;
15720  esac
15721  shlibpath_var=LD_LIBRARY_PATH
15722  case $host_os in
15723  freebsd2.*)
15724    shlibpath_overrides_runpath=yes
15725    ;;
15726  freebsd3.[01]* | freebsdelf3.[01]*)
15727    shlibpath_overrides_runpath=yes
15728    hardcode_into_libs=yes
15729    ;;
15730  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15731  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15732    shlibpath_overrides_runpath=no
15733    hardcode_into_libs=yes
15734    ;;
15735  *) # from 4.6 on, and DragonFly
15736    shlibpath_overrides_runpath=yes
15737    hardcode_into_libs=yes
15738    ;;
15739  esac
15740  ;;
15741
15742haiku*)
15743  version_type=linux # correct to gnu/linux during the next big refactor
15744  need_lib_prefix=no
15745  need_version=no
15746  dynamic_linker="$host_os runtime_loader"
15747  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15748  soname_spec='$libname$release$shared_ext$major'
15749  shlibpath_var=LIBRARY_PATH
15750  shlibpath_overrides_runpath=no
15751  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
15752  hardcode_into_libs=yes
15753  ;;
15754
15755hpux9* | hpux10* | hpux11*)
15756  # Give a soname corresponding to the major version so that dld.sl refuses to
15757  # link against other versions.
15758  version_type=sunos
15759  need_lib_prefix=no
15760  need_version=no
15761  case $host_cpu in
15762  ia64*)
15763    shrext_cmds='.so'
15764    hardcode_into_libs=yes
15765    dynamic_linker="$host_os dld.so"
15766    shlibpath_var=LD_LIBRARY_PATH
15767    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15768    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15769    soname_spec='$libname$release$shared_ext$major'
15770    if test 32 = "$HPUX_IA64_MODE"; then
15771      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15772      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
15773    else
15774      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15775      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
15776    fi
15777    ;;
15778  hppa*64*)
15779    shrext_cmds='.sl'
15780    hardcode_into_libs=yes
15781    dynamic_linker="$host_os dld.sl"
15782    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15783    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15784    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15785    soname_spec='$libname$release$shared_ext$major'
15786    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15787    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15788    ;;
15789  *)
15790    shrext_cmds='.sl'
15791    dynamic_linker="$host_os dld.sl"
15792    shlibpath_var=SHLIB_PATH
15793    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15794    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15795    soname_spec='$libname$release$shared_ext$major'
15796    ;;
15797  esac
15798  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
15799  postinstall_cmds='chmod 555 $lib'
15800  # or fails outright, so override atomically:
15801  install_override_mode=555
15802  ;;
15803
15804interix[3-9]*)
15805  version_type=linux # correct to gnu/linux during the next big refactor
15806  need_lib_prefix=no
15807  need_version=no
15808  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15809  soname_spec='$libname$release$shared_ext$major'
15810  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15811  shlibpath_var=LD_LIBRARY_PATH
15812  shlibpath_overrides_runpath=no
15813  hardcode_into_libs=yes
15814  ;;
15815
15816irix5* | irix6* | nonstopux*)
15817  case $host_os in
15818    nonstopux*) version_type=nonstopux ;;
15819    *)
15820	if test yes = "$lt_cv_prog_gnu_ld"; then
15821		version_type=linux # correct to gnu/linux during the next big refactor
15822	else
15823		version_type=irix
15824	fi ;;
15825  esac
15826  need_lib_prefix=no
15827  need_version=no
15828  soname_spec='$libname$release$shared_ext$major'
15829  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
15830  case $host_os in
15831  irix5* | nonstopux*)
15832    libsuff= shlibsuff=
15833    ;;
15834  *)
15835    case $LD in # libtool.m4 will add one of these switches to LD
15836    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15837      libsuff= shlibsuff= libmagic=32-bit;;
15838    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15839      libsuff=32 shlibsuff=N32 libmagic=N32;;
15840    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15841      libsuff=64 shlibsuff=64 libmagic=64-bit;;
15842    *) libsuff= shlibsuff= libmagic=never-match;;
15843    esac
15844    ;;
15845  esac
15846  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15847  shlibpath_overrides_runpath=no
15848  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
15849  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
15850  hardcode_into_libs=yes
15851  ;;
15852
15853# No shared lib support for Linux oldld, aout, or coff.
15854linux*oldld* | linux*aout* | linux*coff*)
15855  dynamic_linker=no
15856  ;;
15857
15858linux*android*)
15859  version_type=none # Android doesn't support versioned libraries.
15860  need_lib_prefix=no
15861  need_version=no
15862  library_names_spec='$libname$release$shared_ext'
15863  soname_spec='$libname$release$shared_ext'
15864  finish_cmds=
15865  shlibpath_var=LD_LIBRARY_PATH
15866  shlibpath_overrides_runpath=yes
15867
15868  # This implies no fast_install, which is unacceptable.
15869  # Some rework will be needed to allow for fast_install
15870  # before this can be enabled.
15871  hardcode_into_libs=yes
15872
15873  dynamic_linker='Android linker'
15874  # Don't embed -rpath directories since the linker doesn't support them.
15875  hardcode_libdir_flag_spec='-L$libdir'
15876  ;;
15877
15878# This must be glibc/ELF.
15879linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15880  version_type=linux # correct to gnu/linux during the next big refactor
15881  need_lib_prefix=no
15882  need_version=no
15883  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15884  soname_spec='$libname$release$shared_ext$major'
15885  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15886  shlibpath_var=LD_LIBRARY_PATH
15887  shlibpath_overrides_runpath=no
15888
15889  # Some binutils ld are patched to set DT_RUNPATH
15890  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
15891  $as_echo_n "(cached) " >&6
15892else
15893  lt_cv_shlibpath_overrides_runpath=no
15894    save_LDFLAGS=$LDFLAGS
15895    save_libdir=$libdir
15896    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
15897	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
15898    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15899/* end confdefs.h.  */
15900
15901int
15902main ()
15903{
15904
15905  ;
15906  return 0;
15907}
15908_ACEOF
15909if ac_fn_c_try_link "$LINENO"; then :
15910  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
15911  lt_cv_shlibpath_overrides_runpath=yes
15912fi
15913fi
15914rm -f core conftest.err conftest.$ac_objext \
15915    conftest$ac_exeext conftest.$ac_ext
15916    LDFLAGS=$save_LDFLAGS
15917    libdir=$save_libdir
15918
15919fi
15920
15921  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
15922
15923  # This implies no fast_install, which is unacceptable.
15924  # Some rework will be needed to allow for fast_install
15925  # before this can be enabled.
15926  hardcode_into_libs=yes
15927
15928  # Ideally, we could use ldconfig to report *all* directores which are
15929  # searched for libraries, however this is still not possible.  Aside from not
15930  # being certain /sbin/ldconfig is available, command
15931  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
15932  # even though it is searched at run-time.  Try to do the best guess by
15933  # appending ld.so.conf contents (and includes) to the search path.
15934  if test -f /etc/ld.so.conf; then
15935    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
15936    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15937  fi
15938
15939  # We used to test for /lib/ld.so.1 and disable shared libraries on
15940  # powerpc, because MkLinux only supported shared libraries with the
15941  # GNU dynamic linker.  Since this was broken with cross compilers,
15942  # most powerpc-linux boxes support dynamic linking these days and
15943  # people can always --disable-shared, the test was removed, and we
15944  # assume the GNU/Linux dynamic linker is in use.
15945  dynamic_linker='GNU/Linux ld.so'
15946  ;;
15947
15948netbsdelf*-gnu)
15949  version_type=linux
15950  need_lib_prefix=no
15951  need_version=no
15952  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15953  soname_spec='${libname}${release}${shared_ext}$major'
15954  shlibpath_var=LD_LIBRARY_PATH
15955  shlibpath_overrides_runpath=no
15956  hardcode_into_libs=yes
15957  dynamic_linker='NetBSD ld.elf_so'
15958  ;;
15959
15960netbsd*)
15961  version_type=sunos
15962  need_lib_prefix=no
15963  need_version=no
15964  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15965    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15966    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15967    dynamic_linker='NetBSD (a.out) ld.so'
15968  else
15969    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15970    soname_spec='$libname$release$shared_ext$major'
15971    dynamic_linker='NetBSD ld.elf_so'
15972  fi
15973  shlibpath_var=LD_LIBRARY_PATH
15974  shlibpath_overrides_runpath=yes
15975  hardcode_into_libs=yes
15976  ;;
15977
15978newsos6)
15979  version_type=linux # correct to gnu/linux during the next big refactor
15980  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15981  shlibpath_var=LD_LIBRARY_PATH
15982  shlibpath_overrides_runpath=yes
15983  ;;
15984
15985*nto* | *qnx*)
15986  version_type=qnx
15987  need_lib_prefix=no
15988  need_version=no
15989  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15990  soname_spec='$libname$release$shared_ext$major'
15991  shlibpath_var=LD_LIBRARY_PATH
15992  shlibpath_overrides_runpath=no
15993  hardcode_into_libs=yes
15994  dynamic_linker='ldqnx.so'
15995  ;;
15996
15997openbsd* | bitrig*)
15998  version_type=sunos
15999  sys_lib_dlsearch_path_spec=/usr/lib
16000  need_lib_prefix=no
16001  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16002    need_version=no
16003  else
16004    need_version=yes
16005  fi
16006  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16007  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16008  shlibpath_var=LD_LIBRARY_PATH
16009  shlibpath_overrides_runpath=yes
16010  ;;
16011
16012os2*)
16013  libname_spec='$name'
16014  version_type=windows
16015  shrext_cmds=.dll
16016  need_version=no
16017  need_lib_prefix=no
16018  # OS/2 can only load a DLL with a base name of 8 characters or less.
16019  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
16020    v=$($ECHO $release$versuffix | tr -d .-);
16021    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
16022    $ECHO $n$v`$shared_ext'
16023  library_names_spec='${libname}_dll.$libext'
16024  dynamic_linker='OS/2 ld.exe'
16025  shlibpath_var=BEGINLIBPATH
16026  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16027  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16028  postinstall_cmds='base_file=`basename \$file`~
16029    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
16030    dldir=$destdir/`dirname \$dlpath`~
16031    test -d \$dldir || mkdir -p \$dldir~
16032    $install_prog $dir/$dlname \$dldir/$dlname~
16033    chmod a+x \$dldir/$dlname~
16034    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16035      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16036    fi'
16037  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
16038    dlpath=$dir/\$dldll~
16039    $RM \$dlpath'
16040  ;;
16041
16042osf3* | osf4* | osf5*)
16043  version_type=osf
16044  need_lib_prefix=no
16045  need_version=no
16046  soname_spec='$libname$release$shared_ext$major'
16047  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16048  shlibpath_var=LD_LIBRARY_PATH
16049  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16050  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16051  ;;
16052
16053rdos*)
16054  dynamic_linker=no
16055  ;;
16056
16057solaris*)
16058  version_type=linux # correct to gnu/linux during the next big refactor
16059  need_lib_prefix=no
16060  need_version=no
16061  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16062  soname_spec='$libname$release$shared_ext$major'
16063  shlibpath_var=LD_LIBRARY_PATH
16064  shlibpath_overrides_runpath=yes
16065  hardcode_into_libs=yes
16066  # ldd complains unless libraries are executable
16067  postinstall_cmds='chmod +x $lib'
16068  ;;
16069
16070sunos4*)
16071  version_type=sunos
16072  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16073  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16074  shlibpath_var=LD_LIBRARY_PATH
16075  shlibpath_overrides_runpath=yes
16076  if test yes = "$with_gnu_ld"; then
16077    need_lib_prefix=no
16078  fi
16079  need_version=yes
16080  ;;
16081
16082sysv4 | sysv4.3*)
16083  version_type=linux # correct to gnu/linux during the next big refactor
16084  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16085  soname_spec='$libname$release$shared_ext$major'
16086  shlibpath_var=LD_LIBRARY_PATH
16087  case $host_vendor in
16088    sni)
16089      shlibpath_overrides_runpath=no
16090      need_lib_prefix=no
16091      runpath_var=LD_RUN_PATH
16092      ;;
16093    siemens)
16094      need_lib_prefix=no
16095      ;;
16096    motorola)
16097      need_lib_prefix=no
16098      need_version=no
16099      shlibpath_overrides_runpath=no
16100      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16101      ;;
16102  esac
16103  ;;
16104
16105sysv4*MP*)
16106  if test -d /usr/nec; then
16107    version_type=linux # correct to gnu/linux during the next big refactor
16108    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
16109    soname_spec='$libname$shared_ext.$major'
16110    shlibpath_var=LD_LIBRARY_PATH
16111  fi
16112  ;;
16113
16114sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16115  version_type=sco
16116  need_lib_prefix=no
16117  need_version=no
16118  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
16119  soname_spec='$libname$release$shared_ext$major'
16120  shlibpath_var=LD_LIBRARY_PATH
16121  shlibpath_overrides_runpath=yes
16122  hardcode_into_libs=yes
16123  if test yes = "$with_gnu_ld"; then
16124    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16125  else
16126    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16127    case $host_os in
16128      sco3.2v5*)
16129        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16130	;;
16131    esac
16132  fi
16133  sys_lib_dlsearch_path_spec='/usr/lib'
16134  ;;
16135
16136tpf*)
16137  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
16138  version_type=linux # correct to gnu/linux during the next big refactor
16139  need_lib_prefix=no
16140  need_version=no
16141  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16142  shlibpath_var=LD_LIBRARY_PATH
16143  shlibpath_overrides_runpath=no
16144  hardcode_into_libs=yes
16145  ;;
16146
16147uts4*)
16148  version_type=linux # correct to gnu/linux during the next big refactor
16149  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16150  soname_spec='$libname$release$shared_ext$major'
16151  shlibpath_var=LD_LIBRARY_PATH
16152  ;;
16153
16154*)
16155  dynamic_linker=no
16156  ;;
16157esac
16158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16159$as_echo "$dynamic_linker" >&6; }
16160test no = "$dynamic_linker" && can_build_shared=no
16161
16162variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16163if test yes = "$GCC"; then
16164  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16165fi
16166
16167if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
16168  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
16169fi
16170
16171if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
16172  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
16173fi
16174
16175# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
16176configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
16177
16178# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
16179func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
16180
16181# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
16182configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16281$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
16282hardcode_action=
16283if test -n "$hardcode_libdir_flag_spec" ||
16284   test -n "$runpath_var" ||
16285   test yes = "$hardcode_automatic"; then
16286
16287  # We can hardcode non-existent directories.
16288  if test no != "$hardcode_direct" &&
16289     # If the only mechanism to avoid hardcoding is shlibpath_var, we
16290     # have to relink, otherwise we might link with an installed library
16291     # when we should be linking with a yet-to-be-installed one
16292     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
16293     test no != "$hardcode_minus_L"; then
16294    # Linking always hardcodes the temporary library directory.
16295    hardcode_action=relink
16296  else
16297    # We can link without hardcoding, and we can hardcode nonexisting dirs.
16298    hardcode_action=immediate
16299  fi
16300else
16301  # We cannot hardcode anything, or else we can only hardcode existing
16302  # directories.
16303  hardcode_action=unsupported
16304fi
16305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
16306$as_echo "$hardcode_action" >&6; }
16307
16308if test relink = "$hardcode_action" ||
16309   test yes = "$inherit_rpath"; then
16310  # Fast installation is not supported
16311  enable_fast_install=no
16312elif test yes = "$shlibpath_overrides_runpath" ||
16313     test no = "$enable_shared"; then
16314  # Fast installation is not necessary
16315  enable_fast_install=needless
16316fi
16317
16318
16319
16320
16321
16322
16323  if test yes != "$enable_dlopen"; then
16324  enable_dlopen=unknown
16325  enable_dlopen_self=unknown
16326  enable_dlopen_self_static=unknown
16327else
16328  lt_cv_dlopen=no
16329  lt_cv_dlopen_libs=
16330
16331  case $host_os in
16332  beos*)
16333    lt_cv_dlopen=load_add_on
16334    lt_cv_dlopen_libs=
16335    lt_cv_dlopen_self=yes
16336    ;;
16337
16338  mingw* | pw32* | cegcc*)
16339    lt_cv_dlopen=LoadLibrary
16340    lt_cv_dlopen_libs=
16341    ;;
16342
16343  cygwin*)
16344    lt_cv_dlopen=dlopen
16345    lt_cv_dlopen_libs=
16346    ;;
16347
16348  darwin*)
16349    # if libdl is installed we need to link against it
16350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16351$as_echo_n "checking for dlopen in -ldl... " >&6; }
16352if ${ac_cv_lib_dl_dlopen+:} false; then :
16353  $as_echo_n "(cached) " >&6
16354else
16355  ac_check_lib_save_LIBS=$LIBS
16356LIBS="-ldl  $LIBS"
16357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16358/* end confdefs.h.  */
16359
16360/* Override any GCC internal prototype to avoid an error.
16361   Use char because int might match the return type of a GCC
16362   builtin and then its argument prototype would still apply.  */
16363#ifdef __cplusplus
16364extern "C"
16365#endif
16366char dlopen ();
16367int
16368main ()
16369{
16370return dlopen ();
16371  ;
16372  return 0;
16373}
16374_ACEOF
16375if ac_fn_c_try_link "$LINENO"; then :
16376  ac_cv_lib_dl_dlopen=yes
16377else
16378  ac_cv_lib_dl_dlopen=no
16379fi
16380rm -f core conftest.err conftest.$ac_objext \
16381    conftest$ac_exeext conftest.$ac_ext
16382LIBS=$ac_check_lib_save_LIBS
16383fi
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16385$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16386if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
16387  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
16388else
16389
16390    lt_cv_dlopen=dyld
16391    lt_cv_dlopen_libs=
16392    lt_cv_dlopen_self=yes
16393
16394fi
16395
16396    ;;
16397
16398  tpf*)
16399    # Don't try to run any link tests for TPF.  We know it's impossible
16400    # because TPF is a cross-compiler, and we know how we open DSOs.
16401    lt_cv_dlopen=dlopen
16402    lt_cv_dlopen_libs=
16403    lt_cv_dlopen_self=no
16404    ;;
16405
16406  *)
16407    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
16408if test "x$ac_cv_func_shl_load" = xyes; then :
16409  lt_cv_dlopen=shl_load
16410else
16411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
16412$as_echo_n "checking for shl_load in -ldld... " >&6; }
16413if ${ac_cv_lib_dld_shl_load+:} false; then :
16414  $as_echo_n "(cached) " >&6
16415else
16416  ac_check_lib_save_LIBS=$LIBS
16417LIBS="-ldld  $LIBS"
16418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16419/* end confdefs.h.  */
16420
16421/* Override any GCC internal prototype to avoid an error.
16422   Use char because int might match the return type of a GCC
16423   builtin and then its argument prototype would still apply.  */
16424#ifdef __cplusplus
16425extern "C"
16426#endif
16427char shl_load ();
16428int
16429main ()
16430{
16431return shl_load ();
16432  ;
16433  return 0;
16434}
16435_ACEOF
16436if ac_fn_c_try_link "$LINENO"; then :
16437  ac_cv_lib_dld_shl_load=yes
16438else
16439  ac_cv_lib_dld_shl_load=no
16440fi
16441rm -f core conftest.err conftest.$ac_objext \
16442    conftest$ac_exeext conftest.$ac_ext
16443LIBS=$ac_check_lib_save_LIBS
16444fi
16445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
16446$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
16447if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
16448  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
16449else
16450  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16451if test "x$ac_cv_func_dlopen" = xyes; then :
16452  lt_cv_dlopen=dlopen
16453else
16454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16455$as_echo_n "checking for dlopen in -ldl... " >&6; }
16456if ${ac_cv_lib_dl_dlopen+:} false; then :
16457  $as_echo_n "(cached) " >&6
16458else
16459  ac_check_lib_save_LIBS=$LIBS
16460LIBS="-ldl  $LIBS"
16461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16462/* end confdefs.h.  */
16463
16464/* Override any GCC internal prototype to avoid an error.
16465   Use char because int might match the return type of a GCC
16466   builtin and then its argument prototype would still apply.  */
16467#ifdef __cplusplus
16468extern "C"
16469#endif
16470char dlopen ();
16471int
16472main ()
16473{
16474return dlopen ();
16475  ;
16476  return 0;
16477}
16478_ACEOF
16479if ac_fn_c_try_link "$LINENO"; then :
16480  ac_cv_lib_dl_dlopen=yes
16481else
16482  ac_cv_lib_dl_dlopen=no
16483fi
16484rm -f core conftest.err conftest.$ac_objext \
16485    conftest$ac_exeext conftest.$ac_ext
16486LIBS=$ac_check_lib_save_LIBS
16487fi
16488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16489$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16490if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
16491  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
16492else
16493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
16494$as_echo_n "checking for dlopen in -lsvld... " >&6; }
16495if ${ac_cv_lib_svld_dlopen+:} false; then :
16496  $as_echo_n "(cached) " >&6
16497else
16498  ac_check_lib_save_LIBS=$LIBS
16499LIBS="-lsvld  $LIBS"
16500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16501/* end confdefs.h.  */
16502
16503/* Override any GCC internal prototype to avoid an error.
16504   Use char because int might match the return type of a GCC
16505   builtin and then its argument prototype would still apply.  */
16506#ifdef __cplusplus
16507extern "C"
16508#endif
16509char dlopen ();
16510int
16511main ()
16512{
16513return dlopen ();
16514  ;
16515  return 0;
16516}
16517_ACEOF
16518if ac_fn_c_try_link "$LINENO"; then :
16519  ac_cv_lib_svld_dlopen=yes
16520else
16521  ac_cv_lib_svld_dlopen=no
16522fi
16523rm -f core conftest.err conftest.$ac_objext \
16524    conftest$ac_exeext conftest.$ac_ext
16525LIBS=$ac_check_lib_save_LIBS
16526fi
16527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
16528$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
16529if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
16530  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
16531else
16532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
16533$as_echo_n "checking for dld_link in -ldld... " >&6; }
16534if ${ac_cv_lib_dld_dld_link+:} false; then :
16535  $as_echo_n "(cached) " >&6
16536else
16537  ac_check_lib_save_LIBS=$LIBS
16538LIBS="-ldld  $LIBS"
16539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16540/* end confdefs.h.  */
16541
16542/* Override any GCC internal prototype to avoid an error.
16543   Use char because int might match the return type of a GCC
16544   builtin and then its argument prototype would still apply.  */
16545#ifdef __cplusplus
16546extern "C"
16547#endif
16548char dld_link ();
16549int
16550main ()
16551{
16552return dld_link ();
16553  ;
16554  return 0;
16555}
16556_ACEOF
16557if ac_fn_c_try_link "$LINENO"; then :
16558  ac_cv_lib_dld_dld_link=yes
16559else
16560  ac_cv_lib_dld_dld_link=no
16561fi
16562rm -f core conftest.err conftest.$ac_objext \
16563    conftest$ac_exeext conftest.$ac_ext
16564LIBS=$ac_check_lib_save_LIBS
16565fi
16566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
16567$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
16568if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
16569  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
16570fi
16571
16572
16573fi
16574
16575
16576fi
16577
16578
16579fi
16580
16581
16582fi
16583
16584
16585fi
16586
16587    ;;
16588  esac
16589
16590  if test no = "$lt_cv_dlopen"; then
16591    enable_dlopen=no
16592  else
16593    enable_dlopen=yes
16594  fi
16595
16596  case $lt_cv_dlopen in
16597  dlopen)
16598    save_CPPFLAGS=$CPPFLAGS
16599    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
16600
16601    save_LDFLAGS=$LDFLAGS
16602    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
16603
16604    save_LIBS=$LIBS
16605    LIBS="$lt_cv_dlopen_libs $LIBS"
16606
16607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
16608$as_echo_n "checking whether a program can dlopen itself... " >&6; }
16609if ${lt_cv_dlopen_self+:} false; then :
16610  $as_echo_n "(cached) " >&6
16611else
16612  	  if test yes = "$cross_compiling"; then :
16613  lt_cv_dlopen_self=cross
16614else
16615  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16616  lt_status=$lt_dlunknown
16617  cat > conftest.$ac_ext <<_LT_EOF
16618#line $LINENO "configure"
16619#include "confdefs.h"
16620
16621#if HAVE_DLFCN_H
16622#include <dlfcn.h>
16623#endif
16624
16625#include <stdio.h>
16626
16627#ifdef RTLD_GLOBAL
16628#  define LT_DLGLOBAL		RTLD_GLOBAL
16629#else
16630#  ifdef DL_GLOBAL
16631#    define LT_DLGLOBAL		DL_GLOBAL
16632#  else
16633#    define LT_DLGLOBAL		0
16634#  endif
16635#endif
16636
16637/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16638   find out it does not work in some platform. */
16639#ifndef LT_DLLAZY_OR_NOW
16640#  ifdef RTLD_LAZY
16641#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
16642#  else
16643#    ifdef DL_LAZY
16644#      define LT_DLLAZY_OR_NOW		DL_LAZY
16645#    else
16646#      ifdef RTLD_NOW
16647#        define LT_DLLAZY_OR_NOW	RTLD_NOW
16648#      else
16649#        ifdef DL_NOW
16650#          define LT_DLLAZY_OR_NOW	DL_NOW
16651#        else
16652#          define LT_DLLAZY_OR_NOW	0
16653#        endif
16654#      endif
16655#    endif
16656#  endif
16657#endif
16658
16659/* When -fvisibility=hidden is used, assume the code has been annotated
16660   correspondingly for the symbols needed.  */
16661#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16662int fnord () __attribute__((visibility("default")));
16663#endif
16664
16665int fnord () { return 42; }
16666int main ()
16667{
16668  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16669  int status = $lt_dlunknown;
16670
16671  if (self)
16672    {
16673      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
16674      else
16675        {
16676	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
16677          else puts (dlerror ());
16678	}
16679      /* dlclose (self); */
16680    }
16681  else
16682    puts (dlerror ());
16683
16684  return status;
16685}
16686_LT_EOF
16687  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16688  (eval $ac_link) 2>&5
16689  ac_status=$?
16690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16691  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16692    (./conftest; exit; ) >&5 2>/dev/null
16693    lt_status=$?
16694    case x$lt_status in
16695      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
16696      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
16697      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
16698    esac
16699  else :
16700    # compilation failed
16701    lt_cv_dlopen_self=no
16702  fi
16703fi
16704rm -fr conftest*
16705
16706
16707fi
16708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
16709$as_echo "$lt_cv_dlopen_self" >&6; }
16710
16711    if test yes = "$lt_cv_dlopen_self"; then
16712      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
16713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
16714$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
16715if ${lt_cv_dlopen_self_static+:} false; then :
16716  $as_echo_n "(cached) " >&6
16717else
16718  	  if test yes = "$cross_compiling"; then :
16719  lt_cv_dlopen_self_static=cross
16720else
16721  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16722  lt_status=$lt_dlunknown
16723  cat > conftest.$ac_ext <<_LT_EOF
16724#line $LINENO "configure"
16725#include "confdefs.h"
16726
16727#if HAVE_DLFCN_H
16728#include <dlfcn.h>
16729#endif
16730
16731#include <stdio.h>
16732
16733#ifdef RTLD_GLOBAL
16734#  define LT_DLGLOBAL		RTLD_GLOBAL
16735#else
16736#  ifdef DL_GLOBAL
16737#    define LT_DLGLOBAL		DL_GLOBAL
16738#  else
16739#    define LT_DLGLOBAL		0
16740#  endif
16741#endif
16742
16743/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16744   find out it does not work in some platform. */
16745#ifndef LT_DLLAZY_OR_NOW
16746#  ifdef RTLD_LAZY
16747#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
16748#  else
16749#    ifdef DL_LAZY
16750#      define LT_DLLAZY_OR_NOW		DL_LAZY
16751#    else
16752#      ifdef RTLD_NOW
16753#        define LT_DLLAZY_OR_NOW	RTLD_NOW
16754#      else
16755#        ifdef DL_NOW
16756#          define LT_DLLAZY_OR_NOW	DL_NOW
16757#        else
16758#          define LT_DLLAZY_OR_NOW	0
16759#        endif
16760#      endif
16761#    endif
16762#  endif
16763#endif
16764
16765/* When -fvisibility=hidden is used, assume the code has been annotated
16766   correspondingly for the symbols needed.  */
16767#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16768int fnord () __attribute__((visibility("default")));
16769#endif
16770
16771int fnord () { return 42; }
16772int main ()
16773{
16774  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16775  int status = $lt_dlunknown;
16776
16777  if (self)
16778    {
16779      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
16780      else
16781        {
16782	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
16783          else puts (dlerror ());
16784	}
16785      /* dlclose (self); */
16786    }
16787  else
16788    puts (dlerror ());
16789
16790  return status;
16791}
16792_LT_EOF
16793  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16794  (eval $ac_link) 2>&5
16795  ac_status=$?
16796  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16797  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
16798    (./conftest; exit; ) >&5 2>/dev/null
16799    lt_status=$?
16800    case x$lt_status in
16801      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
16802      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
16803      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
16804    esac
16805  else :
16806    # compilation failed
16807    lt_cv_dlopen_self_static=no
16808  fi
16809fi
16810rm -fr conftest*
16811
16812
16813fi
16814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
16815$as_echo "$lt_cv_dlopen_self_static" >&6; }
16816    fi
16817
16818    CPPFLAGS=$save_CPPFLAGS
16819    LDFLAGS=$save_LDFLAGS
16820    LIBS=$save_LIBS
16821    ;;
16822  esac
16823
16824  case $lt_cv_dlopen_self in
16825  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
16826  *) enable_dlopen_self=unknown ;;
16827  esac
16828
16829  case $lt_cv_dlopen_self_static in
16830  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
16831  *) enable_dlopen_self_static=unknown ;;
16832  esac
16833fi
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851striplib=
16852old_striplib=
16853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
16854$as_echo_n "checking whether stripping libraries is possible... " >&6; }
16855if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
16856  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
16857  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
16858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16859$as_echo "yes" >&6; }
16860else
16861# FIXME - insert some real tests, host_os isn't really good enough
16862  case $host_os in
16863  darwin*)
16864    if test -n "$STRIP"; then
16865      striplib="$STRIP -x"
16866      old_striplib="$STRIP -S"
16867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16868$as_echo "yes" >&6; }
16869    else
16870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16871$as_echo "no" >&6; }
16872    fi
16873    ;;
16874  *)
16875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16876$as_echo "no" >&6; }
16877    ;;
16878  esac
16879fi
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892  # Report what library types will actually be built
16893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
16894$as_echo_n "checking if libtool supports shared libraries... " >&6; }
16895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
16896$as_echo "$can_build_shared" >&6; }
16897
16898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
16899$as_echo_n "checking whether to build shared libraries... " >&6; }
16900  test no = "$can_build_shared" && enable_shared=no
16901
16902  # On AIX, shared libraries and static libraries use the same namespace, and
16903  # are all built from PIC.
16904  case $host_os in
16905  aix3*)
16906    test yes = "$enable_shared" && enable_static=no
16907    if test -n "$RANLIB"; then
16908      archive_cmds="$archive_cmds~\$RANLIB \$lib"
16909      postinstall_cmds='$RANLIB $lib'
16910    fi
16911    ;;
16912
16913  aix[4-9]*)
16914    if test ia64 != "$host_cpu"; then
16915      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
16916      yes,aix,yes) ;;			# shared object as lib.so file only
16917      yes,svr4,*) ;;			# shared object as lib.so archive member only
16918      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
16919      esac
16920    fi
16921    ;;
16922  esac
16923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
16924$as_echo "$enable_shared" >&6; }
16925
16926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
16927$as_echo_n "checking whether to build static libraries... " >&6; }
16928  # Make sure either enable_shared or enable_static is yes.
16929  test yes = "$enable_shared" || enable_static=yes
16930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
16931$as_echo "$enable_static" >&6; }
16932
16933
16934
16935
16936fi
16937ac_ext=c
16938ac_cpp='$CPP $CPPFLAGS'
16939ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16940ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16941ac_compiler_gnu=$ac_cv_c_compiler_gnu
16942
16943CC=$lt_save_CC
16944
16945      if test -n "$CXX" && ( test no != "$CXX" &&
16946    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
16947    (test g++ != "$CXX"))); then
16948  ac_ext=cpp
16949ac_cpp='$CXXCPP $CPPFLAGS'
16950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
16954$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
16955if test -z "$CXXCPP"; then
16956  if ${ac_cv_prog_CXXCPP+:} false; then :
16957  $as_echo_n "(cached) " >&6
16958else
16959      # Double quotes because CXXCPP needs to be expanded
16960    for CXXCPP in "$CXX -E" "/lib/cpp"
16961    do
16962      ac_preproc_ok=false
16963for ac_cxx_preproc_warn_flag in '' yes
16964do
16965  # Use a header file that comes with gcc, so configuring glibc
16966  # with a fresh cross-compiler works.
16967  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16968  # <limits.h> exists even on freestanding compilers.
16969  # On the NeXT, cc -E runs the code through the compiler's parser,
16970  # not just through cpp. "Syntax error" is here to catch this case.
16971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16972/* end confdefs.h.  */
16973#ifdef __STDC__
16974# include <limits.h>
16975#else
16976# include <assert.h>
16977#endif
16978		     Syntax error
16979_ACEOF
16980if ac_fn_cxx_try_cpp "$LINENO"; then :
16981
16982else
16983  # Broken: fails on valid input.
16984continue
16985fi
16986rm -f conftest.err conftest.i conftest.$ac_ext
16987
16988  # OK, works on sane cases.  Now check whether nonexistent headers
16989  # can be detected and how.
16990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16991/* end confdefs.h.  */
16992#include <ac_nonexistent.h>
16993_ACEOF
16994if ac_fn_cxx_try_cpp "$LINENO"; then :
16995  # Broken: success on invalid input.
16996continue
16997else
16998  # Passes both tests.
16999ac_preproc_ok=:
17000break
17001fi
17002rm -f conftest.err conftest.i conftest.$ac_ext
17003
17004done
17005# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17006rm -f conftest.i conftest.err conftest.$ac_ext
17007if $ac_preproc_ok; then :
17008  break
17009fi
17010
17011    done
17012    ac_cv_prog_CXXCPP=$CXXCPP
17013
17014fi
17015  CXXCPP=$ac_cv_prog_CXXCPP
17016else
17017  ac_cv_prog_CXXCPP=$CXXCPP
17018fi
17019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
17020$as_echo "$CXXCPP" >&6; }
17021ac_preproc_ok=false
17022for ac_cxx_preproc_warn_flag in '' yes
17023do
17024  # Use a header file that comes with gcc, so configuring glibc
17025  # with a fresh cross-compiler works.
17026  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17027  # <limits.h> exists even on freestanding compilers.
17028  # On the NeXT, cc -E runs the code through the compiler's parser,
17029  # not just through cpp. "Syntax error" is here to catch this case.
17030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17031/* end confdefs.h.  */
17032#ifdef __STDC__
17033# include <limits.h>
17034#else
17035# include <assert.h>
17036#endif
17037		     Syntax error
17038_ACEOF
17039if ac_fn_cxx_try_cpp "$LINENO"; then :
17040
17041else
17042  # Broken: fails on valid input.
17043continue
17044fi
17045rm -f conftest.err conftest.i conftest.$ac_ext
17046
17047  # OK, works on sane cases.  Now check whether nonexistent headers
17048  # can be detected and how.
17049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17050/* end confdefs.h.  */
17051#include <ac_nonexistent.h>
17052_ACEOF
17053if ac_fn_cxx_try_cpp "$LINENO"; then :
17054  # Broken: success on invalid input.
17055continue
17056else
17057  # Passes both tests.
17058ac_preproc_ok=:
17059break
17060fi
17061rm -f conftest.err conftest.i conftest.$ac_ext
17062
17063done
17064# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17065rm -f conftest.i conftest.err conftest.$ac_ext
17066if $ac_preproc_ok; then :
17067
17068else
17069  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17071as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
17072See \`config.log' for more details" "$LINENO" 5; }
17073fi
17074
17075ac_ext=c
17076ac_cpp='$CPP $CPPFLAGS'
17077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17079ac_compiler_gnu=$ac_cv_c_compiler_gnu
17080
17081else
17082  _lt_caught_CXX_error=yes
17083fi
17084
17085ac_ext=cpp
17086ac_cpp='$CXXCPP $CPPFLAGS'
17087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17090
17091archive_cmds_need_lc_CXX=no
17092allow_undefined_flag_CXX=
17093always_export_symbols_CXX=no
17094archive_expsym_cmds_CXX=
17095compiler_needs_object_CXX=no
17096export_dynamic_flag_spec_CXX=
17097hardcode_direct_CXX=no
17098hardcode_direct_absolute_CXX=no
17099hardcode_libdir_flag_spec_CXX=
17100hardcode_libdir_separator_CXX=
17101hardcode_minus_L_CXX=no
17102hardcode_shlibpath_var_CXX=unsupported
17103hardcode_automatic_CXX=no
17104inherit_rpath_CXX=no
17105module_cmds_CXX=
17106module_expsym_cmds_CXX=
17107link_all_deplibs_CXX=unknown
17108old_archive_cmds_CXX=$old_archive_cmds
17109reload_flag_CXX=$reload_flag
17110reload_cmds_CXX=$reload_cmds
17111no_undefined_flag_CXX=
17112whole_archive_flag_spec_CXX=
17113enable_shared_with_static_runtimes_CXX=no
17114
17115# Source file extension for C++ test sources.
17116ac_ext=cpp
17117
17118# Object file extension for compiled C++ test sources.
17119objext=o
17120objext_CXX=$objext
17121
17122# No sense in running all these tests if we already determined that
17123# the CXX compiler isn't working.  Some variables (like enable_shared)
17124# are currently assumed to apply to all compilers on this platform,
17125# and will be corrupted by setting them based on a non-working compiler.
17126if test yes != "$_lt_caught_CXX_error"; then
17127  # Code to be used in simple compile tests
17128  lt_simple_compile_test_code="int some_variable = 0;"
17129
17130  # Code to be used in simple link tests
17131  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
17132
17133  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
17134
17135
17136
17137
17138
17139
17140# If no C compiler was specified, use CC.
17141LTCC=${LTCC-"$CC"}
17142
17143# If no C compiler flags were specified, use CFLAGS.
17144LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17145
17146# Allow CC to be a program name with arguments.
17147compiler=$CC
17148
17149
17150  # save warnings/boilerplate of simple test code
17151  ac_outfile=conftest.$ac_objext
17152echo "$lt_simple_compile_test_code" >conftest.$ac_ext
17153eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17154_lt_compiler_boilerplate=`cat conftest.err`
17155$RM conftest*
17156
17157  ac_outfile=conftest.$ac_objext
17158echo "$lt_simple_link_test_code" >conftest.$ac_ext
17159eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17160_lt_linker_boilerplate=`cat conftest.err`
17161$RM -r conftest*
17162
17163
17164  # Allow CC to be a program name with arguments.
17165  lt_save_CC=$CC
17166  lt_save_CFLAGS=$CFLAGS
17167  lt_save_LD=$LD
17168  lt_save_GCC=$GCC
17169  GCC=$GXX
17170  lt_save_with_gnu_ld=$with_gnu_ld
17171  lt_save_path_LD=$lt_cv_path_LD
17172  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
17173    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
17174  else
17175    $as_unset lt_cv_prog_gnu_ld
17176  fi
17177  if test -n "${lt_cv_path_LDCXX+set}"; then
17178    lt_cv_path_LD=$lt_cv_path_LDCXX
17179  else
17180    $as_unset lt_cv_path_LD
17181  fi
17182  test -z "${LDCXX+set}" || LD=$LDCXX
17183  CC=${CXX-"c++"}
17184  CFLAGS=$CXXFLAGS
17185  compiler=$CC
17186  compiler_CXX=$CC
17187  func_cc_basename $compiler
17188cc_basename=$func_cc_basename_result
17189
17190
17191  if test -n "$compiler"; then
17192    # We don't want -fno-exception when compiling C++ code, so set the
17193    # no_builtin_flag separately
17194    if test yes = "$GXX"; then
17195      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
17196    else
17197      lt_prog_compiler_no_builtin_flag_CXX=
17198    fi
17199
17200    if test yes = "$GXX"; then
17201      # Set up default GNU C++ configuration
17202
17203
17204
17205# Check whether --with-gnu-ld was given.
17206if test "${with_gnu_ld+set}" = set; then :
17207  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
17208else
17209  with_gnu_ld=no
17210fi
17211
17212ac_prog=ld
17213if test yes = "$GCC"; then
17214  # Check if gcc -print-prog-name=ld gives a path.
17215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17216$as_echo_n "checking for ld used by $CC... " >&6; }
17217  case $host in
17218  *-*-mingw*)
17219    # gcc leaves a trailing carriage return, which upsets mingw
17220    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17221  *)
17222    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17223  esac
17224  case $ac_prog in
17225    # Accept absolute paths.
17226    [\\/]* | ?:[\\/]*)
17227      re_direlt='/[^/][^/]*/\.\./'
17228      # Canonicalize the pathname of ld
17229      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17230      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17231	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17232      done
17233      test -z "$LD" && LD=$ac_prog
17234      ;;
17235  "")
17236    # If it fails, then pretend we aren't using GCC.
17237    ac_prog=ld
17238    ;;
17239  *)
17240    # If it is relative, then search for the first ld in PATH.
17241    with_gnu_ld=unknown
17242    ;;
17243  esac
17244elif test yes = "$with_gnu_ld"; then
17245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17246$as_echo_n "checking for GNU ld... " >&6; }
17247else
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17249$as_echo_n "checking for non-GNU ld... " >&6; }
17250fi
17251if ${lt_cv_path_LD+:} false; then :
17252  $as_echo_n "(cached) " >&6
17253else
17254  if test -z "$LD"; then
17255  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
17256  for ac_dir in $PATH; do
17257    IFS=$lt_save_ifs
17258    test -z "$ac_dir" && ac_dir=.
17259    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17260      lt_cv_path_LD=$ac_dir/$ac_prog
17261      # Check to see if the program is GNU ld.  I'd rather use --version,
17262      # but apparently some variants of GNU ld only accept -v.
17263      # Break only if it was the GNU/non-GNU ld that we prefer.
17264      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17265      *GNU* | *'with BFD'*)
17266	test no != "$with_gnu_ld" && break
17267	;;
17268      *)
17269	test yes != "$with_gnu_ld" && break
17270	;;
17271      esac
17272    fi
17273  done
17274  IFS=$lt_save_ifs
17275else
17276  lt_cv_path_LD=$LD # Let the user override the test with a path.
17277fi
17278fi
17279
17280LD=$lt_cv_path_LD
17281if test -n "$LD"; then
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17283$as_echo "$LD" >&6; }
17284else
17285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17286$as_echo "no" >&6; }
17287fi
17288test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
17289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17290$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17291if ${lt_cv_prog_gnu_ld+:} false; then :
17292  $as_echo_n "(cached) " >&6
17293else
17294  # I'd rather use --version here, but apparently some GNU lds only accept -v.
17295case `$LD -v 2>&1 </dev/null` in
17296*GNU* | *'with BFD'*)
17297  lt_cv_prog_gnu_ld=yes
17298  ;;
17299*)
17300  lt_cv_prog_gnu_ld=no
17301  ;;
17302esac
17303fi
17304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17305$as_echo "$lt_cv_prog_gnu_ld" >&6; }
17306with_gnu_ld=$lt_cv_prog_gnu_ld
17307
17308
17309
17310
17311
17312
17313
17314      # Check if GNU C++ uses GNU ld as the underlying linker, since the
17315      # archiving commands below assume that GNU ld is being used.
17316      if test yes = "$with_gnu_ld"; then
17317        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
17318        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
17319
17320        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
17321        export_dynamic_flag_spec_CXX='$wl--export-dynamic'
17322
17323        # If archive_cmds runs LD, not CC, wlarc should be empty
17324        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
17325        #     investigate it a little bit more. (MM)
17326        wlarc='$wl'
17327
17328        # ancient GNU ld didn't support --whole-archive et. al.
17329        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
17330	  $GREP 'no-whole-archive' > /dev/null; then
17331          whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
17332        else
17333          whole_archive_flag_spec_CXX=
17334        fi
17335      else
17336        with_gnu_ld=no
17337        wlarc=
17338
17339        # A generic and very simple default shared library creation
17340        # command for GNU C++ for the case where it uses the native
17341        # linker, instead of GNU ld.  If possible, this setting should
17342        # overridden to take advantage of the native linker features on
17343        # the platform it is being used on.
17344        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
17345      fi
17346
17347      # Commands to make compiler produce verbose output that lists
17348      # what "hidden" libraries, object files and flags are used when
17349      # linking a shared library.
17350      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
17351
17352    else
17353      GXX=no
17354      with_gnu_ld=no
17355      wlarc=
17356    fi
17357
17358    # PORTME: fill in a description of your system's C++ link characteristics
17359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17360$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
17361    ld_shlibs_CXX=yes
17362    case $host_os in
17363      aix3*)
17364        # FIXME: insert proper C++ library support
17365        ld_shlibs_CXX=no
17366        ;;
17367      aix[4-9]*)
17368        if test ia64 = "$host_cpu"; then
17369          # On IA64, the linker does run time linking by default, so we don't
17370          # have to do anything special.
17371          aix_use_runtimelinking=no
17372          exp_sym_flag='-Bexport'
17373          no_entry_flag=
17374        else
17375          aix_use_runtimelinking=no
17376
17377          # Test if we are trying to use run time linking or normal
17378          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17379          # have runtime linking enabled, and use it for executables.
17380          # For shared libraries, we enable/disable runtime linking
17381          # depending on the kind of the shared library created -
17382          # when "with_aix_soname,aix_use_runtimelinking" is:
17383          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
17384          # "aix,yes"  lib.so          shared, rtl:yes, for executables
17385          #            lib.a           static archive
17386          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
17387          #            lib.a(lib.so.V) shared, rtl:no,  for executables
17388          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
17389          #            lib.a(lib.so.V) shared, rtl:no
17390          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
17391          #            lib.a           static archive
17392          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17393	    for ld_flag in $LDFLAGS; do
17394	      case $ld_flag in
17395	      *-brtl*)
17396	        aix_use_runtimelinking=yes
17397	        break
17398	        ;;
17399	      esac
17400	    done
17401	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
17402	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
17403	      # so we don't have lib.a shared libs to link our executables.
17404	      # We have to force runtime linking in this case.
17405	      aix_use_runtimelinking=yes
17406	      LDFLAGS="$LDFLAGS -Wl,-brtl"
17407	    fi
17408	    ;;
17409          esac
17410
17411          exp_sym_flag='-bexport'
17412          no_entry_flag='-bnoentry'
17413        fi
17414
17415        # When large executables or shared objects are built, AIX ld can
17416        # have problems creating the table of contents.  If linking a library
17417        # or program results in "error TOC overflow" add -mminimal-toc to
17418        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
17419        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17420
17421        archive_cmds_CXX=''
17422        hardcode_direct_CXX=yes
17423        hardcode_direct_absolute_CXX=yes
17424        hardcode_libdir_separator_CXX=':'
17425        link_all_deplibs_CXX=yes
17426        file_list_spec_CXX='$wl-f,'
17427        case $with_aix_soname,$aix_use_runtimelinking in
17428        aix,*) ;;	# no import file
17429        svr4,* | *,yes) # use import file
17430          # The Import File defines what to hardcode.
17431          hardcode_direct_CXX=no
17432          hardcode_direct_absolute_CXX=no
17433          ;;
17434        esac
17435
17436        if test yes = "$GXX"; then
17437          case $host_os in aix4.[012]|aix4.[012].*)
17438          # We only want to do this on AIX 4.2 and lower, the check
17439          # below for broken collect2 doesn't work under 4.3+
17440	  collect2name=`$CC -print-prog-name=collect2`
17441	  if test -f "$collect2name" &&
17442	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17443	  then
17444	    # We have reworked collect2
17445	    :
17446	  else
17447	    # We have old collect2
17448	    hardcode_direct_CXX=unsupported
17449	    # It fails to find uninstalled libraries when the uninstalled
17450	    # path is not listed in the libpath.  Setting hardcode_minus_L
17451	    # to unsupported forces relinking
17452	    hardcode_minus_L_CXX=yes
17453	    hardcode_libdir_flag_spec_CXX='-L$libdir'
17454	    hardcode_libdir_separator_CXX=
17455	  fi
17456          esac
17457          shared_flag='-shared'
17458	  if test yes = "$aix_use_runtimelinking"; then
17459	    shared_flag=$shared_flag' $wl-G'
17460	  fi
17461	  # Need to ensure runtime linking is disabled for the traditional
17462	  # shared library, or the linker may eventually find shared libraries
17463	  # /with/ Import File - we do not want to mix them.
17464	  shared_flag_aix='-shared'
17465	  shared_flag_svr4='-shared $wl-G'
17466        else
17467          # not using gcc
17468          if test ia64 = "$host_cpu"; then
17469	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17470	  # chokes on -Wl,-G. The following line is correct:
17471	  shared_flag='-G'
17472          else
17473	    if test yes = "$aix_use_runtimelinking"; then
17474	      shared_flag='$wl-G'
17475	    else
17476	      shared_flag='$wl-bM:SRE'
17477	    fi
17478	    shared_flag_aix='$wl-bM:SRE'
17479	    shared_flag_svr4='$wl-G'
17480          fi
17481        fi
17482
17483        export_dynamic_flag_spec_CXX='$wl-bexpall'
17484        # It seems that -bexpall does not export symbols beginning with
17485        # underscore (_), so it is better to generate a list of symbols to
17486	# export.
17487        always_export_symbols_CXX=yes
17488	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
17489          # Warning - without using the other runtime loading flags (-brtl),
17490          # -berok will link without error, but may produce a broken library.
17491          # The "-G" linker flag allows undefined symbols.
17492          no_undefined_flag_CXX='-bernotok'
17493          # Determine the default libpath from the value encoded in an empty
17494          # executable.
17495          if test set = "${lt_cv_aix_libpath+set}"; then
17496  aix_libpath=$lt_cv_aix_libpath
17497else
17498  if ${lt_cv_aix_libpath__CXX+:} false; then :
17499  $as_echo_n "(cached) " >&6
17500else
17501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17502/* end confdefs.h.  */
17503
17504int
17505main ()
17506{
17507
17508  ;
17509  return 0;
17510}
17511_ACEOF
17512if ac_fn_cxx_try_link "$LINENO"; then :
17513
17514  lt_aix_libpath_sed='
17515      /Import File Strings/,/^$/ {
17516	  /^0/ {
17517	      s/^0  *\([^ ]*\) *$/\1/
17518	      p
17519	  }
17520      }'
17521  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17522  # Check for a 64-bit object if we didn't find anything.
17523  if test -z "$lt_cv_aix_libpath__CXX"; then
17524    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17525  fi
17526fi
17527rm -f core conftest.err conftest.$ac_objext \
17528    conftest$ac_exeext conftest.$ac_ext
17529  if test -z "$lt_cv_aix_libpath__CXX"; then
17530    lt_cv_aix_libpath__CXX=/usr/lib:/lib
17531  fi
17532
17533fi
17534
17535  aix_libpath=$lt_cv_aix_libpath__CXX
17536fi
17537
17538          hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
17539
17540          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
17541        else
17542          if test ia64 = "$host_cpu"; then
17543	    hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
17544	    allow_undefined_flag_CXX="-z nodefs"
17545	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
17546          else
17547	    # Determine the default libpath from the value encoded in an
17548	    # empty executable.
17549	    if test set = "${lt_cv_aix_libpath+set}"; then
17550  aix_libpath=$lt_cv_aix_libpath
17551else
17552  if ${lt_cv_aix_libpath__CXX+:} false; then :
17553  $as_echo_n "(cached) " >&6
17554else
17555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17556/* end confdefs.h.  */
17557
17558int
17559main ()
17560{
17561
17562  ;
17563  return 0;
17564}
17565_ACEOF
17566if ac_fn_cxx_try_link "$LINENO"; then :
17567
17568  lt_aix_libpath_sed='
17569      /Import File Strings/,/^$/ {
17570	  /^0/ {
17571	      s/^0  *\([^ ]*\) *$/\1/
17572	      p
17573	  }
17574      }'
17575  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17576  # Check for a 64-bit object if we didn't find anything.
17577  if test -z "$lt_cv_aix_libpath__CXX"; then
17578    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17579  fi
17580fi
17581rm -f core conftest.err conftest.$ac_objext \
17582    conftest$ac_exeext conftest.$ac_ext
17583  if test -z "$lt_cv_aix_libpath__CXX"; then
17584    lt_cv_aix_libpath__CXX=/usr/lib:/lib
17585  fi
17586
17587fi
17588
17589  aix_libpath=$lt_cv_aix_libpath__CXX
17590fi
17591
17592	    hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
17593	    # Warning - without using the other run time loading flags,
17594	    # -berok will link without error, but may produce a broken library.
17595	    no_undefined_flag_CXX=' $wl-bernotok'
17596	    allow_undefined_flag_CXX=' $wl-berok'
17597	    if test yes = "$with_gnu_ld"; then
17598	      # We only use this code for GNU lds that support --whole-archive.
17599	      whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
17600	    else
17601	      # Exported symbols can be pulled into shared objects from archives
17602	      whole_archive_flag_spec_CXX='$convenience'
17603	    fi
17604	    archive_cmds_need_lc_CXX=yes
17605	    archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
17606	    # -brtl affects multiple linker settings, -berok does not and is overridden later
17607	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
17608	    if test svr4 != "$with_aix_soname"; then
17609	      # This is similar to how AIX traditionally builds its shared
17610	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
17611	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
17612	    fi
17613	    if test aix != "$with_aix_soname"; then
17614	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
17615	    else
17616	      # used by -dlpreopen to get the symbols
17617	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
17618	    fi
17619	    archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
17620          fi
17621        fi
17622        ;;
17623
17624      beos*)
17625	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17626	  allow_undefined_flag_CXX=unsupported
17627	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17628	  # support --undefined.  This deserves some investigation.  FIXME
17629	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17630	else
17631	  ld_shlibs_CXX=no
17632	fi
17633	;;
17634
17635      chorus*)
17636        case $cc_basename in
17637          *)
17638	  # FIXME: insert proper C++ library support
17639	  ld_shlibs_CXX=no
17640	  ;;
17641        esac
17642        ;;
17643
17644      cygwin* | mingw* | pw32* | cegcc*)
17645	case $GXX,$cc_basename in
17646	,cl* | no,cl*)
17647	  # Native MSVC
17648	  # hardcode_libdir_flag_spec is actually meaningless, as there is
17649	  # no search path for DLLs.
17650	  hardcode_libdir_flag_spec_CXX=' '
17651	  allow_undefined_flag_CXX=unsupported
17652	  always_export_symbols_CXX=yes
17653	  file_list_spec_CXX='@'
17654	  # Tell ltmain to make .lib files, not .a files.
17655	  libext=lib
17656	  # Tell ltmain to make .dll files, not .so files.
17657	  shrext_cmds=.dll
17658	  # FIXME: Setting linknames here is a bad hack.
17659	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
17660	  archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
17661              cp "$export_symbols" "$output_objdir/$soname.def";
17662              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
17663            else
17664              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
17665            fi~
17666            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
17667            linknames='
17668	  # The linker will not automatically build a static lib if we build a DLL.
17669	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
17670	  enable_shared_with_static_runtimes_CXX=yes
17671	  # Don't use ranlib
17672	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
17673	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
17674            lt_tool_outputfile="@TOOL_OUTPUT@"~
17675            case $lt_outputfile in
17676              *.exe|*.EXE) ;;
17677              *)
17678                lt_outputfile=$lt_outputfile.exe
17679                lt_tool_outputfile=$lt_tool_outputfile.exe
17680                ;;
17681            esac~
17682            func_to_tool_file "$lt_outputfile"~
17683            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
17684              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
17685              $RM "$lt_outputfile.manifest";
17686            fi'
17687	  ;;
17688	*)
17689	  # g++
17690	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
17691	  # as there is no search path for DLLs.
17692	  hardcode_libdir_flag_spec_CXX='-L$libdir'
17693	  export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
17694	  allow_undefined_flag_CXX=unsupported
17695	  always_export_symbols_CXX=no
17696	  enable_shared_with_static_runtimes_CXX=yes
17697
17698	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17699	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17700	    # If the export-symbols file already is a .def file, use it as
17701	    # is; otherwise, prepend EXPORTS...
17702	    archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
17703              cp $export_symbols $output_objdir/$soname.def;
17704            else
17705              echo EXPORTS > $output_objdir/$soname.def;
17706              cat $export_symbols >> $output_objdir/$soname.def;
17707            fi~
17708            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17709	  else
17710	    ld_shlibs_CXX=no
17711	  fi
17712	  ;;
17713	esac
17714	;;
17715      darwin* | rhapsody*)
17716
17717
17718  archive_cmds_need_lc_CXX=no
17719  hardcode_direct_CXX=no
17720  hardcode_automatic_CXX=yes
17721  hardcode_shlibpath_var_CXX=unsupported
17722  if test yes = "$lt_cv_ld_force_load"; then
17723    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
17724
17725  else
17726    whole_archive_flag_spec_CXX=''
17727  fi
17728  link_all_deplibs_CXX=yes
17729  allow_undefined_flag_CXX=$_lt_dar_allow_undefined
17730  case $cc_basename in
17731     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
17732     *) _lt_dar_can_shared=$GCC ;;
17733  esac
17734  if test yes = "$_lt_dar_can_shared"; then
17735    output_verbose_link_cmd=func_echo_all
17736    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
17737    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
17738    archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
17739    module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
17740       if test yes != "$lt_cv_apple_cc_single_mod"; then
17741      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
17742      archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
17743    fi
17744
17745  else
17746  ld_shlibs_CXX=no
17747  fi
17748
17749	;;
17750
17751      os2*)
17752	hardcode_libdir_flag_spec_CXX='-L$libdir'
17753	hardcode_minus_L_CXX=yes
17754	allow_undefined_flag_CXX=unsupported
17755	shrext_cmds=.dll
17756	archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17757	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17758	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17759	  $ECHO EXPORTS >> $output_objdir/$libname.def~
17760	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
17761	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17762	  emximp -o $lib $output_objdir/$libname.def'
17763	archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17764	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17765	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17766	  $ECHO EXPORTS >> $output_objdir/$libname.def~
17767	  prefix_cmds="$SED"~
17768	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
17769	    prefix_cmds="$prefix_cmds -e 1d";
17770	  fi~
17771	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
17772	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
17773	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17774	  emximp -o $lib $output_objdir/$libname.def'
17775	old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
17776	enable_shared_with_static_runtimes_CXX=yes
17777	;;
17778
17779      dgux*)
17780        case $cc_basename in
17781          ec++*)
17782	    # FIXME: insert proper C++ library support
17783	    ld_shlibs_CXX=no
17784	    ;;
17785          ghcx*)
17786	    # Green Hills C++ Compiler
17787	    # FIXME: insert proper C++ library support
17788	    ld_shlibs_CXX=no
17789	    ;;
17790          *)
17791	    # FIXME: insert proper C++ library support
17792	    ld_shlibs_CXX=no
17793	    ;;
17794        esac
17795        ;;
17796
17797      freebsd2.*)
17798        # C++ shared libraries reported to be fairly broken before
17799	# switch to ELF
17800        ld_shlibs_CXX=no
17801        ;;
17802
17803      freebsd-elf*)
17804        archive_cmds_need_lc_CXX=no
17805        ;;
17806
17807      freebsd* | dragonfly*)
17808        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
17809        # conventions
17810        ld_shlibs_CXX=yes
17811        ;;
17812
17813      haiku*)
17814        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17815        link_all_deplibs_CXX=yes
17816        ;;
17817
17818      hpux9*)
17819        hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
17820        hardcode_libdir_separator_CXX=:
17821        export_dynamic_flag_spec_CXX='$wl-E'
17822        hardcode_direct_CXX=yes
17823        hardcode_minus_L_CXX=yes # Not in the search PATH,
17824				             # but as the default
17825				             # location of the library.
17826
17827        case $cc_basename in
17828          CC*)
17829            # FIXME: insert proper C++ library support
17830            ld_shlibs_CXX=no
17831            ;;
17832          aCC*)
17833            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17834            # Commands to make compiler produce verbose output that lists
17835            # what "hidden" libraries, object files and flags are used when
17836            # linking a shared library.
17837            #
17838            # There doesn't appear to be a way to prevent this compiler from
17839            # explicitly linking system object files so we need to strip them
17840            # from the output so that they don't get included in the library
17841            # dependencies.
17842            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
17843            ;;
17844          *)
17845            if test yes = "$GXX"; then
17846              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17847            else
17848              # FIXME: insert proper C++ library support
17849              ld_shlibs_CXX=no
17850            fi
17851            ;;
17852        esac
17853        ;;
17854
17855      hpux10*|hpux11*)
17856        if test no = "$with_gnu_ld"; then
17857	  hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
17858	  hardcode_libdir_separator_CXX=:
17859
17860          case $host_cpu in
17861            hppa*64*|ia64*)
17862              ;;
17863            *)
17864	      export_dynamic_flag_spec_CXX='$wl-E'
17865              ;;
17866          esac
17867        fi
17868        case $host_cpu in
17869          hppa*64*|ia64*)
17870            hardcode_direct_CXX=no
17871            hardcode_shlibpath_var_CXX=no
17872            ;;
17873          *)
17874            hardcode_direct_CXX=yes
17875            hardcode_direct_absolute_CXX=yes
17876            hardcode_minus_L_CXX=yes # Not in the search PATH,
17877					         # but as the default
17878					         # location of the library.
17879            ;;
17880        esac
17881
17882        case $cc_basename in
17883          CC*)
17884	    # FIXME: insert proper C++ library support
17885	    ld_shlibs_CXX=no
17886	    ;;
17887          aCC*)
17888	    case $host_cpu in
17889	      hppa*64*)
17890	        archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17891	        ;;
17892	      ia64*)
17893	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17894	        ;;
17895	      *)
17896	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17897	        ;;
17898	    esac
17899	    # Commands to make compiler produce verbose output that lists
17900	    # what "hidden" libraries, object files and flags are used when
17901	    # linking a shared library.
17902	    #
17903	    # There doesn't appear to be a way to prevent this compiler from
17904	    # explicitly linking system object files so we need to strip them
17905	    # from the output so that they don't get included in the library
17906	    # dependencies.
17907	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
17908	    ;;
17909          *)
17910	    if test yes = "$GXX"; then
17911	      if test no = "$with_gnu_ld"; then
17912	        case $host_cpu in
17913	          hppa*64*)
17914	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17915	            ;;
17916	          ia64*)
17917	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17918	            ;;
17919	          *)
17920	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
17921	            ;;
17922	        esac
17923	      fi
17924	    else
17925	      # FIXME: insert proper C++ library support
17926	      ld_shlibs_CXX=no
17927	    fi
17928	    ;;
17929        esac
17930        ;;
17931
17932      interix[3-9]*)
17933	hardcode_direct_CXX=no
17934	hardcode_shlibpath_var_CXX=no
17935	hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17936	export_dynamic_flag_spec_CXX='$wl-E'
17937	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17938	# Instead, shared libraries are loaded at an image base (0x10000000 by
17939	# default) and relocated if they conflict, which is a slow very memory
17940	# consuming and fragmenting process.  To avoid this, we pick a random,
17941	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17942	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
17943	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17944	archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17945	;;
17946      irix5* | irix6*)
17947        case $cc_basename in
17948          CC*)
17949	    # SGI C++
17950	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17951
17952	    # Archives containing C++ object files must be created using
17953	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
17954	    # necessary to make sure instantiated templates are included
17955	    # in the archive.
17956	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
17957	    ;;
17958          *)
17959	    if test yes = "$GXX"; then
17960	      if test no = "$with_gnu_ld"; then
17961	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17962	      else
17963	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
17964	      fi
17965	    fi
17966	    link_all_deplibs_CXX=yes
17967	    ;;
17968        esac
17969        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
17970        hardcode_libdir_separator_CXX=:
17971        inherit_rpath_CXX=yes
17972        ;;
17973
17974      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
17975        case $cc_basename in
17976          KCC*)
17977	    # Kuck and Associates, Inc. (KAI) C++ Compiler
17978
17979	    # KCC will only create a shared library if the output file
17980	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
17981	    # to its proper name (with version) after linking.
17982	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
17983	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
17984	    # Commands to make compiler produce verbose output that lists
17985	    # what "hidden" libraries, object files and flags are used when
17986	    # linking a shared library.
17987	    #
17988	    # There doesn't appear to be a way to prevent this compiler from
17989	    # explicitly linking system object files so we need to strip them
17990	    # from the output so that they don't get included in the library
17991	    # dependencies.
17992	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
17993
17994	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
17995	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
17996
17997	    # Archives containing C++ object files must be created using
17998	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
17999	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
18000	    ;;
18001	  icpc* | ecpc* )
18002	    # Intel C++
18003	    with_gnu_ld=yes
18004	    # version 8.0 and above of icpc choke on multiply defined symbols
18005	    # if we add $predep_objects and $postdep_objects, however 7.1 and
18006	    # earlier do not add the objects themselves.
18007	    case `$CC -V 2>&1` in
18008	      *"Version 7."*)
18009	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
18010		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
18011		;;
18012	      *)  # Version 8.0 or newer
18013	        tmp_idyn=
18014	        case $host_cpu in
18015		  ia64*) tmp_idyn=' -i_dynamic';;
18016		esac
18017	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
18018		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
18019		;;
18020	    esac
18021	    archive_cmds_need_lc_CXX=no
18022	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
18023	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
18024	    whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
18025	    ;;
18026          pgCC* | pgcpp*)
18027            # Portland Group C++ compiler
18028	    case `$CC -V` in
18029	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
18030	      prelink_cmds_CXX='tpldir=Template.dir~
18031               rm -rf $tpldir~
18032               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
18033               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
18034	      old_archive_cmds_CXX='tpldir=Template.dir~
18035                rm -rf $tpldir~
18036                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
18037                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
18038                $RANLIB $oldlib'
18039	      archive_cmds_CXX='tpldir=Template.dir~
18040                rm -rf $tpldir~
18041                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18042                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
18043	      archive_expsym_cmds_CXX='tpldir=Template.dir~
18044                rm -rf $tpldir~
18045                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
18046                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
18047	      ;;
18048	    *) # Version 6 and above use weak symbols
18049	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
18050	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
18051	      ;;
18052	    esac
18053
18054	    hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
18055	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
18056	    whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
18057            ;;
18058	  cxx*)
18059	    # Compaq C++
18060	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
18061	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
18062
18063	    runpath_var=LD_RUN_PATH
18064	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18065	    hardcode_libdir_separator_CXX=:
18066
18067	    # Commands to make compiler produce verbose output that lists
18068	    # what "hidden" libraries, object files and flags are used when
18069	    # linking a shared library.
18070	    #
18071	    # There doesn't appear to be a way to prevent this compiler from
18072	    # explicitly linking system object files so we need to strip them
18073	    # from the output so that they don't get included in the library
18074	    # dependencies.
18075	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
18076	    ;;
18077	  xl* | mpixl* | bgxl*)
18078	    # IBM XL 8.0 on PPC, with GNU ld
18079	    hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
18080	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
18081	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
18082	    if test yes = "$supports_anon_versioning"; then
18083	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
18084                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18085                echo "local: *; };" >> $output_objdir/$libname.ver~
18086                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
18087	    fi
18088	    ;;
18089	  *)
18090	    case `$CC -V 2>&1 | sed 5q` in
18091	    *Sun\ C*)
18092	      # Sun C++ 5.9
18093	      no_undefined_flag_CXX=' -zdefs'
18094	      archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18095	      archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
18096	      hardcode_libdir_flag_spec_CXX='-R$libdir'
18097	      whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
18098	      compiler_needs_object_CXX=yes
18099
18100	      # Not sure whether something based on
18101	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
18102	      # would be better.
18103	      output_verbose_link_cmd='func_echo_all'
18104
18105	      # Archives containing C++ object files must be created using
18106	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
18107	      # necessary to make sure instantiated templates are included
18108	      # in the archive.
18109	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18110	      ;;
18111	    esac
18112	    ;;
18113	esac
18114	;;
18115
18116      lynxos*)
18117        # FIXME: insert proper C++ library support
18118	ld_shlibs_CXX=no
18119	;;
18120
18121      m88k*)
18122        # FIXME: insert proper C++ library support
18123        ld_shlibs_CXX=no
18124	;;
18125
18126      mvs*)
18127        case $cc_basename in
18128          cxx*)
18129	    # FIXME: insert proper C++ library support
18130	    ld_shlibs_CXX=no
18131	    ;;
18132	  *)
18133	    # FIXME: insert proper C++ library support
18134	    ld_shlibs_CXX=no
18135	    ;;
18136	esac
18137	;;
18138
18139      netbsd*)
18140        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18141	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
18142	  wlarc=
18143	  hardcode_libdir_flag_spec_CXX='-R$libdir'
18144	  hardcode_direct_CXX=yes
18145	  hardcode_shlibpath_var_CXX=no
18146	fi
18147	# Workaround some broken pre-1.5 toolchains
18148	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
18149	;;
18150
18151      *nto* | *qnx*)
18152        ld_shlibs_CXX=yes
18153	;;
18154
18155      openbsd* | bitrig*)
18156	if test -f /usr/libexec/ld.so; then
18157	  hardcode_direct_CXX=yes
18158	  hardcode_shlibpath_var_CXX=no
18159	  hardcode_direct_absolute_CXX=yes
18160	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
18161	  hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
18162	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
18163	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
18164	    export_dynamic_flag_spec_CXX='$wl-E'
18165	    whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
18166	  fi
18167	  output_verbose_link_cmd=func_echo_all
18168	else
18169	  ld_shlibs_CXX=no
18170	fi
18171	;;
18172
18173      osf3* | osf4* | osf5*)
18174        case $cc_basename in
18175          KCC*)
18176	    # Kuck and Associates, Inc. (KAI) C++ Compiler
18177
18178	    # KCC will only create a shared library if the output file
18179	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
18180	    # to its proper name (with version) after linking.
18181	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
18182
18183	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
18184	    hardcode_libdir_separator_CXX=:
18185
18186	    # Archives containing C++ object files must be created using
18187	    # the KAI C++ compiler.
18188	    case $host in
18189	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
18190	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
18191	    esac
18192	    ;;
18193          RCC*)
18194	    # Rational C++ 2.4.1
18195	    # FIXME: insert proper C++ library support
18196	    ld_shlibs_CXX=no
18197	    ;;
18198          cxx*)
18199	    case $host in
18200	      osf3*)
18201	        allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
18202	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
18203	        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
18204		;;
18205	      *)
18206	        allow_undefined_flag_CXX=' -expect_unresolved \*'
18207	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
18208	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
18209                  echo "-hidden">> $lib.exp~
18210                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
18211                  $RM $lib.exp'
18212	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
18213		;;
18214	    esac
18215
18216	    hardcode_libdir_separator_CXX=:
18217
18218	    # Commands to make compiler produce verbose output that lists
18219	    # what "hidden" libraries, object files and flags are used when
18220	    # linking a shared library.
18221	    #
18222	    # There doesn't appear to be a way to prevent this compiler from
18223	    # explicitly linking system object files so we need to strip them
18224	    # from the output so that they don't get included in the library
18225	    # dependencies.
18226	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
18227	    ;;
18228	  *)
18229	    if test yes,no = "$GXX,$with_gnu_ld"; then
18230	      allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
18231	      case $host in
18232	        osf3*)
18233	          archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
18234		  ;;
18235	        *)
18236	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
18237		  ;;
18238	      esac
18239
18240	      hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
18241	      hardcode_libdir_separator_CXX=:
18242
18243	      # Commands to make compiler produce verbose output that lists
18244	      # what "hidden" libraries, object files and flags are used when
18245	      # linking a shared library.
18246	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
18247
18248	    else
18249	      # FIXME: insert proper C++ library support
18250	      ld_shlibs_CXX=no
18251	    fi
18252	    ;;
18253        esac
18254        ;;
18255
18256      psos*)
18257        # FIXME: insert proper C++ library support
18258        ld_shlibs_CXX=no
18259        ;;
18260
18261      sunos4*)
18262        case $cc_basename in
18263          CC*)
18264	    # Sun C++ 4.x
18265	    # FIXME: insert proper C++ library support
18266	    ld_shlibs_CXX=no
18267	    ;;
18268          lcc*)
18269	    # Lucid
18270	    # FIXME: insert proper C++ library support
18271	    ld_shlibs_CXX=no
18272	    ;;
18273          *)
18274	    # FIXME: insert proper C++ library support
18275	    ld_shlibs_CXX=no
18276	    ;;
18277        esac
18278        ;;
18279
18280      solaris*)
18281        case $cc_basename in
18282          CC* | sunCC*)
18283	    # Sun C++ 4.2, 5.x and Centerline C++
18284            archive_cmds_need_lc_CXX=yes
18285	    no_undefined_flag_CXX=' -zdefs'
18286	    archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
18287	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18288              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18289
18290	    hardcode_libdir_flag_spec_CXX='-R$libdir'
18291	    hardcode_shlibpath_var_CXX=no
18292	    case $host_os in
18293	      solaris2.[0-5] | solaris2.[0-5].*) ;;
18294	      *)
18295		# The compiler driver will combine and reorder linker options,
18296		# but understands '-z linker_flag'.
18297	        # Supported since Solaris 2.6 (maybe 2.5.1?)
18298		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
18299	        ;;
18300	    esac
18301	    link_all_deplibs_CXX=yes
18302
18303	    output_verbose_link_cmd='func_echo_all'
18304
18305	    # Archives containing C++ object files must be created using
18306	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
18307	    # necessary to make sure instantiated templates are included
18308	    # in the archive.
18309	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
18310	    ;;
18311          gcx*)
18312	    # Green Hills C++ Compiler
18313	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
18314
18315	    # The C++ compiler must be used to create the archive.
18316	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
18317	    ;;
18318          *)
18319	    # GNU C++ compiler with Solaris linker
18320	    if test yes,no = "$GXX,$with_gnu_ld"; then
18321	      no_undefined_flag_CXX=' $wl-z ${wl}defs'
18322	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
18323	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
18324	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18325                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18326
18327	        # Commands to make compiler produce verbose output that lists
18328	        # what "hidden" libraries, object files and flags are used when
18329	        # linking a shared library.
18330	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
18331	      else
18332	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
18333	        # platform.
18334	        archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
18335	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18336                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
18337
18338	        # Commands to make compiler produce verbose output that lists
18339	        # what "hidden" libraries, object files and flags are used when
18340	        # linking a shared library.
18341	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
18342	      fi
18343
18344	      hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
18345	      case $host_os in
18346		solaris2.[0-5] | solaris2.[0-5].*) ;;
18347		*)
18348		  whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
18349		  ;;
18350	      esac
18351	    fi
18352	    ;;
18353        esac
18354        ;;
18355
18356    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18357      no_undefined_flag_CXX='$wl-z,text'
18358      archive_cmds_need_lc_CXX=no
18359      hardcode_shlibpath_var_CXX=no
18360      runpath_var='LD_RUN_PATH'
18361
18362      case $cc_basename in
18363        CC*)
18364	  archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18365	  archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18366	  ;;
18367	*)
18368	  archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18369	  archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18370	  ;;
18371      esac
18372      ;;
18373
18374      sysv5* | sco3.2v5* | sco5v6*)
18375	# Note: We CANNOT use -z defs as we might desire, because we do not
18376	# link with -lc, and that would cause any symbols used from libc to
18377	# always be unresolved, which means just about no library would
18378	# ever link correctly.  If we're not using GNU ld we use -z text
18379	# though, which does catch some bad symbols but isn't as heavy-handed
18380	# as -z defs.
18381	no_undefined_flag_CXX='$wl-z,text'
18382	allow_undefined_flag_CXX='$wl-z,nodefs'
18383	archive_cmds_need_lc_CXX=no
18384	hardcode_shlibpath_var_CXX=no
18385	hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
18386	hardcode_libdir_separator_CXX=':'
18387	link_all_deplibs_CXX=yes
18388	export_dynamic_flag_spec_CXX='$wl-Bexport'
18389	runpath_var='LD_RUN_PATH'
18390
18391	case $cc_basename in
18392          CC*)
18393	    archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18394	    archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18395	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
18396              '"$old_archive_cmds_CXX"
18397	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
18398              '"$reload_cmds_CXX"
18399	    ;;
18400	  *)
18401	    archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18402	    archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18403	    ;;
18404	esac
18405      ;;
18406
18407      tandem*)
18408        case $cc_basename in
18409          NCC*)
18410	    # NonStop-UX NCC 3.20
18411	    # FIXME: insert proper C++ library support
18412	    ld_shlibs_CXX=no
18413	    ;;
18414          *)
18415	    # FIXME: insert proper C++ library support
18416	    ld_shlibs_CXX=no
18417	    ;;
18418        esac
18419        ;;
18420
18421      vxworks*)
18422        # FIXME: insert proper C++ library support
18423        ld_shlibs_CXX=no
18424        ;;
18425
18426      *)
18427        # FIXME: insert proper C++ library support
18428        ld_shlibs_CXX=no
18429        ;;
18430    esac
18431
18432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
18433$as_echo "$ld_shlibs_CXX" >&6; }
18434    test no = "$ld_shlibs_CXX" && can_build_shared=no
18435
18436    GCC_CXX=$GXX
18437    LD_CXX=$LD
18438
18439    ## CAVEAT EMPTOR:
18440    ## There is no encapsulation within the following macros, do not change
18441    ## the running order or otherwise move them around unless you know exactly
18442    ## what you are doing...
18443    # Dependencies to place before and after the object being linked:
18444predep_objects_CXX=
18445postdep_objects_CXX=
18446predeps_CXX=
18447postdeps_CXX=
18448compiler_lib_search_path_CXX=
18449
18450cat > conftest.$ac_ext <<_LT_EOF
18451class Foo
18452{
18453public:
18454  Foo (void) { a = 0; }
18455private:
18456  int a;
18457};
18458_LT_EOF
18459
18460
18461_lt_libdeps_save_CFLAGS=$CFLAGS
18462case "$CC $CFLAGS " in #(
18463*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
18464*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
18465*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
18466esac
18467
18468if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18469  (eval $ac_compile) 2>&5
18470  ac_status=$?
18471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18472  test $ac_status = 0; }; then
18473  # Parse the compiler output and extract the necessary
18474  # objects, libraries and library flags.
18475
18476  # Sentinel used to keep track of whether or not we are before
18477  # the conftest object file.
18478  pre_test_object_deps_done=no
18479
18480  for p in `eval "$output_verbose_link_cmd"`; do
18481    case $prev$p in
18482
18483    -L* | -R* | -l*)
18484       # Some compilers place space between "-{L,R}" and the path.
18485       # Remove the space.
18486       if test x-L = "$p" ||
18487          test x-R = "$p"; then
18488	 prev=$p
18489	 continue
18490       fi
18491
18492       # Expand the sysroot to ease extracting the directories later.
18493       if test -z "$prev"; then
18494         case $p in
18495         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
18496         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
18497         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
18498         esac
18499       fi
18500       case $p in
18501       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
18502       esac
18503       if test no = "$pre_test_object_deps_done"; then
18504	 case $prev in
18505	 -L | -R)
18506	   # Internal compiler library paths should come after those
18507	   # provided the user.  The postdeps already come after the
18508	   # user supplied libs so there is no need to process them.
18509	   if test -z "$compiler_lib_search_path_CXX"; then
18510	     compiler_lib_search_path_CXX=$prev$p
18511	   else
18512	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
18513	   fi
18514	   ;;
18515	 # The "-l" case would never come before the object being
18516	 # linked, so don't bother handling this case.
18517	 esac
18518       else
18519	 if test -z "$postdeps_CXX"; then
18520	   postdeps_CXX=$prev$p
18521	 else
18522	   postdeps_CXX="${postdeps_CXX} $prev$p"
18523	 fi
18524       fi
18525       prev=
18526       ;;
18527
18528    *.lto.$objext) ;; # Ignore GCC LTO objects
18529    *.$objext)
18530       # This assumes that the test object file only shows up
18531       # once in the compiler output.
18532       if test "$p" = "conftest.$objext"; then
18533	 pre_test_object_deps_done=yes
18534	 continue
18535       fi
18536
18537       if test no = "$pre_test_object_deps_done"; then
18538	 if test -z "$predep_objects_CXX"; then
18539	   predep_objects_CXX=$p
18540	 else
18541	   predep_objects_CXX="$predep_objects_CXX $p"
18542	 fi
18543       else
18544	 if test -z "$postdep_objects_CXX"; then
18545	   postdep_objects_CXX=$p
18546	 else
18547	   postdep_objects_CXX="$postdep_objects_CXX $p"
18548	 fi
18549       fi
18550       ;;
18551
18552    *) ;; # Ignore the rest.
18553
18554    esac
18555  done
18556
18557  # Clean up.
18558  rm -f a.out a.exe
18559else
18560  echo "libtool.m4: error: problem compiling CXX test program"
18561fi
18562
18563$RM -f confest.$objext
18564CFLAGS=$_lt_libdeps_save_CFLAGS
18565
18566# PORTME: override above test on systems where it is broken
18567case $host_os in
18568interix[3-9]*)
18569  # Interix 3.5 installs completely hosed .la files for C++, so rather than
18570  # hack all around it, let's just trust "g++" to DTRT.
18571  predep_objects_CXX=
18572  postdep_objects_CXX=
18573  postdeps_CXX=
18574  ;;
18575esac
18576
18577
18578case " $postdeps_CXX " in
18579*" -lc "*) archive_cmds_need_lc_CXX=no ;;
18580esac
18581 compiler_lib_search_dirs_CXX=
18582if test -n "${compiler_lib_search_path_CXX}"; then
18583 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
18584fi
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616    lt_prog_compiler_wl_CXX=
18617lt_prog_compiler_pic_CXX=
18618lt_prog_compiler_static_CXX=
18619
18620
18621  # C++ specific cases for pic, static, wl, etc.
18622  if test yes = "$GXX"; then
18623    lt_prog_compiler_wl_CXX='-Wl,'
18624    lt_prog_compiler_static_CXX='-static'
18625
18626    case $host_os in
18627    aix*)
18628      # All AIX code is PIC.
18629      if test ia64 = "$host_cpu"; then
18630	# AIX 5 now supports IA64 processor
18631	lt_prog_compiler_static_CXX='-Bstatic'
18632      fi
18633      lt_prog_compiler_pic_CXX='-fPIC'
18634      ;;
18635
18636    amigaos*)
18637      case $host_cpu in
18638      powerpc)
18639            # see comment about AmigaOS4 .so support
18640            lt_prog_compiler_pic_CXX='-fPIC'
18641        ;;
18642      m68k)
18643            # FIXME: we need at least 68020 code to build shared libraries, but
18644            # adding the '-m68020' flag to GCC prevents building anything better,
18645            # like '-m68040'.
18646            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
18647        ;;
18648      esac
18649      ;;
18650
18651    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
18652      # PIC is the default for these OSes.
18653      ;;
18654    mingw* | cygwin* | os2* | pw32* | cegcc*)
18655      # This hack is so that the source file can tell whether it is being
18656      # built for inclusion in a dll (and should export symbols for example).
18657      # Although the cygwin gcc ignores -fPIC, still need this for old-style
18658      # (--disable-auto-import) libraries
18659      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
18660      case $host_os in
18661      os2*)
18662	lt_prog_compiler_static_CXX='$wl-static'
18663	;;
18664      esac
18665      ;;
18666    darwin* | rhapsody*)
18667      # PIC is the default on this platform
18668      # Common symbols not allowed in MH_DYLIB files
18669      lt_prog_compiler_pic_CXX='-fno-common'
18670      ;;
18671    *djgpp*)
18672      # DJGPP does not support shared libraries at all
18673      lt_prog_compiler_pic_CXX=
18674      ;;
18675    haiku*)
18676      # PIC is the default for Haiku.
18677      # The "-static" flag exists, but is broken.
18678      lt_prog_compiler_static_CXX=
18679      ;;
18680    interix[3-9]*)
18681      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
18682      # Instead, we relocate shared libraries at runtime.
18683      ;;
18684    sysv4*MP*)
18685      if test -d /usr/nec; then
18686	lt_prog_compiler_pic_CXX=-Kconform_pic
18687      fi
18688      ;;
18689    hpux*)
18690      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
18691      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
18692      # sets the default TLS model and affects inlining.
18693      case $host_cpu in
18694      hppa*64*)
18695	;;
18696      *)
18697	lt_prog_compiler_pic_CXX='-fPIC'
18698	;;
18699      esac
18700      ;;
18701    *qnx* | *nto*)
18702      # QNX uses GNU C++, but need to define -shared option too, otherwise
18703      # it will coredump.
18704      lt_prog_compiler_pic_CXX='-fPIC -shared'
18705      ;;
18706    *)
18707      lt_prog_compiler_pic_CXX='-fPIC'
18708      ;;
18709    esac
18710  else
18711    case $host_os in
18712      aix[4-9]*)
18713	# All AIX code is PIC.
18714	if test ia64 = "$host_cpu"; then
18715	  # AIX 5 now supports IA64 processor
18716	  lt_prog_compiler_static_CXX='-Bstatic'
18717	else
18718	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
18719	fi
18720	;;
18721      chorus*)
18722	case $cc_basename in
18723	cxch68*)
18724	  # Green Hills C++ Compiler
18725	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
18726	  ;;
18727	esac
18728	;;
18729      mingw* | cygwin* | os2* | pw32* | cegcc*)
18730	# This hack is so that the source file can tell whether it is being
18731	# built for inclusion in a dll (and should export symbols for example).
18732	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
18733	;;
18734      dgux*)
18735	case $cc_basename in
18736	  ec++*)
18737	    lt_prog_compiler_pic_CXX='-KPIC'
18738	    ;;
18739	  ghcx*)
18740	    # Green Hills C++ Compiler
18741	    lt_prog_compiler_pic_CXX='-pic'
18742	    ;;
18743	  *)
18744	    ;;
18745	esac
18746	;;
18747      freebsd* | dragonfly*)
18748	# FreeBSD uses GNU C++
18749	;;
18750      hpux9* | hpux10* | hpux11*)
18751	case $cc_basename in
18752	  CC*)
18753	    lt_prog_compiler_wl_CXX='-Wl,'
18754	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
18755	    if test ia64 != "$host_cpu"; then
18756	      lt_prog_compiler_pic_CXX='+Z'
18757	    fi
18758	    ;;
18759	  aCC*)
18760	    lt_prog_compiler_wl_CXX='-Wl,'
18761	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
18762	    case $host_cpu in
18763	    hppa*64*|ia64*)
18764	      # +Z the default
18765	      ;;
18766	    *)
18767	      lt_prog_compiler_pic_CXX='+Z'
18768	      ;;
18769	    esac
18770	    ;;
18771	  *)
18772	    ;;
18773	esac
18774	;;
18775      interix*)
18776	# This is c89, which is MS Visual C++ (no shared libs)
18777	# Anyone wants to do a port?
18778	;;
18779      irix5* | irix6* | nonstopux*)
18780	case $cc_basename in
18781	  CC*)
18782	    lt_prog_compiler_wl_CXX='-Wl,'
18783	    lt_prog_compiler_static_CXX='-non_shared'
18784	    # CC pic flag -KPIC is the default.
18785	    ;;
18786	  *)
18787	    ;;
18788	esac
18789	;;
18790      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
18791	case $cc_basename in
18792	  KCC*)
18793	    # KAI C++ Compiler
18794	    lt_prog_compiler_wl_CXX='--backend -Wl,'
18795	    lt_prog_compiler_pic_CXX='-fPIC'
18796	    ;;
18797	  ecpc* )
18798	    # old Intel C++ for x86_64, which still supported -KPIC.
18799	    lt_prog_compiler_wl_CXX='-Wl,'
18800	    lt_prog_compiler_pic_CXX='-KPIC'
18801	    lt_prog_compiler_static_CXX='-static'
18802	    ;;
18803	  icpc* )
18804	    # Intel C++, used to be incompatible with GCC.
18805	    # ICC 10 doesn't accept -KPIC any more.
18806	    lt_prog_compiler_wl_CXX='-Wl,'
18807	    lt_prog_compiler_pic_CXX='-fPIC'
18808	    lt_prog_compiler_static_CXX='-static'
18809	    ;;
18810	  pgCC* | pgcpp*)
18811	    # Portland Group C++ compiler
18812	    lt_prog_compiler_wl_CXX='-Wl,'
18813	    lt_prog_compiler_pic_CXX='-fpic'
18814	    lt_prog_compiler_static_CXX='-Bstatic'
18815	    ;;
18816	  cxx*)
18817	    # Compaq C++
18818	    # Make sure the PIC flag is empty.  It appears that all Alpha
18819	    # Linux and Compaq Tru64 Unix objects are PIC.
18820	    lt_prog_compiler_pic_CXX=
18821	    lt_prog_compiler_static_CXX='-non_shared'
18822	    ;;
18823	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
18824	    # IBM XL 8.0, 9.0 on PPC and BlueGene
18825	    lt_prog_compiler_wl_CXX='-Wl,'
18826	    lt_prog_compiler_pic_CXX='-qpic'
18827	    lt_prog_compiler_static_CXX='-qstaticlink'
18828	    ;;
18829	  *)
18830	    case `$CC -V 2>&1 | sed 5q` in
18831	    *Sun\ C*)
18832	      # Sun C++ 5.9
18833	      lt_prog_compiler_pic_CXX='-KPIC'
18834	      lt_prog_compiler_static_CXX='-Bstatic'
18835	      lt_prog_compiler_wl_CXX='-Qoption ld '
18836	      ;;
18837	    esac
18838	    ;;
18839	esac
18840	;;
18841      lynxos*)
18842	;;
18843      m88k*)
18844	;;
18845      mvs*)
18846	case $cc_basename in
18847	  cxx*)
18848	    lt_prog_compiler_pic_CXX='-W c,exportall'
18849	    ;;
18850	  *)
18851	    ;;
18852	esac
18853	;;
18854      netbsd* | netbsdelf*-gnu)
18855	;;
18856      *qnx* | *nto*)
18857        # QNX uses GNU C++, but need to define -shared option too, otherwise
18858        # it will coredump.
18859        lt_prog_compiler_pic_CXX='-fPIC -shared'
18860        ;;
18861      osf3* | osf4* | osf5*)
18862	case $cc_basename in
18863	  KCC*)
18864	    lt_prog_compiler_wl_CXX='--backend -Wl,'
18865	    ;;
18866	  RCC*)
18867	    # Rational C++ 2.4.1
18868	    lt_prog_compiler_pic_CXX='-pic'
18869	    ;;
18870	  cxx*)
18871	    # Digital/Compaq C++
18872	    lt_prog_compiler_wl_CXX='-Wl,'
18873	    # Make sure the PIC flag is empty.  It appears that all Alpha
18874	    # Linux and Compaq Tru64 Unix objects are PIC.
18875	    lt_prog_compiler_pic_CXX=
18876	    lt_prog_compiler_static_CXX='-non_shared'
18877	    ;;
18878	  *)
18879	    ;;
18880	esac
18881	;;
18882      psos*)
18883	;;
18884      solaris*)
18885	case $cc_basename in
18886	  CC* | sunCC*)
18887	    # Sun C++ 4.2, 5.x and Centerline C++
18888	    lt_prog_compiler_pic_CXX='-KPIC'
18889	    lt_prog_compiler_static_CXX='-Bstatic'
18890	    lt_prog_compiler_wl_CXX='-Qoption ld '
18891	    ;;
18892	  gcx*)
18893	    # Green Hills C++ Compiler
18894	    lt_prog_compiler_pic_CXX='-PIC'
18895	    ;;
18896	  *)
18897	    ;;
18898	esac
18899	;;
18900      sunos4*)
18901	case $cc_basename in
18902	  CC*)
18903	    # Sun C++ 4.x
18904	    lt_prog_compiler_pic_CXX='-pic'
18905	    lt_prog_compiler_static_CXX='-Bstatic'
18906	    ;;
18907	  lcc*)
18908	    # Lucid
18909	    lt_prog_compiler_pic_CXX='-pic'
18910	    ;;
18911	  *)
18912	    ;;
18913	esac
18914	;;
18915      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
18916	case $cc_basename in
18917	  CC*)
18918	    lt_prog_compiler_wl_CXX='-Wl,'
18919	    lt_prog_compiler_pic_CXX='-KPIC'
18920	    lt_prog_compiler_static_CXX='-Bstatic'
18921	    ;;
18922	esac
18923	;;
18924      tandem*)
18925	case $cc_basename in
18926	  NCC*)
18927	    # NonStop-UX NCC 3.20
18928	    lt_prog_compiler_pic_CXX='-KPIC'
18929	    ;;
18930	  *)
18931	    ;;
18932	esac
18933	;;
18934      vxworks*)
18935	;;
18936      *)
18937	lt_prog_compiler_can_build_shared_CXX=no
18938	;;
18939    esac
18940  fi
18941
18942case $host_os in
18943  # For platforms that do not support PIC, -DPIC is meaningless:
18944  *djgpp*)
18945    lt_prog_compiler_pic_CXX=
18946    ;;
18947  *)
18948    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
18949    ;;
18950esac
18951
18952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
18953$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
18954if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
18955  $as_echo_n "(cached) " >&6
18956else
18957  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
18958fi
18959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
18960$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
18961lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
18962
18963#
18964# Check to make sure the PIC flag actually works.
18965#
18966if test -n "$lt_prog_compiler_pic_CXX"; then
18967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
18968$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
18969if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
18970  $as_echo_n "(cached) " >&6
18971else
18972  lt_cv_prog_compiler_pic_works_CXX=no
18973   ac_outfile=conftest.$ac_objext
18974   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18975   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"  ## exclude from sc_useless_quotes_in_assignment
18976   # Insert the option either (1) after the last *FLAGS variable, or
18977   # (2) before a word containing "conftest.", or (3) at the end.
18978   # Note that $ac_compile itself does not contain backslashes and begins
18979   # with a dollar sign (not a hyphen), so the echo should work correctly.
18980   # The option is referenced via a variable to avoid confusing sed.
18981   lt_compile=`echo "$ac_compile" | $SED \
18982   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18983   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18984   -e 's:$: $lt_compiler_flag:'`
18985   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
18986   (eval "$lt_compile" 2>conftest.err)
18987   ac_status=$?
18988   cat conftest.err >&5
18989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18990   if (exit $ac_status) && test -s "$ac_outfile"; then
18991     # The compiler can only warn and ignore the option if not recognized
18992     # So say no if there are warnings other than the usual output.
18993     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
18994     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18995     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
18996       lt_cv_prog_compiler_pic_works_CXX=yes
18997     fi
18998   fi
18999   $RM conftest*
19000
19001fi
19002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
19003$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
19004
19005if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
19006    case $lt_prog_compiler_pic_CXX in
19007     "" | " "*) ;;
19008     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
19009     esac
19010else
19011    lt_prog_compiler_pic_CXX=
19012     lt_prog_compiler_can_build_shared_CXX=no
19013fi
19014
19015fi
19016
19017
19018
19019
19020
19021#
19022# Check to make sure the static flag actually works.
19023#
19024wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
19025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19026$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19027if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
19028  $as_echo_n "(cached) " >&6
19029else
19030  lt_cv_prog_compiler_static_works_CXX=no
19031   save_LDFLAGS=$LDFLAGS
19032   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19033   echo "$lt_simple_link_test_code" > conftest.$ac_ext
19034   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19035     # The linker can only warn and ignore the option if not recognized
19036     # So say no if there are warnings
19037     if test -s conftest.err; then
19038       # Append any errors to the config.log.
19039       cat conftest.err 1>&5
19040       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
19041       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19042       if diff conftest.exp conftest.er2 >/dev/null; then
19043         lt_cv_prog_compiler_static_works_CXX=yes
19044       fi
19045     else
19046       lt_cv_prog_compiler_static_works_CXX=yes
19047     fi
19048   fi
19049   $RM -r conftest*
19050   LDFLAGS=$save_LDFLAGS
19051
19052fi
19053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
19054$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
19055
19056if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
19057    :
19058else
19059    lt_prog_compiler_static_CXX=
19060fi
19061
19062
19063
19064
19065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19066$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19067if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
19068  $as_echo_n "(cached) " >&6
19069else
19070  lt_cv_prog_compiler_c_o_CXX=no
19071   $RM -r conftest 2>/dev/null
19072   mkdir conftest
19073   cd conftest
19074   mkdir out
19075   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19076
19077   lt_compiler_flag="-o out/conftest2.$ac_objext"
19078   # Insert the option either (1) after the last *FLAGS variable, or
19079   # (2) before a word containing "conftest.", or (3) at the end.
19080   # Note that $ac_compile itself does not contain backslashes and begins
19081   # with a dollar sign (not a hyphen), so the echo should work correctly.
19082   lt_compile=`echo "$ac_compile" | $SED \
19083   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19084   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19085   -e 's:$: $lt_compiler_flag:'`
19086   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19087   (eval "$lt_compile" 2>out/conftest.err)
19088   ac_status=$?
19089   cat out/conftest.err >&5
19090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19091   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19092   then
19093     # The compiler can only warn and ignore the option if not recognized
19094     # So say no if there are warnings
19095     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19096     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19097     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19098       lt_cv_prog_compiler_c_o_CXX=yes
19099     fi
19100   fi
19101   chmod u+w . 2>&5
19102   $RM conftest*
19103   # SGI C++ compiler will create directory out/ii_files/ for
19104   # template instantiation
19105   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19106   $RM out/* && rmdir out
19107   cd ..
19108   $RM -r conftest
19109   $RM conftest*
19110
19111fi
19112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19113$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
19114
19115
19116
19117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19118$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19119if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
19120  $as_echo_n "(cached) " >&6
19121else
19122  lt_cv_prog_compiler_c_o_CXX=no
19123   $RM -r conftest 2>/dev/null
19124   mkdir conftest
19125   cd conftest
19126   mkdir out
19127   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19128
19129   lt_compiler_flag="-o out/conftest2.$ac_objext"
19130   # Insert the option either (1) after the last *FLAGS variable, or
19131   # (2) before a word containing "conftest.", or (3) at the end.
19132   # Note that $ac_compile itself does not contain backslashes and begins
19133   # with a dollar sign (not a hyphen), so the echo should work correctly.
19134   lt_compile=`echo "$ac_compile" | $SED \
19135   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19136   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19137   -e 's:$: $lt_compiler_flag:'`
19138   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19139   (eval "$lt_compile" 2>out/conftest.err)
19140   ac_status=$?
19141   cat out/conftest.err >&5
19142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19143   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19144   then
19145     # The compiler can only warn and ignore the option if not recognized
19146     # So say no if there are warnings
19147     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19148     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19149     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19150       lt_cv_prog_compiler_c_o_CXX=yes
19151     fi
19152   fi
19153   chmod u+w . 2>&5
19154   $RM conftest*
19155   # SGI C++ compiler will create directory out/ii_files/ for
19156   # template instantiation
19157   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19158   $RM out/* && rmdir out
19159   cd ..
19160   $RM -r conftest
19161   $RM conftest*
19162
19163fi
19164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
19165$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
19166
19167
19168
19169
19170hard_links=nottested
19171if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
19172  # do not overwrite the value of need_locks provided by the user
19173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19174$as_echo_n "checking if we can lock with hard links... " >&6; }
19175  hard_links=yes
19176  $RM conftest*
19177  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19178  touch conftest.a
19179  ln conftest.a conftest.b 2>&5 || hard_links=no
19180  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19182$as_echo "$hard_links" >&6; }
19183  if test no = "$hard_links"; then
19184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
19185$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
19186    need_locks=warn
19187  fi
19188else
19189  need_locks=no
19190fi
19191
19192
19193
19194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19195$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
19196
19197  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19198  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19199  case $host_os in
19200  aix[4-9]*)
19201    # If we're using GNU nm, then we don't want the "-C" option.
19202    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
19203    # Without the "-l" option, or with the "-B" option, AIX nm treats
19204    # weak defined symbols like other global defined symbols, whereas
19205    # GNU nm marks them as "W".
19206    # While the 'weak' keyword is ignored in the Export File, we need
19207    # it in the Import File for the 'aix-soname' feature, so we have
19208    # to replace the "-B" option with "-P" for AIX nm.
19209    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
19210      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
19211    else
19212      export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
19213    fi
19214    ;;
19215  pw32*)
19216    export_symbols_cmds_CXX=$ltdll_cmds
19217    ;;
19218  cygwin* | mingw* | cegcc*)
19219    case $cc_basename in
19220    cl*)
19221      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
19222      ;;
19223    *)
19224      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
19225      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
19226      ;;
19227    esac
19228    ;;
19229  linux* | k*bsd*-gnu | gnu*)
19230    link_all_deplibs_CXX=no
19231    ;;
19232  *)
19233    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19234    ;;
19235  esac
19236
19237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
19238$as_echo "$ld_shlibs_CXX" >&6; }
19239test no = "$ld_shlibs_CXX" && can_build_shared=no
19240
19241with_gnu_ld_CXX=$with_gnu_ld
19242
19243
19244
19245
19246
19247
19248#
19249# Do we need to explicitly link libc?
19250#
19251case "x$archive_cmds_need_lc_CXX" in
19252x|xyes)
19253  # Assume -lc should be added
19254  archive_cmds_need_lc_CXX=yes
19255
19256  if test yes,yes = "$GCC,$enable_shared"; then
19257    case $archive_cmds_CXX in
19258    *'~'*)
19259      # FIXME: we may have to deal with multi-command sequences.
19260      ;;
19261    '$CC '*)
19262      # Test whether the compiler implicitly links with -lc since on some
19263      # systems, -lgcc has to come before -lc. If gcc already passes -lc
19264      # to ld, don't add -lc before -lgcc.
19265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
19266$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
19267if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
19268  $as_echo_n "(cached) " >&6
19269else
19270  $RM conftest*
19271	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19272
19273	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19274  (eval $ac_compile) 2>&5
19275  ac_status=$?
19276  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19277  test $ac_status = 0; } 2>conftest.err; then
19278	  soname=conftest
19279	  lib=conftest
19280	  libobjs=conftest.$ac_objext
19281	  deplibs=
19282	  wl=$lt_prog_compiler_wl_CXX
19283	  pic_flag=$lt_prog_compiler_pic_CXX
19284	  compiler_flags=-v
19285	  linker_flags=-v
19286	  verstring=
19287	  output_objdir=.
19288	  libname=conftest
19289	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
19290	  allow_undefined_flag_CXX=
19291	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
19292  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
19293  ac_status=$?
19294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19295  test $ac_status = 0; }
19296	  then
19297	    lt_cv_archive_cmds_need_lc_CXX=no
19298	  else
19299	    lt_cv_archive_cmds_need_lc_CXX=yes
19300	  fi
19301	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
19302	else
19303	  cat conftest.err 1>&5
19304	fi
19305	$RM conftest*
19306
19307fi
19308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
19309$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
19310      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
19311      ;;
19312    esac
19313  fi
19314  ;;
19315esac
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
19379$as_echo_n "checking dynamic linker characteristics... " >&6; }
19380
19381library_names_spec=
19382libname_spec='lib$name'
19383soname_spec=
19384shrext_cmds=.so
19385postinstall_cmds=
19386postuninstall_cmds=
19387finish_cmds=
19388finish_eval=
19389shlibpath_var=
19390shlibpath_overrides_runpath=unknown
19391version_type=none
19392dynamic_linker="$host_os ld.so"
19393sys_lib_dlsearch_path_spec="/lib /usr/lib"
19394need_lib_prefix=unknown
19395hardcode_into_libs=no
19396
19397# when you set need_version to no, make sure it does not cause -set_version
19398# flags to be left without arguments
19399need_version=unknown
19400
19401
19402
19403case $host_os in
19404aix3*)
19405  version_type=linux # correct to gnu/linux during the next big refactor
19406  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
19407  shlibpath_var=LIBPATH
19408
19409  # AIX 3 has no versioning support, so we append a major version to the name.
19410  soname_spec='$libname$release$shared_ext$major'
19411  ;;
19412
19413aix[4-9]*)
19414  version_type=linux # correct to gnu/linux during the next big refactor
19415  need_lib_prefix=no
19416  need_version=no
19417  hardcode_into_libs=yes
19418  if test ia64 = "$host_cpu"; then
19419    # AIX 5 supports IA64
19420    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
19421    shlibpath_var=LD_LIBRARY_PATH
19422  else
19423    # With GCC up to 2.95.x, collect2 would create an import file
19424    # for dependence libraries.  The import file would start with
19425    # the line '#! .'.  This would cause the generated library to
19426    # depend on '.', always an invalid library.  This was fixed in
19427    # development snapshots of GCC prior to 3.0.
19428    case $host_os in
19429      aix4 | aix4.[01] | aix4.[01].*)
19430      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19431	   echo ' yes '
19432	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
19433	:
19434      else
19435	can_build_shared=no
19436      fi
19437      ;;
19438    esac
19439    # Using Import Files as archive members, it is possible to support
19440    # filename-based versioning of shared library archives on AIX. While
19441    # this would work for both with and without runtime linking, it will
19442    # prevent static linking of such archives. So we do filename-based
19443    # shared library versioning with .so extension only, which is used
19444    # when both runtime linking and shared linking is enabled.
19445    # Unfortunately, runtime linking may impact performance, so we do
19446    # not want this to be the default eventually. Also, we use the
19447    # versioned .so libs for executables only if there is the -brtl
19448    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
19449    # To allow for filename-based versioning support, we need to create
19450    # libNAME.so.V as an archive file, containing:
19451    # *) an Import File, referring to the versioned filename of the
19452    #    archive as well as the shared archive member, telling the
19453    #    bitwidth (32 or 64) of that shared object, and providing the
19454    #    list of exported symbols of that shared object, eventually
19455    #    decorated with the 'weak' keyword
19456    # *) the shared object with the F_LOADONLY flag set, to really avoid
19457    #    it being seen by the linker.
19458    # At run time we better use the real file rather than another symlink,
19459    # but for link time we create the symlink libNAME.so -> libNAME.so.V
19460
19461    case $with_aix_soname,$aix_use_runtimelinking in
19462    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
19463    # soname into executable. Probably we can add versioning support to
19464    # collect2, so additional links can be useful in future.
19465    aix,yes) # traditional libtool
19466      dynamic_linker='AIX unversionable lib.so'
19467      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19468      # instead of lib<name>.a to let people know that these are not
19469      # typical AIX shared libraries.
19470      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19471      ;;
19472    aix,no) # traditional AIX only
19473      dynamic_linker='AIX lib.a(lib.so.V)'
19474      # We preserve .a as extension for shared libraries through AIX4.2
19475      # and later when we are not doing run time linking.
19476      library_names_spec='$libname$release.a $libname.a'
19477      soname_spec='$libname$release$shared_ext$major'
19478      ;;
19479    svr4,*) # full svr4 only
19480      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
19481      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
19482      # We do not specify a path in Import Files, so LIBPATH fires.
19483      shlibpath_overrides_runpath=yes
19484      ;;
19485    *,yes) # both, prefer svr4
19486      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
19487      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
19488      # unpreferred sharedlib libNAME.a needs extra handling
19489      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
19490      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
19491      # We do not specify a path in Import Files, so LIBPATH fires.
19492      shlibpath_overrides_runpath=yes
19493      ;;
19494    *,no) # both, prefer aix
19495      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
19496      library_names_spec='$libname$release.a $libname.a'
19497      soname_spec='$libname$release$shared_ext$major'
19498      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
19499      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
19500      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
19501      ;;
19502    esac
19503    shlibpath_var=LIBPATH
19504  fi
19505  ;;
19506
19507amigaos*)
19508  case $host_cpu in
19509  powerpc)
19510    # Since July 2007 AmigaOS4 officially supports .so libraries.
19511    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19512    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19513    ;;
19514  m68k)
19515    library_names_spec='$libname.ixlibrary $libname.a'
19516    # Create ${libname}_ixlibrary.a entries in /sys/libs.
19517    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
19518    ;;
19519  esac
19520  ;;
19521
19522beos*)
19523  library_names_spec='$libname$shared_ext'
19524  dynamic_linker="$host_os ld.so"
19525  shlibpath_var=LIBRARY_PATH
19526  ;;
19527
19528bsdi[45]*)
19529  version_type=linux # correct to gnu/linux during the next big refactor
19530  need_version=no
19531  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19532  soname_spec='$libname$release$shared_ext$major'
19533  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19534  shlibpath_var=LD_LIBRARY_PATH
19535  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19536  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19537  # the default ld.so.conf also contains /usr/contrib/lib and
19538  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19539  # libtool to hard-code these into programs
19540  ;;
19541
19542cygwin* | mingw* | pw32* | cegcc*)
19543  version_type=windows
19544  shrext_cmds=.dll
19545  need_version=no
19546  need_lib_prefix=no
19547
19548  case $GCC,$cc_basename in
19549  yes,*)
19550    # gcc
19551    library_names_spec='$libname.dll.a'
19552    # DLL is installed to $(libdir)/../bin by postinstall_cmds
19553    postinstall_cmds='base_file=`basename \$file`~
19554      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
19555      dldir=$destdir/`dirname \$dlpath`~
19556      test -d \$dldir || mkdir -p \$dldir~
19557      $install_prog $dir/$dlname \$dldir/$dlname~
19558      chmod a+x \$dldir/$dlname~
19559      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
19560        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
19561      fi'
19562    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19563      dlpath=$dir/\$dldll~
19564       $RM \$dlpath'
19565    shlibpath_overrides_runpath=yes
19566
19567    case $host_os in
19568    cygwin*)
19569      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19570      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19571
19572      ;;
19573    mingw* | cegcc*)
19574      # MinGW DLLs use traditional 'lib' prefix
19575      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19576      ;;
19577    pw32*)
19578      # pw32 DLLs use 'pw' prefix rather than 'lib'
19579      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19580      ;;
19581    esac
19582    dynamic_linker='Win32 ld.exe'
19583    ;;
19584
19585  *,cl*)
19586    # Native MSVC
19587    libname_spec='$name'
19588    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
19589    library_names_spec='$libname.dll.lib'
19590
19591    case $build_os in
19592    mingw*)
19593      sys_lib_search_path_spec=
19594      lt_save_ifs=$IFS
19595      IFS=';'
19596      for lt_path in $LIB
19597      do
19598        IFS=$lt_save_ifs
19599        # Let DOS variable expansion print the short 8.3 style file name.
19600        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
19601        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
19602      done
19603      IFS=$lt_save_ifs
19604      # Convert to MSYS style.
19605      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
19606      ;;
19607    cygwin*)
19608      # Convert to unix form, then to dos form, then back to unix form
19609      # but this time dos style (no spaces!) so that the unix form looks
19610      # like /cygdrive/c/PROGRA~1:/cygdr...
19611      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
19612      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
19613      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
19614      ;;
19615    *)
19616      sys_lib_search_path_spec=$LIB
19617      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
19618        # It is most probably a Windows format PATH.
19619        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
19620      else
19621        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
19622      fi
19623      # FIXME: find the short name or the path components, as spaces are
19624      # common. (e.g. "Program Files" -> "PROGRA~1")
19625      ;;
19626    esac
19627
19628    # DLL is installed to $(libdir)/../bin by postinstall_cmds
19629    postinstall_cmds='base_file=`basename \$file`~
19630      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
19631      dldir=$destdir/`dirname \$dlpath`~
19632      test -d \$dldir || mkdir -p \$dldir~
19633      $install_prog $dir/$dlname \$dldir/$dlname'
19634    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19635      dlpath=$dir/\$dldll~
19636       $RM \$dlpath'
19637    shlibpath_overrides_runpath=yes
19638    dynamic_linker='Win32 link.exe'
19639    ;;
19640
19641  *)
19642    # Assume MSVC wrapper
19643    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
19644    dynamic_linker='Win32 ld.exe'
19645    ;;
19646  esac
19647  # FIXME: first we should search . and the directory the executable is in
19648  shlibpath_var=PATH
19649  ;;
19650
19651darwin* | rhapsody*)
19652  dynamic_linker="$host_os dyld"
19653  version_type=darwin
19654  need_lib_prefix=no
19655  need_version=no
19656  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
19657  soname_spec='$libname$release$major$shared_ext'
19658  shlibpath_overrides_runpath=yes
19659  shlibpath_var=DYLD_LIBRARY_PATH
19660  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
19661
19662  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19663  ;;
19664
19665dgux*)
19666  version_type=linux # correct to gnu/linux during the next big refactor
19667  need_lib_prefix=no
19668  need_version=no
19669  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19670  soname_spec='$libname$release$shared_ext$major'
19671  shlibpath_var=LD_LIBRARY_PATH
19672  ;;
19673
19674freebsd* | dragonfly*)
19675  # DragonFly does not have aout.  When/if they implement a new
19676  # versioning mechanism, adjust this.
19677  if test -x /usr/bin/objformat; then
19678    objformat=`/usr/bin/objformat`
19679  else
19680    case $host_os in
19681    freebsd[23].*) objformat=aout ;;
19682    *) objformat=elf ;;
19683    esac
19684  fi
19685  version_type=freebsd-$objformat
19686  case $version_type in
19687    freebsd-elf*)
19688      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19689      soname_spec='$libname$release$shared_ext$major'
19690      need_version=no
19691      need_lib_prefix=no
19692      ;;
19693    freebsd-*)
19694      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19695      need_version=yes
19696      ;;
19697  esac
19698  shlibpath_var=LD_LIBRARY_PATH
19699  case $host_os in
19700  freebsd2.*)
19701    shlibpath_overrides_runpath=yes
19702    ;;
19703  freebsd3.[01]* | freebsdelf3.[01]*)
19704    shlibpath_overrides_runpath=yes
19705    hardcode_into_libs=yes
19706    ;;
19707  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
19708  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
19709    shlibpath_overrides_runpath=no
19710    hardcode_into_libs=yes
19711    ;;
19712  *) # from 4.6 on, and DragonFly
19713    shlibpath_overrides_runpath=yes
19714    hardcode_into_libs=yes
19715    ;;
19716  esac
19717  ;;
19718
19719haiku*)
19720  version_type=linux # correct to gnu/linux during the next big refactor
19721  need_lib_prefix=no
19722  need_version=no
19723  dynamic_linker="$host_os runtime_loader"
19724  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19725  soname_spec='$libname$release$shared_ext$major'
19726  shlibpath_var=LIBRARY_PATH
19727  shlibpath_overrides_runpath=no
19728  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
19729  hardcode_into_libs=yes
19730  ;;
19731
19732hpux9* | hpux10* | hpux11*)
19733  # Give a soname corresponding to the major version so that dld.sl refuses to
19734  # link against other versions.
19735  version_type=sunos
19736  need_lib_prefix=no
19737  need_version=no
19738  case $host_cpu in
19739  ia64*)
19740    shrext_cmds='.so'
19741    hardcode_into_libs=yes
19742    dynamic_linker="$host_os dld.so"
19743    shlibpath_var=LD_LIBRARY_PATH
19744    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19745    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19746    soname_spec='$libname$release$shared_ext$major'
19747    if test 32 = "$HPUX_IA64_MODE"; then
19748      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
19749      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
19750    else
19751      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
19752      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
19753    fi
19754    ;;
19755  hppa*64*)
19756    shrext_cmds='.sl'
19757    hardcode_into_libs=yes
19758    dynamic_linker="$host_os dld.sl"
19759    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
19760    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19761    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19762    soname_spec='$libname$release$shared_ext$major'
19763    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
19764    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19765    ;;
19766  *)
19767    shrext_cmds='.sl'
19768    dynamic_linker="$host_os dld.sl"
19769    shlibpath_var=SHLIB_PATH
19770    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
19771    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19772    soname_spec='$libname$release$shared_ext$major'
19773    ;;
19774  esac
19775  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
19776  postinstall_cmds='chmod 555 $lib'
19777  # or fails outright, so override atomically:
19778  install_override_mode=555
19779  ;;
19780
19781interix[3-9]*)
19782  version_type=linux # correct to gnu/linux during the next big refactor
19783  need_lib_prefix=no
19784  need_version=no
19785  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19786  soname_spec='$libname$release$shared_ext$major'
19787  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
19788  shlibpath_var=LD_LIBRARY_PATH
19789  shlibpath_overrides_runpath=no
19790  hardcode_into_libs=yes
19791  ;;
19792
19793irix5* | irix6* | nonstopux*)
19794  case $host_os in
19795    nonstopux*) version_type=nonstopux ;;
19796    *)
19797	if test yes = "$lt_cv_prog_gnu_ld"; then
19798		version_type=linux # correct to gnu/linux during the next big refactor
19799	else
19800		version_type=irix
19801	fi ;;
19802  esac
19803  need_lib_prefix=no
19804  need_version=no
19805  soname_spec='$libname$release$shared_ext$major'
19806  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
19807  case $host_os in
19808  irix5* | nonstopux*)
19809    libsuff= shlibsuff=
19810    ;;
19811  *)
19812    case $LD in # libtool.m4 will add one of these switches to LD
19813    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
19814      libsuff= shlibsuff= libmagic=32-bit;;
19815    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
19816      libsuff=32 shlibsuff=N32 libmagic=N32;;
19817    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
19818      libsuff=64 shlibsuff=64 libmagic=64-bit;;
19819    *) libsuff= shlibsuff= libmagic=never-match;;
19820    esac
19821    ;;
19822  esac
19823  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
19824  shlibpath_overrides_runpath=no
19825  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
19826  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
19827  hardcode_into_libs=yes
19828  ;;
19829
19830# No shared lib support for Linux oldld, aout, or coff.
19831linux*oldld* | linux*aout* | linux*coff*)
19832  dynamic_linker=no
19833  ;;
19834
19835linux*android*)
19836  version_type=none # Android doesn't support versioned libraries.
19837  need_lib_prefix=no
19838  need_version=no
19839  library_names_spec='$libname$release$shared_ext'
19840  soname_spec='$libname$release$shared_ext'
19841  finish_cmds=
19842  shlibpath_var=LD_LIBRARY_PATH
19843  shlibpath_overrides_runpath=yes
19844
19845  # This implies no fast_install, which is unacceptable.
19846  # Some rework will be needed to allow for fast_install
19847  # before this can be enabled.
19848  hardcode_into_libs=yes
19849
19850  dynamic_linker='Android linker'
19851  # Don't embed -rpath directories since the linker doesn't support them.
19852  hardcode_libdir_flag_spec_CXX='-L$libdir'
19853  ;;
19854
19855# This must be glibc/ELF.
19856linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
19857  version_type=linux # correct to gnu/linux during the next big refactor
19858  need_lib_prefix=no
19859  need_version=no
19860  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19861  soname_spec='$libname$release$shared_ext$major'
19862  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
19863  shlibpath_var=LD_LIBRARY_PATH
19864  shlibpath_overrides_runpath=no
19865
19866  # Some binutils ld are patched to set DT_RUNPATH
19867  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
19868  $as_echo_n "(cached) " >&6
19869else
19870  lt_cv_shlibpath_overrides_runpath=no
19871    save_LDFLAGS=$LDFLAGS
19872    save_libdir=$libdir
19873    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
19874	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
19875    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19876/* end confdefs.h.  */
19877
19878int
19879main ()
19880{
19881
19882  ;
19883  return 0;
19884}
19885_ACEOF
19886if ac_fn_cxx_try_link "$LINENO"; then :
19887  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
19888  lt_cv_shlibpath_overrides_runpath=yes
19889fi
19890fi
19891rm -f core conftest.err conftest.$ac_objext \
19892    conftest$ac_exeext conftest.$ac_ext
19893    LDFLAGS=$save_LDFLAGS
19894    libdir=$save_libdir
19895
19896fi
19897
19898  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
19899
19900  # This implies no fast_install, which is unacceptable.
19901  # Some rework will be needed to allow for fast_install
19902  # before this can be enabled.
19903  hardcode_into_libs=yes
19904
19905  # Ideally, we could use ldconfig to report *all* directores which are
19906  # searched for libraries, however this is still not possible.  Aside from not
19907  # being certain /sbin/ldconfig is available, command
19908  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
19909  # even though it is searched at run-time.  Try to do the best guess by
19910  # appending ld.so.conf contents (and includes) to the search path.
19911  if test -f /etc/ld.so.conf; then
19912    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
19913    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
19914  fi
19915
19916  # We used to test for /lib/ld.so.1 and disable shared libraries on
19917  # powerpc, because MkLinux only supported shared libraries with the
19918  # GNU dynamic linker.  Since this was broken with cross compilers,
19919  # most powerpc-linux boxes support dynamic linking these days and
19920  # people can always --disable-shared, the test was removed, and we
19921  # assume the GNU/Linux dynamic linker is in use.
19922  dynamic_linker='GNU/Linux ld.so'
19923  ;;
19924
19925netbsdelf*-gnu)
19926  version_type=linux
19927  need_lib_prefix=no
19928  need_version=no
19929  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19930  soname_spec='${libname}${release}${shared_ext}$major'
19931  shlibpath_var=LD_LIBRARY_PATH
19932  shlibpath_overrides_runpath=no
19933  hardcode_into_libs=yes
19934  dynamic_linker='NetBSD ld.elf_so'
19935  ;;
19936
19937netbsd*)
19938  version_type=sunos
19939  need_lib_prefix=no
19940  need_version=no
19941  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
19942    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19943    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19944    dynamic_linker='NetBSD (a.out) ld.so'
19945  else
19946    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19947    soname_spec='$libname$release$shared_ext$major'
19948    dynamic_linker='NetBSD ld.elf_so'
19949  fi
19950  shlibpath_var=LD_LIBRARY_PATH
19951  shlibpath_overrides_runpath=yes
19952  hardcode_into_libs=yes
19953  ;;
19954
19955newsos6)
19956  version_type=linux # correct to gnu/linux during the next big refactor
19957  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19958  shlibpath_var=LD_LIBRARY_PATH
19959  shlibpath_overrides_runpath=yes
19960  ;;
19961
19962*nto* | *qnx*)
19963  version_type=qnx
19964  need_lib_prefix=no
19965  need_version=no
19966  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
19967  soname_spec='$libname$release$shared_ext$major'
19968  shlibpath_var=LD_LIBRARY_PATH
19969  shlibpath_overrides_runpath=no
19970  hardcode_into_libs=yes
19971  dynamic_linker='ldqnx.so'
19972  ;;
19973
19974openbsd* | bitrig*)
19975  version_type=sunos
19976  sys_lib_dlsearch_path_spec=/usr/lib
19977  need_lib_prefix=no
19978  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
19979    need_version=no
19980  else
19981    need_version=yes
19982  fi
19983  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
19984  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19985  shlibpath_var=LD_LIBRARY_PATH
19986  shlibpath_overrides_runpath=yes
19987  ;;
19988
19989os2*)
19990  libname_spec='$name'
19991  version_type=windows
19992  shrext_cmds=.dll
19993  need_version=no
19994  need_lib_prefix=no
19995  # OS/2 can only load a DLL with a base name of 8 characters or less.
19996  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
19997    v=$($ECHO $release$versuffix | tr -d .-);
19998    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
19999    $ECHO $n$v`$shared_ext'
20000  library_names_spec='${libname}_dll.$libext'
20001  dynamic_linker='OS/2 ld.exe'
20002  shlibpath_var=BEGINLIBPATH
20003  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
20004  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20005  postinstall_cmds='base_file=`basename \$file`~
20006    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
20007    dldir=$destdir/`dirname \$dlpath`~
20008    test -d \$dldir || mkdir -p \$dldir~
20009    $install_prog $dir/$dlname \$dldir/$dlname~
20010    chmod a+x \$dldir/$dlname~
20011    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
20012      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
20013    fi'
20014  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
20015    dlpath=$dir/\$dldll~
20016    $RM \$dlpath'
20017  ;;
20018
20019osf3* | osf4* | osf5*)
20020  version_type=osf
20021  need_lib_prefix=no
20022  need_version=no
20023  soname_spec='$libname$release$shared_ext$major'
20024  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
20025  shlibpath_var=LD_LIBRARY_PATH
20026  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
20027  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20028  ;;
20029
20030rdos*)
20031  dynamic_linker=no
20032  ;;
20033
20034solaris*)
20035  version_type=linux # correct to gnu/linux during the next big refactor
20036  need_lib_prefix=no
20037  need_version=no
20038  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
20039  soname_spec='$libname$release$shared_ext$major'
20040  shlibpath_var=LD_LIBRARY_PATH
20041  shlibpath_overrides_runpath=yes
20042  hardcode_into_libs=yes
20043  # ldd complains unless libraries are executable
20044  postinstall_cmds='chmod +x $lib'
20045  ;;
20046
20047sunos4*)
20048  version_type=sunos
20049  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
20050  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
20051  shlibpath_var=LD_LIBRARY_PATH
20052  shlibpath_overrides_runpath=yes
20053  if test yes = "$with_gnu_ld"; then
20054    need_lib_prefix=no
20055  fi
20056  need_version=yes
20057  ;;
20058
20059sysv4 | sysv4.3*)
20060  version_type=linux # correct to gnu/linux during the next big refactor
20061  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
20062  soname_spec='$libname$release$shared_ext$major'
20063  shlibpath_var=LD_LIBRARY_PATH
20064  case $host_vendor in
20065    sni)
20066      shlibpath_overrides_runpath=no
20067      need_lib_prefix=no
20068      runpath_var=LD_RUN_PATH
20069      ;;
20070    siemens)
20071      need_lib_prefix=no
20072      ;;
20073    motorola)
20074      need_lib_prefix=no
20075      need_version=no
20076      shlibpath_overrides_runpath=no
20077      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
20078      ;;
20079  esac
20080  ;;
20081
20082sysv4*MP*)
20083  if test -d /usr/nec; then
20084    version_type=linux # correct to gnu/linux during the next big refactor
20085    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
20086    soname_spec='$libname$shared_ext.$major'
20087    shlibpath_var=LD_LIBRARY_PATH
20088  fi
20089  ;;
20090
20091sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
20092  version_type=sco
20093  need_lib_prefix=no
20094  need_version=no
20095  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
20096  soname_spec='$libname$release$shared_ext$major'
20097  shlibpath_var=LD_LIBRARY_PATH
20098  shlibpath_overrides_runpath=yes
20099  hardcode_into_libs=yes
20100  if test yes = "$with_gnu_ld"; then
20101    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
20102  else
20103    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
20104    case $host_os in
20105      sco3.2v5*)
20106        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
20107	;;
20108    esac
20109  fi
20110  sys_lib_dlsearch_path_spec='/usr/lib'
20111  ;;
20112
20113tpf*)
20114  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
20115  version_type=linux # correct to gnu/linux during the next big refactor
20116  need_lib_prefix=no
20117  need_version=no
20118  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
20119  shlibpath_var=LD_LIBRARY_PATH
20120  shlibpath_overrides_runpath=no
20121  hardcode_into_libs=yes
20122  ;;
20123
20124uts4*)
20125  version_type=linux # correct to gnu/linux during the next big refactor
20126  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
20127  soname_spec='$libname$release$shared_ext$major'
20128  shlibpath_var=LD_LIBRARY_PATH
20129  ;;
20130
20131*)
20132  dynamic_linker=no
20133  ;;
20134esac
20135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
20136$as_echo "$dynamic_linker" >&6; }
20137test no = "$dynamic_linker" && can_build_shared=no
20138
20139variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
20140if test yes = "$GCC"; then
20141  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
20142fi
20143
20144if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
20145  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
20146fi
20147
20148if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
20149  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
20150fi
20151
20152# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
20153configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
20154
20155# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
20156func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
20157
20158# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
20159configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
20201$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
20202hardcode_action_CXX=
20203if test -n "$hardcode_libdir_flag_spec_CXX" ||
20204   test -n "$runpath_var_CXX" ||
20205   test yes = "$hardcode_automatic_CXX"; then
20206
20207  # We can hardcode non-existent directories.
20208  if test no != "$hardcode_direct_CXX" &&
20209     # If the only mechanism to avoid hardcoding is shlibpath_var, we
20210     # have to relink, otherwise we might link with an installed library
20211     # when we should be linking with a yet-to-be-installed one
20212     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
20213     test no != "$hardcode_minus_L_CXX"; then
20214    # Linking always hardcodes the temporary library directory.
20215    hardcode_action_CXX=relink
20216  else
20217    # We can link without hardcoding, and we can hardcode nonexisting dirs.
20218    hardcode_action_CXX=immediate
20219  fi
20220else
20221  # We cannot hardcode anything, or else we can only hardcode existing
20222  # directories.
20223  hardcode_action_CXX=unsupported
20224fi
20225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
20226$as_echo "$hardcode_action_CXX" >&6; }
20227
20228if test relink = "$hardcode_action_CXX" ||
20229   test yes = "$inherit_rpath_CXX"; then
20230  # Fast installation is not supported
20231  enable_fast_install=no
20232elif test yes = "$shlibpath_overrides_runpath" ||
20233     test no = "$enable_shared"; then
20234  # Fast installation is not necessary
20235  enable_fast_install=needless
20236fi
20237
20238
20239
20240
20241
20242
20243
20244  fi # test -n "$compiler"
20245
20246  CC=$lt_save_CC
20247  CFLAGS=$lt_save_CFLAGS
20248  LDCXX=$LD
20249  LD=$lt_save_LD
20250  GCC=$lt_save_GCC
20251  with_gnu_ld=$lt_save_with_gnu_ld
20252  lt_cv_path_LDCXX=$lt_cv_path_LD
20253  lt_cv_path_LD=$lt_save_path_LD
20254  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
20255  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
20256fi # test yes != "$_lt_caught_CXX_error"
20257
20258ac_ext=c
20259ac_cpp='$CPP $CPPFLAGS'
20260ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20261ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20262ac_compiler_gnu=$ac_cv_c_compiler_gnu
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278        ac_config_commands="$ac_config_commands libtool"
20279
20280
20281
20282
20283# Only expand once:
20284
20285
20286
20287ac_ext=cpp
20288ac_cpp='$CXXCPP $CPPFLAGS'
20289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20292
20293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20294/* end confdefs.h.  */
20295#ifndef __cplusplus
20296    #error "broken C++"
20297    #endif
20298int
20299main ()
20300{
20301
20302  ;
20303  return 0;
20304}
20305_ACEOF
20306if ac_fn_cxx_try_compile "$LINENO"; then :
20307
20308else
20309  CXX=;
20310fi
20311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20312ac_ext=c
20313ac_cpp='$CPP $CPPFLAGS'
20314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20316ac_compiler_gnu=$ac_cv_c_compiler_gnu
20317
20318
20319if test "x$CXX" = x ; then
20320  as_fn_error $? "\"You don't have a working C++ compiler.\"" "$LINENO" 5
20321fi
20322
20323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::isnan" >&5
20324$as_echo_n "checking for std::isnan... " >&6; }
20325ac_ext=cpp
20326ac_cpp='$CXXCPP $CPPFLAGS'
20327ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20328ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20329ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20330
20331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20332/* end confdefs.h.  */
20333#include <cmath>
20334    int CPLIsNan(float f) { return std::isnan(f); }
20335int
20336main ()
20337{
20338
20339  ;
20340  return 0;
20341}
20342_ACEOF
20343if ac_fn_cxx_try_compile "$LINENO"; then :
20344
20345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20346$as_echo "yes" >&6; }
20347
20348cat >>confdefs.h <<_ACEOF
20349#define HAVE_STD_IS_NAN 1
20350_ACEOF
20351
20352
20353else
20354
20355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20356$as_echo "no" >&6; }
20357
20358fi
20359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20360ac_ext=c
20361ac_cpp='$CPP $CPPFLAGS'
20362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20364ac_compiler_gnu=$ac_cv_c_compiler_gnu
20365
20366
20367
20368# Check whether --with-libtool was given.
20369if test "${with_libtool+set}" = set; then :
20370  withval=$with_libtool;
20371fi
20372
20373
20374if test "$with_libtool" = "no"; then
20375if test -n "$ac_tool_prefix"; then
20376  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
20377set dummy ${ac_tool_prefix}ranlib; ac_word=$2
20378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20379$as_echo_n "checking for $ac_word... " >&6; }
20380if ${ac_cv_prog_RANLIB+:} false; then :
20381  $as_echo_n "(cached) " >&6
20382else
20383  if test -n "$RANLIB"; then
20384  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
20385else
20386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20387for as_dir in $PATH
20388do
20389  IFS=$as_save_IFS
20390  test -z "$as_dir" && as_dir=.
20391    for ac_exec_ext in '' $ac_executable_extensions; do
20392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20393    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
20394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20395    break 2
20396  fi
20397done
20398  done
20399IFS=$as_save_IFS
20400
20401fi
20402fi
20403RANLIB=$ac_cv_prog_RANLIB
20404if test -n "$RANLIB"; then
20405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
20406$as_echo "$RANLIB" >&6; }
20407else
20408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20409$as_echo "no" >&6; }
20410fi
20411
20412
20413fi
20414if test -z "$ac_cv_prog_RANLIB"; then
20415  ac_ct_RANLIB=$RANLIB
20416  # Extract the first word of "ranlib", so it can be a program name with args.
20417set dummy ranlib; ac_word=$2
20418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20419$as_echo_n "checking for $ac_word... " >&6; }
20420if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
20421  $as_echo_n "(cached) " >&6
20422else
20423  if test -n "$ac_ct_RANLIB"; then
20424  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
20425else
20426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20427for as_dir in $PATH
20428do
20429  IFS=$as_save_IFS
20430  test -z "$as_dir" && as_dir=.
20431    for ac_exec_ext in '' $ac_executable_extensions; do
20432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20433    ac_cv_prog_ac_ct_RANLIB="ranlib"
20434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20435    break 2
20436  fi
20437done
20438  done
20439IFS=$as_save_IFS
20440
20441fi
20442fi
20443ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
20444if test -n "$ac_ct_RANLIB"; then
20445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
20446$as_echo "$ac_ct_RANLIB" >&6; }
20447else
20448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20449$as_echo "no" >&6; }
20450fi
20451
20452  if test "x$ac_ct_RANLIB" = x; then
20453    RANLIB=":"
20454  else
20455    case $cross_compiling:$ac_tool_warned in
20456yes:)
20457{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20458$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20459ac_tool_warned=yes ;;
20460esac
20461    RANLIB=$ac_ct_RANLIB
20462  fi
20463else
20464  RANLIB="$ac_cv_prog_RANLIB"
20465fi
20466
20467
20468	echo 'void f(){}' > conftest.c
20469	if test -z "`${CC-cc} $CFLAGS -fPIC -c conftest.c 2>&1`"; then
20470	  CFLAGS="$CFLAGS -fPIC"
20471	fi
20472	echo 'void f(){}' > conftest.cpp
20473	if test -z "`${CXX-g++} $CXXFLAGS -fPIC -c conftest.cpp 2>&1`"; then
20474	  CXXFLAGS="$CXXFLAGS -fPIC"
20475	fi
20476	rm -f conftest*
20477
20478SAVED_CFLAGS=$CFLAGS
20479CFLAGS=`echo "$CFLAGS " | sed "s/-fsanitize=undefined //" | sed "s/-fsanitize=address //" | sed "s/-fsanitize=unsigned-integer-overflow //"`
20480
20481  echo 'void g(); int main(){ g(); return 0; }' > conftest1.c
20482
20483  echo '#include <stdio.h>' > conftest2.c
20484  echo 'void g(); void g(){printf("");}' >> conftest2.c
20485  ${CC} ${CFLAGS} -c conftest2.c
20486
20487  SO_EXT="so"
20488  export SO_EXT
20489  LD_SHARED="/bin/true"
20490  if test ! -z "`uname -a | grep IRIX`" ; then
20491    IRIX_ALL=-all
20492  else
20493    IRIX_ALL=
20494  fi
20495
20496
20497# Check whether --with-ld-shared was given.
20498if test "${with_ld_shared+set}" = set; then :
20499  withval=$with_ld_shared;
20500fi
20501
20502
20503  if test "$with_ld_shared" != "" ; then
20504    if test "$with_ld_shared" = "no" ; then
20505      echo "user disabled shared library support."
20506    elif test "$with_ld_shared" = "yes" ; then
20507      as_fn_error $? "--with-ld-shared not supported" "$LINENO" 5
20508    else
20509      echo "using user supplied .so link command ... $with_ld_shared"
20510    fi
20511    LD_SHARED="$with_ld_shared"
20512  fi
20513
20514
20515  if test ! -z "`uname -a | grep CYGWIN`" \
20516        -a "$LD_SHARED" = "/bin/true" \
20517	-a -z "`gcc -shared conftest2.o -o libconftest.dll`" ; then
20518    if test -z "`${CC} conftest1.c -L./ -lconftest -o conftest1 2>&1`"; then
20519      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
20520      if test -z "$LD_LIBRARY_PATH" ; then
20521        LD_LIBRARY_PATH="`pwd`"
20522      else
20523        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
20524      fi
20525      export LD_LIBRARY_PATH
20526      if test -z "`./conftest1 2>&1`" ; then
20527        echo "checking for Cygwin gcc -shared ... yes"
20528        LD_SHARED="c++ -shared"
20529        SO_EXT="dll"
20530      fi
20531      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
20532    fi
20533  fi
20534
20535
20536  if test ! -z "`uname | grep Darwin`" \
20537          -a "$LD_SHARED" = "/bin/true" \
20538          -a -z "`${CXX} -dynamiclib conftest2.o -o libconftest.so 2>&1`" ; then
20539    ${CC} -c conftest1.c
20540    if test -z "`${CXX} conftest1.o libconftest.so -o conftest1 2>&1`"; then
20541      DYLD_LIBRARY_PATH_OLD="$DYLD_LIBRARY_PATH"
20542      if test -z "$DYLD_LIBRARY_PATH" ; then
20543        DYLD_LIBRARY_PATH="`pwd`"
20544      else
20545        DYLD_LIBRARY_PATH="`pwd`:$DYLD_LIBRARY_PATH"
20546      fi
20547      export DYLD_LIBRARY_PATH
20548      if test -z "`./conftest1 2>&1`" ; then
20549        echo "checking for ${CXX} -dynamiclib ... yes"
20550        LD_SHARED="${CXX} -dynamiclib"
20551	SO_EXT=dylib
20552      fi
20553      DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH_OLD"
20554    fi
20555    rm -f conftest1.o
20556  fi
20557
20558  if test "$LD_SHARED" = "/bin/true" \
20559	-a -z "`${CXX} -shared $IRIX_ALL conftest2.o -o libconftest.so 2>&1|grep -v WARNING`" ; then
20560    if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then
20561      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
20562      if test -z "$LD_LIBRARY_PATH" ; then
20563        LD_LIBRARY_PATH="`pwd`"
20564      else
20565        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
20566      fi
20567      export LD_LIBRARY_PATH
20568      if test -z "`./conftest1 2>&1`" ; then
20569        echo "checking for ${CXX} -shared ... yes"
20570        LD_SHARED="${CXX} -shared $IRIX_ALL"
20571      else
20572        echo "checking for ${CXX} -shared ... no(3)"
20573      fi
20574      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
20575    else
20576      echo "checking for ${CXX} -shared ... no(2)"
20577    fi
20578  else
20579    if test "$LD_SHARED" = "/bin/true" ; then
20580      echo "checking for ${CXX} -shared ... no(1)"
20581    fi
20582  fi
20583
20584  if test "$LD_SHARED" = "/bin/true" \
20585          -a -z "`ld -shared conftest2.o -o libconftest.so 2>&1`" ; then
20586    if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then
20587      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
20588      if test -z "$LD_LIBRARY_PATH" ; then
20589        LD_LIBRARY_PATH="`pwd`"
20590      else
20591        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
20592      fi
20593      export LD_LIBRARY_PATH
20594      if test -z "`./conftest1 2>&1`" ; then
20595        echo "checking for ld -shared ... yes"
20596        LD_SHARED="ld -shared"
20597      fi
20598      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
20599    fi
20600  fi
20601
20602  if test "$LD_SHARED" = "/bin/true" ; then
20603    echo "checking for ld -shared ... no"
20604    if test ! -x /bin/true ; then
20605      LD_SHARED=/usr/bin/true
20606    fi
20607  fi
20608  if test "$LD_SHARED" = "no" ; then
20609    if test -x /bin/true ; then
20610      LD_SHARED=/bin/true
20611    else
20612      LD_SHARED=/usr/bin/true
20613    fi
20614  fi
20615
20616  rm -f conftest* libconftest*
20617
20618  LD_SHARED=$LD_SHARED
20619
20620  SO_EXT=$SO_EXT
20621
20622
20623CFLAGS=$SAVED_CFLAGS
20624else
20625with_libtool=yes
20626fi
20627HAVE_LIBTOOL=$with_libtool
20628
20629
20630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
20631$as_echo_n "checking for dlopen in -ldl... " >&6; }
20632if ${ac_cv_lib_dl_dlopen+:} false; then :
20633  $as_echo_n "(cached) " >&6
20634else
20635  ac_check_lib_save_LIBS=$LIBS
20636LIBS="-ldl  $LIBS"
20637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20638/* end confdefs.h.  */
20639
20640/* Override any GCC internal prototype to avoid an error.
20641   Use char because int might match the return type of a GCC
20642   builtin and then its argument prototype would still apply.  */
20643#ifdef __cplusplus
20644extern "C"
20645#endif
20646char dlopen ();
20647int
20648main ()
20649{
20650return dlopen ();
20651  ;
20652  return 0;
20653}
20654_ACEOF
20655if ac_fn_c_try_link "$LINENO"; then :
20656  ac_cv_lib_dl_dlopen=yes
20657else
20658  ac_cv_lib_dl_dlopen=no
20659fi
20660rm -f core conftest.err conftest.$ac_objext \
20661    conftest$ac_exeext conftest.$ac_ext
20662LIBS=$ac_check_lib_save_LIBS
20663fi
20664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
20665$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
20666if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
20667  cat >>confdefs.h <<_ACEOF
20668#define HAVE_LIBDL 1
20669_ACEOF
20670
20671  LIBS="-ldl $LIBS"
20672
20673fi
20674
20675
20676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
20677$as_echo_n "checking for nanosleep in -lrt... " >&6; }
20678if ${ac_cv_lib_rt_nanosleep+:} false; then :
20679  $as_echo_n "(cached) " >&6
20680else
20681  ac_check_lib_save_LIBS=$LIBS
20682LIBS="-lrt  $LIBS"
20683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20684/* end confdefs.h.  */
20685
20686/* Override any GCC internal prototype to avoid an error.
20687   Use char because int might match the return type of a GCC
20688   builtin and then its argument prototype would still apply.  */
20689#ifdef __cplusplus
20690extern "C"
20691#endif
20692char nanosleep ();
20693int
20694main ()
20695{
20696return nanosleep ();
20697  ;
20698  return 0;
20699}
20700_ACEOF
20701if ac_fn_c_try_link "$LINENO"; then :
20702  ac_cv_lib_rt_nanosleep=yes
20703else
20704  ac_cv_lib_rt_nanosleep=no
20705fi
20706rm -f core conftest.err conftest.$ac_objext \
20707    conftest$ac_exeext conftest.$ac_ext
20708LIBS=$ac_check_lib_save_LIBS
20709fi
20710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
20711$as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
20712if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
20713  cat >>confdefs.h <<_ACEOF
20714#define HAVE_LIBRT 1
20715_ACEOF
20716
20717  LIBS="-lrt $LIBS"
20718
20719fi
20720
20721
20722case "${host_os}" in
20723    cygwin* | mingw32* | pw32* | beos* | darwin*)
20724        ;;
20725    *)
20726	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
20727$as_echo_n "checking for sin in -lm... " >&6; }
20728if ${ac_cv_lib_m_sin+:} false; then :
20729  $as_echo_n "(cached) " >&6
20730else
20731  ac_check_lib_save_LIBS=$LIBS
20732LIBS="-lm  $LIBS"
20733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20734/* end confdefs.h.  */
20735
20736/* Override any GCC internal prototype to avoid an error.
20737   Use char because int might match the return type of a GCC
20738   builtin and then its argument prototype would still apply.  */
20739#ifdef __cplusplus
20740extern "C"
20741#endif
20742char sin ();
20743int
20744main ()
20745{
20746return sin ();
20747  ;
20748  return 0;
20749}
20750_ACEOF
20751if ac_fn_c_try_link "$LINENO"; then :
20752  ac_cv_lib_m_sin=yes
20753else
20754  ac_cv_lib_m_sin=no
20755fi
20756rm -f core conftest.err conftest.$ac_objext \
20757    conftest$ac_exeext conftest.$ac_ext
20758LIBS=$ac_check_lib_save_LIBS
20759fi
20760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
20761$as_echo "$ac_cv_lib_m_sin" >&6; }
20762if test "x$ac_cv_lib_m_sin" = xyes; then :
20763  cat >>confdefs.h <<_ACEOF
20764#define HAVE_LIBM 1
20765_ACEOF
20766
20767  LIBS="-lm $LIBS"
20768
20769fi
20770
20771        ;;
20772esac
20773
20774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
20775$as_echo_n "checking for ANSI C header files... " >&6; }
20776if ${ac_cv_header_stdc+:} false; then :
20777  $as_echo_n "(cached) " >&6
20778else
20779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20780/* end confdefs.h.  */
20781#include <stdlib.h>
20782#include <stdarg.h>
20783#include <string.h>
20784#include <float.h>
20785
20786int
20787main ()
20788{
20789
20790  ;
20791  return 0;
20792}
20793_ACEOF
20794if ac_fn_c_try_compile "$LINENO"; then :
20795  ac_cv_header_stdc=yes
20796else
20797  ac_cv_header_stdc=no
20798fi
20799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20800
20801if test $ac_cv_header_stdc = yes; then
20802  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20804/* end confdefs.h.  */
20805#include <string.h>
20806
20807_ACEOF
20808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20809  $EGREP "memchr" >/dev/null 2>&1; then :
20810
20811else
20812  ac_cv_header_stdc=no
20813fi
20814rm -f conftest*
20815
20816fi
20817
20818if test $ac_cv_header_stdc = yes; then
20819  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20821/* end confdefs.h.  */
20822#include <stdlib.h>
20823
20824_ACEOF
20825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20826  $EGREP "free" >/dev/null 2>&1; then :
20827
20828else
20829  ac_cv_header_stdc=no
20830fi
20831rm -f conftest*
20832
20833fi
20834
20835if test $ac_cv_header_stdc = yes; then
20836  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20837  if test "$cross_compiling" = yes; then :
20838  :
20839else
20840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20841/* end confdefs.h.  */
20842#include <ctype.h>
20843#include <stdlib.h>
20844#if ((' ' & 0x0FF) == 0x020)
20845# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20846# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20847#else
20848# define ISLOWER(c) \
20849		   (('a' <= (c) && (c) <= 'i') \
20850		     || ('j' <= (c) && (c) <= 'r') \
20851		     || ('s' <= (c) && (c) <= 'z'))
20852# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20853#endif
20854
20855#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20856int
20857main ()
20858{
20859  int i;
20860  for (i = 0; i < 256; i++)
20861    if (XOR (islower (i), ISLOWER (i))
20862	|| toupper (i) != TOUPPER (i))
20863      return 2;
20864  return 0;
20865}
20866_ACEOF
20867if ac_fn_c_try_run "$LINENO"; then :
20868
20869else
20870  ac_cv_header_stdc=no
20871fi
20872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20873  conftest.$ac_objext conftest.beam conftest.$ac_ext
20874fi
20875
20876fi
20877fi
20878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
20879$as_echo "$ac_cv_header_stdc" >&6; }
20880if test $ac_cv_header_stdc = yes; then
20881
20882$as_echo "#define STDC_HEADERS 1" >>confdefs.h
20883
20884fi
20885
20886for ac_header in assert.h fcntl.h unistd.h dbmalloc.h dlfcn.h stdint.h limits.h locale.h values.h float.h errno.h direct.h
20887do :
20888  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20889ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20890if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20891  cat >>confdefs.h <<_ACEOF
20892#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20893_ACEOF
20894
20895fi
20896
20897done
20898
20899
20900for ac_header in linux/userfaultfd.h
20901do :
20902  ac_fn_c_check_header_mongrel "$LINENO" "linux/userfaultfd.h" "ac_cv_header_linux_userfaultfd_h" "$ac_includes_default"
20903if test "x$ac_cv_header_linux_userfaultfd_h" = xyes; then :
20904  cat >>confdefs.h <<_ACEOF
20905#define HAVE_LINUX_USERFAULTFD_H 1
20906_ACEOF
20907 ENABLE_UFFD="yes"
20908else
20909  ENABLE_UFFD="no"
20910fi
20911
20912done
20913
20914ENABLE_UFFD=$ENABLE_UFFD
20915
20916
20917case "${host_os}" in
20918    linux*)
20919        for ac_header in linux/fs.h
20920do :
20921  ac_fn_c_check_header_mongrel "$LINENO" "linux/fs.h" "ac_cv_header_linux_fs_h" "$ac_includes_default"
20922if test "x$ac_cv_header_linux_fs_h" = xyes; then :
20923  cat >>confdefs.h <<_ACEOF
20924#define HAVE_LINUX_FS_H 1
20925_ACEOF
20926
20927else
20928  as_fn_error $? "Unable to find linux/fs.h header" "$LINENO" 5
20929fi
20930
20931done
20932
20933        ;;
20934    *)
20935        ;;
20936esac
20937
20938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
20939$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
20940if ${ac_cv_c_bigendian+:} false; then :
20941  $as_echo_n "(cached) " >&6
20942else
20943  ac_cv_c_bigendian=unknown
20944    # See if we're dealing with a universal compiler.
20945    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20946/* end confdefs.h.  */
20947#ifndef __APPLE_CC__
20948	       not a universal capable compiler
20949	     #endif
20950	     typedef int dummy;
20951
20952_ACEOF
20953if ac_fn_c_try_compile "$LINENO"; then :
20954
20955	# Check for potential -arch flags.  It is not universal unless
20956	# there are at least two -arch flags with different values.
20957	ac_arch=
20958	ac_prev=
20959	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
20960	 if test -n "$ac_prev"; then
20961	   case $ac_word in
20962	     i?86 | x86_64 | ppc | ppc64)
20963	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
20964		 ac_arch=$ac_word
20965	       else
20966		 ac_cv_c_bigendian=universal
20967		 break
20968	       fi
20969	       ;;
20970	   esac
20971	   ac_prev=
20972	 elif test "x$ac_word" = "x-arch"; then
20973	   ac_prev=arch
20974	 fi
20975       done
20976fi
20977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20978    if test $ac_cv_c_bigendian = unknown; then
20979      # See if sys/param.h defines the BYTE_ORDER macro.
20980      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20981/* end confdefs.h.  */
20982#include <sys/types.h>
20983	     #include <sys/param.h>
20984
20985int
20986main ()
20987{
20988#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
20989		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
20990		     && LITTLE_ENDIAN)
20991	      bogus endian macros
20992	     #endif
20993
20994  ;
20995  return 0;
20996}
20997_ACEOF
20998if ac_fn_c_try_compile "$LINENO"; then :
20999  # It does; now see whether it defined to BIG_ENDIAN or not.
21000	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21001/* end confdefs.h.  */
21002#include <sys/types.h>
21003		#include <sys/param.h>
21004
21005int
21006main ()
21007{
21008#if BYTE_ORDER != BIG_ENDIAN
21009		 not big endian
21010		#endif
21011
21012  ;
21013  return 0;
21014}
21015_ACEOF
21016if ac_fn_c_try_compile "$LINENO"; then :
21017  ac_cv_c_bigendian=yes
21018else
21019  ac_cv_c_bigendian=no
21020fi
21021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21022fi
21023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21024    fi
21025    if test $ac_cv_c_bigendian = unknown; then
21026      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
21027      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21028/* end confdefs.h.  */
21029#include <limits.h>
21030
21031int
21032main ()
21033{
21034#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
21035	      bogus endian macros
21036	     #endif
21037
21038  ;
21039  return 0;
21040}
21041_ACEOF
21042if ac_fn_c_try_compile "$LINENO"; then :
21043  # It does; now see whether it defined to _BIG_ENDIAN or not.
21044	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21045/* end confdefs.h.  */
21046#include <limits.h>
21047
21048int
21049main ()
21050{
21051#ifndef _BIG_ENDIAN
21052		 not big endian
21053		#endif
21054
21055  ;
21056  return 0;
21057}
21058_ACEOF
21059if ac_fn_c_try_compile "$LINENO"; then :
21060  ac_cv_c_bigendian=yes
21061else
21062  ac_cv_c_bigendian=no
21063fi
21064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21065fi
21066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21067    fi
21068    if test $ac_cv_c_bigendian = unknown; then
21069      # Compile a test program.
21070      if test "$cross_compiling" = yes; then :
21071  # Try to guess by grepping values from an object file.
21072	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21073/* end confdefs.h.  */
21074short int ascii_mm[] =
21075		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21076		short int ascii_ii[] =
21077		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
21078		int use_ascii (int i) {
21079		  return ascii_mm[i] + ascii_ii[i];
21080		}
21081		short int ebcdic_ii[] =
21082		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21083		short int ebcdic_mm[] =
21084		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
21085		int use_ebcdic (int i) {
21086		  return ebcdic_mm[i] + ebcdic_ii[i];
21087		}
21088		extern int foo;
21089
21090int
21091main ()
21092{
21093return use_ascii (foo) == use_ebcdic (foo);
21094  ;
21095  return 0;
21096}
21097_ACEOF
21098if ac_fn_c_try_compile "$LINENO"; then :
21099  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
21100	      ac_cv_c_bigendian=yes
21101	    fi
21102	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
21103	      if test "$ac_cv_c_bigendian" = unknown; then
21104		ac_cv_c_bigendian=no
21105	      else
21106		# finding both strings is unlikely to happen, but who knows?
21107		ac_cv_c_bigendian=unknown
21108	      fi
21109	    fi
21110fi
21111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21112else
21113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21114/* end confdefs.h.  */
21115$ac_includes_default
21116int
21117main ()
21118{
21119
21120	     /* Are we little or big endian?  From Harbison&Steele.  */
21121	     union
21122	     {
21123	       long int l;
21124	       char c[sizeof (long int)];
21125	     } u;
21126	     u.l = 1;
21127	     return u.c[sizeof (long int) - 1] == 1;
21128
21129  ;
21130  return 0;
21131}
21132_ACEOF
21133if ac_fn_c_try_run "$LINENO"; then :
21134  ac_cv_c_bigendian=no
21135else
21136  ac_cv_c_bigendian=yes
21137fi
21138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21139  conftest.$ac_objext conftest.beam conftest.$ac_ext
21140fi
21141
21142    fi
21143fi
21144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
21145$as_echo "$ac_cv_c_bigendian" >&6; }
21146 case $ac_cv_c_bigendian in #(
21147   yes)
21148     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
21149;; #(
21150   no)
21151      ;; #(
21152   universal)
21153
21154$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
21155
21156     ;; #(
21157   *)
21158     as_fn_error $? "unknown endianness
21159 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
21160 esac
21161
21162
21163ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
21164if test "x$ac_cv_type_long_long" = xyes; then :
21165
21166cat >>confdefs.h <<_ACEOF
21167#define HAVE_LONG_LONG 1
21168_ACEOF
21169
21170
21171fi
21172
21173
21174
21175# Check whether --with-unix-stdio-64 was given.
21176if test "${with_unix_stdio_64+set}" = set; then :
21177  withval=$with_unix_stdio_64;
21178fi
21179
21180
21181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64bit file io" >&5
21182$as_echo_n "checking for 64bit file io... " >&6; }
21183
21184          if test x"$with_unix_stdio_64" = x"" ; then
21185    echo '#if defined(__MINGW32__)' > conftest.c
21186    echo '#ifndef __MSVCRT_VERSION__' >> conftest.c
21187    echo '#define __MSVCRT_VERSION__ 0x0601' >> conftest.c
21188    echo '#endif' >> conftest.c
21189    echo '#endif' >> conftest.c
21190    echo '#include <sys/types.h>' >> conftest.c
21191    echo '#include <sys/stat.h>' >> conftest.c
21192    echo 'int main() { struct __stat64 buf; _stat64( "", &buf ); return 0; }' >> conftest.c
21193    if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
21194        with_unix_stdio_64=no
21195
21196cat >>confdefs.h <<_ACEOF
21197#define VSI_STAT64 _stat64
21198_ACEOF
21199
21200
21201cat >>confdefs.h <<_ACEOF
21202#define VSI_STAT64_T __stat64
21203_ACEOF
21204
21205    fi
21206    rm -f conftest*
21207  fi
21208
21209  if test x"$with_unix_stdio_64" = x"yes" ; then
21210    VSI_FTELL64=ftell64
21211    VSI_FSEEK64=fseek64
21212  fi
21213
21214  if test x"$with_unix_stdio_64" = x"" ; then
21215    echo '#include <stdio.h>' > conftest.c
21216    echo 'int main() { long long off=0; fseek64(NULL, off, SEEK_SET); off = ftell64(NULL); return 0; }' >> conftest.c
21217    if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
21218      with_unix_stdio_64=yes
21219      VSI_FTELL64=ftell64
21220      VSI_FSEEK64=fseek64
21221    fi
21222    rm -f conftest*
21223  fi
21224
21225
21226  if test x"$with_unix_stdio_64" = x"" ; then
21227    echo '#include <stdio.h>' > conftest.cpp
21228    echo 'int main() { long long off=0; fseeko64(NULL, off, SEEK_SET); off = ftello64(NULL); return 0; }' >> conftest.cpp
21229    if test -z "`${CXX} ${CXXFLAGS} -o conftest conftest.cpp 2>&1`" ; then
21230      with_unix_stdio_64=yes
21231      VSI_FTELL64=ftello64
21232      VSI_FSEEK64=fseeko64
21233    fi
21234    rm -f conftest*
21235  fi
21236
21237
21238  if test x"$with_unix_stdio_64" = x"" ; then
21239    echo '#define _LARGEFILE64_SOURCE' > conftest.cpp
21240    echo '#include <stdio.h>' >> conftest.cpp
21241    echo 'int main() { long long off=0; fseeko64(NULL, off, SEEK_SET); off = ftello64(NULL); return 0; }' >> conftest.cpp
21242    if test -z "`${CXX} ${CXXFLAGS} -o conftest conftest.cpp 2>&1`" ; then
21243      with_unix_stdio_64=yes
21244      VSI_FTELL64=ftello64
21245      VSI_FSEEK64=fseeko64
21246
21247$as_echo "#define VSI_NEED_LARGEFILE64_SOURCE 1" >>confdefs.h
21248
21249    fi
21250    rm -f conftest*
21251  fi
21252
21253
21254  if test x"$with_unix_stdio_64" = x"" ; then
21255    case "${host_os}" in
21256      darwin*)
21257        with_unix_stdio_64=yes
21258        VSI_FTELL64=ftello
21259        VSI_FSEEK64=fseeko
21260        ;;
21261    esac
21262  fi
21263
21264
21265  if test x"$with_unix_stdio_64" = x"" ; then
21266    echo '#include <stdio.h>' > conftest.c
21267    echo 'int main() { fpos_t off=0; fseeko(NULL, off, SEEK_SET); off = ftello(NULL); return 0; }' >> conftest.c
21268    if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
21269      with_unix_stdio_64=yes
21270      VSI_FTELL64=ftello
21271      VSI_FSEEK64=fseeko
21272    fi
21273    rm -f conftest*
21274  fi
21275
21276  if test x"$with_unix_stdio_64" = x"yes" ; then
21277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21278$as_echo "yes" >&6; }
21279
21280    case "${host_os}" in
21281      darwin*)
21282        VSI_STAT64=stat
21283        VSI_STAT64_T=stat
21284        ;;
21285      *)
21286        ac_fn_c_check_func "$LINENO" "stat64" "ac_cv_func_stat64"
21287if test "x$ac_cv_func_stat64" = xyes; then :
21288  VSI_STAT64=stat64 VSI_STAT64_T=stat64
21289else
21290  VSI_STAT64=stat VSI_STAT64_T=stat
21291fi
21292
21293        ;;
21294    esac
21295    ac_fn_c_check_func "$LINENO" "fopen64" "ac_cv_func_fopen64"
21296if test "x$ac_cv_func_fopen64" = xyes; then :
21297  VSI_FOPEN64=fopen64
21298else
21299  VSI_FOPEN64=fopen
21300fi
21301
21302    ac_fn_c_check_func "$LINENO" "ftruncate64" "ac_cv_func_ftruncate64"
21303if test "x$ac_cv_func_ftruncate64" = xyes; then :
21304  VSI_FTRUNCATE64=ftruncate64
21305else
21306  VSI_FTRUNCATE64=ftruncate
21307fi
21308
21309
21310
21311$as_echo "#define UNIX_STDIO_64 1" >>confdefs.h
21312
21313
21314$as_echo "#define VSI_LARGE_API_SUPPORTED 1" >>confdefs.h
21315
21316
21317    export VSI_FTELL64 VSI_FSEEK64 VSI_STAT64 VSI_STAT64_T VSI_OPEN64 VSI_FTRUNCATE64
21318
21319cat >>confdefs.h <<_ACEOF
21320#define VSI_FTELL64 $VSI_FTELL64
21321_ACEOF
21322
21323
21324cat >>confdefs.h <<_ACEOF
21325#define VSI_FSEEK64 $VSI_FSEEK64
21326_ACEOF
21327
21328
21329cat >>confdefs.h <<_ACEOF
21330#define VSI_STAT64 $VSI_STAT64
21331_ACEOF
21332
21333
21334cat >>confdefs.h <<_ACEOF
21335#define VSI_STAT64_T $VSI_STAT64_T
21336_ACEOF
21337
21338
21339cat >>confdefs.h <<_ACEOF
21340#define VSI_FOPEN64 $VSI_FOPEN64
21341_ACEOF
21342
21343
21344cat >>confdefs.h <<_ACEOF
21345#define VSI_FTRUNCATE64 $VSI_FTRUNCATE64
21346_ACEOF
21347
21348  else
21349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21350$as_echo "no" >&6; }
21351  fi
21352
21353
21354
21355# The cast to long int works around a bug in the HP C Compiler
21356# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21357# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21358# This bug is HP SR number 8606223364.
21359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
21360$as_echo_n "checking size of int... " >&6; }
21361if ${ac_cv_sizeof_int+:} false; then :
21362  $as_echo_n "(cached) " >&6
21363else
21364  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
21365
21366else
21367  if test "$ac_cv_type_int" = yes; then
21368     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21369$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21370as_fn_error 77 "cannot compute sizeof (int)
21371See \`config.log' for more details" "$LINENO" 5; }
21372   else
21373     ac_cv_sizeof_int=0
21374   fi
21375fi
21376
21377fi
21378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
21379$as_echo "$ac_cv_sizeof_int" >&6; }
21380
21381
21382
21383cat >>confdefs.h <<_ACEOF
21384#define SIZEOF_INT $ac_cv_sizeof_int
21385_ACEOF
21386
21387
21388# The cast to long int works around a bug in the HP C Compiler
21389# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21390# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21391# This bug is HP SR number 8606223364.
21392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
21393$as_echo_n "checking size of unsigned long... " >&6; }
21394if ${ac_cv_sizeof_unsigned_long+:} false; then :
21395  $as_echo_n "(cached) " >&6
21396else
21397  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
21398
21399else
21400  if test "$ac_cv_type_unsigned_long" = yes; then
21401     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21403as_fn_error 77 "cannot compute sizeof (unsigned long)
21404See \`config.log' for more details" "$LINENO" 5; }
21405   else
21406     ac_cv_sizeof_unsigned_long=0
21407   fi
21408fi
21409
21410fi
21411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
21412$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
21413
21414
21415
21416cat >>confdefs.h <<_ACEOF
21417#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
21418_ACEOF
21419
21420
21421# The cast to long int works around a bug in the HP C Compiler
21422# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21423# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21424# This bug is HP SR number 8606223364.
21425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
21426$as_echo_n "checking size of void*... " >&6; }
21427if ${ac_cv_sizeof_voidp+:} false; then :
21428  $as_echo_n "(cached) " >&6
21429else
21430  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
21431
21432else
21433  if test "$ac_cv_type_voidp" = yes; then
21434     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21436as_fn_error 77 "cannot compute sizeof (void*)
21437See \`config.log' for more details" "$LINENO" 5; }
21438   else
21439     ac_cv_sizeof_voidp=0
21440   fi
21441fi
21442
21443fi
21444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
21445$as_echo "$ac_cv_sizeof_voidp" >&6; }
21446
21447
21448
21449cat >>confdefs.h <<_ACEOF
21450#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
21451_ACEOF
21452
21453
21454ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "
21455#if HAVE_INTTYPES_H
21456# include <inttypes.h>
21457#endif
21458
21459"
21460if test "x$ac_cv_type_int8" = xyes; then :
21461
21462cat >>confdefs.h <<_ACEOF
21463#define HAVE_INT8 1
21464_ACEOF
21465
21466
21467fi
21468ac_fn_c_check_type "$LINENO" "int16" "ac_cv_type_int16" "
21469#if HAVE_INTTYPES_H
21470# include <inttypes.h>
21471#endif
21472
21473"
21474if test "x$ac_cv_type_int16" = xyes; then :
21475
21476cat >>confdefs.h <<_ACEOF
21477#define HAVE_INT16 1
21478_ACEOF
21479
21480
21481fi
21482ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "
21483#if HAVE_INTTYPES_H
21484# include <inttypes.h>
21485#endif
21486
21487"
21488if test "x$ac_cv_type_int32" = xyes; then :
21489
21490cat >>confdefs.h <<_ACEOF
21491#define HAVE_INT32 1
21492_ACEOF
21493
21494
21495fi
21496
21497ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
21498if test "x$ac_cv_type_uintptr_t" = xyes; then :
21499
21500cat >>confdefs.h <<_ACEOF
21501#define HAVE_UINTPTR_T 1
21502_ACEOF
21503
21504
21505fi
21506
21507
21508HAVE_IEEEFP=1
21509
21510cat >>confdefs.h <<_ACEOF
21511#define HAVE_IEEEFP $HAVE_IEEEFP
21512_ACEOF
21513
21514
21515for ac_func in vprintf
21516do :
21517  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
21518if test "x$ac_cv_func_vprintf" = xyes; then :
21519  cat >>confdefs.h <<_ACEOF
21520#define HAVE_VPRINTF 1
21521_ACEOF
21522
21523ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
21524if test "x$ac_cv_func__doprnt" = xyes; then :
21525
21526$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
21527
21528fi
21529
21530fi
21531done
21532
21533
21534for ac_func in snprintf vsnprintf
21535do :
21536  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21537ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21538if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21539  cat >>confdefs.h <<_ACEOF
21540#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21541_ACEOF
21542
21543fi
21544done
21545
21546for ac_func in atoll
21547do :
21548  ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
21549if test "x$ac_cv_func_atoll" = xyes; then :
21550  cat >>confdefs.h <<_ACEOF
21551#define HAVE_ATOLL 1
21552_ACEOF
21553
21554fi
21555done
21556
21557for ac_func in strtoll
21558do :
21559  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
21560if test "x$ac_cv_func_strtoll" = xyes; then :
21561  cat >>confdefs.h <<_ACEOF
21562#define HAVE_STRTOLL 1
21563_ACEOF
21564
21565fi
21566done
21567
21568for ac_func in strtoull
21569do :
21570  ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
21571if test "x$ac_cv_func_strtoull" = xyes; then :
21572  cat >>confdefs.h <<_ACEOF
21573#define HAVE_STRTOULL 1
21574_ACEOF
21575
21576fi
21577done
21578
21579for ac_func in strtof
21580do :
21581  ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
21582if test "x$ac_cv_func_strtof" = xyes; then :
21583  cat >>confdefs.h <<_ACEOF
21584#define HAVE_STRTOF 1
21585_ACEOF
21586
21587fi
21588done
21589
21590for ac_func in getcwd
21591do :
21592  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
21593if test "x$ac_cv_func_getcwd" = xyes; then :
21594  cat >>confdefs.h <<_ACEOF
21595#define HAVE_GETCWD 1
21596_ACEOF
21597
21598fi
21599done
21600
21601
21602ac_fn_c_check_decl "$LINENO" "strtof" "ac_cv_have_decl_strtof" "$ac_includes_default"
21603if test "x$ac_cv_have_decl_strtof" = xyes; then :
21604  ac_have_decl=1
21605else
21606  ac_have_decl=0
21607fi
21608
21609cat >>confdefs.h <<_ACEOF
21610#define HAVE_DECL_STRTOF $ac_have_decl
21611_ACEOF
21612
21613
21614for ac_func in readlink
21615do :
21616  ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
21617if test "x$ac_cv_func_readlink" = xyes; then :
21618  cat >>confdefs.h <<_ACEOF
21619#define HAVE_READLINK 1
21620_ACEOF
21621
21622fi
21623done
21624
21625for ac_func in lstat
21626do :
21627  ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
21628if test "x$ac_cv_func_lstat" = xyes; then :
21629  cat >>confdefs.h <<_ACEOF
21630#define HAVE_LSTAT 1
21631_ACEOF
21632
21633fi
21634done
21635
21636for ac_func in posix_spawnp
21637do :
21638  ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
21639if test "x$ac_cv_func_posix_spawnp" = xyes; then :
21640  cat >>confdefs.h <<_ACEOF
21641#define HAVE_POSIX_SPAWNP 1
21642_ACEOF
21643
21644fi
21645done
21646
21647for ac_func in posix_memalign
21648do :
21649  ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign"
21650if test "x$ac_cv_func_posix_memalign" = xyes; then :
21651  cat >>confdefs.h <<_ACEOF
21652#define HAVE_POSIX_MEMALIGN 1
21653_ACEOF
21654
21655fi
21656done
21657
21658for ac_func in vfork
21659do :
21660  ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
21661if test "x$ac_cv_func_vfork" = xyes; then :
21662  cat >>confdefs.h <<_ACEOF
21663#define HAVE_VFORK 1
21664_ACEOF
21665
21666fi
21667done
21668
21669for ac_func in mmap
21670do :
21671  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
21672if test "x$ac_cv_func_mmap" = xyes; then :
21673  cat >>confdefs.h <<_ACEOF
21674#define HAVE_MMAP 1
21675_ACEOF
21676
21677fi
21678done
21679
21680for ac_func in sigaction
21681do :
21682  ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
21683if test "x$ac_cv_func_sigaction" = xyes; then :
21684  cat >>confdefs.h <<_ACEOF
21685#define HAVE_SIGACTION 1
21686_ACEOF
21687
21688fi
21689done
21690
21691for ac_func in statvfs
21692do :
21693  ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
21694if test "x$ac_cv_func_statvfs" = xyes; then :
21695  cat >>confdefs.h <<_ACEOF
21696#define HAVE_STATVFS 1
21697_ACEOF
21698
21699fi
21700done
21701
21702for ac_func in statvfs64
21703do :
21704  ac_fn_c_check_func "$LINENO" "statvfs64" "ac_cv_func_statvfs64"
21705if test "x$ac_cv_func_statvfs64" = xyes; then :
21706  cat >>confdefs.h <<_ACEOF
21707#define HAVE_STATVFS64 1
21708_ACEOF
21709
21710fi
21711done
21712
21713for ac_func in getrlimit
21714do :
21715  ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
21716if test "x$ac_cv_func_getrlimit" = xyes; then :
21717  cat >>confdefs.h <<_ACEOF
21718#define HAVE_GETRLIMIT 1
21719_ACEOF
21720
21721fi
21722done
21723
21724
21725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_AS" >&5
21726$as_echo_n "checking for RLIMIT_AS... " >&6; }
21727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21728/* end confdefs.h.  */
21729
21730#include <sys/time.h>
21731#include <sys/resource.h>
21732
21733int
21734main ()
21735{
21736
21737    return RLIMIT_AS;
21738
21739  ;
21740  return 0;
21741}
21742_ACEOF
21743if ac_fn_c_try_compile "$LINENO"; then :
21744
21745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21746$as_echo "yes" >&6; }
21747
21748cat >>confdefs.h <<_ACEOF
21749#define HAVE_RLIMIT_AS 1
21750_ACEOF
21751
21752
21753else
21754
21755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21756$as_echo "no" >&6; }
21757
21758fi
21759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21760
21761
21762
21763ac_ext=cpp
21764ac_cpp='$CXXCPP $CPPFLAGS'
21765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21768
21769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmtime_r" >&5
21770$as_echo_n "checking for gmtime_r... " >&6; }
21771if ${ac_cv_func_gmtime_r+:} false; then :
21772  $as_echo_n "(cached) " >&6
21773else
21774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21775/* end confdefs.h.  */
21776
21777#include <assert.h>
21778#include <time.h>
21779void test_f()
21780{
21781  time_t t; struct tm ltime; t = time(0); gmtime_r( &t, &ltime );
21782}
21783
21784int
21785main ()
21786{
21787
21788  ;
21789  return 0;
21790}
21791_ACEOF
21792if ac_fn_cxx_try_link "$LINENO"; then :
21793  ac_cv_func_gmtime_r=yes
21794else
21795  ac_cv_func_gmtime_r=no
21796fi
21797rm -f core conftest.err conftest.$ac_objext \
21798    conftest$ac_exeext conftest.$ac_ext
21799fi
21800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gmtime_r" >&5
21801$as_echo "$ac_cv_func_gmtime_r" >&6; }
21802if test $ac_cv_func_gmtime_r = yes; then :
21803
21804fi
21805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for localtime_r" >&5
21806$as_echo_n "checking for localtime_r... " >&6; }
21807if ${ac_cv_func_localtime_r+:} false; then :
21808  $as_echo_n "(cached) " >&6
21809else
21810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21811/* end confdefs.h.  */
21812
21813#include <assert.h>
21814#include <time.h>
21815void test_f()
21816{
21817  time_t t; struct tm ltime; t = time(0); localtime_r( &t, &ltime );
21818}
21819
21820int
21821main ()
21822{
21823
21824  ;
21825  return 0;
21826}
21827_ACEOF
21828if ac_fn_cxx_try_link "$LINENO"; then :
21829  ac_cv_func_localtime_r=yes
21830else
21831  ac_cv_func_localtime_r=no
21832fi
21833rm -f core conftest.err conftest.$ac_objext \
21834    conftest$ac_exeext conftest.$ac_ext
21835fi
21836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_localtime_r" >&5
21837$as_echo "$ac_cv_func_localtime_r" >&6; }
21838if test $ac_cv_func_localtime_r = yes; then :
21839
21840fi
21841ac_ext=c
21842ac_cpp='$CPP $CPPFLAGS'
21843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21845ac_compiler_gnu=$ac_cv_c_compiler_gnu
21846
21847
21848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uselocale" >&5
21849$as_echo_n "checking for uselocale... " >&6; }
21850ac_ext=cpp
21851ac_cpp='$CXXCPP $CPPFLAGS'
21852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21855
21856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21857/* end confdefs.h.  */
21858
21859#define _XOPEN_SOURCE 700
21860#include <locale.h>
21861
21862int
21863main ()
21864{
21865
21866    locale_t alocale = newlocale (LC_NUMERIC_MASK, "C", 0);
21867    locale_t oldlocale = uselocale(alocale);
21868    uselocale(oldlocale);
21869    freelocale(alocale);
21870    return 0;
21871
21872  ;
21873  return 0;
21874}
21875_ACEOF
21876if ac_fn_cxx_try_compile "$LINENO"; then :
21877
21878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21879$as_echo "yes" >&6; }
21880
21881cat >>confdefs.h <<_ACEOF
21882#define HAVE_USELOCALE 1
21883_ACEOF
21884
21885
21886else
21887
21888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21889$as_echo "no" >&6; }
21890
21891fi
21892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21893ac_ext=c
21894ac_cpp='$CPP $CPPFLAGS'
21895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21897ac_compiler_gnu=$ac_cv_c_compiler_gnu
21898
21899
21900
21901OPT_GDAL_FORMATS=
21902EXTRA_INCLUDES=
21903
21904
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to enable debug build" >&5
21906$as_echo_n "checking to enable debug build... " >&6; }
21907
21908# Check whether --enable-debug was given.
21909if test "${enable_debug+set}" = set; then :
21910  enableval=$enable_debug; HAVE_DEBUG=$enableval
21911else
21912  HAVE_DEBUG=yes
21913fi
21914
21915
21916CFLAGS_NOFTRAPV="$CFLAGS"
21917CXXFLAGS_NOFTRAPV="$CXXFLAGS"
21918
21919if test "x$enable_debug" = "xyes" ; then
21920
21921
21922  CXXFLAGS=`echo "$CXXFLAGS " | sed "s/-O2 //"`
21923  CFLAGS=`echo "$CFLAGS " | sed "s/-O2 //"`
21924  CXXFLAGS=`echo "$CXXFLAGS" | sed "s/-O //"`
21925  CFLAGS=`echo "$CFLAGS" | sed "s/-O //"`
21926
21927
21928  CXXFLAGS=`echo "$CXXFLAGS" | sed "s/-g //"`
21929  CFLAGS=`echo "$CFLAGS" | sed "s/-g //"`
21930
21931
21932  CXXFLAGS="$CXXFLAGS -g -DDEBUG"
21933  CFLAGS="$CFLAGS -g -DDEBUG"
21934
21935  CFLAGS_NOFTRAPV="$CFLAGS"
21936  CXXFLAGS_NOFTRAPV="$CXXFLAGS"
21937
21938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, modified CFLAGS=\"$CFLAGS\"" >&5
21939$as_echo "yes, modified CFLAGS=\"$CFLAGS\"" >&6; }
21940
21941  # Some clang version on 32 bits have linking error with 64bit operations (undefined reference to `__mulodi4')
21942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -ftrapv can be used" >&5
21943$as_echo_n "checking whether -ftrapv can be used... " >&6; }
21944  rm -f testftrapv.c
21945  echo 'int main(int argc, char** argv) { return (long long)argc * argc; } ' > testftrapv.c
21946  if test -z "`${CC} ${CFLAGS} -ftrapv testftrapv.c -o testftrapv 2>&1`" ; then
21947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21948$as_echo "yes" >&6; }
21949    CFLAGS="$CFLAGS -ftrapv"
21950    CXXFLAGS="$CXXFLAGS -ftrapv"
21951  else
21952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21953$as_echo "no" >&6; }
21954  fi
21955  rm -f testftrapv.* testftrapv
21956
21957else
21958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, CFLAGS=\"$CFLAGS\"" >&5
21959$as_echo "no, CFLAGS=\"$CFLAGS\"" >&6; }
21960fi
21961
21962CFLAGS_NOFTRAPV=$CFLAGS_NOFTRAPV
21963
21964CXXFLAGS_NOFTRAPV=$CXXFLAGS_NOFTRAPV
21965
21966
21967
21968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GCC 4.1 atomic builtins are available" >&5
21969$as_echo_n "checking whether GCC 4.1 atomic builtins are available... " >&6; }
21970
21971rm -f atomicbuiltins.c
21972echo 'int main(int argc, char** argv) { int i; __sync_add_and_fetch(&i, 1); __sync_sub_and_fetch(&i, 1); __sync_bool_compare_and_swap(&i, 0, 1); return 0; } ' > atomicbuiltins.c
21973if test -z "`${CC} ${CFLAGS} atomicbuiltins.c -o atomicbuiltins 2>&1`" ; then
21974    HAVE_GCC_ATOMIC_BUILTINS=yes
21975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21976$as_echo "yes" >&6; }
21977
21978cat >>confdefs.h <<_ACEOF
21979#define HAVE_GCC_ATOMIC_BUILTINS 1
21980_ACEOF
21981
21982else
21983    HAVE_GCC_ATOMIC_BUILTINS=no
21984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21985$as_echo "no" >&6; }
21986fi
21987rm -rf atomicbuiltins.* atomicbuiltins
21988
21989HAVE_GCC_ATOMIC_BUILTINS=$HAVE_GCC_ATOMIC_BUILTINS
21990
21991
21992
21993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GCC bswap builtins are available" >&5
21994$as_echo_n "checking whether GCC bswap builtins are available... " >&6; }
21995
21996rm -f bswapbuiltins.c
21997echo '#include <x86intrin.h>' > bswapbuiltins.c
21998echo 'int main(int argc, char** argv) { (void)__builtin_bswap32(0); (void)__builtin_bswap64(0); return 0; } ' >> bswapbuiltins.c
21999if test -z "`${CC} ${CFLAGS} bswapbuiltins.c -o bswapbuiltins 2>&1`" ; then
22000    HAVE_GCC_BSWAP=yes
22001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22002$as_echo "yes" >&6; }
22003
22004cat >>confdefs.h <<_ACEOF
22005#define HAVE_GCC_BSWAP 1
22006_ACEOF
22007
22008else
22009    HAVE_GCC_BSWAP=no
22010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22011$as_echo "no" >&6; }
22012fi
22013rm -rf bswapbuiltins.* bswapbuiltins
22014
22015HAVE_GCC_BSWAP=$HAVE_GCC_BSWAP
22016
22017
22018
22019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __uint128_t" >&5
22020$as_echo_n "checking for __uint128_t... " >&6; }
22021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22022/* end confdefs.h.  */
22023
22024
22025int
22026main ()
22027{
22028
22029      unsigned long long v1 = 1024ULL;
22030      unsigned long long v2 = 0x8000000000000000ULL;
22031      __uint128_t u = ((__uint128_t)v1)*((__uint128_t)v2);
22032      return u == 0;
22033
22034  ;
22035  return 0;
22036}
22037_ACEOF
22038if ac_fn_c_try_compile "$LINENO"; then :
22039
22040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22041$as_echo "yes" >&6; }
22042
22043cat >>confdefs.h <<_ACEOF
22044#define HAVE_UINT128_T 1
22045_ACEOF
22046
22047
22048else
22049
22050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22051$as_echo "no" >&6; }
22052
22053fi
22054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22055
22056
22057
22058# Check whether --with-sse was given.
22059if test "${with_sse+set}" = set; then :
22060  withval=$with_sse;
22061fi
22062
22063
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSE is available at compile time" >&5
22065$as_echo_n "checking whether SSE is available at compile time... " >&6; }
22066
22067if test "$with_sse" = "yes" -o "$with_sse" = ""; then
22068
22069    rm -f detectsse.cpp
22070    echo '#ifdef __SSE__' > detectsse.cpp
22071    echo '#include <xmmintrin.h>' >> detectsse.cpp
22072    echo 'void foo() { float fEpsilon = 0.0000000000001f; __m128 xmm_small = _mm_load1_ps(&fEpsilon); }  int main() { return 0; }' >> detectsse.cpp
22073    echo '#else' >> detectsse.cpp
22074    echo 'some_error' >> detectsse.cpp
22075    echo '#endif' >> detectsse.cpp
22076    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -o detectsse detectsse.cpp 2>&1`" ; then
22077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22078$as_echo "yes" >&6; }
22079        SSEFLAGS=""
22080        HAVE_SSE_AT_COMPILE_TIME=yes
22081    else
22082        if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -msse -o detectsse detectsse.cpp 2>&1`" ; then
22083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22084$as_echo "yes" >&6; }
22085            SSEFLAGS="-msse"
22086            HAVE_SSE_AT_COMPILE_TIME=yes
22087        else
22088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089$as_echo "no" >&6; }
22090            if test "$with_sse" = "yes"; then
22091                as_fn_error $? "--with-sse was requested, but SSE is not available" "$LINENO" 5
22092            fi
22093        fi
22094    fi
22095
22096                    if test "$HAVE_SSE_AT_COMPILE_TIME" = "yes"; then
22097       case $host_os in
22098         solaris*)
22099           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSE is available and needed at runtime" >&5
22100$as_echo_n "checking whether SSE is available and needed at runtime... " >&6; }
22101           if ./detectsse; then
22102             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22103$as_echo "yes" >&6; }
22104           else
22105             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22106$as_echo "no" >&6; }
22107             if test "$with_sse" = "yes"; then
22108               echo "Caution: the generated binaries will not run on this system."
22109             else
22110               echo "Disabling SSE as it is not explicitly required"
22111               HAVE_SSE_AT_COMPILE_TIME=""
22112               SSEFLAGS=""
22113             fi
22114           fi
22115           ;;
22116       esac
22117    fi
22118
22119    if test "$HAVE_SSE_AT_COMPILE_TIME" = "yes"; then
22120        CFLAGS="-DHAVE_SSE_AT_COMPILE_TIME $CFLAGS"
22121        CXXFLAGS="-DHAVE_SSE_AT_COMPILE_TIME $CXXFLAGS"
22122    fi
22123
22124    rm -rf detectsse*
22125else
22126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22127$as_echo "no" >&6; }
22128fi
22129
22130SSEFLAGS=$SSEFLAGS
22131
22132
22133
22134
22135# Check whether --with-ssse3 was given.
22136if test "${with_ssse3+set}" = set; then :
22137  withval=$with_ssse3;
22138fi
22139
22140
22141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSSE3 is available at compile time" >&5
22142$as_echo_n "checking whether SSSE3 is available at compile time... " >&6; }
22143
22144if test "$with_ssse3" = "yes" -o "$with_ssse3" = ""; then
22145
22146    rm -f detectssse3.cpp
22147    echo '#ifdef __SSSE3__' > detectssse3.cpp
22148    echo '#include <tmmintrin.h>' >> detectssse3.cpp
22149    echo 'void foo() { __m128i xmm_i = _mm_set1_epi16(0); xmm_i = _mm_shuffle_epi8(xmm_i, xmm_i); }  int main() { return 0; }' >> detectssse3.cpp
22150    echo '#else' >> detectssse3.cpp
22151    echo 'some_error' >> detectssse3.cpp
22152    echo '#endif' >> detectssse3.cpp
22153    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -o detectssse3 detectssse3.cpp 2>&1`" ; then
22154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22155$as_echo "yes" >&6; }
22156        SSSE3FLAGS=""
22157        HAVE_SSSE3_AT_COMPILE_TIME=yes
22158    else
22159        if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -mssse3 -o detectssse3 detectssse3.cpp 2>&1`" ; then
22160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22161$as_echo "yes" >&6; }
22162            SSSE3FLAGS="-mssse3"
22163            HAVE_SSSE3_AT_COMPILE_TIME=yes
22164        else
22165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22166$as_echo "no" >&6; }
22167            if test "$with_ssse3" = "yes"; then
22168                as_fn_error $? "--with-ssse3 was requested, but SSSE3 is not available" "$LINENO" 5
22169            fi
22170        fi
22171    fi
22172
22173                    if test "$HAVE_SSSE3_AT_COMPILE_TIME" = "yes"; then
22174       case $host_os in
22175         solaris*)
22176           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSSE3 is available and needed at runtime" >&5
22177$as_echo_n "checking whether SSSE3 is available and needed at runtime... " >&6; }
22178           if ./detectssse3; then
22179             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22180$as_echo "yes" >&6; }
22181           else
22182             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22183$as_echo "no" >&6; }
22184             if test "$with_ssse3" = "yes"; then
22185               echo "Caution: the generated binaries will not run on this system."
22186             else
22187               echo "Disabling SSSE3 as it is not explicitly required"
22188               HAVE_SSSE3_AT_COMPILE_TIME=""
22189               SSSE3FLAGS=""
22190             fi
22191           fi
22192           ;;
22193       esac
22194    fi
22195
22196    if test "$HAVE_SSSE3_AT_COMPILE_TIME" = "yes"; then
22197        CFLAGS="-DHAVE_SSSE3_AT_COMPILE_TIME $CFLAGS"
22198        CXXFLAGS="-DHAVE_SSSE3_AT_COMPILE_TIME $CXXFLAGS"
22199    fi
22200
22201    rm -rf detectssse3*
22202else
22203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22204$as_echo "no" >&6; }
22205fi
22206
22207SSSE3FLAGS=$SSSE3FLAGS
22208
22209
22210
22211
22212# Check whether --with-avx was given.
22213if test "${with_avx+set}" = set; then :
22214  withval=$with_avx;
22215fi
22216
22217
22218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether AVX is available at compile time" >&5
22219$as_echo_n "checking whether AVX is available at compile time... " >&6; }
22220
22221if test "$with_avx" = "yes" -o "$with_avx" = ""; then
22222
22223    rm -f detectavx.cpp
22224    echo '#ifdef __AVX__' > detectavx.cpp
22225    echo '#include <immintrin.h>' >> detectavx.cpp
22226    echo 'int foo() { unsigned int nXCRLow, nXCRHigh;' >> detectavx.cpp
22227    echo '__asm__ ("xgetbv" : "=a" (nXCRLow), "=d" (nXCRHigh) : "c" (0));' >> detectavx.cpp
22228    echo 'float fEpsilon = 0.0000000000001f;' >> detectavx.cpp
22229    echo '__m256 ymm_small = _mm256_set_ps(fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon,fEpsilon);' >> detectavx.cpp
22230    echo 'return (int)nXCRLow + _mm256_movemask_ps(ymm_small); }' >> detectavx.cpp
22231    echo 'int main(int argc, char**) { if( argc == 0 ) return foo(); return 0; }' >> detectavx.cpp
22232    echo '#else' >> detectavx.cpp
22233    echo 'some_error' >> detectavx.cpp
22234    echo '#endif' >> detectavx.cpp
22235    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -o detectavx detectavx.cpp 2>&1`" ; then
22236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22237$as_echo "yes" >&6; }
22238        AVXFLAGS=""
22239        HAVE_AVX_AT_COMPILE_TIME=yes
22240    else
22241        if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -mavx -o detectavx detectavx.cpp 2>&1`" ; then
22242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22243$as_echo "yes" >&6; }
22244            AVXFLAGS="-mavx"
22245            HAVE_AVX_AT_COMPILE_TIME=yes
22246        else
22247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22248$as_echo "no" >&6; }
22249            if test "$with_avx" = "yes"; then
22250                as_fn_error $? "--with-avx was requested, but AVX is not available" "$LINENO" 5
22251            fi
22252        fi
22253    fi
22254
22255                    if test "$HAVE_AVX_AT_COMPILE_TIME" = "yes"; then
22256       case $host_os in
22257         solaris*)
22258           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether AVX is available and needed at runtime" >&5
22259$as_echo_n "checking whether AVX is available and needed at runtime... " >&6; }
22260           if ./detectavx; then
22261             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22262$as_echo "yes" >&6; }
22263           else
22264             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22265$as_echo "no" >&6; }
22266             if test "$with_avx" = "yes"; then
22267               echo "Caution: the generated binaries will not run on this system."
22268             else
22269               echo "Disabling AVX as it is not explicitly required"
22270               AVXFLAGS=""
22271               HAVE_AVX_AT_COMPILE_TIME=""
22272             fi
22273           fi
22274           ;;
22275       esac
22276    fi
22277
22278    if test "$HAVE_AVX_AT_COMPILE_TIME" = "yes"; then
22279        CFLAGS="-DHAVE_AVX_AT_COMPILE_TIME $CFLAGS"
22280        CXXFLAGS="-DHAVE_AVX_AT_COMPILE_TIME $CXXFLAGS"
22281    fi
22282
22283    rm -rf detectavx*
22284else
22285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22286$as_echo "no" >&6; }
22287fi
22288
22289AVXFLAGS=$AVXFLAGS
22290
22291
22292
22293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to enable LTO (link time optimization) build" >&5
22294$as_echo_n "checking to enable LTO (link time optimization) build... " >&6; }
22295
22296# Check whether --enable-lto was given.
22297if test "${enable_lto+set}" = set; then :
22298  enableval=$enable_lto;
22299fi
22300
22301
22302CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT="$CXXFLAGS"
22303CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT="$CXXFLAGS"
22304
22305if test "x$enable_lto" = "xyes" ; then
22306
22307
22308  CXXFLAGS=`echo "$CXXFLAGS" | sed "s/-g //"`
22309  CFLAGS=`echo "$CFLAGS" | sed "s/-g //"`
22310
22311
22312  CXXFLAGS="$CXXFLAGS -flto"
22313  CFLAGS="$CFLAGS -flto"
22314  LDFLAGS="$LDFLAGS -flto"
22315
22316      if test "$HAVE_AVX_AT_COMPILE_TIME" = "yes"; then
22317    if test "$AVXFLAGS" = ""; then
22318        CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT="$CXXFLAGS"
22319    fi
22320  fi
22321  if test "$HAVE_SSSE3_AT_COMPILE_TIME" = "yes"; then
22322    if test "$SSSE3FLAGS" = ""; then
22323        CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT="$CXXFLAGS"
22324    fi
22325  fi
22326
22327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22328$as_echo "yes" >&6; }
22329else
22330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22331$as_echo "no" >&6; }
22332fi
22333
22334CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT=$CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT
22335
22336CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT=$CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT
22337
22338
22339
22340echo "#include <winsock2.h>" > test_ws2_32.c
22341echo "#include <ws2tcpip.h>" >> test_ws2_32.c
22342echo "void foo() {}" >> test_ws2_32.c
22343
22344if test -z "`${CC} -c test_ws2_32.c 2>&1`" ; then
22345  LIBS="$LIBS -lws2_32"
22346fi
22347rm -f test_ws2_32*
22348
22349
22350echo "#include <windows.h>" > test_psapi.c
22351echo "#include <psapi.h>" >> test_psapi.c
22352echo "void foo() {}" >> test_psapi.c
22353
22354if test -z "`${CC} -c test_psapi.c 2>&1`" ; then
22355  LIBS="$LIBS -lpsapi"
22356fi
22357rm -f test_psapi*
22358
22359
22360
22361echo "#include <sys/types.h>" > test_getaddrinfo.c
22362echo "#include <sys/socket.h>" >> test_getaddrinfo.c
22363echo "#include <netdb.h>" >> test_getaddrinfo.c
22364echo "void test() { getaddrinfo(0,0,0,0); }"  >> test_getaddrinfo.c
22365
22366HAVE_GETADDRINFO=NO
22367if test -z "`${CC} -c test_getaddrinfo.c 2>&1`" ; then
22368
22369cat >>confdefs.h <<_ACEOF
22370#define HAVE_GETADDRINFO 1
22371_ACEOF
22372
22373fi
22374rm -f test_getaddrinfo*
22375
22376
22377
22378# Check whether --with-hide_internal_symbols was given.
22379if test "${with_hide_internal_symbols+set}" = set; then :
22380  withval=$with_hide_internal_symbols;
22381fi
22382
22383
22384HAVE_HIDE_INTERNAL_SYMBOLS=no
22385
22386if test "$with_hide_internal_symbols" = "yes"; then
22387
22388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should hide internal symbols" >&5
22389$as_echo_n "checking whether we should hide internal symbols... " >&6; }
22390
22391    rm -f hiddensymbols.c
22392    echo 'int visible() { return 0; } __attribute__ ((visibility("default")))' >> hiddensymbols.c
22393    echo 'int hidden() { return 0; }' >> hiddensymbols.c
22394    if test -z "`${CC} -fvisibility=hidden -c hiddensymbols.c 2>&1`" ; then
22395      HAVE_HIDE_INTERNAL_SYMBOLS=yes
22396    else
22397      HAVE_HIDE_INTERNAL_SYMBOLS=no
22398    fi
22399    if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes"; then
22400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22401$as_echo "yes" >&6; }
22402        CFLAGS="$CFLAGS -fvisibility=hidden"
22403        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
22404        CFLAGS_NOFTRAPV="$CFLAGS_NOFTRAPV -fvisibility=hidden"
22405        CXXFLAGS_NOFTRAPV="$CXXFLAGS_NOFTRAPV -fvisibility=hidden"
22406        CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT="$CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT -fvisibility=hidden"
22407        CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT="$CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT -fvisibility=hidden"
22408    else
22409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22410$as_echo "no" >&6; }
22411    fi
22412    rm -f hiddensymbols.*
22413else
22414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should hide internal symbols" >&5
22415$as_echo_n "checking whether we should hide internal symbols... " >&6; }
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22417$as_echo "no" >&6; }
22418fi
22419
22420if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes" ; then
22421
22422cat >>confdefs.h <<_ACEOF
22423#define USE_GCC_VISIBILITY_FLAG 1
22424_ACEOF
22425
22426fi
22427
22428HAVE_HIDE_INTERNAL_SYMBOLS=$HAVE_HIDE_INTERNAL_SYMBOLS
22429
22430
22431
22432
22433# Check whether --with-rename_internal_libtiff_symbols was given.
22434if test "${with_rename_internal_libtiff_symbols+set}" = set; then :
22435  withval=$with_rename_internal_libtiff_symbols;
22436fi
22437
22438
22439if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes" ; then
22440    with_rename_internal_libtiff_symbols=yes
22441    if test "x$with_rename_internal_libtiff_symbols" = "x$no"; then
22442        with_rename_internal_libtiff_symbols=no
22443    fi
22444else
22445    with_rename_internal_libtiff_symbols=no
22446    if test "x$with_rename_internal_libtiff_symbols" = "x$yes" -o "x$with_rename_internal_libtiff_symbols" = "x"; then
22447        with_rename_internal_libtiff_symbols=yes
22448    fi
22449fi
22450
22451RENAME_INTERNAL_LIBTIFF_SYMBOLS=$with_rename_internal_libtiff_symbols
22452
22453
22454
22455
22456# Check whether --with-rename_internal_libgeotiff_symbols was given.
22457if test "${with_rename_internal_libgeotiff_symbols+set}" = set; then :
22458  withval=$with_rename_internal_libgeotiff_symbols;
22459fi
22460
22461
22462if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes" ; then
22463    with_rename_internal_libgeotiff_symbols=yes
22464    if test "x$with_rename_internal_libgeotiff_symbols" = "x$no"; then
22465        with_rename_internal_libgeotiff_symbols=no
22466    fi
22467else
22468    with_rename_internal_libgeotiff_symbols=no
22469    if test "x$with_rename_internal_libgeotiff_symbols" = "x$yes" -o "x$with_rename_internal_libgeotiff_symbols" = "x"; then
22470        with_rename_internal_libgeotiff_symbols=yes
22471    fi
22472fi
22473
22474RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS=$with_rename_internal_libgeotiff_symbols
22475
22476
22477
22478
22479# Check whether --with-rename_internal_shapelib_symbols was given.
22480if test "${with_rename_internal_shapelib_symbols+set}" = set; then :
22481  withval=$with_rename_internal_shapelib_symbols;
22482fi
22483
22484
22485if test "$HAVE_HIDE_INTERNAL_SYMBOLS" = "yes" ; then
22486    with_rename_internal_shapelib_symbols=yes
22487    if test "x$with_rename_internal_shapelib_symbols" = "x$no"; then
22488        with_rename_internal_shapelib_symbols=no
22489    fi
22490else
22491    with_rename_internal_shapelib_symbols=no
22492    if test "x$with_rename_internal_shapelib_symbols" = "x$yes" -o "x$with_rename_internal_shapelib_symbols" = "x"; then
22493        with_rename_internal_shapelib_symbols=yes
22494    fi
22495fi
22496RENAME_INTERNAL_SHAPELIB_SYMBOLS=$with_rename_internal_shapelib_symbols
22497
22498
22499
22500
22501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for local include/lib path" >&5
22502$as_echo_n "checking for local include/lib path... " >&6; }
22503
22504
22505# Check whether --with-local was given.
22506if test "${with_local+set}" = set; then :
22507  withval=$with_local;
22508fi
22509
22510
22511if test "$with_local" != "no" -a "$with_local" != "" ; then
22512
22513  if test "$with_local" = "yes" ; then
22514    ADD_PREFIX=/usr/local
22515  else
22516    ADD_PREFIX=$with_local
22517  fi
22518
22519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding $ADD_PREFIX" >&5
22520$as_echo "adding $ADD_PREFIX" >&6; }
22521
22522  LIBS="$LIBS -L$ADD_PREFIX/lib"
22523  CPPFLAGS="$CPPFLAGS -I$ADD_PREFIX/include"
22524else
22525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
22526$as_echo "none" >&6; }
22527fi
22528
22529
22530THREAD_LIB=""
22531THREAD_FLAG=""
22532PTHREAD_ENABLED="no"
22533
22534
22535# Check whether --with-threads was given.
22536if test "${with_threads+set}" = set; then :
22537  withval=$with_threads;
22538fi
22539
22540
22541if test "$with_threads" = "yes" -o "$with_threads" = "" ; then
22542
22543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
22544$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
22545if ${ac_cv_lib_pthread_pthread_create+:} false; then :
22546  $as_echo_n "(cached) " >&6
22547else
22548  ac_check_lib_save_LIBS=$LIBS
22549LIBS="-lpthread  $LIBS"
22550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22551/* end confdefs.h.  */
22552
22553/* Override any GCC internal prototype to avoid an error.
22554   Use char because int might match the return type of a GCC
22555   builtin and then its argument prototype would still apply.  */
22556#ifdef __cplusplus
22557extern "C"
22558#endif
22559char pthread_create ();
22560int
22561main ()
22562{
22563return pthread_create ();
22564  ;
22565  return 0;
22566}
22567_ACEOF
22568if ac_fn_c_try_link "$LINENO"; then :
22569  ac_cv_lib_pthread_pthread_create=yes
22570else
22571  ac_cv_lib_pthread_pthread_create=no
22572fi
22573rm -f core conftest.err conftest.$ac_objext \
22574    conftest$ac_exeext conftest.$ac_ext
22575LIBS=$ac_check_lib_save_LIBS
22576fi
22577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
22578$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
22579if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
22580  THREAD_FLAG=CPL_MULTIPROC_PTHREAD
22581fi
22582
22583
22584  if test -n "$THREAD_FLAG" ; then
22585      THREAD_LIB="-lpthread"
22586  else
22587    # For Android, pthread_create is in Bionic libc
22588    unset ac_cv_lib_pthread_pthread_create
22589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc" >&5
22590$as_echo_n "checking for pthread_create in -lc... " >&6; }
22591if ${ac_cv_lib_c_pthread_create+:} false; then :
22592  $as_echo_n "(cached) " >&6
22593else
22594  ac_check_lib_save_LIBS=$LIBS
22595LIBS="-lc  $LIBS"
22596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22597/* end confdefs.h.  */
22598
22599/* Override any GCC internal prototype to avoid an error.
22600   Use char because int might match the return type of a GCC
22601   builtin and then its argument prototype would still apply.  */
22602#ifdef __cplusplus
22603extern "C"
22604#endif
22605char pthread_create ();
22606int
22607main ()
22608{
22609return pthread_create ();
22610  ;
22611  return 0;
22612}
22613_ACEOF
22614if ac_fn_c_try_link "$LINENO"; then :
22615  ac_cv_lib_c_pthread_create=yes
22616else
22617  ac_cv_lib_c_pthread_create=no
22618fi
22619rm -f core conftest.err conftest.$ac_objext \
22620    conftest$ac_exeext conftest.$ac_ext
22621LIBS=$ac_check_lib_save_LIBS
22622fi
22623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_create" >&5
22624$as_echo "$ac_cv_lib_c_pthread_create" >&6; }
22625if test "x$ac_cv_lib_c_pthread_create" = xyes; then :
22626  THREAD_FLAG=CPL_MULTIPROC_PTHREAD
22627fi
22628
22629  fi
22630
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
22632$as_echo_n "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
22633
22634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22635/* end confdefs.h.  */
22636
22637#define _GNU_SOURCE
22638#include <pthread.h>
22639
22640int
22641main ()
22642{
22643
22644    return (PTHREAD_MUTEX_RECURSIVE);
22645
22646  ;
22647  return 0;
22648}
22649_ACEOF
22650if ac_fn_c_try_compile "$LINENO"; then :
22651
22652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22653$as_echo "yes" >&6; }
22654
22655cat >>confdefs.h <<_ACEOF
22656#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
22657_ACEOF
22658
22659
22660else
22661
22662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22663$as_echo "no" >&6; }
22664
22665fi
22666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22667
22668
22669
22670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ADAPTIVE_NP" >&5
22671$as_echo_n "checking for PTHREAD_MUTEX_ADAPTIVE_NP... " >&6; }
22672
22673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22674/* end confdefs.h.  */
22675
22676#define _GNU_SOURCE
22677#include <pthread.h>
22678
22679int
22680main ()
22681{
22682
22683    return PTHREAD_MUTEX_ADAPTIVE_NP;
22684
22685  ;
22686  return 0;
22687}
22688_ACEOF
22689if ac_fn_c_try_compile "$LINENO"; then :
22690
22691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22692$as_echo "yes" >&6; }
22693
22694cat >>confdefs.h <<_ACEOF
22695#define HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1
22696_ACEOF
22697
22698
22699else
22700
22701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22702$as_echo "no" >&6; }
22703
22704fi
22705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22706
22707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_spinlock_t" >&5
22708$as_echo_n "checking for pthread_spinlock_t... " >&6; }
22709
22710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22711/* end confdefs.h.  */
22712
22713#define _GNU_SOURCE
22714#include <pthread.h>
22715
22716int
22717main ()
22718{
22719
22720    pthread_spinlock_t spin;
22721    return 1;
22722
22723  ;
22724  return 0;
22725}
22726_ACEOF
22727if ac_fn_c_try_compile "$LINENO"; then :
22728
22729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22730$as_echo "yes" >&6; }
22731
22732cat >>confdefs.h <<_ACEOF
22733#define HAVE_PTHREAD_SPINLOCK 1
22734_ACEOF
22735
22736
22737else
22738
22739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22740$as_echo "no" >&6; }
22741
22742fi
22743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22744
22745elif test "$with_threads" != "no" ; then
22746
22747  THREAD_FLAG=CPL_MULTIPROC_PTHREAD
22748  THREAD_LIB="$with_threads"
22749
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include thread/mutex support......" >&5
22751$as_echo "$as_me: checking whether we should include thread/mutex support......" >&6;}
22752  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using threads with link options \"$THREAD_LIB\"." >&5
22753$as_echo "        using threads with link options \"$THREAD_LIB\"." >&6; }
22754
22755else
22756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include thread/mutex support......" >&5
22757$as_echo "$as_me: checking whether we should include thread/mutex support......" >&6;}
22758  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         thread safe support disabled." >&5
22759$as_echo "        thread safe support disabled." >&6; }
22760fi
22761
22762if test "$THREAD_FLAG" = "CPL_MULTIPROC_PTHREAD" ; then
22763
22764cat >>confdefs.h <<_ACEOF
22765#define CPL_MULTIPROC_PTHREAD 1
22766_ACEOF
22767
22768  PTHREAD_ENABLED="yes"
22769fi
22770
22771LIBS="$THREAD_LIB $LIBS"
22772
22773
22774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 5 args mremap()" >&5
22775$as_echo_n "checking for 5 args mremap()... " >&6; }
22776
22777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22778/* end confdefs.h.  */
22779
22780#define _GNU_SOURCE
22781#include <sys/mman.h>
22782
22783int
22784main ()
22785{
22786
22787return (mremap(0,0,0,0,0));
22788
22789  ;
22790  return 0;
22791}
22792_ACEOF
22793if ac_fn_c_try_compile "$LINENO"; then :
22794
22795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22796$as_echo "yes" >&6; }
22797
22798cat >>confdefs.h <<_ACEOF
22799#define HAVE_5ARGS_MREMAP 1
22800_ACEOF
22801
22802
22803else
22804
22805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22806$as_echo "no" >&6; }
22807
22808fi
22809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22810
22811
22812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_PHYS_PAGES" >&5
22813$as_echo_n "checking for _SC_PHYS_PAGES... " >&6; }
22814
22815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22816/* end confdefs.h.  */
22817
22818#include <unistd.h>
22819
22820int
22821main ()
22822{
22823
22824return (sysconf(_SC_PHYS_PAGES));
22825
22826  ;
22827  return 0;
22828}
22829_ACEOF
22830if ac_fn_c_try_compile "$LINENO"; then :
22831
22832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22833$as_echo "yes" >&6; }
22834
22835cat >>confdefs.h <<_ACEOF
22836#define HAVE_SC_PHYS_PAGES 1
22837_ACEOF
22838
22839
22840else
22841
22842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22843$as_echo "no" >&6; }
22844
22845fi
22846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22847
22848
22849
22850
22851
22852
22853# Check whether --with-libz was given.
22854if test "${with_libz+set}" = set; then :
22855  withval=$with_libz;
22856fi
22857
22858
22859if test "$with_libz" = "external" -o "$with_libz" = "" -o "$with_libz" = "yes" ; then
22860
22861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflateInit_ in -lz" >&5
22862$as_echo_n "checking for deflateInit_ in -lz... " >&6; }
22863if ${ac_cv_lib_z_deflateInit_+:} false; then :
22864  $as_echo_n "(cached) " >&6
22865else
22866  ac_check_lib_save_LIBS=$LIBS
22867LIBS="-lz  $LIBS"
22868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22869/* end confdefs.h.  */
22870
22871/* Override any GCC internal prototype to avoid an error.
22872   Use char because int might match the return type of a GCC
22873   builtin and then its argument prototype would still apply.  */
22874#ifdef __cplusplus
22875extern "C"
22876#endif
22877char deflateInit_ ();
22878int
22879main ()
22880{
22881return deflateInit_ ();
22882  ;
22883  return 0;
22884}
22885_ACEOF
22886if ac_fn_c_try_link "$LINENO"; then :
22887  ac_cv_lib_z_deflateInit_=yes
22888else
22889  ac_cv_lib_z_deflateInit_=no
22890fi
22891rm -f core conftest.err conftest.$ac_objext \
22892    conftest$ac_exeext conftest.$ac_ext
22893LIBS=$ac_check_lib_save_LIBS
22894fi
22895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflateInit_" >&5
22896$as_echo "$ac_cv_lib_z_deflateInit_" >&6; }
22897if test "x$ac_cv_lib_z_deflateInit_" = xyes; then :
22898  LIBZ_SETTING=external
22899else
22900  LIBZ_SETTING=internal
22901fi
22902
22903
22904  if test "$LIBZ_SETTING" = "external" ; then
22905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
22906$as_echo_n "checking for inflateCopy in -lz... " >&6; }
22907if ${ac_cv_lib_z_inflateCopy+:} false; then :
22908  $as_echo_n "(cached) " >&6
22909else
22910  ac_check_lib_save_LIBS=$LIBS
22911LIBS="-lz  $LIBS"
22912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22913/* end confdefs.h.  */
22914
22915/* Override any GCC internal prototype to avoid an error.
22916   Use char because int might match the return type of a GCC
22917   builtin and then its argument prototype would still apply.  */
22918#ifdef __cplusplus
22919extern "C"
22920#endif
22921char inflateCopy ();
22922int
22923main ()
22924{
22925return inflateCopy ();
22926  ;
22927  return 0;
22928}
22929_ACEOF
22930if ac_fn_c_try_link "$LINENO"; then :
22931  ac_cv_lib_z_inflateCopy=yes
22932else
22933  ac_cv_lib_z_inflateCopy=no
22934fi
22935rm -f core conftest.err conftest.$ac_objext \
22936    conftest$ac_exeext conftest.$ac_ext
22937LIBS=$ac_check_lib_save_LIBS
22938fi
22939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
22940$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
22941if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
22942  LIBZ_SETTING=external
22943else
22944  LIBZ_SETTING=internal
22945fi
22946
22947    if test "$LIBZ_SETTING" = "external" ; then
22948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using pre-installed libz" >&5
22949$as_echo "using pre-installed libz" >&6; }
22950    else
22951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal libz code as inflateCopy is missing" >&5
22952$as_echo "using internal libz code as inflateCopy is missing" >&6; }
22953    fi
22954  else
22955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal libz code as deflateInit_ is missing" >&5
22956$as_echo "using internal libz code as deflateInit_ is missing" >&6; }
22957  fi
22958
22959elif test "$with_libz" != "no" -a "$with_libz" != "internal" ; then
22960
22961  LIBS="-L$with_libz -L$with_libz/lib $LIBS"
22962
22963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflateInit_ in -lz" >&5
22964$as_echo_n "checking for deflateInit_ in -lz... " >&6; }
22965if ${ac_cv_lib_z_deflateInit_+:} false; then :
22966  $as_echo_n "(cached) " >&6
22967else
22968  ac_check_lib_save_LIBS=$LIBS
22969LIBS="-lz -L$with_libz -L$with_libz/lib -lz $LIBS"
22970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22971/* end confdefs.h.  */
22972
22973/* Override any GCC internal prototype to avoid an error.
22974   Use char because int might match the return type of a GCC
22975   builtin and then its argument prototype would still apply.  */
22976#ifdef __cplusplus
22977extern "C"
22978#endif
22979char deflateInit_ ();
22980int
22981main ()
22982{
22983return deflateInit_ ();
22984  ;
22985  return 0;
22986}
22987_ACEOF
22988if ac_fn_c_try_link "$LINENO"; then :
22989  ac_cv_lib_z_deflateInit_=yes
22990else
22991  ac_cv_lib_z_deflateInit_=no
22992fi
22993rm -f core conftest.err conftest.$ac_objext \
22994    conftest$ac_exeext conftest.$ac_ext
22995LIBS=$ac_check_lib_save_LIBS
22996fi
22997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflateInit_" >&5
22998$as_echo "$ac_cv_lib_z_deflateInit_" >&6; }
22999if test "x$ac_cv_lib_z_deflateInit_" = xyes; then :
23000  LIBZ_SETTING=external
23001else
23002  LIBZ_SETTING=internal
23003fi
23004
23005  if test "$LIBZ_SETTING" = "external" ; then
23006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
23007$as_echo_n "checking for inflateCopy in -lz... " >&6; }
23008if ${ac_cv_lib_z_inflateCopy+:} false; then :
23009  $as_echo_n "(cached) " >&6
23010else
23011  ac_check_lib_save_LIBS=$LIBS
23012LIBS="-lz -L$with_libz -L$with_libz/lib -lz $LIBS"
23013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23014/* end confdefs.h.  */
23015
23016/* Override any GCC internal prototype to avoid an error.
23017   Use char because int might match the return type of a GCC
23018   builtin and then its argument prototype would still apply.  */
23019#ifdef __cplusplus
23020extern "C"
23021#endif
23022char inflateCopy ();
23023int
23024main ()
23025{
23026return inflateCopy ();
23027  ;
23028  return 0;
23029}
23030_ACEOF
23031if ac_fn_c_try_link "$LINENO"; then :
23032  ac_cv_lib_z_inflateCopy=yes
23033else
23034  ac_cv_lib_z_inflateCopy=no
23035fi
23036rm -f core conftest.err conftest.$ac_objext \
23037    conftest$ac_exeext conftest.$ac_ext
23038LIBS=$ac_check_lib_save_LIBS
23039fi
23040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
23041$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
23042if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
23043  LIBZ_SETTING=external
23044else
23045  LIBZ_SETTING=internal
23046fi
23047
23048     if test "$LIBZ_SETTING" = "external" ; then
23049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libz library from $with_libz" >&5
23050$as_echo "using libz library from $with_libz" >&6; }
23051    else
23052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal libz code as inflateCopy from $with_libz is missing" >&5
23053$as_echo "using internal libz code as inflateCopy from $with_libz is missing" >&6; }
23054    fi
23055  else
23056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal libz code as deflateInit_ from $with_libz is missing" >&5
23057$as_echo "using internal libz code as deflateInit_ from $with_libz is missing" >&6; }
23058  fi
23059
23060fi
23061
23062if test "$LIBZ_SETTING" = "external" ; then
23063  LIBS="-lz $LIBS"
23064  if test "$with_libz" != "" -a "$with_libz" != "yes" -a "$with_libz" != "external" ; then
23065    EXTRA_INCLUDES="-I$with_libz -I$with_libz/include $EXTRA_INCLUDES"
23066  fi
23067elif test "$with_libz" = "no" ; then
23068  LIBZ_SETTING=no
23069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not using libz at all." >&5
23070$as_echo "not using libz at all." >&6; }
23071else
23072  LIBZ_SETTING=internal
23073  OPT_GDAL_FORMATS="zlib $OPT_GDAL_FORMATS"
23074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal libz code." >&5
23075$as_echo "using internal libz code." >&6; }
23076fi
23077
23078LIBZ_SETTING=$LIBZ_SETTING
23079
23080
23081
23082LIBDEFLATE_SETTING=no
23083
23084
23085# Check whether --with-libdeflate was given.
23086if test "${with_libdeflate+set}" = set; then :
23087  withval=$with_libdeflate;
23088fi
23089
23090
23091if test "$with_libdeflate" != "no" ; then
23092
23093  if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then
23094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdeflate_zlib_decompress in -ldeflate" >&5
23095$as_echo_n "checking for libdeflate_zlib_decompress in -ldeflate... " >&6; }
23096if ${ac_cv_lib_deflate_libdeflate_zlib_decompress+:} false; then :
23097  $as_echo_n "(cached) " >&6
23098else
23099  ac_check_lib_save_LIBS=$LIBS
23100LIBS="-ldeflate -L$with_libdeflate/lib $LIBS"
23101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23102/* end confdefs.h.  */
23103
23104/* Override any GCC internal prototype to avoid an error.
23105   Use char because int might match the return type of a GCC
23106   builtin and then its argument prototype would still apply.  */
23107#ifdef __cplusplus
23108extern "C"
23109#endif
23110char libdeflate_zlib_decompress ();
23111int
23112main ()
23113{
23114return libdeflate_zlib_decompress ();
23115  ;
23116  return 0;
23117}
23118_ACEOF
23119if ac_fn_c_try_link "$LINENO"; then :
23120  ac_cv_lib_deflate_libdeflate_zlib_decompress=yes
23121else
23122  ac_cv_lib_deflate_libdeflate_zlib_decompress=no
23123fi
23124rm -f core conftest.err conftest.$ac_objext \
23125    conftest$ac_exeext conftest.$ac_ext
23126LIBS=$ac_check_lib_save_LIBS
23127fi
23128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_deflate_libdeflate_zlib_decompress" >&5
23129$as_echo "$ac_cv_lib_deflate_libdeflate_zlib_decompress" >&6; }
23130if test "x$ac_cv_lib_deflate_libdeflate_zlib_decompress" = xyes; then :
23131  libdeflate_lib=yes
23132else
23133  libdeflate_lib=no
23134fi
23135
23136  else
23137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdeflate_zlib_decompress in -ldeflate" >&5
23138$as_echo_n "checking for libdeflate_zlib_decompress in -ldeflate... " >&6; }
23139if ${ac_cv_lib_deflate_libdeflate_zlib_decompress+:} false; then :
23140  $as_echo_n "(cached) " >&6
23141else
23142  ac_check_lib_save_LIBS=$LIBS
23143LIBS="-ldeflate  $LIBS"
23144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23145/* end confdefs.h.  */
23146
23147/* Override any GCC internal prototype to avoid an error.
23148   Use char because int might match the return type of a GCC
23149   builtin and then its argument prototype would still apply.  */
23150#ifdef __cplusplus
23151extern "C"
23152#endif
23153char libdeflate_zlib_decompress ();
23154int
23155main ()
23156{
23157return libdeflate_zlib_decompress ();
23158  ;
23159  return 0;
23160}
23161_ACEOF
23162if ac_fn_c_try_link "$LINENO"; then :
23163  ac_cv_lib_deflate_libdeflate_zlib_decompress=yes
23164else
23165  ac_cv_lib_deflate_libdeflate_zlib_decompress=no
23166fi
23167rm -f core conftest.err conftest.$ac_objext \
23168    conftest$ac_exeext conftest.$ac_ext
23169LIBS=$ac_check_lib_save_LIBS
23170fi
23171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_deflate_libdeflate_zlib_decompress" >&5
23172$as_echo "$ac_cv_lib_deflate_libdeflate_zlib_decompress" >&6; }
23173if test "x$ac_cv_lib_deflate_libdeflate_zlib_decompress" = xyes; then :
23174  libdeflate_lib=yes
23175else
23176  libdeflate_lib=no
23177fi
23178
23179  fi
23180
23181  if test "$libdeflate_lib" = "no" -a "$with_libdeflate" = "yes"; then
23182    as_fn_error $? "libdeflate library not found" "$LINENO" 5
23183  fi
23184
23185  if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then
23186    if test -r "$with_libdeflate/include/libdeflate.h" ; then
23187      libdeflate_h=yes
23188    else
23189      libdeflate_h=no
23190    fi
23191  else
23192    ac_fn_c_check_header_mongrel "$LINENO" "libdeflate.h" "ac_cv_header_libdeflate_h" "$ac_includes_default"
23193if test "x$ac_cv_header_libdeflate_h" = xyes; then :
23194  libdeflate_h=yes
23195else
23196  libdeflate_h=no
23197fi
23198
23199
23200  fi
23201  if test "$libdeflate_h" = "no" -a "$with_libdeflate" = "yes"; then
23202    as_fn_error $? "libdeflate headers not found" "$LINENO" 5
23203  fi
23204
23205  if test "$libdeflate_lib" = "yes" -a "$libdeflate_h" = "yes" ; then
23206    LIBDEFLATE_SETTING=yes
23207  fi
23208
23209fi
23210
23211if test "$LIBDEFLATE_SETTING" = "yes" ; then
23212  if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then
23213    EXTRA_INCLUDES="-I$with_libdeflate/include $EXTRA_INCLUDES"
23214    LIBS="-L$with_libdeflate/lib -ldeflate $LIBS"
23215  else
23216    LIBS="-ldeflate $LIBS"
23217  fi
23218fi
23219
23220LIBDEFLATE_SETTING=$LIBDEFLATE_SETTING
23221
23222
23223
23224      if test "X$prefix" = "XNONE"; then
23225    acl_final_prefix="$ac_default_prefix"
23226  else
23227    acl_final_prefix="$prefix"
23228  fi
23229  if test "X$exec_prefix" = "XNONE"; then
23230    acl_final_exec_prefix='${prefix}'
23231  else
23232    acl_final_exec_prefix="$exec_prefix"
23233  fi
23234  acl_save_prefix="$prefix"
23235  prefix="$acl_final_prefix"
23236  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
23237  prefix="$acl_save_prefix"
23238
23239
23240# Check whether --with-gnu-ld was given.
23241if test "${with_gnu_ld+set}" = set; then :
23242  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
23243else
23244  with_gnu_ld=no
23245fi
23246
23247# Prepare PATH_SEPARATOR.
23248# The user is always right.
23249if test "${PATH_SEPARATOR+set}" != set; then
23250  echo "#! /bin/sh" >conf$$.sh
23251  echo  "exit 0"   >>conf$$.sh
23252  chmod +x conf$$.sh
23253  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23254    PATH_SEPARATOR=';'
23255  else
23256    PATH_SEPARATOR=:
23257  fi
23258  rm -f conf$$.sh
23259fi
23260ac_prog=ld
23261if test "$GCC" = yes; then
23262  # Check if gcc -print-prog-name=ld gives a path.
23263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
23264$as_echo_n "checking for ld used by GCC... " >&6; }
23265  case $host in
23266  *-*-mingw*)
23267    # gcc leaves a trailing carriage return which upsets mingw
23268    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
23269  *)
23270    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
23271  esac
23272  case $ac_prog in
23273    # Accept absolute paths.
23274    [\\/]* | [A-Za-z]:[\\/]*)
23275      re_direlt='/[^/][^/]*/\.\./'
23276      # Canonicalize the path of ld
23277      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
23278      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
23279	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
23280      done
23281      test -z "$LD" && LD="$ac_prog"
23282      ;;
23283  "")
23284    # If it fails, then pretend we aren't using GCC.
23285    ac_prog=ld
23286    ;;
23287  *)
23288    # If it is relative, then search for the first ld in PATH.
23289    with_gnu_ld=unknown
23290    ;;
23291  esac
23292elif test "$with_gnu_ld" = yes; then
23293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
23294$as_echo_n "checking for GNU ld... " >&6; }
23295else
23296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
23297$as_echo_n "checking for non-GNU ld... " >&6; }
23298fi
23299if ${acl_cv_path_LD+:} false; then :
23300  $as_echo_n "(cached) " >&6
23301else
23302  if test -z "$LD"; then
23303  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
23304  for ac_dir in $PATH; do
23305    test -z "$ac_dir" && ac_dir=.
23306    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
23307      acl_cv_path_LD="$ac_dir/$ac_prog"
23308      # Check to see if the program is GNU ld.  I'd rather use --version,
23309      # but apparently some GNU ld's only accept -v.
23310      # Break only if it was the GNU/non-GNU ld that we prefer.
23311      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
23312      *GNU* | *'with BFD'*)
23313	test "$with_gnu_ld" != no && break ;;
23314      *)
23315	test "$with_gnu_ld" != yes && break ;;
23316      esac
23317    fi
23318  done
23319  IFS="$ac_save_ifs"
23320else
23321  acl_cv_path_LD="$LD" # Let the user override the test with a path.
23322fi
23323fi
23324
23325LD="$acl_cv_path_LD"
23326if test -n "$LD"; then
23327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
23328$as_echo "$LD" >&6; }
23329else
23330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23331$as_echo "no" >&6; }
23332fi
23333test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
23334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
23335$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
23336if ${acl_cv_prog_gnu_ld+:} false; then :
23337  $as_echo_n "(cached) " >&6
23338else
23339  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
23340case `$LD -v 2>&1 </dev/null` in
23341*GNU* | *'with BFD'*)
23342  acl_cv_prog_gnu_ld=yes ;;
23343*)
23344  acl_cv_prog_gnu_ld=no ;;
23345esac
23346fi
23347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
23348$as_echo "$acl_cv_prog_gnu_ld" >&6; }
23349with_gnu_ld=$acl_cv_prog_gnu_ld
23350
23351
23352
23353
23354                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
23355$as_echo_n "checking for shared library run path origin... " >&6; }
23356if ${acl_cv_rpath+:} false; then :
23357  $as_echo_n "(cached) " >&6
23358else
23359
23360    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
23361    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
23362    . ./conftest.sh
23363    rm -f ./conftest.sh
23364    acl_cv_rpath=done
23365
23366fi
23367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
23368$as_echo "$acl_cv_rpath" >&6; }
23369  wl="$acl_cv_wl"
23370  acl_libext="$acl_cv_libext"
23371  acl_shlibext="$acl_cv_shlibext"
23372  acl_libname_spec="$acl_cv_libname_spec"
23373  acl_library_names_spec="$acl_cv_library_names_spec"
23374  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
23375  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
23376  acl_hardcode_direct="$acl_cv_hardcode_direct"
23377  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
23378    # Check whether --enable-rpath was given.
23379if test "${enable_rpath+set}" = set; then :
23380  enableval=$enable_rpath; :
23381else
23382  enable_rpath=yes
23383fi
23384
23385
23386
23387                  acl_libdirstem=lib
23388  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
23389  if test -n "$searchpath"; then
23390    acl_save_IFS="${IFS= 	}"; IFS=":"
23391    for searchdir in $searchpath; do
23392      if test -d "$searchdir"; then
23393        case "$searchdir" in
23394          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
23395          *) searchdir=`cd "$searchdir" && pwd`
23396             case "$searchdir" in
23397               */lib64 ) acl_libdirstem=lib64 ;;
23398             esac ;;
23399        esac
23400      fi
23401    done
23402    IFS="$acl_save_IFS"
23403  fi
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413    use_additional=yes
23414
23415  acl_save_prefix="$prefix"
23416  prefix="$acl_final_prefix"
23417  acl_save_exec_prefix="$exec_prefix"
23418  exec_prefix="$acl_final_exec_prefix"
23419
23420    eval additional_includedir=\"$includedir\"
23421    eval additional_libdir=\"$libdir\"
23422
23423  exec_prefix="$acl_save_exec_prefix"
23424  prefix="$acl_save_prefix"
23425
23426
23427# Check whether --with-libiconv-prefix was given.
23428if test "${with_libiconv_prefix+set}" = set; then :
23429  withval=$with_libiconv_prefix;
23430    if test "X$withval" = "Xno"; then
23431      use_additional=no
23432    else
23433      if test "X$withval" = "X"; then
23434
23435  acl_save_prefix="$prefix"
23436  prefix="$acl_final_prefix"
23437  acl_save_exec_prefix="$exec_prefix"
23438  exec_prefix="$acl_final_exec_prefix"
23439
23440          eval additional_includedir=\"$includedir\"
23441          eval additional_libdir=\"$libdir\"
23442
23443  exec_prefix="$acl_save_exec_prefix"
23444  prefix="$acl_save_prefix"
23445
23446      else
23447        additional_includedir="$withval/include"
23448        additional_libdir="$withval/$acl_libdirstem"
23449      fi
23450    fi
23451
23452fi
23453
23454      LIBICONV=
23455  LTLIBICONV=
23456  INCICONV=
23457  LIBICONV_PREFIX=
23458  rpathdirs=
23459  ltrpathdirs=
23460  names_already_handled=
23461  names_next_round='iconv '
23462  while test -n "$names_next_round"; do
23463    names_this_round="$names_next_round"
23464    names_next_round=
23465    for name in $names_this_round; do
23466      already_handled=
23467      for n in $names_already_handled; do
23468        if test "$n" = "$name"; then
23469          already_handled=yes
23470          break
23471        fi
23472      done
23473      if test -z "$already_handled"; then
23474        names_already_handled="$names_already_handled $name"
23475                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
23476        eval value=\"\$HAVE_LIB$uppername\"
23477        if test -n "$value"; then
23478          if test "$value" = yes; then
23479            eval value=\"\$LIB$uppername\"
23480            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
23481            eval value=\"\$LTLIB$uppername\"
23482            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
23483          else
23484                                    :
23485          fi
23486        else
23487                              found_dir=
23488          found_la=
23489          found_so=
23490          found_a=
23491          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
23492          if test -n "$acl_shlibext"; then
23493            shrext=".$acl_shlibext"             # typically: shrext=.so
23494          else
23495            shrext=
23496          fi
23497          if test $use_additional = yes; then
23498            dir="$additional_libdir"
23499                                    if test -n "$acl_shlibext"; then
23500              if test -f "$dir/$libname$shrext"; then
23501                found_dir="$dir"
23502                found_so="$dir/$libname$shrext"
23503              else
23504                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
23505                  ver=`(cd "$dir" && \
23506                        for f in "$libname$shrext".*; do echo "$f"; done \
23507                        | sed -e "s,^$libname$shrext\\\\.,," \
23508                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
23509                        | sed 1q ) 2>/dev/null`
23510                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
23511                    found_dir="$dir"
23512                    found_so="$dir/$libname$shrext.$ver"
23513                  fi
23514                else
23515                  eval library_names=\"$acl_library_names_spec\"
23516                  for f in $library_names; do
23517                    if test -f "$dir/$f"; then
23518                      found_dir="$dir"
23519                      found_so="$dir/$f"
23520                      break
23521                    fi
23522                  done
23523                fi
23524              fi
23525            fi
23526                        if test "X$found_dir" = "X"; then
23527              if test -f "$dir/$libname.$acl_libext"; then
23528                found_dir="$dir"
23529                found_a="$dir/$libname.$acl_libext"
23530              fi
23531            fi
23532            if test "X$found_dir" != "X"; then
23533              if test -f "$dir/$libname.la"; then
23534                found_la="$dir/$libname.la"
23535              fi
23536            fi
23537          fi
23538          if test "X$found_dir" = "X"; then
23539            for x in $LDFLAGS $LTLIBICONV; do
23540
23541  acl_save_prefix="$prefix"
23542  prefix="$acl_final_prefix"
23543  acl_save_exec_prefix="$exec_prefix"
23544  exec_prefix="$acl_final_exec_prefix"
23545  eval x=\"$x\"
23546  exec_prefix="$acl_save_exec_prefix"
23547  prefix="$acl_save_prefix"
23548
23549              case "$x" in
23550                -L*)
23551                  dir=`echo "X$x" | sed -e 's/^X-L//'`
23552                                    if test -n "$acl_shlibext"; then
23553                    if test -f "$dir/$libname$shrext"; then
23554                      found_dir="$dir"
23555                      found_so="$dir/$libname$shrext"
23556                    else
23557                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
23558                        ver=`(cd "$dir" && \
23559                              for f in "$libname$shrext".*; do echo "$f"; done \
23560                              | sed -e "s,^$libname$shrext\\\\.,," \
23561                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
23562                              | sed 1q ) 2>/dev/null`
23563                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
23564                          found_dir="$dir"
23565                          found_so="$dir/$libname$shrext.$ver"
23566                        fi
23567                      else
23568                        eval library_names=\"$acl_library_names_spec\"
23569                        for f in $library_names; do
23570                          if test -f "$dir/$f"; then
23571                            found_dir="$dir"
23572                            found_so="$dir/$f"
23573                            break
23574                          fi
23575                        done
23576                      fi
23577                    fi
23578                  fi
23579                                    if test "X$found_dir" = "X"; then
23580                    if test -f "$dir/$libname.$acl_libext"; then
23581                      found_dir="$dir"
23582                      found_a="$dir/$libname.$acl_libext"
23583                    fi
23584                  fi
23585                  if test "X$found_dir" != "X"; then
23586                    if test -f "$dir/$libname.la"; then
23587                      found_la="$dir/$libname.la"
23588                    fi
23589                  fi
23590                  ;;
23591              esac
23592              if test "X$found_dir" != "X"; then
23593                break
23594              fi
23595            done
23596          fi
23597          if test "X$found_dir" != "X"; then
23598                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
23599            if test "X$found_so" != "X"; then
23600                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
23601                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23602              else
23603                                                                                haveit=
23604                for x in $ltrpathdirs; do
23605                  if test "X$x" = "X$found_dir"; then
23606                    haveit=yes
23607                    break
23608                  fi
23609                done
23610                if test -z "$haveit"; then
23611                  ltrpathdirs="$ltrpathdirs $found_dir"
23612                fi
23613                                if test "$acl_hardcode_direct" = yes; then
23614                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23615                else
23616                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
23617                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23618                                                            haveit=
23619                    for x in $rpathdirs; do
23620                      if test "X$x" = "X$found_dir"; then
23621                        haveit=yes
23622                        break
23623                      fi
23624                    done
23625                    if test -z "$haveit"; then
23626                      rpathdirs="$rpathdirs $found_dir"
23627                    fi
23628                  else
23629                                                                                haveit=
23630                    for x in $LDFLAGS $LIBICONV; do
23631
23632  acl_save_prefix="$prefix"
23633  prefix="$acl_final_prefix"
23634  acl_save_exec_prefix="$exec_prefix"
23635  exec_prefix="$acl_final_exec_prefix"
23636  eval x=\"$x\"
23637  exec_prefix="$acl_save_exec_prefix"
23638  prefix="$acl_save_prefix"
23639
23640                      if test "X$x" = "X-L$found_dir"; then
23641                        haveit=yes
23642                        break
23643                      fi
23644                    done
23645                    if test -z "$haveit"; then
23646                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
23647                    fi
23648                    if test "$acl_hardcode_minus_L" != no; then
23649                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23650                    else
23651                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
23652                    fi
23653                  fi
23654                fi
23655              fi
23656            else
23657              if test "X$found_a" != "X"; then
23658                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
23659              else
23660                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
23661              fi
23662            fi
23663                        additional_includedir=
23664            case "$found_dir" in
23665              */$acl_libdirstem | */$acl_libdirstem/)
23666                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
23667                LIBICONV_PREFIX="$basedir"
23668                additional_includedir="$basedir/include"
23669                ;;
23670            esac
23671            if test "X$additional_includedir" != "X"; then
23672                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
23673                haveit=
23674                if test "X$additional_includedir" = "X/usr/local/include"; then
23675                  if test -n "$GCC"; then
23676                    case $host_os in
23677                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
23678                    esac
23679                  fi
23680                fi
23681                if test -z "$haveit"; then
23682                  for x in $CPPFLAGS $INCICONV; do
23683
23684  acl_save_prefix="$prefix"
23685  prefix="$acl_final_prefix"
23686  acl_save_exec_prefix="$exec_prefix"
23687  exec_prefix="$acl_final_exec_prefix"
23688  eval x=\"$x\"
23689  exec_prefix="$acl_save_exec_prefix"
23690  prefix="$acl_save_prefix"
23691
23692                    if test "X$x" = "X-I$additional_includedir"; then
23693                      haveit=yes
23694                      break
23695                    fi
23696                  done
23697                  if test -z "$haveit"; then
23698                    if test -d "$additional_includedir"; then
23699                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
23700                    fi
23701                  fi
23702                fi
23703              fi
23704            fi
23705                        if test -n "$found_la"; then
23706                                                        save_libdir="$libdir"
23707              case "$found_la" in
23708                */* | *\\*) . "$found_la" ;;
23709                *) . "./$found_la" ;;
23710              esac
23711              libdir="$save_libdir"
23712                            for dep in $dependency_libs; do
23713                case "$dep" in
23714                  -L*)
23715                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
23716                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
23717                      haveit=
23718                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
23719                        if test -n "$GCC"; then
23720                          case $host_os in
23721                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
23722                          esac
23723                        fi
23724                      fi
23725                      if test -z "$haveit"; then
23726                        haveit=
23727                        for x in $LDFLAGS $LIBICONV; do
23728
23729  acl_save_prefix="$prefix"
23730  prefix="$acl_final_prefix"
23731  acl_save_exec_prefix="$exec_prefix"
23732  exec_prefix="$acl_final_exec_prefix"
23733  eval x=\"$x\"
23734  exec_prefix="$acl_save_exec_prefix"
23735  prefix="$acl_save_prefix"
23736
23737                          if test "X$x" = "X-L$additional_libdir"; then
23738                            haveit=yes
23739                            break
23740                          fi
23741                        done
23742                        if test -z "$haveit"; then
23743                          if test -d "$additional_libdir"; then
23744                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
23745                          fi
23746                        fi
23747                        haveit=
23748                        for x in $LDFLAGS $LTLIBICONV; do
23749
23750  acl_save_prefix="$prefix"
23751  prefix="$acl_final_prefix"
23752  acl_save_exec_prefix="$exec_prefix"
23753  exec_prefix="$acl_final_exec_prefix"
23754  eval x=\"$x\"
23755  exec_prefix="$acl_save_exec_prefix"
23756  prefix="$acl_save_prefix"
23757
23758                          if test "X$x" = "X-L$additional_libdir"; then
23759                            haveit=yes
23760                            break
23761                          fi
23762                        done
23763                        if test -z "$haveit"; then
23764                          if test -d "$additional_libdir"; then
23765                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
23766                          fi
23767                        fi
23768                      fi
23769                    fi
23770                    ;;
23771                  -R*)
23772                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
23773                    if test "$enable_rpath" != no; then
23774                                                                  haveit=
23775                      for x in $rpathdirs; do
23776                        if test "X$x" = "X$dir"; then
23777                          haveit=yes
23778                          break
23779                        fi
23780                      done
23781                      if test -z "$haveit"; then
23782                        rpathdirs="$rpathdirs $dir"
23783                      fi
23784                                                                  haveit=
23785                      for x in $ltrpathdirs; do
23786                        if test "X$x" = "X$dir"; then
23787                          haveit=yes
23788                          break
23789                        fi
23790                      done
23791                      if test -z "$haveit"; then
23792                        ltrpathdirs="$ltrpathdirs $dir"
23793                      fi
23794                    fi
23795                    ;;
23796                  -l*)
23797                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
23798                    ;;
23799                  *.la)
23800                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
23801                    ;;
23802                  *)
23803                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
23804                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
23805                    ;;
23806                esac
23807              done
23808            fi
23809          else
23810                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
23811            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
23812          fi
23813        fi
23814      fi
23815    done
23816  done
23817  if test "X$rpathdirs" != "X"; then
23818    if test -n "$acl_hardcode_libdir_separator"; then
23819                        alldirs=
23820      for found_dir in $rpathdirs; do
23821        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
23822      done
23823            acl_save_libdir="$libdir"
23824      libdir="$alldirs"
23825      eval flag=\"$acl_hardcode_libdir_flag_spec\"
23826      libdir="$acl_save_libdir"
23827      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
23828    else
23829            for found_dir in $rpathdirs; do
23830        acl_save_libdir="$libdir"
23831        libdir="$found_dir"
23832        eval flag=\"$acl_hardcode_libdir_flag_spec\"
23833        libdir="$acl_save_libdir"
23834        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
23835      done
23836    fi
23837  fi
23838  if test "X$ltrpathdirs" != "X"; then
23839            for found_dir in $ltrpathdirs; do
23840      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
23841    done
23842  fi
23843
23844
23845
23846
23847
23848
23849
23850          am_save_CPPFLAGS="$CPPFLAGS"
23851
23852  for element in $INCICONV; do
23853    haveit=
23854    for x in $CPPFLAGS; do
23855
23856  acl_save_prefix="$prefix"
23857  prefix="$acl_final_prefix"
23858  acl_save_exec_prefix="$exec_prefix"
23859  exec_prefix="$acl_final_exec_prefix"
23860  eval x=\"$x\"
23861  exec_prefix="$acl_save_exec_prefix"
23862  prefix="$acl_save_prefix"
23863
23864      if test "X$x" = "X$element"; then
23865        haveit=yes
23866        break
23867      fi
23868    done
23869    if test -z "$haveit"; then
23870      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
23871    fi
23872  done
23873
23874
23875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
23876$as_echo_n "checking for iconv... " >&6; }
23877if ${am_cv_func_iconv+:} false; then :
23878  $as_echo_n "(cached) " >&6
23879else
23880
23881    am_cv_func_iconv="no, consider installing GNU libiconv"
23882    am_cv_lib_iconv=no
23883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23884/* end confdefs.h.  */
23885
23886#include <stdlib.h>
23887#include <iconv.h>
23888
23889int
23890main ()
23891{
23892iconv_t cd = iconv_open("","");
23893           iconv(cd,NULL,NULL,NULL,NULL);
23894           iconv_close(cd);
23895  ;
23896  return 0;
23897}
23898_ACEOF
23899if ac_fn_c_try_link "$LINENO"; then :
23900  am_cv_func_iconv=yes
23901fi
23902rm -f core conftest.err conftest.$ac_objext \
23903    conftest$ac_exeext conftest.$ac_ext
23904    if test "$am_cv_func_iconv" != yes; then
23905      am_save_LIBS="$LIBS"
23906      LIBS="$LIBS $LIBICONV"
23907      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23908/* end confdefs.h.  */
23909
23910#include <stdlib.h>
23911#include <iconv.h>
23912
23913int
23914main ()
23915{
23916iconv_t cd = iconv_open("","");
23917             iconv(cd,NULL,NULL,NULL,NULL);
23918             iconv_close(cd);
23919  ;
23920  return 0;
23921}
23922_ACEOF
23923if ac_fn_c_try_link "$LINENO"; then :
23924  am_cv_lib_iconv=yes
23925        am_cv_func_iconv=yes
23926fi
23927rm -f core conftest.err conftest.$ac_objext \
23928    conftest$ac_exeext conftest.$ac_ext
23929      LIBS="$am_save_LIBS"
23930    fi
23931
23932fi
23933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
23934$as_echo "$am_cv_func_iconv" >&6; }
23935  if test "$am_cv_func_iconv" = yes; then
23936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
23937$as_echo_n "checking for working iconv... " >&6; }
23938if ${am_cv_func_iconv_works+:} false; then :
23939  $as_echo_n "(cached) " >&6
23940else
23941
23942                  am_save_LIBS="$LIBS"
23943      if test $am_cv_lib_iconv = yes; then
23944        LIBS="$LIBS $LIBICONV"
23945      fi
23946      if test "$cross_compiling" = yes; then :
23947
23948         case "$host_os" in
23949           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
23950           *)            am_cv_func_iconv_works="guessing yes" ;;
23951         esac
23952
23953else
23954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23955/* end confdefs.h.  */
23956
23957#include <iconv.h>
23958#include <string.h>
23959int main ()
23960{
23961  int result = 0;
23962  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
23963     returns.  */
23964  {
23965    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
23966    if (cd_utf8_to_88591 != (iconv_t)(-1))
23967      {
23968        static const char input[] = "\342\202\254"; /* EURO SIGN */
23969        char buf[10];
23970        const char *inptr = input;
23971        size_t inbytesleft = strlen (input);
23972        char *outptr = buf;
23973        size_t outbytesleft = sizeof (buf);
23974        size_t res = iconv (cd_utf8_to_88591,
23975                            (char **) &inptr, &inbytesleft,
23976                            &outptr, &outbytesleft);
23977        if (res == 0)
23978          result |= 1;
23979        iconv_close (cd_utf8_to_88591);
23980      }
23981  }
23982  /* Test against Solaris 10 bug: Failures are not distinguishable from
23983     successful returns.  */
23984  {
23985    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
23986    if (cd_ascii_to_88591 != (iconv_t)(-1))
23987      {
23988        static const char input[] = "\263";
23989        char buf[10];
23990        const char *inptr = input;
23991        size_t inbytesleft = strlen (input);
23992        char *outptr = buf;
23993        size_t outbytesleft = sizeof (buf);
23994        size_t res = iconv (cd_ascii_to_88591,
23995                            (char **) &inptr, &inbytesleft,
23996                            &outptr, &outbytesleft);
23997        if (res == 0)
23998          result |= 2;
23999        iconv_close (cd_ascii_to_88591);
24000      }
24001  }
24002  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
24003  {
24004    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
24005    if (cd_88591_to_utf8 != (iconv_t)(-1))
24006      {
24007        static const char input[] = "\304";
24008        static char buf[2] = { (char)0xDE, (char)0xAD };
24009        const char *inptr = input;
24010        size_t inbytesleft = 1;
24011        char *outptr = buf;
24012        size_t outbytesleft = 1;
24013        size_t res = iconv (cd_88591_to_utf8,
24014                            (char **) &inptr, &inbytesleft,
24015                            &outptr, &outbytesleft);
24016        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
24017          result |= 4;
24018        iconv_close (cd_88591_to_utf8);
24019      }
24020  }
24021#if 0 /* This bug could be worked around by the caller.  */
24022  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
24023  {
24024    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
24025    if (cd_88591_to_utf8 != (iconv_t)(-1))
24026      {
24027        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
24028        char buf[50];
24029        const char *inptr = input;
24030        size_t inbytesleft = strlen (input);
24031        char *outptr = buf;
24032        size_t outbytesleft = sizeof (buf);
24033        size_t res = iconv (cd_88591_to_utf8,
24034                            (char **) &inptr, &inbytesleft,
24035                            &outptr, &outbytesleft);
24036        if ((int)res > 0)
24037          result |= 8;
24038        iconv_close (cd_88591_to_utf8);
24039      }
24040  }
24041#endif
24042  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
24043     provided.  */
24044  if (/* Try standardized names.  */
24045      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
24046      /* Try IRIX, OSF/1 names.  */
24047      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
24048      /* Try AIX names.  */
24049      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
24050      /* Try HP-UX names.  */
24051      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
24052    result |= 16;
24053  return result;
24054}
24055_ACEOF
24056if ac_fn_c_try_run "$LINENO"; then :
24057  am_cv_func_iconv_works=yes
24058else
24059  am_cv_func_iconv_works=no
24060fi
24061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24062  conftest.$ac_objext conftest.beam conftest.$ac_ext
24063fi
24064
24065      LIBS="$am_save_LIBS"
24066
24067fi
24068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
24069$as_echo "$am_cv_func_iconv_works" >&6; }
24070    case "$am_cv_func_iconv_works" in
24071      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
24072      *)   am_func_iconv=yes ;;
24073    esac
24074  else
24075    am_func_iconv=no am_cv_lib_iconv=no
24076  fi
24077  if test "$am_func_iconv" = yes; then
24078
24079$as_echo "#define HAVE_ICONV 1" >>confdefs.h
24080
24081  fi
24082  if test "$am_cv_lib_iconv" = yes; then
24083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
24084$as_echo_n "checking how to link with libiconv... " >&6; }
24085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
24086$as_echo "$LIBICONV" >&6; }
24087  else
24088            CPPFLAGS="$am_save_CPPFLAGS"
24089    LIBICONV=
24090    LTLIBICONV=
24091  fi
24092
24093
24094
24095  if test "$am_cv_func_iconv" = yes; then
24096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
24097$as_echo_n "checking for iconv declaration... " >&6; }
24098    if ${am_cv_proto_iconv+:} false; then :
24099  $as_echo_n "(cached) " >&6
24100else
24101
24102      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24103/* end confdefs.h.  */
24104
24105#include <stdlib.h>
24106#include <iconv.h>
24107extern
24108#ifdef __cplusplus
24109"C"
24110#endif
24111#if defined(__STDC__) || defined(__cplusplus)
24112size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
24113#else
24114size_t iconv();
24115#endif
24116
24117int
24118main ()
24119{
24120
24121  ;
24122  return 0;
24123}
24124_ACEOF
24125if ac_fn_c_try_compile "$LINENO"; then :
24126  am_cv_proto_iconv_arg1=""
24127else
24128  am_cv_proto_iconv_arg1="const"
24129fi
24130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24131      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
24132fi
24133
24134    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
24135    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
24136         $am_cv_proto_iconv" >&5
24137$as_echo "
24138         $am_cv_proto_iconv" >&6; }
24139
24140cat >>confdefs.h <<_ACEOF
24141#define ICONV_CONST $am_cv_proto_iconv_arg1
24142_ACEOF
24143
24144
24145  fi
24146
24147
24148if test "$am_func_iconv" = "yes"; then
24149    rm -f testiconv.*
24150    echo '#include <iconv.h>' > testiconv.cpp
24151    echo 'int main(int argc, char** argv) { iconv_t cd = 0; return iconv (cd, (const char **) 0, 0, 0, 0); } ' >> testiconv.cpp
24152    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testiconv.cpp -c 2>&1`" ; then
24153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ICONV_CPP_CONST=\"const\"" >&5
24154$as_echo "using ICONV_CPP_CONST=\"const\"" >&6; }
24155        ICONV_CPP_CONST="const"
24156    else
24157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ICONV_CPP_CONST=\"\"" >&5
24158$as_echo "using ICONV_CPP_CONST=\"\"" >&6; }
24159        ICONV_CPP_CONST=""
24160    fi
24161    rm -f testiconv.*
24162
24163
24164cat >>confdefs.h <<_ACEOF
24165#define ICONV_CPP_CONST $ICONV_CPP_CONST
24166_ACEOF
24167
24168fi
24169
24170
24171
24172# Check whether --with-bash-completion was given.
24173if test "${with_bash_completion+set}" = set; then :
24174  withval=$with_bash_completion;
24175fi
24176
24177
24178if test "x$with_bash_completion" = "xno" -o "x$with_bash_completion" = "x"; then
24179  { $as_echo "$as_me:${as_lineno-$LINENO}: Bash completions not requested" >&5
24180$as_echo "$as_me: Bash completions not requested" >&6;}
24181elif test "x$with_bash_completion" = "xyes"; then
24182
24183
24184if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24185	if test -n "$ac_tool_prefix"; then
24186  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24187set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24189$as_echo_n "checking for $ac_word... " >&6; }
24190if ${ac_cv_path_PKG_CONFIG+:} false; then :
24191  $as_echo_n "(cached) " >&6
24192else
24193  case $PKG_CONFIG in
24194  [\\/]* | ?:[\\/]*)
24195  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24196  ;;
24197  *)
24198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24199for as_dir in $PATH
24200do
24201  IFS=$as_save_IFS
24202  test -z "$as_dir" && as_dir=.
24203    for ac_exec_ext in '' $ac_executable_extensions; do
24204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24205    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24207    break 2
24208  fi
24209done
24210  done
24211IFS=$as_save_IFS
24212
24213  ;;
24214esac
24215fi
24216PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24217if test -n "$PKG_CONFIG"; then
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24219$as_echo "$PKG_CONFIG" >&6; }
24220else
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24222$as_echo "no" >&6; }
24223fi
24224
24225
24226fi
24227if test -z "$ac_cv_path_PKG_CONFIG"; then
24228  ac_pt_PKG_CONFIG=$PKG_CONFIG
24229  # Extract the first word of "pkg-config", so it can be a program name with args.
24230set dummy pkg-config; ac_word=$2
24231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24232$as_echo_n "checking for $ac_word... " >&6; }
24233if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24234  $as_echo_n "(cached) " >&6
24235else
24236  case $ac_pt_PKG_CONFIG in
24237  [\\/]* | ?:[\\/]*)
24238  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24239  ;;
24240  *)
24241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24242for as_dir in $PATH
24243do
24244  IFS=$as_save_IFS
24245  test -z "$as_dir" && as_dir=.
24246    for ac_exec_ext in '' $ac_executable_extensions; do
24247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24248    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24250    break 2
24251  fi
24252done
24253  done
24254IFS=$as_save_IFS
24255
24256  ;;
24257esac
24258fi
24259ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24260if test -n "$ac_pt_PKG_CONFIG"; then
24261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24262$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24263else
24264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24265$as_echo "no" >&6; }
24266fi
24267
24268  if test "x$ac_pt_PKG_CONFIG" = x; then
24269    PKG_CONFIG=""
24270  else
24271    case $cross_compiling:$ac_tool_warned in
24272yes:)
24273{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24274$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24275ac_tool_warned=yes ;;
24276esac
24277    PKG_CONFIG=$ac_pt_PKG_CONFIG
24278  fi
24279else
24280  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24281fi
24282
24283fi
24284if test -n "$PKG_CONFIG"; then
24285	_pkg_min_version=0.9.0
24286	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24287$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24288	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24289		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24290$as_echo "yes" >&6; }
24291	else
24292		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24293$as_echo "no" >&6; }
24294		PKG_CONFIG=""
24295	fi
24296
24297fi
24298
24299if test -n "$PKG_CONFIG"; then
24300    if test -n "$bashcompdir"; then
24301        pkg_cv_bashcompdir="$bashcompdir"
24302    else
24303        if test -n "$PKG_CONFIG" && \
24304    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bash-completion\""; } >&5
24305  ($PKG_CONFIG --exists --print-errors "bash-completion") 2>&5
24306  ac_status=$?
24307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24308  test $ac_status = 0; }; then
24309  pkg_cv_bashcompdir=`$PKG_CONFIG --variable="completionsdir" "bash-completion" 2>/dev/null`
24310else
24311  pkg_failed=yes
24312fi
24313    fi
24314else
24315	pkg_failed=untried
24316fi
24317bashcompdir=$pkg_cv_bashcompdir
24318
24319if test "x$bashcompdir" = x""; then :
24320  bashcompdir="${sysconfdir}/bash_completion.d"
24321fi
24322
24323else
24324  bashcompdir=$with_bash_completion
24325
24326fi
24327
24328
24329
24330# Check whether --with-jpeg was given.
24331if test "${with_jpeg+set}" = set; then :
24332  withval=$with_jpeg;
24333fi
24334
24335
24336if test "$with_jpeg" = "no" ; then
24337
24338  JPEG_SETTING=no
24339
24340  echo "jpeg support disabled."
24341
24342elif test "$with_jpeg" = "yes" -o "$with_jpeg" = "" ; then
24343
24344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_scanlines in -ljpeg" >&5
24345$as_echo_n "checking for jpeg_read_scanlines in -ljpeg... " >&6; }
24346if ${ac_cv_lib_jpeg_jpeg_read_scanlines+:} false; then :
24347  $as_echo_n "(cached) " >&6
24348else
24349  ac_check_lib_save_LIBS=$LIBS
24350LIBS="-ljpeg  $LIBS"
24351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24352/* end confdefs.h.  */
24353
24354/* Override any GCC internal prototype to avoid an error.
24355   Use char because int might match the return type of a GCC
24356   builtin and then its argument prototype would still apply.  */
24357#ifdef __cplusplus
24358extern "C"
24359#endif
24360char jpeg_read_scanlines ();
24361int
24362main ()
24363{
24364return jpeg_read_scanlines ();
24365  ;
24366  return 0;
24367}
24368_ACEOF
24369if ac_fn_c_try_link "$LINENO"; then :
24370  ac_cv_lib_jpeg_jpeg_read_scanlines=yes
24371else
24372  ac_cv_lib_jpeg_jpeg_read_scanlines=no
24373fi
24374rm -f core conftest.err conftest.$ac_objext \
24375    conftest$ac_exeext conftest.$ac_ext
24376LIBS=$ac_check_lib_save_LIBS
24377fi
24378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_scanlines" >&5
24379$as_echo "$ac_cv_lib_jpeg_jpeg_read_scanlines" >&6; }
24380if test "x$ac_cv_lib_jpeg_jpeg_read_scanlines" = xyes; then :
24381  JPEG_SETTING=external
24382else
24383  JPEG_SETTING=internal
24384fi
24385
24386  for ac_header in jpeglib.h
24387do :
24388  ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
24389if test "x$ac_cv_header_jpeglib_h" = xyes; then :
24390  cat >>confdefs.h <<_ACEOF
24391#define HAVE_JPEGLIB_H 1
24392_ACEOF
24393
24394fi
24395
24396done
24397
24398
24399  if test "$JPEG_SETTING" = "external" -a "$ac_cv_header_jpeglib_h" = "no" ; then
24400    JPEG_SETTING=internal
24401  fi
24402
24403  if test "$JPEG_SETTING" = "external" -a "$TIFF_SETTING" = "internal" ; then
24404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for width_in_blocks in jpeglib.h" >&5
24405$as_echo_n "checking for width_in_blocks in jpeglib.h... " >&6; }
24406
24407    rm -f conftest.c
24408    echo '#include <stdio.h>' >> conftest.c
24409    echo '#include "jpeglib.h"' >> conftest.c
24410    echo 'int main() { jpeg_component_info *comptr=0; int i; i = comptr->width_in_blocks; }' >> conftest.c
24411    if test -z "`${CC} ${CPPFLAGS} ${CFLAGS} -c conftest.c 2>&1`" ; then
24412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24413$as_echo "yes" >&6; }
24414    else
24415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24416$as_echo "no" >&6; }
24417      JPEG_SETTING=internal
24418    fi
24419    rm -f conftest*
24420  fi
24421
24422  if test "$JPEG_SETTING" = "external" ; then
24423    LIBS="-ljpeg $LIBS"
24424    echo "using pre-installed libjpeg."
24425  else
24426    echo "using internal jpeg code."
24427  fi
24428
24429elif test "$with_jpeg" = "internal" ; then
24430
24431  JPEG_SETTING=internal
24432
24433  echo "using internal jpeg code."
24434
24435else
24436
24437  JPEG_SETTING=external
24438  LIBS="-L$with_jpeg -L$with_jpeg/lib -ljpeg $LIBS"
24439  EXTRA_INCLUDES="-I$with_jpeg -I$with_jpeg/include $EXTRA_INCLUDES"
24440
24441  echo "using libjpeg from $with_jpeg."
24442
24443fi
24444
24445JPEG_SETTING=$JPEG_SETTING
24446
24447
24448if test "$JPEG_SETTING" != "no" ; then
24449  OPT_GDAL_FORMATS="jpeg $OPT_GDAL_FORMATS"
24450fi
24451
24452
24453
24454
24455
24456
24457# Check whether --with-libtiff was given.
24458if test "${with_libtiff+set}" = set; then :
24459  withval=$with_libtiff;
24460fi
24461
24462
24463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtiff" >&5
24464$as_echo_n "checking for libtiff... " >&6; }
24465
24466if test "x${with_libtiff}" = "xyes" -o "x${with_libtiff}" = "x" ; then
24467
24468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFScanlineSize64 in -ltiff" >&5
24469$as_echo_n "checking for TIFFScanlineSize64 in -ltiff... " >&6; }
24470if ${ac_cv_lib_tiff_TIFFScanlineSize64+:} false; then :
24471  $as_echo_n "(cached) " >&6
24472else
24473  ac_check_lib_save_LIBS=$LIBS
24474LIBS="-ltiff  $LIBS"
24475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24476/* end confdefs.h.  */
24477
24478/* Override any GCC internal prototype to avoid an error.
24479   Use char because int might match the return type of a GCC
24480   builtin and then its argument prototype would still apply.  */
24481#ifdef __cplusplus
24482extern "C"
24483#endif
24484char TIFFScanlineSize64 ();
24485int
24486main ()
24487{
24488return TIFFScanlineSize64 ();
24489  ;
24490  return 0;
24491}
24492_ACEOF
24493if ac_fn_c_try_link "$LINENO"; then :
24494  ac_cv_lib_tiff_TIFFScanlineSize64=yes
24495else
24496  ac_cv_lib_tiff_TIFFScanlineSize64=no
24497fi
24498rm -f core conftest.err conftest.$ac_objext \
24499    conftest$ac_exeext conftest.$ac_ext
24500LIBS=$ac_check_lib_save_LIBS
24501fi
24502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFScanlineSize64" >&5
24503$as_echo "$ac_cv_lib_tiff_TIFFScanlineSize64" >&6; }
24504if test "x$ac_cv_lib_tiff_TIFFScanlineSize64" = xyes; then :
24505  TIFF_SETTING=external HAVE_BIGTIFF=yes
24506else
24507  TIFF_SETTING=internal HAVE_BIGTIFF=yes
24508fi
24509
24510
24511  if test "$TIFF_SETTING" = "external" ; then
24512    LIBS="-ltiff $LIBS"
24513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using pre-installed libtiff." >&5
24514$as_echo "using pre-installed libtiff." >&6; }
24515  else
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal TIFF code." >&5
24517$as_echo "using internal TIFF code." >&6; }
24518  fi
24519
24520elif test "x${with_libtiff}" = "xno" ; then
24521
24522  as_fn_error $? "libtiff is a required dependency" "$LINENO" 5
24523
24524elif test "x${with_libtiff}" = "xinternal" ; then
24525
24526  TIFF_SETTING=internal
24527  HAVE_BIGTIFF=yes
24528
24529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal TIFF code." >&5
24530$as_echo "using internal TIFF code." >&6; }
24531
24532else
24533
24534  TIFF_SETTING=external
24535  if test -r "$with_libtiff/tiff.h" ; then
24536    LIBS="-L$with_libtiff -ltiff $LIBS"
24537    EXTRA_INCLUDES="-I$with_libtiff $EXTRA_INCLUDES"
24538  else
24539    LIBS="-L$with_libtiff/lib -ltiff $LIBS"
24540    EXTRA_INCLUDES="-I$with_libtiff/include $EXTRA_INCLUDES"
24541  fi
24542
24543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libtiff from ${with_libtiff}." >&5
24544$as_echo "using libtiff from ${with_libtiff}." >&6; }
24545
24546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFScanlineSize64 in -ltiff" >&5
24547$as_echo_n "checking for TIFFScanlineSize64 in -ltiff... " >&6; }
24548if ${ac_cv_lib_tiff_TIFFScanlineSize64+:} false; then :
24549  $as_echo_n "(cached) " >&6
24550else
24551  ac_check_lib_save_LIBS=$LIBS
24552LIBS="-ltiff  $LIBS"
24553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554/* end confdefs.h.  */
24555
24556/* Override any GCC internal prototype to avoid an error.
24557   Use char because int might match the return type of a GCC
24558   builtin and then its argument prototype would still apply.  */
24559#ifdef __cplusplus
24560extern "C"
24561#endif
24562char TIFFScanlineSize64 ();
24563int
24564main ()
24565{
24566return TIFFScanlineSize64 ();
24567  ;
24568  return 0;
24569}
24570_ACEOF
24571if ac_fn_c_try_link "$LINENO"; then :
24572  ac_cv_lib_tiff_TIFFScanlineSize64=yes
24573else
24574  ac_cv_lib_tiff_TIFFScanlineSize64=no
24575fi
24576rm -f core conftest.err conftest.$ac_objext \
24577    conftest$ac_exeext conftest.$ac_ext
24578LIBS=$ac_check_lib_save_LIBS
24579fi
24580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFScanlineSize64" >&5
24581$as_echo "$ac_cv_lib_tiff_TIFFScanlineSize64" >&6; }
24582if test "x$ac_cv_lib_tiff_TIFFScanlineSize64" = xyes; then :
24583  HAVE_BIGTIFF=yes
24584else
24585  HAVE_BIGTIFF=no
24586fi
24587
24588
24589fi
24590
24591if test "${HAVE_BIGTIFF}" != "yes" ; then
24592  as_fn_error $? "libtiff >= 4.0 is required." "$LINENO" 5
24593fi
24594
24595TIFF_SETTING=${TIFF_SETTING}
24596
24597
24598CURL_SETTING=no
24599CURL_INC=
24600CURL_LIB=
24601
24602
24603# Check whether --with-curl was given.
24604if test "${with_curl+set}" = set; then :
24605  withval=$with_curl;
24606fi
24607
24608
24609unset ac_cv_path_LIBCURL
24610
24611if test "`basename xx/$with_curl`" = "curl-config" ; then
24612  LIBCURL_CONFIG="$with_curl"
24613elif test "$with_curl" = "no" ; then
24614  LIBCURL_CONFIG=no
24615else
24616  # Extract the first word of "curl-config", so it can be a program name with args.
24617set dummy curl-config; ac_word=$2
24618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24619$as_echo_n "checking for $ac_word... " >&6; }
24620if ${ac_cv_path_LIBCURL_CONFIG+:} false; then :
24621  $as_echo_n "(cached) " >&6
24622else
24623  case $LIBCURL_CONFIG in
24624  [\\/]* | ?:[\\/]*)
24625  ac_cv_path_LIBCURL_CONFIG="$LIBCURL_CONFIG" # Let the user override the test with a path.
24626  ;;
24627  *)
24628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24629for as_dir in $PATH
24630do
24631  IFS=$as_save_IFS
24632  test -z "$as_dir" && as_dir=.
24633    for ac_exec_ext in '' $ac_executable_extensions; do
24634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24635    ac_cv_path_LIBCURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24637    break 2
24638  fi
24639done
24640  done
24641IFS=$as_save_IFS
24642
24643  test -z "$ac_cv_path_LIBCURL_CONFIG" && ac_cv_path_LIBCURL_CONFIG="no"
24644  ;;
24645esac
24646fi
24647LIBCURL_CONFIG=$ac_cv_path_LIBCURL_CONFIG
24648if test -n "$LIBCURL_CONFIG"; then
24649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_CONFIG" >&5
24650$as_echo "$LIBCURL_CONFIG" >&6; }
24651else
24652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24653$as_echo "no" >&6; }
24654fi
24655
24656
24657fi
24658
24659if test "$LIBCURL_CONFIG" != "no" ; then
24660
24661  CURL_VERNUM=`$LIBCURL_CONFIG --vernum`
24662  CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'`
24663
24664  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         found libcurl version $CURL_VER" >&5
24665$as_echo "        found libcurl version $CURL_VER" >&6; }
24666
24667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_global_init in -lcurl" >&5
24668$as_echo_n "checking for curl_global_init in -lcurl... " >&6; }
24669if ${ac_cv_lib_curl_curl_global_init+:} false; then :
24670  $as_echo_n "(cached) " >&6
24671else
24672  ac_check_lib_save_LIBS=$LIBS
24673LIBS="-lcurl `$LIBCURL_CONFIG --libs` $LIBS"
24674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24675/* end confdefs.h.  */
24676
24677/* Override any GCC internal prototype to avoid an error.
24678   Use char because int might match the return type of a GCC
24679   builtin and then its argument prototype would still apply.  */
24680#ifdef __cplusplus
24681extern "C"
24682#endif
24683char curl_global_init ();
24684int
24685main ()
24686{
24687return curl_global_init ();
24688  ;
24689  return 0;
24690}
24691_ACEOF
24692if ac_fn_c_try_link "$LINENO"; then :
24693  ac_cv_lib_curl_curl_global_init=yes
24694else
24695  ac_cv_lib_curl_curl_global_init=no
24696fi
24697rm -f core conftest.err conftest.$ac_objext \
24698    conftest$ac_exeext conftest.$ac_ext
24699LIBS=$ac_check_lib_save_LIBS
24700fi
24701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_global_init" >&5
24702$as_echo "$ac_cv_lib_curl_curl_global_init" >&6; }
24703if test "x$ac_cv_lib_curl_curl_global_init" = xyes; then :
24704  CURL_SETTING=yes
24705else
24706  CURL_SETTING=no
24707fi
24708
24709
24710fi
24711
24712CURL_SETTING=$CURL_SETTING
24713
24714CURL_INC=$CURL_INC
24715
24716CURL_LIB=$CURL_LIB
24717
24718
24719
24720SQLITE3_REQ_VERSION="3.0.0"
24721
24722
24723# Check whether --with-sqlite3 was given.
24724if test "${with_sqlite3+set}" = set; then :
24725  withval=$with_sqlite3;
24726        if test "$withval" = "no"; then
24727            WANT_SQLITE3="no"
24728        elif test "$withval" = "yes"; then
24729            WANT_SQLITE3="yes"
24730            ac_sqlite3_path=""
24731        else
24732            WANT_SQLITE3="yes"
24733            ac_sqlite3_path="$withval"
24734        fi
24735
24736else
24737  WANT_SQLITE3="yes"
24738
24739fi
24740
24741
24742    SQLITE3_CFLAGS=""
24743    SQLITE3_LDFLAGS=""
24744    SQLITE3_VERSION=""
24745    HAVE_SQLITE3="no"
24746
24747    sqlite3_version_req=$SQLITE3_REQ_VERSION
24748    sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([0-9]*\.[0-9]*\)'`
24749    sqlite3_version_req_major=`expr $sqlite3_version_req : '\([0-9]*\)'`
24750    sqlite3_version_req_minor=`expr $sqlite3_version_req : '[0-9]*\.\([0-9]*\)'`
24751    sqlite3_version_req_micro=`expr $sqlite3_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
24752    if test "x$sqlite3_version_req_micro" = "x" ; then
24753        sqlite3_version_req_micro="0"
24754    fi
24755
24756    sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \
24757                               \+ $sqlite3_version_req_minor \* 1000 \
24758                               \+ $sqlite3_version_req_micro`
24759
24760    if test "x$WANT_SQLITE3" = "xyes"; then
24761        ac_sqlite3_header="sqlite3.h"
24762        LIB_SQLITE3_FOUND=no
24763
24764        if test "$ac_sqlite3_path" != ""; then
24765
24766            unset ac_cv_lib_sqlite3_sqlite3_open
24767            saved_LIBS="$LIBS"
24768            LIBS=""
24769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
24770$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
24771if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
24772  $as_echo_n "(cached) " >&6
24773else
24774  ac_check_lib_save_LIBS=$LIBS
24775LIBS="-lsqlite3 -L$ac_sqlite3_path/lib $LIBS"
24776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24777/* end confdefs.h.  */
24778
24779/* Override any GCC internal prototype to avoid an error.
24780   Use char because int might match the return type of a GCC
24781   builtin and then its argument prototype would still apply.  */
24782#ifdef __cplusplus
24783extern "C"
24784#endif
24785char sqlite3_open ();
24786int
24787main ()
24788{
24789return sqlite3_open ();
24790  ;
24791  return 0;
24792}
24793_ACEOF
24794if ac_fn_c_try_link "$LINENO"; then :
24795  ac_cv_lib_sqlite3_sqlite3_open=yes
24796else
24797  ac_cv_lib_sqlite3_sqlite3_open=no
24798fi
24799rm -f core conftest.err conftest.$ac_objext \
24800    conftest$ac_exeext conftest.$ac_ext
24801LIBS=$ac_check_lib_save_LIBS
24802fi
24803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
24804$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
24805if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
24806  LIB_SQLITE3_FOUND=yes
24807else
24808  LIB_SQLITE3_FOUND=no
24809fi
24810
24811            LIBS="$saved_LIBS"
24812            if test "$LIB_SQLITE3_FOUND" = "yes"; then
24813                ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
24814            fi
24815
24816            ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
24817        else
24818            for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do
24819                if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
24820                    && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
24821                    ac_sqlite3_path=$ac_sqlite3_path_tmp
24822
24823                    unset ac_cv_lib_sqlite3_sqlite3_open
24824                    saved_LIBS="$LIBS"
24825                    LIBS=""
24826                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
24827$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
24828if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
24829  $as_echo_n "(cached) " >&6
24830else
24831  ac_check_lib_save_LIBS=$LIBS
24832LIBS="-lsqlite3  $LIBS"
24833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24834/* end confdefs.h.  */
24835
24836/* Override any GCC internal prototype to avoid an error.
24837   Use char because int might match the return type of a GCC
24838   builtin and then its argument prototype would still apply.  */
24839#ifdef __cplusplus
24840extern "C"
24841#endif
24842char sqlite3_open ();
24843int
24844main ()
24845{
24846return sqlite3_open ();
24847  ;
24848  return 0;
24849}
24850_ACEOF
24851if ac_fn_c_try_link "$LINENO"; then :
24852  ac_cv_lib_sqlite3_sqlite3_open=yes
24853else
24854  ac_cv_lib_sqlite3_sqlite3_open=no
24855fi
24856rm -f core conftest.err conftest.$ac_objext \
24857    conftest$ac_exeext conftest.$ac_ext
24858LIBS=$ac_check_lib_save_LIBS
24859fi
24860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
24861$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
24862if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
24863  LIB_SQLITE3_FOUND=yes
24864else
24865  LIB_SQLITE3_FOUND=no
24866fi
24867
24868                    LIBS="$saved_LIBS"
24869                    if test "$LIB_SQLITE3_FOUND" = "yes"; then
24870                        ac_sqlite3_ldflags=""
24871                    else
24872                        unset ac_cv_lib_sqlite3_sqlite3_open
24873                        saved_LIBS="$LIBS"
24874                        LIBS=""
24875                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
24876$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
24877if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
24878  $as_echo_n "(cached) " >&6
24879else
24880  ac_check_lib_save_LIBS=$LIBS
24881LIBS="-lsqlite3 -L$ac_sqlite3_path_tmp/lib $LIBS"
24882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24883/* end confdefs.h.  */
24884
24885/* Override any GCC internal prototype to avoid an error.
24886   Use char because int might match the return type of a GCC
24887   builtin and then its argument prototype would still apply.  */
24888#ifdef __cplusplus
24889extern "C"
24890#endif
24891char sqlite3_open ();
24892int
24893main ()
24894{
24895return sqlite3_open ();
24896  ;
24897  return 0;
24898}
24899_ACEOF
24900if ac_fn_c_try_link "$LINENO"; then :
24901  ac_cv_lib_sqlite3_sqlite3_open=yes
24902else
24903  ac_cv_lib_sqlite3_sqlite3_open=no
24904fi
24905rm -f core conftest.err conftest.$ac_objext \
24906    conftest$ac_exeext conftest.$ac_ext
24907LIBS=$ac_check_lib_save_LIBS
24908fi
24909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
24910$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
24911if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
24912  LIB_SQLITE3_FOUND=yes
24913else
24914  LIB_SQLITE3_FOUND=no
24915fi
24916
24917                        LIBS="$saved_LIBS"
24918                        if test "$LIB_SQLITE3_FOUND" = "yes"; then
24919                            ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib"
24920                        fi
24921                    fi
24922
24923                    ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include"
24924                    break;
24925                fi
24926            done
24927        fi
24928
24929        if test "$LIB_SQLITE3_FOUND" = "no"; then
24930            WANT_SQLITE3="no"
24931        fi
24932    fi
24933
24934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLite3 library >= $sqlite3_version_req" >&5
24935$as_echo_n "checking for SQLite3 library >= $sqlite3_version_req... " >&6; }
24936
24937    if test "x$WANT_SQLITE3" = "xyes"; then
24938
24939        ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3"
24940
24941        saved_CPPFLAGS="$CPPFLAGS"
24942        CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags"
24943
24944        ac_ext=cpp
24945ac_cpp='$CXXCPP $CPPFLAGS'
24946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24949
24950        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24951/* end confdefs.h.  */
24952
24953            #include <sqlite3.h>
24954int
24955main ()
24956{
24957
24958#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number)
24959// Everything is okay
24960#else
24961#  error SQLite version is too old
24962#endif
24963
24964
24965  ;
24966  return 0;
24967}
24968
24969_ACEOF
24970if ac_fn_cxx_try_compile "$LINENO"; then :
24971
24972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24973$as_echo "yes" >&6; }
24974            HAVE_SQLITE3="yes"
24975            success="yes"
24976
24977else
24978
24979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24980$as_echo "not found" >&6; }
24981            HAVE_SQLITE3="no"
24982            success="no"
24983
24984
24985fi
24986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24987        ac_ext=c
24988ac_cpp='$CPP $CPPFLAGS'
24989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24991ac_compiler_gnu=$ac_cv_c_compiler_gnu
24992
24993
24994        CPPFLAGS="$saved_CPPFLAGS"
24995
24996        if test "$success" = "yes"; then
24997
24998            SQLITE3_CFLAGS="$ac_sqlite3_cppflags"
24999            SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
25000
25001            ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
25002
25003                        if test "x$ac_sqlite3_header_path" != "x"; then
25004                ac_sqlite3_version=`cat $ac_sqlite3_header_path \
25005                    | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \
25006                        | sed -e 's/"//'`
25007                if test "$ac_sqlite3_version" != ""; then
25008                    SQLITE3_VERSION=$ac_sqlite3_version
25009                else
25010                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&5
25011$as_echo "$as_me: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&2;}
25012                fi
25013            fi
25014
25015
25016        fi
25017
25018
25019
25020
25021    else
25022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
25023$as_echo "disabled" >&6; }
25024    fi
25025
25026
25027if test "$HAVE_SQLITE3" = "yes"; then
25028    LIBS="$SQLITE3_LDFLAGS $LIBS"
25029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_column_table_name in -lsqlite3" >&5
25030$as_echo_n "checking for sqlite3_column_table_name in -lsqlite3... " >&6; }
25031if ${ac_cv_lib_sqlite3_sqlite3_column_table_name+:} false; then :
25032  $as_echo_n "(cached) " >&6
25033else
25034  ac_check_lib_save_LIBS=$LIBS
25035LIBS="-lsqlite3 $LIBS $LIBS"
25036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25037/* end confdefs.h.  */
25038
25039/* Override any GCC internal prototype to avoid an error.
25040   Use char because int might match the return type of a GCC
25041   builtin and then its argument prototype would still apply.  */
25042#ifdef __cplusplus
25043extern "C"
25044#endif
25045char sqlite3_column_table_name ();
25046int
25047main ()
25048{
25049return sqlite3_column_table_name ();
25050  ;
25051  return 0;
25052}
25053_ACEOF
25054if ac_fn_c_try_link "$LINENO"; then :
25055  ac_cv_lib_sqlite3_sqlite3_column_table_name=yes
25056else
25057  ac_cv_lib_sqlite3_sqlite3_column_table_name=no
25058fi
25059rm -f core conftest.err conftest.$ac_objext \
25060    conftest$ac_exeext conftest.$ac_ext
25061LIBS=$ac_check_lib_save_LIBS
25062fi
25063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_column_table_name" >&5
25064$as_echo "$ac_cv_lib_sqlite3_sqlite3_column_table_name" >&6; }
25065if test "x$ac_cv_lib_sqlite3_sqlite3_column_table_name" = xyes; then :
25066  SQLITE_HAS_COLUMN_METADATA=yes
25067else
25068  SQLITE_HAS_COLUMN_METADATA=no
25069fi
25070
25071fi
25072
25073SQLITE_INC=$SQLITE3_CFLAGS
25074
25075HAVE_SQLITE=$HAVE_SQLITE3
25076
25077SQLITE_HAS_COLUMN_METADATA=$SQLITE_HAS_COLUMN_METADATA
25078
25079HAVE_SQLITE=$HAVE_SQLITE3
25080
25081
25082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROJ >= 6 library" >&5
25083$as_echo_n "checking for PROJ >= 6 library... " >&6; }
25084
25085
25086# Check whether --with-proj was given.
25087if test "${with_proj+set}" = set; then :
25088  withval=$with_proj;
25089fi
25090
25091
25092
25093# Check whether --with-proj-extra-lib-for-test was given.
25094if test "${with_proj_extra_lib_for_test+set}" = set; then :
25095  withval=$with_proj_extra_lib_for_test;
25096fi
25097
25098
25099PROJ_INCLUDE=""
25100if test "x$with_proj" = "xno" ; then
25101
25102  as_fn_error $? "PROJ >= 6 is a required dependency." "$LINENO" 5
25103
25104else
25105
25106  if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then
25107    ORIG_LIBS="$LIBS"
25108    LIBS="-lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25109    ac_ext=cpp
25110ac_cpp='$CXXCPP $CPPFLAGS'
25111ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25112ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25113ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25114
25115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
25116$as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
25117if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
25118  $as_echo_n "(cached) " >&6
25119else
25120  ac_check_lib_save_LIBS=$LIBS
25121LIBS="-lproj  $LIBS"
25122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25123/* end confdefs.h.  */
25124
25125/* Override any GCC internal prototype to avoid an error.
25126   Use char because int might match the return type of a GCC
25127   builtin and then its argument prototype would still apply.  */
25128#ifdef __cplusplus
25129extern "C"
25130#endif
25131char proj_create_from_wkt ();
25132int
25133main ()
25134{
25135return proj_create_from_wkt ();
25136  ;
25137  return 0;
25138}
25139_ACEOF
25140if ac_fn_cxx_try_link "$LINENO"; then :
25141  ac_cv_lib_proj_proj_create_from_wkt=yes
25142else
25143  ac_cv_lib_proj_proj_create_from_wkt=no
25144fi
25145rm -f core conftest.err conftest.$ac_objext \
25146    conftest$ac_exeext conftest.$ac_ext
25147LIBS=$ac_check_lib_save_LIBS
25148fi
25149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
25150$as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
25151if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
25152  PROJ_FOUND=yes
25153else
25154  PROJ_FOUND=no
25155fi
25156
25157    ac_ext=c
25158ac_cpp='$CPP $CPPFLAGS'
25159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25161ac_compiler_gnu=$ac_cv_c_compiler_gnu
25162
25163    if test "$PROJ_FOUND" = "no"; then
25164        ac_ext=cpp
25165ac_cpp='$CXXCPP $CPPFLAGS'
25166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25169
25170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
25171$as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
25172if ${ac_cv_lib_proj_internal_proj_create_from_wkt+:} false; then :
25173  $as_echo_n "(cached) " >&6
25174else
25175  ac_check_lib_save_LIBS=$LIBS
25176LIBS="-lproj  $LIBS"
25177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25178/* end confdefs.h.  */
25179
25180/* Override any GCC internal prototype to avoid an error.
25181   Use char because int might match the return type of a GCC
25182   builtin and then its argument prototype would still apply.  */
25183#ifdef __cplusplus
25184extern "C"
25185#endif
25186char internal_proj_create_from_wkt ();
25187int
25188main ()
25189{
25190return internal_proj_create_from_wkt ();
25191  ;
25192  return 0;
25193}
25194_ACEOF
25195if ac_fn_cxx_try_link "$LINENO"; then :
25196  ac_cv_lib_proj_internal_proj_create_from_wkt=yes
25197else
25198  ac_cv_lib_proj_internal_proj_create_from_wkt=no
25199fi
25200rm -f core conftest.err conftest.$ac_objext \
25201    conftest$ac_exeext conftest.$ac_ext
25202LIBS=$ac_check_lib_save_LIBS
25203fi
25204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_internal_proj_create_from_wkt" >&5
25205$as_echo "$ac_cv_lib_proj_internal_proj_create_from_wkt" >&6; }
25206if test "x$ac_cv_lib_proj_internal_proj_create_from_wkt" = xyes; then :
25207  PROJ_FOUND=yes
25208else
25209  PROJ_FOUND=no
25210fi
25211
25212        ac_ext=c
25213ac_cpp='$CPP $CPPFLAGS'
25214ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25215ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25216ac_compiler_gnu=$ac_cv_c_compiler_gnu
25217
25218        if test "$PROJ_FOUND" = "yes"; then
25219            PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
25220        fi
25221    fi
25222    if test "$PROJ_FOUND" = "no"; then
25223        LIBS="-linternalproj $ORIG_LIBS"
25224        ac_ext=cpp
25225ac_cpp='$CXXCPP $CPPFLAGS'
25226ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25227ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25228ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25229
25230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -linternalproj" >&5
25231$as_echo_n "checking for internal_proj_create_from_wkt in -linternalproj... " >&6; }
25232if ${ac_cv_lib_internalproj_internal_proj_create_from_wkt+:} false; then :
25233  $as_echo_n "(cached) " >&6
25234else
25235  ac_check_lib_save_LIBS=$LIBS
25236LIBS="-linternalproj  $LIBS"
25237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25238/* end confdefs.h.  */
25239
25240/* Override any GCC internal prototype to avoid an error.
25241   Use char because int might match the return type of a GCC
25242   builtin and then its argument prototype would still apply.  */
25243#ifdef __cplusplus
25244extern "C"
25245#endif
25246char internal_proj_create_from_wkt ();
25247int
25248main ()
25249{
25250return internal_proj_create_from_wkt ();
25251  ;
25252  return 0;
25253}
25254_ACEOF
25255if ac_fn_cxx_try_link "$LINENO"; then :
25256  ac_cv_lib_internalproj_internal_proj_create_from_wkt=yes
25257else
25258  ac_cv_lib_internalproj_internal_proj_create_from_wkt=no
25259fi
25260rm -f core conftest.err conftest.$ac_objext \
25261    conftest$ac_exeext conftest.$ac_ext
25262LIBS=$ac_check_lib_save_LIBS
25263fi
25264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&5
25265$as_echo "$ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&6; }
25266if test "x$ac_cv_lib_internalproj_internal_proj_create_from_wkt" = xyes; then :
25267  PROJ_FOUND=yes
25268else
25269  PROJ_FOUND=no
25270fi
25271
25272        ac_ext=c
25273ac_cpp='$CPP $CPPFLAGS'
25274ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25275ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25276ac_compiler_gnu=$ac_cv_c_compiler_gnu
25277
25278        if test "$PROJ_FOUND" = "yes"; then
25279            PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
25280        fi
25281    fi
25282    if test "$PROJ_FOUND" = "no"; then
25283        as_fn_error $? "PROJ 6 symbols not found" "$LINENO" 5
25284    fi
25285    for ac_header in proj.h
25286do :
25287  ac_fn_c_check_header_mongrel "$LINENO" "proj.h" "ac_cv_header_proj_h" "$ac_includes_default"
25288if test "x$ac_cv_header_proj_h" = xyes; then :
25289  cat >>confdefs.h <<_ACEOF
25290#define HAVE_PROJ_H 1
25291_ACEOF
25292
25293fi
25294
25295done
25296
25297    if test "$ac_cv_header_proj_h" = "yes" ; then
25298        { $as_echo "$as_me:${as_lineno-$LINENO}: proj.h found" >&5
25299$as_echo "$as_me: proj.h found" >&6;}
25300    else
25301        as_fn_error $? "proj.h not found" "$LINENO" 5
25302    fi
25303  else
25304    ORIG_LIBS="$LIBS"
25305    LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25306    ac_ext=cpp
25307ac_cpp='$CXXCPP $CPPFLAGS'
25308ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25309ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25310ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25311
25312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
25313$as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
25314if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
25315  $as_echo_n "(cached) " >&6
25316else
25317  ac_check_lib_save_LIBS=$LIBS
25318LIBS="-lproj  $LIBS"
25319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25320/* end confdefs.h.  */
25321
25322/* Override any GCC internal prototype to avoid an error.
25323   Use char because int might match the return type of a GCC
25324   builtin and then its argument prototype would still apply.  */
25325#ifdef __cplusplus
25326extern "C"
25327#endif
25328char proj_create_from_wkt ();
25329int
25330main ()
25331{
25332return proj_create_from_wkt ();
25333  ;
25334  return 0;
25335}
25336_ACEOF
25337if ac_fn_cxx_try_link "$LINENO"; then :
25338  ac_cv_lib_proj_proj_create_from_wkt=yes
25339else
25340  ac_cv_lib_proj_proj_create_from_wkt=no
25341fi
25342rm -f core conftest.err conftest.$ac_objext \
25343    conftest$ac_exeext conftest.$ac_ext
25344LIBS=$ac_check_lib_save_LIBS
25345fi
25346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
25347$as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
25348if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
25349  PROJ_FOUND=yes
25350else
25351  PROJ_FOUND=no
25352fi
25353
25354    ac_ext=c
25355ac_cpp='$CPP $CPPFLAGS'
25356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25358ac_compiler_gnu=$ac_cv_c_compiler_gnu
25359
25360    if test "$PROJ_FOUND" = "no"; then
25361        LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25362        unset ac_cv_lib_proj_proj_create_from_wkt
25363        ac_ext=cpp
25364ac_cpp='$CXXCPP $CPPFLAGS'
25365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25368
25369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
25370$as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
25371if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
25372  $as_echo_n "(cached) " >&6
25373else
25374  ac_check_lib_save_LIBS=$LIBS
25375LIBS="-lproj  $LIBS"
25376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25377/* end confdefs.h.  */
25378
25379/* Override any GCC internal prototype to avoid an error.
25380   Use char because int might match the return type of a GCC
25381   builtin and then its argument prototype would still apply.  */
25382#ifdef __cplusplus
25383extern "C"
25384#endif
25385char proj_create_from_wkt ();
25386int
25387main ()
25388{
25389return proj_create_from_wkt ();
25390  ;
25391  return 0;
25392}
25393_ACEOF
25394if ac_fn_cxx_try_link "$LINENO"; then :
25395  ac_cv_lib_proj_proj_create_from_wkt=yes
25396else
25397  ac_cv_lib_proj_proj_create_from_wkt=no
25398fi
25399rm -f core conftest.err conftest.$ac_objext \
25400    conftest$ac_exeext conftest.$ac_ext
25401LIBS=$ac_check_lib_save_LIBS
25402fi
25403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
25404$as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
25405if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
25406  PROJ_FOUND=yes
25407else
25408  PROJ_FOUND=no
25409fi
25410
25411        ac_ext=c
25412ac_cpp='$CPP $CPPFLAGS'
25413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25415ac_compiler_gnu=$ac_cv_c_compiler_gnu
25416
25417    fi
25418    if test "$PROJ_FOUND" = "no"; then
25419        LIBS="-L$with_proj/lib64 -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25420        unset ac_cv_lib_proj_proj_create_from_wkt
25421        ac_ext=cpp
25422ac_cpp='$CXXCPP $CPPFLAGS'
25423ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25424ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25425ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25426
25427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
25428$as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
25429if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
25430  $as_echo_n "(cached) " >&6
25431else
25432  ac_check_lib_save_LIBS=$LIBS
25433LIBS="-lproj  $LIBS"
25434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25435/* end confdefs.h.  */
25436
25437/* Override any GCC internal prototype to avoid an error.
25438   Use char because int might match the return type of a GCC
25439   builtin and then its argument prototype would still apply.  */
25440#ifdef __cplusplus
25441extern "C"
25442#endif
25443char proj_create_from_wkt ();
25444int
25445main ()
25446{
25447return proj_create_from_wkt ();
25448  ;
25449  return 0;
25450}
25451_ACEOF
25452if ac_fn_cxx_try_link "$LINENO"; then :
25453  ac_cv_lib_proj_proj_create_from_wkt=yes
25454else
25455  ac_cv_lib_proj_proj_create_from_wkt=no
25456fi
25457rm -f core conftest.err conftest.$ac_objext \
25458    conftest$ac_exeext conftest.$ac_ext
25459LIBS=$ac_check_lib_save_LIBS
25460fi
25461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
25462$as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
25463if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
25464  PROJ_FOUND=yes
25465else
25466  PROJ_FOUND=no
25467fi
25468
25469        ac_ext=c
25470ac_cpp='$CPP $CPPFLAGS'
25471ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25472ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25473ac_compiler_gnu=$ac_cv_c_compiler_gnu
25474
25475    fi
25476    if test "$PROJ_FOUND" = "no"; then
25477        LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25478        ac_ext=cpp
25479ac_cpp='$CXXCPP $CPPFLAGS'
25480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25483
25484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
25485$as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
25486if ${ac_cv_lib_proj_internal_proj_create_from_wkt+:} false; then :
25487  $as_echo_n "(cached) " >&6
25488else
25489  ac_check_lib_save_LIBS=$LIBS
25490LIBS="-lproj  $LIBS"
25491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25492/* end confdefs.h.  */
25493
25494/* Override any GCC internal prototype to avoid an error.
25495   Use char because int might match the return type of a GCC
25496   builtin and then its argument prototype would still apply.  */
25497#ifdef __cplusplus
25498extern "C"
25499#endif
25500char internal_proj_create_from_wkt ();
25501int
25502main ()
25503{
25504return internal_proj_create_from_wkt ();
25505  ;
25506  return 0;
25507}
25508_ACEOF
25509if ac_fn_cxx_try_link "$LINENO"; then :
25510  ac_cv_lib_proj_internal_proj_create_from_wkt=yes
25511else
25512  ac_cv_lib_proj_internal_proj_create_from_wkt=no
25513fi
25514rm -f core conftest.err conftest.$ac_objext \
25515    conftest$ac_exeext conftest.$ac_ext
25516LIBS=$ac_check_lib_save_LIBS
25517fi
25518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_internal_proj_create_from_wkt" >&5
25519$as_echo "$ac_cv_lib_proj_internal_proj_create_from_wkt" >&6; }
25520if test "x$ac_cv_lib_proj_internal_proj_create_from_wkt" = xyes; then :
25521  PROJ_FOUND=yes
25522else
25523  PROJ_FOUND=no
25524fi
25525
25526        ac_ext=c
25527ac_cpp='$CPP $CPPFLAGS'
25528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25530ac_compiler_gnu=$ac_cv_c_compiler_gnu
25531
25532        if test "$PROJ_FOUND" = "no"; then
25533            LIBS="-L$with_proj/lib -lproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25534            unset ac_cv_lib_proj_internal_proj_create_from_wkt
25535            ac_ext=cpp
25536ac_cpp='$CXXCPP $CPPFLAGS'
25537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25540
25541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
25542$as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
25543if ${ac_cv_lib_proj_internal_proj_create_from_wkt+:} false; then :
25544  $as_echo_n "(cached) " >&6
25545else
25546  ac_check_lib_save_LIBS=$LIBS
25547LIBS="-lproj  $LIBS"
25548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25549/* end confdefs.h.  */
25550
25551/* Override any GCC internal prototype to avoid an error.
25552   Use char because int might match the return type of a GCC
25553   builtin and then its argument prototype would still apply.  */
25554#ifdef __cplusplus
25555extern "C"
25556#endif
25557char internal_proj_create_from_wkt ();
25558int
25559main ()
25560{
25561return internal_proj_create_from_wkt ();
25562  ;
25563  return 0;
25564}
25565_ACEOF
25566if ac_fn_cxx_try_link "$LINENO"; then :
25567  ac_cv_lib_proj_internal_proj_create_from_wkt=yes
25568else
25569  ac_cv_lib_proj_internal_proj_create_from_wkt=no
25570fi
25571rm -f core conftest.err conftest.$ac_objext \
25572    conftest$ac_exeext conftest.$ac_ext
25573LIBS=$ac_check_lib_save_LIBS
25574fi
25575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_internal_proj_create_from_wkt" >&5
25576$as_echo "$ac_cv_lib_proj_internal_proj_create_from_wkt" >&6; }
25577if test "x$ac_cv_lib_proj_internal_proj_create_from_wkt" = xyes; then :
25578  PROJ_FOUND=yes
25579else
25580  PROJ_FOUND=no
25581fi
25582
25583            ac_ext=c
25584ac_cpp='$CPP $CPPFLAGS'
25585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25587ac_compiler_gnu=$ac_cv_c_compiler_gnu
25588
25589        fi
25590        if test "$PROJ_FOUND" = "yes"; then
25591            PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
25592        fi
25593    fi
25594    if test "$PROJ_FOUND" = "no"; then
25595        LIBS="-L$with_proj/lib -linternalproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25596        ac_ext=cpp
25597ac_cpp='$CXXCPP $CPPFLAGS'
25598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25601
25602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -linternalproj" >&5
25603$as_echo_n "checking for internal_proj_create_from_wkt in -linternalproj... " >&6; }
25604if ${ac_cv_lib_internalproj_internal_proj_create_from_wkt+:} false; then :
25605  $as_echo_n "(cached) " >&6
25606else
25607  ac_check_lib_save_LIBS=$LIBS
25608LIBS="-linternalproj  $LIBS"
25609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25610/* end confdefs.h.  */
25611
25612/* Override any GCC internal prototype to avoid an error.
25613   Use char because int might match the return type of a GCC
25614   builtin and then its argument prototype would still apply.  */
25615#ifdef __cplusplus
25616extern "C"
25617#endif
25618char internal_proj_create_from_wkt ();
25619int
25620main ()
25621{
25622return internal_proj_create_from_wkt ();
25623  ;
25624  return 0;
25625}
25626_ACEOF
25627if ac_fn_cxx_try_link "$LINENO"; then :
25628  ac_cv_lib_internalproj_internal_proj_create_from_wkt=yes
25629else
25630  ac_cv_lib_internalproj_internal_proj_create_from_wkt=no
25631fi
25632rm -f core conftest.err conftest.$ac_objext \
25633    conftest$ac_exeext conftest.$ac_ext
25634LIBS=$ac_check_lib_save_LIBS
25635fi
25636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&5
25637$as_echo "$ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&6; }
25638if test "x$ac_cv_lib_internalproj_internal_proj_create_from_wkt" = xyes; then :
25639  PROJ_FOUND=yes
25640else
25641  PROJ_FOUND=no
25642fi
25643
25644        ac_ext=c
25645ac_cpp='$CPP $CPPFLAGS'
25646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25648ac_compiler_gnu=$ac_cv_c_compiler_gnu
25649
25650        if test "$PROJ_FOUND" = "no"; then
25651            LIBS="-L$with_proj/lib -linternalproj $with_proj_extra_lib_for_test $ORIG_LIBS"
25652            unset ac_cv_lib_internal_proj_internal_proj_create_from_wkt
25653            ac_ext=cpp
25654ac_cpp='$CXXCPP $CPPFLAGS'
25655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25658
25659            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -linternalproj" >&5
25660$as_echo_n "checking for internal_proj_create_from_wkt in -linternalproj... " >&6; }
25661if ${ac_cv_lib_internalproj_internal_proj_create_from_wkt+:} false; then :
25662  $as_echo_n "(cached) " >&6
25663else
25664  ac_check_lib_save_LIBS=$LIBS
25665LIBS="-linternalproj  $LIBS"
25666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25667/* end confdefs.h.  */
25668
25669/* Override any GCC internal prototype to avoid an error.
25670   Use char because int might match the return type of a GCC
25671   builtin and then its argument prototype would still apply.  */
25672#ifdef __cplusplus
25673extern "C"
25674#endif
25675char internal_proj_create_from_wkt ();
25676int
25677main ()
25678{
25679return internal_proj_create_from_wkt ();
25680  ;
25681  return 0;
25682}
25683_ACEOF
25684if ac_fn_cxx_try_link "$LINENO"; then :
25685  ac_cv_lib_internalproj_internal_proj_create_from_wkt=yes
25686else
25687  ac_cv_lib_internalproj_internal_proj_create_from_wkt=no
25688fi
25689rm -f core conftest.err conftest.$ac_objext \
25690    conftest$ac_exeext conftest.$ac_ext
25691LIBS=$ac_check_lib_save_LIBS
25692fi
25693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&5
25694$as_echo "$ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&6; }
25695if test "x$ac_cv_lib_internalproj_internal_proj_create_from_wkt" = xyes; then :
25696  PROJ_FOUND=yes
25697else
25698  PROJ_FOUND=no
25699fi
25700
25701            ac_ext=c
25702ac_cpp='$CPP $CPPFLAGS'
25703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25705ac_compiler_gnu=$ac_cv_c_compiler_gnu
25706
25707        fi
25708        if test "$PROJ_FOUND" = "yes"; then
25709            PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
25710        fi
25711    fi
25712    if test "$PROJ_FOUND" = "no"; then
25713        as_fn_error $? "PROJ 6 symbols not found" "$LINENO" 5
25714    fi
25715    if test -r "$with_proj/include/proj.h" ; then
25716        PROJ_INCLUDE="$PROJ_INCLUDE -I$with_proj/include"
25717        { $as_echo "$as_me:${as_lineno-$LINENO}: proj.h found" >&5
25718$as_echo "$as_me: proj.h found" >&6;}
25719    else
25720        as_fn_error $? "proj.h not found" "$LINENO" 5
25721    fi
25722  fi
25723fi
25724
25725
25726
25727
25728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite" >&5
25729$as_echo_n "checking for spatialite... " >&6; }
25730
25731
25732# Check whether --with-spatialite was given.
25733if test "${with_spatialite+set}" = set; then :
25734  withval=$with_spatialite;
25735fi
25736
25737
25738
25739# Check whether --with-spatialite-soname was given.
25740if test "${with_spatialite_soname+set}" = set; then :
25741  withval=$with_spatialite_soname;
25742fi
25743
25744
25745HAVE_SPATIALITE=no
25746
25747if test -z "$with_spatialite" -o "$with_spatialite" = "no"; then
25748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
25749$as_echo "disabled" >&6; }
25750elif test "$with_spatialite" = "yes"; then
25751    for ac_header in sqlite3.h
25752do :
25753  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
25754if test "x$ac_cv_header_sqlite3_h" = xyes; then :
25755  cat >>confdefs.h <<_ACEOF
25756#define HAVE_SQLITE3_H 1
25757_ACEOF
25758
25759fi
25760
25761done
25762
25763    if test "$ac_cv_header_sqlite3_h" = "yes"; then
25764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite.h in /usr/include or /usr/local/include" >&5
25765$as_echo_n "checking for spatialite.h in /usr/include or /usr/local/include... " >&6; }
25766        if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then
25767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
25768$as_echo "found" >&6; }
25769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite_init in -lspatialite" >&5
25770$as_echo_n "checking for spatialite_init in -lspatialite... " >&6; }
25771if ${ac_cv_lib_spatialite_spatialite_init+:} false; then :
25772  $as_echo_n "(cached) " >&6
25773else
25774  ac_check_lib_save_LIBS=$LIBS
25775LIBS="-lspatialite -lsqlite3 $LIBS"
25776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25777/* end confdefs.h.  */
25778
25779/* Override any GCC internal prototype to avoid an error.
25780   Use char because int might match the return type of a GCC
25781   builtin and then its argument prototype would still apply.  */
25782#ifdef __cplusplus
25783extern "C"
25784#endif
25785char spatialite_init ();
25786int
25787main ()
25788{
25789return spatialite_init ();
25790  ;
25791  return 0;
25792}
25793_ACEOF
25794if ac_fn_c_try_link "$LINENO"; then :
25795  ac_cv_lib_spatialite_spatialite_init=yes
25796else
25797  ac_cv_lib_spatialite_spatialite_init=no
25798fi
25799rm -f core conftest.err conftest.$ac_objext \
25800    conftest$ac_exeext conftest.$ac_ext
25801LIBS=$ac_check_lib_save_LIBS
25802fi
25803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_spatialite_spatialite_init" >&5
25804$as_echo "$ac_cv_lib_spatialite_spatialite_init" >&6; }
25805if test "x$ac_cv_lib_spatialite_spatialite_init" = xyes; then :
25806  SPATIALITE_INIT_FOUND=yes
25807else
25808  SPATIALITE_INIT_FOUND=no
25809fi
25810
25811            if test "$SPATIALITE_INIT_FOUND" = "yes"; then
25812                HAVE_SPATIALITE=yes
25813                SPATIALITE_LIBS="-lspatialite -lsqlite3"
25814                LIBS="$LIBS $SPATIALITE_LIBS"
25815                HAVE_SQLITE3=yes
25816            fi
25817        else
25818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found : spatialite support disabled" >&5
25819$as_echo "not found : spatialite support disabled" >&6; }
25820        fi
25821    fi
25822elif test "$with_spatialite" = "dlopen"; then
25823  HAVE_SPATIALITE=dlopen
25824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: dlopen" >&5
25825$as_echo "dlopen" >&6; }
25826
25827  if test "$with_spatialite_soname" != ""; then
25828      SPATIALITE_SONAME="$with_spatialite_soname"
25829  else
25830      SPATIALITE_SONAME="spatialite.so"
25831  fi
25832else
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite_init in -lspatialite" >&5
25834$as_echo_n "checking for spatialite_init in -lspatialite... " >&6; }
25835if ${ac_cv_lib_spatialite_spatialite_init+:} false; then :
25836  $as_echo_n "(cached) " >&6
25837else
25838  ac_check_lib_save_LIBS=$LIBS
25839LIBS="-lspatialite -L$with_spatialite/lib -lspatialite $LIBS"
25840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25841/* end confdefs.h.  */
25842
25843/* Override any GCC internal prototype to avoid an error.
25844   Use char because int might match the return type of a GCC
25845   builtin and then its argument prototype would still apply.  */
25846#ifdef __cplusplus
25847extern "C"
25848#endif
25849char spatialite_init ();
25850int
25851main ()
25852{
25853return spatialite_init ();
25854  ;
25855  return 0;
25856}
25857_ACEOF
25858if ac_fn_c_try_link "$LINENO"; then :
25859  ac_cv_lib_spatialite_spatialite_init=yes
25860else
25861  ac_cv_lib_spatialite_spatialite_init=no
25862fi
25863rm -f core conftest.err conftest.$ac_objext \
25864    conftest$ac_exeext conftest.$ac_ext
25865LIBS=$ac_check_lib_save_LIBS
25866fi
25867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_spatialite_spatialite_init" >&5
25868$as_echo "$ac_cv_lib_spatialite_spatialite_init" >&6; }
25869if test "x$ac_cv_lib_spatialite_spatialite_init" = xyes; then :
25870  SPATIALITE_INIT_FOUND=yes
25871else
25872  SPATIALITE_INIT_FOUND=no
25873fi
25874
25875
25876    if test -f "$with_spatialite/include/spatialite.h" -a \
25877        "$SPATIALITE_INIT_FOUND" = "yes"; then
25878
25879        if test "$HAVE_SQLITE3" = "yes"; then
25880            SPATIALITE_INC="-I$with_spatialite/include"
25881            HAVE_SPATIALITE=yes
25882            SPATIALITE_LIBS="-L$with_spatialite/lib -lspatialite"
25883            LIBS="$SQLITE3_LDFLAGS $LIBS $SPATIALITE_LIBS"
25884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: spatialite enabled" >&5
25885$as_echo "spatialite enabled" >&6; }
25886        else
25887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: spatialite disabled" >&5
25888$as_echo "spatialite disabled" >&6; }
25889        fi
25890    else
25891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
25892$as_echo "disabled" >&6; }
25893    fi
25894fi
25895
25896if test "$HAVE_SPATIALITE" = "yes"; then
25897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite_target_cpu in -lspatialite" >&5
25898$as_echo_n "checking for spatialite_target_cpu in -lspatialite... " >&6; }
25899if ${ac_cv_lib_spatialite_spatialite_target_cpu+:} false; then :
25900  $as_echo_n "(cached) " >&6
25901else
25902  ac_check_lib_save_LIBS=$LIBS
25903LIBS="-lspatialite  $LIBS"
25904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25905/* end confdefs.h.  */
25906
25907/* Override any GCC internal prototype to avoid an error.
25908   Use char because int might match the return type of a GCC
25909   builtin and then its argument prototype would still apply.  */
25910#ifdef __cplusplus
25911extern "C"
25912#endif
25913char spatialite_target_cpu ();
25914int
25915main ()
25916{
25917return spatialite_target_cpu ();
25918  ;
25919  return 0;
25920}
25921_ACEOF
25922if ac_fn_c_try_link "$LINENO"; then :
25923  ac_cv_lib_spatialite_spatialite_target_cpu=yes
25924else
25925  ac_cv_lib_spatialite_spatialite_target_cpu=no
25926fi
25927rm -f core conftest.err conftest.$ac_objext \
25928    conftest$ac_exeext conftest.$ac_ext
25929LIBS=$ac_check_lib_save_LIBS
25930fi
25931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_spatialite_spatialite_target_cpu" >&5
25932$as_echo "$ac_cv_lib_spatialite_spatialite_target_cpu" >&6; }
25933if test "x$ac_cv_lib_spatialite_spatialite_target_cpu" = xyes; then :
25934  SPATIALITE_412_OR_LATER=yes
25935else
25936  SPATIALITE_412_OR_LATER=no
25937fi
25938
25939fi
25940
25941HAVE_SPATIALITE=$HAVE_SPATIALITE
25942
25943SPATIALITE_SONAME=$SPATIALITE_SONAME
25944
25945SPATIALITE_INC=$SPATIALITE_INC
25946
25947SPATIALITE_412_OR_LATER=$SPATIALITE_412_OR_LATER
25948
25949
25950
25951
25952# Check whether --with-liblzma was given.
25953if test "${with_liblzma+set}" = set; then :
25954  withval=$with_liblzma;
25955fi
25956
25957
25958if test "$with_liblzma" = "yes" ; then
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
25960$as_echo_n "checking for lzma_code in -llzma... " >&6; }
25961if ${ac_cv_lib_lzma_lzma_code+:} false; then :
25962  $as_echo_n "(cached) " >&6
25963else
25964  ac_check_lib_save_LIBS=$LIBS
25965LIBS="-llzma  $LIBS"
25966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25967/* end confdefs.h.  */
25968
25969/* Override any GCC internal prototype to avoid an error.
25970   Use char because int might match the return type of a GCC
25971   builtin and then its argument prototype would still apply.  */
25972#ifdef __cplusplus
25973extern "C"
25974#endif
25975char lzma_code ();
25976int
25977main ()
25978{
25979return lzma_code ();
25980  ;
25981  return 0;
25982}
25983_ACEOF
25984if ac_fn_c_try_link "$LINENO"; then :
25985  ac_cv_lib_lzma_lzma_code=yes
25986else
25987  ac_cv_lib_lzma_lzma_code=no
25988fi
25989rm -f core conftest.err conftest.$ac_objext \
25990    conftest$ac_exeext conftest.$ac_ext
25991LIBS=$ac_check_lib_save_LIBS
25992fi
25993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5
25994$as_echo "$ac_cv_lib_lzma_lzma_code" >&6; }
25995if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then :
25996  LIBLZMA_SETTING=yes
25997else
25998  LIBLZMA_SETTING=no
25999fi
26000
26001  for ac_header in lzma.h
26002do :
26003  ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
26004if test "x$ac_cv_header_lzma_h" = xyes; then :
26005  cat >>confdefs.h <<_ACEOF
26006#define HAVE_LZMA_H 1
26007_ACEOF
26008
26009fi
26010
26011done
26012
26013
26014  if test "$LIBLZMA_SETTING" = "yes" -a "$ac_cv_header_lzma_h" = "yes" ; then
26015    LIBS="-llzma $LIBS"
26016  else
26017    LIBLZMA_SETTING=no
26018  fi
26019else
26020    LIBLZMA_SETTING=no
26021fi
26022
26023LIBLZMA_SETTING=$LIBLZMA_SETTING
26024
26025
26026
26027
26028
26029# Check whether --with-zstd was given.
26030if test "${with_zstd+set}" = set; then :
26031  withval=$with_zstd;
26032fi
26033
26034
26035if test "$with_zstd" = "" -o "$with_zstd" = "yes" ; then
26036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_decompressStream in -lzstd" >&5
26037$as_echo_n "checking for ZSTD_decompressStream in -lzstd... " >&6; }
26038if ${ac_cv_lib_zstd_ZSTD_decompressStream+:} false; then :
26039  $as_echo_n "(cached) " >&6
26040else
26041  ac_check_lib_save_LIBS=$LIBS
26042LIBS="-lzstd  $LIBS"
26043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26044/* end confdefs.h.  */
26045
26046/* Override any GCC internal prototype to avoid an error.
26047   Use char because int might match the return type of a GCC
26048   builtin and then its argument prototype would still apply.  */
26049#ifdef __cplusplus
26050extern "C"
26051#endif
26052char ZSTD_decompressStream ();
26053int
26054main ()
26055{
26056return ZSTD_decompressStream ();
26057  ;
26058  return 0;
26059}
26060_ACEOF
26061if ac_fn_c_try_link "$LINENO"; then :
26062  ac_cv_lib_zstd_ZSTD_decompressStream=yes
26063else
26064  ac_cv_lib_zstd_ZSTD_decompressStream=no
26065fi
26066rm -f core conftest.err conftest.$ac_objext \
26067    conftest$ac_exeext conftest.$ac_ext
26068LIBS=$ac_check_lib_save_LIBS
26069fi
26070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_decompressStream" >&5
26071$as_echo "$ac_cv_lib_zstd_ZSTD_decompressStream" >&6; }
26072if test "x$ac_cv_lib_zstd_ZSTD_decompressStream" = xyes; then :
26073  ZSTD_SETTING=yes
26074else
26075  ZSTD_SETTING=no
26076fi
26077
26078
26079  if test "$ZSTD_SETTING" = "yes" ; then
26080    LIBS="-lzstd $LIBS"
26081  else
26082    if test "$with_zstd" = "yes" ; then
26083      as_fn_error $? "libzstd not found" "$LINENO" 5
26084    else
26085      echo "libzstd not found - ZSTD support disabled"
26086    fi
26087  fi
26088elif test "$with_zstd" != "" -a "$with_zstd" != "no"; then
26089
26090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_decompressStream in -lzstd" >&5
26091$as_echo_n "checking for ZSTD_decompressStream in -lzstd... " >&6; }
26092if ${ac_cv_lib_zstd_ZSTD_decompressStream+:} false; then :
26093  $as_echo_n "(cached) " >&6
26094else
26095  ac_check_lib_save_LIBS=$LIBS
26096LIBS="-lzstd -L$with_zstd/lib $LIBS"
26097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26098/* end confdefs.h.  */
26099
26100/* Override any GCC internal prototype to avoid an error.
26101   Use char because int might match the return type of a GCC
26102   builtin and then its argument prototype would still apply.  */
26103#ifdef __cplusplus
26104extern "C"
26105#endif
26106char ZSTD_decompressStream ();
26107int
26108main ()
26109{
26110return ZSTD_decompressStream ();
26111  ;
26112  return 0;
26113}
26114_ACEOF
26115if ac_fn_c_try_link "$LINENO"; then :
26116  ac_cv_lib_zstd_ZSTD_decompressStream=yes
26117else
26118  ac_cv_lib_zstd_ZSTD_decompressStream=no
26119fi
26120rm -f core conftest.err conftest.$ac_objext \
26121    conftest$ac_exeext conftest.$ac_ext
26122LIBS=$ac_check_lib_save_LIBS
26123fi
26124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_decompressStream" >&5
26125$as_echo "$ac_cv_lib_zstd_ZSTD_decompressStream" >&6; }
26126if test "x$ac_cv_lib_zstd_ZSTD_decompressStream" = xyes; then :
26127  ZSTD_SETTING=yes
26128else
26129  ZSTD_SETTING=no
26130fi
26131
26132
26133  if test "$ZSTD_SETTING" = "yes" -a -f "$with_zstd/include/zstd.h" ; then
26134    LIBS="-L$with_zstd/lib -lzstd $LIBS"
26135    EXTRA_INCLUDES="-I$with_zstd/include $EXTRA_INCLUDES"
26136  else
26137    as_fn_error $? "libzstd not found" "$LINENO" 5
26138  fi
26139
26140else
26141    ZSTD_SETTING=no
26142fi
26143
26144ZSTD_SETTING=$ZSTD_SETTING
26145
26146
26147
26148GDALFORMATS_ENABLED=
26149GDALFORMATS_DISABLED=
26150OGRFORMATS_ENABLED=
26151OGRFORMATS_ENABLED_CFLAGS=
26152OGRFORMATS_DISABLED=
26153
26154
26155
26156
26157# Check whether --enable-all-optional-drivers was given.
26158if test "${enable_all_optional_drivers+set}" = set; then :
26159  enableval=$enable_all_optional_drivers;
26160fi
26161
26162if test "x$enable_all_optional_drivers" = "xno"; then :
26163  all_drivers_disabled=yes
26164else
26165  all_drivers_disabled=no
26166fi
26167
26168
26169
26170
26171
26172
26173# Check whether --enable-driver-aaigrid was given.
26174if test "${enable_driver_aaigrid+set}" = set; then :
26175  enableval=$enable_driver_aaigrid;
26176fi
26177cur_driver_enabled=yes
26178requested=$enable_driver_aaigrid
26179if test "$all_drivers_disabled" = "yes"; then :
26180  if test "x$requested" = "xyes"; then :
26181    cur_driver_enabled=yes
26182  else
26183    cur_driver_enabled=no
26184  fi
26185else
26186  if test "x$requested" != "xno"; then :
26187    cur_driver_enabled=yes
26188  else
26189    cur_driver_enabled=no
26190  fi
26191fi
26192
26193if test "$cur_driver_enabled" = "yes"; then :
26194  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED aaigrid"
26195  INTERNAL_FORMAT_aaigrid_ENABLED=yes
26196else
26197  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED aaigrid"
26198  INTERNAL_FORMAT_aaigrid_ENABLED=no
26199fi
26200
26201# Check whether --enable-driver-adrg was given.
26202if test "${enable_driver_adrg+set}" = set; then :
26203  enableval=$enable_driver_adrg;
26204fi
26205cur_driver_enabled=yes
26206requested=$enable_driver_adrg
26207if test "$all_drivers_disabled" = "yes"; then :
26208  if test "x$requested" = "xyes"; then :
26209    cur_driver_enabled=yes
26210  else
26211    cur_driver_enabled=no
26212  fi
26213else
26214  if test "x$requested" != "xno"; then :
26215    cur_driver_enabled=yes
26216  else
26217    cur_driver_enabled=no
26218  fi
26219fi
26220
26221if test "$cur_driver_enabled" = "yes"; then :
26222  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED adrg"
26223  INTERNAL_FORMAT_adrg_ENABLED=yes
26224else
26225  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED adrg"
26226  INTERNAL_FORMAT_adrg_ENABLED=no
26227fi
26228
26229# Check whether --enable-driver-aigrid was given.
26230if test "${enable_driver_aigrid+set}" = set; then :
26231  enableval=$enable_driver_aigrid;
26232fi
26233cur_driver_enabled=yes
26234requested=$enable_driver_aigrid
26235if test "$all_drivers_disabled" = "yes"; then :
26236  if test "x$requested" = "xyes"; then :
26237    cur_driver_enabled=yes
26238  else
26239    cur_driver_enabled=no
26240  fi
26241else
26242  if test "x$requested" != "xno"; then :
26243    cur_driver_enabled=yes
26244  else
26245    cur_driver_enabled=no
26246  fi
26247fi
26248
26249if test "$cur_driver_enabled" = "yes"; then :
26250  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED aigrid"
26251  INTERNAL_FORMAT_aigrid_ENABLED=yes
26252else
26253  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED aigrid"
26254  INTERNAL_FORMAT_aigrid_ENABLED=no
26255fi
26256
26257# Check whether --enable-driver-airsar was given.
26258if test "${enable_driver_airsar+set}" = set; then :
26259  enableval=$enable_driver_airsar;
26260fi
26261cur_driver_enabled=yes
26262requested=$enable_driver_airsar
26263if test "$all_drivers_disabled" = "yes"; then :
26264  if test "x$requested" = "xyes"; then :
26265    cur_driver_enabled=yes
26266  else
26267    cur_driver_enabled=no
26268  fi
26269else
26270  if test "x$requested" != "xno"; then :
26271    cur_driver_enabled=yes
26272  else
26273    cur_driver_enabled=no
26274  fi
26275fi
26276
26277if test "$cur_driver_enabled" = "yes"; then :
26278  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED airsar"
26279  INTERNAL_FORMAT_airsar_ENABLED=yes
26280else
26281  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED airsar"
26282  INTERNAL_FORMAT_airsar_ENABLED=no
26283fi
26284
26285# Check whether --enable-driver-arg was given.
26286if test "${enable_driver_arg+set}" = set; then :
26287  enableval=$enable_driver_arg;
26288fi
26289cur_driver_enabled=yes
26290requested=$enable_driver_arg
26291if test "$all_drivers_disabled" = "yes"; then :
26292  if test "x$requested" = "xyes"; then :
26293    cur_driver_enabled=yes
26294  else
26295    cur_driver_enabled=no
26296  fi
26297else
26298  if test "x$requested" != "xno"; then :
26299    cur_driver_enabled=yes
26300  else
26301    cur_driver_enabled=no
26302  fi
26303fi
26304
26305if test "$cur_driver_enabled" = "yes"; then :
26306  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED arg"
26307  INTERNAL_FORMAT_arg_ENABLED=yes
26308else
26309  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED arg"
26310  INTERNAL_FORMAT_arg_ENABLED=no
26311fi
26312
26313# Check whether --enable-driver-blx was given.
26314if test "${enable_driver_blx+set}" = set; then :
26315  enableval=$enable_driver_blx;
26316fi
26317cur_driver_enabled=yes
26318requested=$enable_driver_blx
26319if test "$all_drivers_disabled" = "yes"; then :
26320  if test "x$requested" = "xyes"; then :
26321    cur_driver_enabled=yes
26322  else
26323    cur_driver_enabled=no
26324  fi
26325else
26326  if test "x$requested" != "xno"; then :
26327    cur_driver_enabled=yes
26328  else
26329    cur_driver_enabled=no
26330  fi
26331fi
26332
26333if test "$cur_driver_enabled" = "yes"; then :
26334  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED blx"
26335  INTERNAL_FORMAT_blx_ENABLED=yes
26336else
26337  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED blx"
26338  INTERNAL_FORMAT_blx_ENABLED=no
26339fi
26340
26341# Check whether --enable-driver-bmp was given.
26342if test "${enable_driver_bmp+set}" = set; then :
26343  enableval=$enable_driver_bmp;
26344fi
26345cur_driver_enabled=yes
26346requested=$enable_driver_bmp
26347if test "$all_drivers_disabled" = "yes"; then :
26348  if test "x$requested" = "xyes"; then :
26349    cur_driver_enabled=yes
26350  else
26351    cur_driver_enabled=no
26352  fi
26353else
26354  if test "x$requested" != "xno"; then :
26355    cur_driver_enabled=yes
26356  else
26357    cur_driver_enabled=no
26358  fi
26359fi
26360
26361if test "$cur_driver_enabled" = "yes"; then :
26362  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED bmp"
26363  INTERNAL_FORMAT_bmp_ENABLED=yes
26364else
26365  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED bmp"
26366  INTERNAL_FORMAT_bmp_ENABLED=no
26367fi
26368
26369# Check whether --enable-driver-bsb was given.
26370if test "${enable_driver_bsb+set}" = set; then :
26371  enableval=$enable_driver_bsb;
26372fi
26373cur_driver_enabled=yes
26374requested=$enable_driver_bsb
26375if test "$all_drivers_disabled" = "yes"; then :
26376  if test "x$requested" = "xyes"; then :
26377    cur_driver_enabled=yes
26378  else
26379    cur_driver_enabled=no
26380  fi
26381else
26382  if test "x$requested" != "xno"; then :
26383    cur_driver_enabled=yes
26384  else
26385    cur_driver_enabled=no
26386  fi
26387fi
26388
26389if test "$cur_driver_enabled" = "yes"; then :
26390  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED bsb"
26391  INTERNAL_FORMAT_bsb_ENABLED=yes
26392else
26393  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED bsb"
26394  INTERNAL_FORMAT_bsb_ENABLED=no
26395fi
26396
26397# Check whether --enable-driver-cals was given.
26398if test "${enable_driver_cals+set}" = set; then :
26399  enableval=$enable_driver_cals;
26400fi
26401cur_driver_enabled=yes
26402requested=$enable_driver_cals
26403if test "$all_drivers_disabled" = "yes"; then :
26404  if test "x$requested" = "xyes"; then :
26405    cur_driver_enabled=yes
26406  else
26407    cur_driver_enabled=no
26408  fi
26409else
26410  if test "x$requested" != "xno"; then :
26411    cur_driver_enabled=yes
26412  else
26413    cur_driver_enabled=no
26414  fi
26415fi
26416
26417if test "$cur_driver_enabled" = "yes"; then :
26418  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED cals"
26419  INTERNAL_FORMAT_cals_ENABLED=yes
26420else
26421  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED cals"
26422  INTERNAL_FORMAT_cals_ENABLED=no
26423fi
26424
26425# Check whether --enable-driver-ceos was given.
26426if test "${enable_driver_ceos+set}" = set; then :
26427  enableval=$enable_driver_ceos;
26428fi
26429cur_driver_enabled=yes
26430requested=$enable_driver_ceos
26431if test "$all_drivers_disabled" = "yes"; then :
26432  if test "x$requested" = "xyes"; then :
26433    cur_driver_enabled=yes
26434  else
26435    cur_driver_enabled=no
26436  fi
26437else
26438  if test "x$requested" != "xno"; then :
26439    cur_driver_enabled=yes
26440  else
26441    cur_driver_enabled=no
26442  fi
26443fi
26444
26445if test "$cur_driver_enabled" = "yes"; then :
26446  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ceos"
26447  INTERNAL_FORMAT_ceos_ENABLED=yes
26448else
26449  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ceos"
26450  INTERNAL_FORMAT_ceos_ENABLED=no
26451fi
26452
26453# Check whether --enable-driver-ceos2 was given.
26454if test "${enable_driver_ceos2+set}" = set; then :
26455  enableval=$enable_driver_ceos2;
26456fi
26457cur_driver_enabled=yes
26458requested=$enable_driver_ceos2
26459if test "$all_drivers_disabled" = "yes"; then :
26460  if test "x$requested" = "xyes"; then :
26461    cur_driver_enabled=yes
26462  else
26463    cur_driver_enabled=no
26464  fi
26465else
26466  if test "x$requested" != "xno"; then :
26467    cur_driver_enabled=yes
26468  else
26469    cur_driver_enabled=no
26470  fi
26471fi
26472
26473if test "$cur_driver_enabled" = "yes"; then :
26474  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ceos2"
26475  INTERNAL_FORMAT_ceos2_ENABLED=yes
26476else
26477  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ceos2"
26478  INTERNAL_FORMAT_ceos2_ENABLED=no
26479fi
26480
26481# Check whether --enable-driver-coasp was given.
26482if test "${enable_driver_coasp+set}" = set; then :
26483  enableval=$enable_driver_coasp;
26484fi
26485cur_driver_enabled=yes
26486requested=$enable_driver_coasp
26487if test "$all_drivers_disabled" = "yes"; then :
26488  if test "x$requested" = "xyes"; then :
26489    cur_driver_enabled=yes
26490  else
26491    cur_driver_enabled=no
26492  fi
26493else
26494  if test "x$requested" != "xno"; then :
26495    cur_driver_enabled=yes
26496  else
26497    cur_driver_enabled=no
26498  fi
26499fi
26500
26501if test "$cur_driver_enabled" = "yes"; then :
26502  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED coasp"
26503  INTERNAL_FORMAT_coasp_ENABLED=yes
26504else
26505  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED coasp"
26506  INTERNAL_FORMAT_coasp_ENABLED=no
26507fi
26508
26509# Check whether --enable-driver-cosar was given.
26510if test "${enable_driver_cosar+set}" = set; then :
26511  enableval=$enable_driver_cosar;
26512fi
26513cur_driver_enabled=yes
26514requested=$enable_driver_cosar
26515if test "$all_drivers_disabled" = "yes"; then :
26516  if test "x$requested" = "xyes"; then :
26517    cur_driver_enabled=yes
26518  else
26519    cur_driver_enabled=no
26520  fi
26521else
26522  if test "x$requested" != "xno"; then :
26523    cur_driver_enabled=yes
26524  else
26525    cur_driver_enabled=no
26526  fi
26527fi
26528
26529if test "$cur_driver_enabled" = "yes"; then :
26530  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED cosar"
26531  INTERNAL_FORMAT_cosar_ENABLED=yes
26532else
26533  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED cosar"
26534  INTERNAL_FORMAT_cosar_ENABLED=no
26535fi
26536
26537# Check whether --enable-driver-ctg was given.
26538if test "${enable_driver_ctg+set}" = set; then :
26539  enableval=$enable_driver_ctg;
26540fi
26541cur_driver_enabled=yes
26542requested=$enable_driver_ctg
26543if test "$all_drivers_disabled" = "yes"; then :
26544  if test "x$requested" = "xyes"; then :
26545    cur_driver_enabled=yes
26546  else
26547    cur_driver_enabled=no
26548  fi
26549else
26550  if test "x$requested" != "xno"; then :
26551    cur_driver_enabled=yes
26552  else
26553    cur_driver_enabled=no
26554  fi
26555fi
26556
26557if test "$cur_driver_enabled" = "yes"; then :
26558  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ctg"
26559  INTERNAL_FORMAT_ctg_ENABLED=yes
26560else
26561  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ctg"
26562  INTERNAL_FORMAT_ctg_ENABLED=no
26563fi
26564
26565# Check whether --enable-driver-dimap was given.
26566if test "${enable_driver_dimap+set}" = set; then :
26567  enableval=$enable_driver_dimap;
26568fi
26569cur_driver_enabled=yes
26570requested=$enable_driver_dimap
26571if test "$all_drivers_disabled" = "yes"; then :
26572  if test "x$requested" = "xyes"; then :
26573    cur_driver_enabled=yes
26574  else
26575    cur_driver_enabled=no
26576  fi
26577else
26578  if test "x$requested" != "xno"; then :
26579    cur_driver_enabled=yes
26580  else
26581    cur_driver_enabled=no
26582  fi
26583fi
26584
26585if test "$cur_driver_enabled" = "yes"; then :
26586  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED dimap"
26587  INTERNAL_FORMAT_dimap_ENABLED=yes
26588else
26589  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED dimap"
26590  INTERNAL_FORMAT_dimap_ENABLED=no
26591fi
26592
26593# Check whether --enable-driver-dted was given.
26594if test "${enable_driver_dted+set}" = set; then :
26595  enableval=$enable_driver_dted;
26596fi
26597cur_driver_enabled=yes
26598requested=$enable_driver_dted
26599if test "$all_drivers_disabled" = "yes"; then :
26600  if test "x$requested" = "xyes"; then :
26601    cur_driver_enabled=yes
26602  else
26603    cur_driver_enabled=no
26604  fi
26605else
26606  if test "x$requested" != "xno"; then :
26607    cur_driver_enabled=yes
26608  else
26609    cur_driver_enabled=no
26610  fi
26611fi
26612
26613if test "$cur_driver_enabled" = "yes"; then :
26614  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED dted"
26615  INTERNAL_FORMAT_dted_ENABLED=yes
26616else
26617  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED dted"
26618  INTERNAL_FORMAT_dted_ENABLED=no
26619fi
26620
26621# Check whether --enable-driver-elas was given.
26622if test "${enable_driver_elas+set}" = set; then :
26623  enableval=$enable_driver_elas;
26624fi
26625cur_driver_enabled=yes
26626requested=$enable_driver_elas
26627if test "$all_drivers_disabled" = "yes"; then :
26628  if test "x$requested" = "xyes"; then :
26629    cur_driver_enabled=yes
26630  else
26631    cur_driver_enabled=no
26632  fi
26633else
26634  if test "x$requested" != "xno"; then :
26635    cur_driver_enabled=yes
26636  else
26637    cur_driver_enabled=no
26638  fi
26639fi
26640
26641if test "$cur_driver_enabled" = "yes"; then :
26642  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED elas"
26643  INTERNAL_FORMAT_elas_ENABLED=yes
26644else
26645  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED elas"
26646  INTERNAL_FORMAT_elas_ENABLED=no
26647fi
26648
26649# Check whether --enable-driver-envisat was given.
26650if test "${enable_driver_envisat+set}" = set; then :
26651  enableval=$enable_driver_envisat;
26652fi
26653cur_driver_enabled=yes
26654requested=$enable_driver_envisat
26655if test "$all_drivers_disabled" = "yes"; then :
26656  if test "x$requested" = "xyes"; then :
26657    cur_driver_enabled=yes
26658  else
26659    cur_driver_enabled=no
26660  fi
26661else
26662  if test "x$requested" != "xno"; then :
26663    cur_driver_enabled=yes
26664  else
26665    cur_driver_enabled=no
26666  fi
26667fi
26668
26669if test "$cur_driver_enabled" = "yes"; then :
26670  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED envisat"
26671  INTERNAL_FORMAT_envisat_ENABLED=yes
26672else
26673  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED envisat"
26674  INTERNAL_FORMAT_envisat_ENABLED=no
26675fi
26676
26677# Check whether --enable-driver-ers was given.
26678if test "${enable_driver_ers+set}" = set; then :
26679  enableval=$enable_driver_ers;
26680fi
26681cur_driver_enabled=yes
26682requested=$enable_driver_ers
26683if test "$all_drivers_disabled" = "yes"; then :
26684  if test "x$requested" = "xyes"; then :
26685    cur_driver_enabled=yes
26686  else
26687    cur_driver_enabled=no
26688  fi
26689else
26690  if test "x$requested" != "xno"; then :
26691    cur_driver_enabled=yes
26692  else
26693    cur_driver_enabled=no
26694  fi
26695fi
26696
26697if test "$cur_driver_enabled" = "yes"; then :
26698  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ers"
26699  INTERNAL_FORMAT_ers_ENABLED=yes
26700else
26701  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ers"
26702  INTERNAL_FORMAT_ers_ENABLED=no
26703fi
26704
26705# Check whether --enable-driver-esric was given.
26706if test "${enable_driver_esric+set}" = set; then :
26707  enableval=$enable_driver_esric;
26708fi
26709cur_driver_enabled=yes
26710requested=$enable_driver_esric
26711if test "$all_drivers_disabled" = "yes"; then :
26712  if test "x$requested" = "xyes"; then :
26713    cur_driver_enabled=yes
26714  else
26715    cur_driver_enabled=no
26716  fi
26717else
26718  if test "x$requested" != "xno"; then :
26719    cur_driver_enabled=yes
26720  else
26721    cur_driver_enabled=no
26722  fi
26723fi
26724
26725if test "$cur_driver_enabled" = "yes"; then :
26726  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED esric"
26727  INTERNAL_FORMAT_esric_ENABLED=yes
26728else
26729  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED esric"
26730  INTERNAL_FORMAT_esric_ENABLED=no
26731fi
26732
26733# Check whether --enable-driver-fit was given.
26734if test "${enable_driver_fit+set}" = set; then :
26735  enableval=$enable_driver_fit;
26736fi
26737cur_driver_enabled=yes
26738requested=$enable_driver_fit
26739if test "$all_drivers_disabled" = "yes"; then :
26740  if test "x$requested" = "xyes"; then :
26741    cur_driver_enabled=yes
26742  else
26743    cur_driver_enabled=no
26744  fi
26745else
26746  if test "x$requested" != "xno"; then :
26747    cur_driver_enabled=yes
26748  else
26749    cur_driver_enabled=no
26750  fi
26751fi
26752
26753if test "$cur_driver_enabled" = "yes"; then :
26754  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED fit"
26755  INTERNAL_FORMAT_fit_ENABLED=yes
26756else
26757  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED fit"
26758  INTERNAL_FORMAT_fit_ENABLED=no
26759fi
26760
26761# Check whether --enable-driver-gff was given.
26762if test "${enable_driver_gff+set}" = set; then :
26763  enableval=$enable_driver_gff;
26764fi
26765cur_driver_enabled=yes
26766requested=$enable_driver_gff
26767if test "$all_drivers_disabled" = "yes"; then :
26768  if test "x$requested" = "xyes"; then :
26769    cur_driver_enabled=yes
26770  else
26771    cur_driver_enabled=no
26772  fi
26773else
26774  if test "x$requested" != "xno"; then :
26775    cur_driver_enabled=yes
26776  else
26777    cur_driver_enabled=no
26778  fi
26779fi
26780
26781if test "$cur_driver_enabled" = "yes"; then :
26782  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED gff"
26783  INTERNAL_FORMAT_gff_ENABLED=yes
26784else
26785  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED gff"
26786  INTERNAL_FORMAT_gff_ENABLED=no
26787fi
26788
26789# Check whether --enable-driver-gsg was given.
26790if test "${enable_driver_gsg+set}" = set; then :
26791  enableval=$enable_driver_gsg;
26792fi
26793cur_driver_enabled=yes
26794requested=$enable_driver_gsg
26795if test "$all_drivers_disabled" = "yes"; then :
26796  if test "x$requested" = "xyes"; then :
26797    cur_driver_enabled=yes
26798  else
26799    cur_driver_enabled=no
26800  fi
26801else
26802  if test "x$requested" != "xno"; then :
26803    cur_driver_enabled=yes
26804  else
26805    cur_driver_enabled=no
26806  fi
26807fi
26808
26809if test "$cur_driver_enabled" = "yes"; then :
26810  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED gsg"
26811  INTERNAL_FORMAT_gsg_ENABLED=yes
26812else
26813  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED gsg"
26814  INTERNAL_FORMAT_gsg_ENABLED=no
26815fi
26816
26817# Check whether --enable-driver-gxf was given.
26818if test "${enable_driver_gxf+set}" = set; then :
26819  enableval=$enable_driver_gxf;
26820fi
26821cur_driver_enabled=yes
26822requested=$enable_driver_gxf
26823if test "$all_drivers_disabled" = "yes"; then :
26824  if test "x$requested" = "xyes"; then :
26825    cur_driver_enabled=yes
26826  else
26827    cur_driver_enabled=no
26828  fi
26829else
26830  if test "x$requested" != "xno"; then :
26831    cur_driver_enabled=yes
26832  else
26833    cur_driver_enabled=no
26834  fi
26835fi
26836
26837if test "$cur_driver_enabled" = "yes"; then :
26838  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED gxf"
26839  INTERNAL_FORMAT_gxf_ENABLED=yes
26840else
26841  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED gxf"
26842  INTERNAL_FORMAT_gxf_ENABLED=no
26843fi
26844
26845# Check whether --enable-driver-hf2 was given.
26846if test "${enable_driver_hf2+set}" = set; then :
26847  enableval=$enable_driver_hf2;
26848fi
26849cur_driver_enabled=yes
26850requested=$enable_driver_hf2
26851if test "$all_drivers_disabled" = "yes"; then :
26852  if test "x$requested" = "xyes"; then :
26853    cur_driver_enabled=yes
26854  else
26855    cur_driver_enabled=no
26856  fi
26857else
26858  if test "x$requested" != "xno"; then :
26859    cur_driver_enabled=yes
26860  else
26861    cur_driver_enabled=no
26862  fi
26863fi
26864
26865if test "$cur_driver_enabled" = "yes"; then :
26866  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED hf2"
26867  INTERNAL_FORMAT_hf2_ENABLED=yes
26868else
26869  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED hf2"
26870  INTERNAL_FORMAT_hf2_ENABLED=no
26871fi
26872
26873# Check whether --enable-driver-idrisi was given.
26874if test "${enable_driver_idrisi+set}" = set; then :
26875  enableval=$enable_driver_idrisi;
26876fi
26877cur_driver_enabled=yes
26878requested=$enable_driver_idrisi
26879if test "$all_drivers_disabled" = "yes"; then :
26880  if test "x$requested" = "xyes"; then :
26881    cur_driver_enabled=yes
26882  else
26883    cur_driver_enabled=no
26884  fi
26885else
26886  if test "x$requested" != "xno"; then :
26887    cur_driver_enabled=yes
26888  else
26889    cur_driver_enabled=no
26890  fi
26891fi
26892
26893if test "$cur_driver_enabled" = "yes"; then :
26894  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED idrisi"
26895  INTERNAL_FORMAT_idrisi_ENABLED=yes
26896else
26897  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED idrisi"
26898  INTERNAL_FORMAT_idrisi_ENABLED=no
26899fi
26900
26901# Check whether --enable-driver-ilwis was given.
26902if test "${enable_driver_ilwis+set}" = set; then :
26903  enableval=$enable_driver_ilwis;
26904fi
26905cur_driver_enabled=yes
26906requested=$enable_driver_ilwis
26907if test "$all_drivers_disabled" = "yes"; then :
26908  if test "x$requested" = "xyes"; then :
26909    cur_driver_enabled=yes
26910  else
26911    cur_driver_enabled=no
26912  fi
26913else
26914  if test "x$requested" != "xno"; then :
26915    cur_driver_enabled=yes
26916  else
26917    cur_driver_enabled=no
26918  fi
26919fi
26920
26921if test "$cur_driver_enabled" = "yes"; then :
26922  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ilwis"
26923  INTERNAL_FORMAT_ilwis_ENABLED=yes
26924else
26925  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ilwis"
26926  INTERNAL_FORMAT_ilwis_ENABLED=no
26927fi
26928
26929# Check whether --enable-driver-ingr was given.
26930if test "${enable_driver_ingr+set}" = set; then :
26931  enableval=$enable_driver_ingr;
26932fi
26933cur_driver_enabled=yes
26934requested=$enable_driver_ingr
26935if test "$all_drivers_disabled" = "yes"; then :
26936  if test "x$requested" = "xyes"; then :
26937    cur_driver_enabled=yes
26938  else
26939    cur_driver_enabled=no
26940  fi
26941else
26942  if test "x$requested" != "xno"; then :
26943    cur_driver_enabled=yes
26944  else
26945    cur_driver_enabled=no
26946  fi
26947fi
26948
26949if test "$cur_driver_enabled" = "yes"; then :
26950  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ingr"
26951  INTERNAL_FORMAT_ingr_ENABLED=yes
26952else
26953  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ingr"
26954  INTERNAL_FORMAT_ingr_ENABLED=no
26955fi
26956
26957# Check whether --enable-driver-iris was given.
26958if test "${enable_driver_iris+set}" = set; then :
26959  enableval=$enable_driver_iris;
26960fi
26961cur_driver_enabled=yes
26962requested=$enable_driver_iris
26963if test "$all_drivers_disabled" = "yes"; then :
26964  if test "x$requested" = "xyes"; then :
26965    cur_driver_enabled=yes
26966  else
26967    cur_driver_enabled=no
26968  fi
26969else
26970  if test "x$requested" != "xno"; then :
26971    cur_driver_enabled=yes
26972  else
26973    cur_driver_enabled=no
26974  fi
26975fi
26976
26977if test "$cur_driver_enabled" = "yes"; then :
26978  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED iris"
26979  INTERNAL_FORMAT_iris_ENABLED=yes
26980else
26981  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED iris"
26982  INTERNAL_FORMAT_iris_ENABLED=no
26983fi
26984
26985# Check whether --enable-driver-iso8211 was given.
26986if test "${enable_driver_iso8211+set}" = set; then :
26987  enableval=$enable_driver_iso8211;
26988fi
26989cur_driver_enabled=yes
26990requested=$enable_driver_iso8211
26991if test "$all_drivers_disabled" = "yes"; then :
26992  if test "x$requested" = "xyes"; then :
26993    cur_driver_enabled=yes
26994  else
26995    cur_driver_enabled=no
26996  fi
26997else
26998  if test "x$requested" != "xno"; then :
26999    cur_driver_enabled=yes
27000  else
27001    cur_driver_enabled=no
27002  fi
27003fi
27004
27005if test "$cur_driver_enabled" = "yes"; then :
27006  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED iso8211"
27007  INTERNAL_FORMAT_iso8211_ENABLED=yes
27008else
27009  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED iso8211"
27010  INTERNAL_FORMAT_iso8211_ENABLED=no
27011fi
27012
27013# Check whether --enable-driver-jaxapalsar was given.
27014if test "${enable_driver_jaxapalsar+set}" = set; then :
27015  enableval=$enable_driver_jaxapalsar;
27016fi
27017cur_driver_enabled=yes
27018requested=$enable_driver_jaxapalsar
27019if test "$all_drivers_disabled" = "yes"; then :
27020  if test "x$requested" = "xyes"; then :
27021    cur_driver_enabled=yes
27022  else
27023    cur_driver_enabled=no
27024  fi
27025else
27026  if test "x$requested" != "xno"; then :
27027    cur_driver_enabled=yes
27028  else
27029    cur_driver_enabled=no
27030  fi
27031fi
27032
27033if test "$cur_driver_enabled" = "yes"; then :
27034  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED jaxapalsar"
27035  INTERNAL_FORMAT_jaxapalsar_ENABLED=yes
27036else
27037  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED jaxapalsar"
27038  INTERNAL_FORMAT_jaxapalsar_ENABLED=no
27039fi
27040
27041# Check whether --enable-driver-jdem was given.
27042if test "${enable_driver_jdem+set}" = set; then :
27043  enableval=$enable_driver_jdem;
27044fi
27045cur_driver_enabled=yes
27046requested=$enable_driver_jdem
27047if test "$all_drivers_disabled" = "yes"; then :
27048  if test "x$requested" = "xyes"; then :
27049    cur_driver_enabled=yes
27050  else
27051    cur_driver_enabled=no
27052  fi
27053else
27054  if test "x$requested" != "xno"; then :
27055    cur_driver_enabled=yes
27056  else
27057    cur_driver_enabled=no
27058  fi
27059fi
27060
27061if test "$cur_driver_enabled" = "yes"; then :
27062  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED jdem"
27063  INTERNAL_FORMAT_jdem_ENABLED=yes
27064else
27065  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED jdem"
27066  INTERNAL_FORMAT_jdem_ENABLED=no
27067fi
27068
27069# Check whether --enable-driver-kmlsuperoverlay was given.
27070if test "${enable_driver_kmlsuperoverlay+set}" = set; then :
27071  enableval=$enable_driver_kmlsuperoverlay;
27072fi
27073cur_driver_enabled=yes
27074requested=$enable_driver_kmlsuperoverlay
27075if test "$all_drivers_disabled" = "yes"; then :
27076  if test "x$requested" = "xyes"; then :
27077    cur_driver_enabled=yes
27078  else
27079    cur_driver_enabled=no
27080  fi
27081else
27082  if test "x$requested" != "xno"; then :
27083    cur_driver_enabled=yes
27084  else
27085    cur_driver_enabled=no
27086  fi
27087fi
27088
27089if test "$cur_driver_enabled" = "yes"; then :
27090  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED kmlsuperoverlay"
27091  INTERNAL_FORMAT_kmlsuperoverlay_ENABLED=yes
27092else
27093  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED kmlsuperoverlay"
27094  INTERNAL_FORMAT_kmlsuperoverlay_ENABLED=no
27095fi
27096
27097# Check whether --enable-driver-l1b was given.
27098if test "${enable_driver_l1b+set}" = set; then :
27099  enableval=$enable_driver_l1b;
27100fi
27101cur_driver_enabled=yes
27102requested=$enable_driver_l1b
27103if test "$all_drivers_disabled" = "yes"; then :
27104  if test "x$requested" = "xyes"; then :
27105    cur_driver_enabled=yes
27106  else
27107    cur_driver_enabled=no
27108  fi
27109else
27110  if test "x$requested" != "xno"; then :
27111    cur_driver_enabled=yes
27112  else
27113    cur_driver_enabled=no
27114  fi
27115fi
27116
27117if test "$cur_driver_enabled" = "yes"; then :
27118  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED l1b"
27119  INTERNAL_FORMAT_l1b_ENABLED=yes
27120else
27121  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED l1b"
27122  INTERNAL_FORMAT_l1b_ENABLED=no
27123fi
27124
27125# Check whether --enable-driver-leveller was given.
27126if test "${enable_driver_leveller+set}" = set; then :
27127  enableval=$enable_driver_leveller;
27128fi
27129cur_driver_enabled=yes
27130requested=$enable_driver_leveller
27131if test "$all_drivers_disabled" = "yes"; then :
27132  if test "x$requested" = "xyes"; then :
27133    cur_driver_enabled=yes
27134  else
27135    cur_driver_enabled=no
27136  fi
27137else
27138  if test "x$requested" != "xno"; then :
27139    cur_driver_enabled=yes
27140  else
27141    cur_driver_enabled=no
27142  fi
27143fi
27144
27145if test "$cur_driver_enabled" = "yes"; then :
27146  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED leveller"
27147  INTERNAL_FORMAT_leveller_ENABLED=yes
27148else
27149  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED leveller"
27150  INTERNAL_FORMAT_leveller_ENABLED=no
27151fi
27152
27153# Check whether --enable-driver-map was given.
27154if test "${enable_driver_map+set}" = set; then :
27155  enableval=$enable_driver_map;
27156fi
27157cur_driver_enabled=yes
27158requested=$enable_driver_map
27159if test "$all_drivers_disabled" = "yes"; then :
27160  if test "x$requested" = "xyes"; then :
27161    cur_driver_enabled=yes
27162  else
27163    cur_driver_enabled=no
27164  fi
27165else
27166  if test "x$requested" != "xno"; then :
27167    cur_driver_enabled=yes
27168  else
27169    cur_driver_enabled=no
27170  fi
27171fi
27172
27173if test "$cur_driver_enabled" = "yes"; then :
27174  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED map"
27175  INTERNAL_FORMAT_map_ENABLED=yes
27176else
27177  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED map"
27178  INTERNAL_FORMAT_map_ENABLED=no
27179fi
27180
27181# Check whether --enable-driver-mrf was given.
27182if test "${enable_driver_mrf+set}" = set; then :
27183  enableval=$enable_driver_mrf;
27184fi
27185cur_driver_enabled=yes
27186requested=$enable_driver_mrf
27187if test "$all_drivers_disabled" = "yes"; then :
27188  if test "x$requested" = "xyes"; then :
27189    cur_driver_enabled=yes
27190  else
27191    cur_driver_enabled=no
27192  fi
27193else
27194  if test "x$requested" != "xno"; then :
27195    cur_driver_enabled=yes
27196  else
27197    cur_driver_enabled=no
27198  fi
27199fi
27200
27201if test "$cur_driver_enabled" = "yes"; then :
27202  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED mrf"
27203  INTERNAL_FORMAT_mrf_ENABLED=yes
27204else
27205  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED mrf"
27206  INTERNAL_FORMAT_mrf_ENABLED=no
27207fi
27208
27209# Check whether --enable-driver-msgn was given.
27210if test "${enable_driver_msgn+set}" = set; then :
27211  enableval=$enable_driver_msgn;
27212fi
27213cur_driver_enabled=yes
27214requested=$enable_driver_msgn
27215if test "$all_drivers_disabled" = "yes"; then :
27216  if test "x$requested" = "xyes"; then :
27217    cur_driver_enabled=yes
27218  else
27219    cur_driver_enabled=no
27220  fi
27221else
27222  if test "x$requested" != "xno"; then :
27223    cur_driver_enabled=yes
27224  else
27225    cur_driver_enabled=no
27226  fi
27227fi
27228
27229if test "$cur_driver_enabled" = "yes"; then :
27230  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED msgn"
27231  INTERNAL_FORMAT_msgn_ENABLED=yes
27232else
27233  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED msgn"
27234  INTERNAL_FORMAT_msgn_ENABLED=no
27235fi
27236
27237# Check whether --enable-driver-ngsgeoid was given.
27238if test "${enable_driver_ngsgeoid+set}" = set; then :
27239  enableval=$enable_driver_ngsgeoid;
27240fi
27241cur_driver_enabled=yes
27242requested=$enable_driver_ngsgeoid
27243if test "$all_drivers_disabled" = "yes"; then :
27244  if test "x$requested" = "xyes"; then :
27245    cur_driver_enabled=yes
27246  else
27247    cur_driver_enabled=no
27248  fi
27249else
27250  if test "x$requested" != "xno"; then :
27251    cur_driver_enabled=yes
27252  else
27253    cur_driver_enabled=no
27254  fi
27255fi
27256
27257if test "$cur_driver_enabled" = "yes"; then :
27258  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ngsgeoid"
27259  INTERNAL_FORMAT_ngsgeoid_ENABLED=yes
27260else
27261  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ngsgeoid"
27262  INTERNAL_FORMAT_ngsgeoid_ENABLED=no
27263fi
27264
27265# Check whether --enable-driver-nitf was given.
27266if test "${enable_driver_nitf+set}" = set; then :
27267  enableval=$enable_driver_nitf;
27268fi
27269cur_driver_enabled=yes
27270requested=$enable_driver_nitf
27271if test "$all_drivers_disabled" = "yes"; then :
27272  if test "x$requested" = "xyes"; then :
27273    cur_driver_enabled=yes
27274  else
27275    cur_driver_enabled=no
27276  fi
27277else
27278  if test "x$requested" != "xno"; then :
27279    cur_driver_enabled=yes
27280  else
27281    cur_driver_enabled=no
27282  fi
27283fi
27284
27285if test "$cur_driver_enabled" = "yes"; then :
27286  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED nitf"
27287  INTERNAL_FORMAT_nitf_ENABLED=yes
27288else
27289  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED nitf"
27290  INTERNAL_FORMAT_nitf_ENABLED=no
27291fi
27292
27293# Check whether --enable-driver-northwood was given.
27294if test "${enable_driver_northwood+set}" = set; then :
27295  enableval=$enable_driver_northwood;
27296fi
27297cur_driver_enabled=yes
27298requested=$enable_driver_northwood
27299if test "$all_drivers_disabled" = "yes"; then :
27300  if test "x$requested" = "xyes"; then :
27301    cur_driver_enabled=yes
27302  else
27303    cur_driver_enabled=no
27304  fi
27305else
27306  if test "x$requested" != "xno"; then :
27307    cur_driver_enabled=yes
27308  else
27309    cur_driver_enabled=no
27310  fi
27311fi
27312
27313if test "$cur_driver_enabled" = "yes"; then :
27314  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED northwood"
27315  INTERNAL_FORMAT_northwood_ENABLED=yes
27316else
27317  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED northwood"
27318  INTERNAL_FORMAT_northwood_ENABLED=no
27319fi
27320
27321# Check whether --enable-driver-pds was given.
27322if test "${enable_driver_pds+set}" = set; then :
27323  enableval=$enable_driver_pds;
27324fi
27325cur_driver_enabled=yes
27326requested=$enable_driver_pds
27327if test "$all_drivers_disabled" = "yes"; then :
27328  if test "x$requested" = "xyes"; then :
27329    cur_driver_enabled=yes
27330  else
27331    cur_driver_enabled=no
27332  fi
27333else
27334  if test "x$requested" != "xno"; then :
27335    cur_driver_enabled=yes
27336  else
27337    cur_driver_enabled=no
27338  fi
27339fi
27340
27341if test "$cur_driver_enabled" = "yes"; then :
27342  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED pds"
27343  INTERNAL_FORMAT_pds_ENABLED=yes
27344else
27345  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED pds"
27346  INTERNAL_FORMAT_pds_ENABLED=no
27347fi
27348
27349# Check whether --enable-driver-prf was given.
27350if test "${enable_driver_prf+set}" = set; then :
27351  enableval=$enable_driver_prf;
27352fi
27353cur_driver_enabled=yes
27354requested=$enable_driver_prf
27355if test "$all_drivers_disabled" = "yes"; then :
27356  if test "x$requested" = "xyes"; then :
27357    cur_driver_enabled=yes
27358  else
27359    cur_driver_enabled=no
27360  fi
27361else
27362  if test "x$requested" != "xno"; then :
27363    cur_driver_enabled=yes
27364  else
27365    cur_driver_enabled=no
27366  fi
27367fi
27368
27369if test "$cur_driver_enabled" = "yes"; then :
27370  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED prf"
27371  INTERNAL_FORMAT_prf_ENABLED=yes
27372else
27373  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED prf"
27374  INTERNAL_FORMAT_prf_ENABLED=no
27375fi
27376
27377# Check whether --enable-driver-r was given.
27378if test "${enable_driver_r+set}" = set; then :
27379  enableval=$enable_driver_r;
27380fi
27381cur_driver_enabled=yes
27382requested=$enable_driver_r
27383if test "$all_drivers_disabled" = "yes"; then :
27384  if test "x$requested" = "xyes"; then :
27385    cur_driver_enabled=yes
27386  else
27387    cur_driver_enabled=no
27388  fi
27389else
27390  if test "x$requested" != "xno"; then :
27391    cur_driver_enabled=yes
27392  else
27393    cur_driver_enabled=no
27394  fi
27395fi
27396
27397if test "$cur_driver_enabled" = "yes"; then :
27398  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED r"
27399  INTERNAL_FORMAT_r_ENABLED=yes
27400else
27401  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED r"
27402  INTERNAL_FORMAT_r_ENABLED=no
27403fi
27404
27405# Check whether --enable-driver-raw was given.
27406if test "${enable_driver_raw+set}" = set; then :
27407  enableval=$enable_driver_raw;
27408fi
27409cur_driver_enabled=yes
27410requested=$enable_driver_raw
27411if test "$all_drivers_disabled" = "yes"; then :
27412  if test "x$requested" = "xyes"; then :
27413    cur_driver_enabled=yes
27414  else
27415    cur_driver_enabled=no
27416  fi
27417else
27418  if test "x$requested" != "xno"; then :
27419    cur_driver_enabled=yes
27420  else
27421    cur_driver_enabled=no
27422  fi
27423fi
27424
27425if test "$cur_driver_enabled" = "yes"; then :
27426  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED raw"
27427  INTERNAL_FORMAT_raw_ENABLED=yes
27428else
27429  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED raw"
27430  INTERNAL_FORMAT_raw_ENABLED=no
27431fi
27432
27433# Check whether --enable-driver-rmf was given.
27434if test "${enable_driver_rmf+set}" = set; then :
27435  enableval=$enable_driver_rmf;
27436fi
27437cur_driver_enabled=yes
27438requested=$enable_driver_rmf
27439if test "$all_drivers_disabled" = "yes"; then :
27440  if test "x$requested" = "xyes"; then :
27441    cur_driver_enabled=yes
27442  else
27443    cur_driver_enabled=no
27444  fi
27445else
27446  if test "x$requested" != "xno"; then :
27447    cur_driver_enabled=yes
27448  else
27449    cur_driver_enabled=no
27450  fi
27451fi
27452
27453if test "$cur_driver_enabled" = "yes"; then :
27454  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED rmf"
27455  INTERNAL_FORMAT_rmf_ENABLED=yes
27456else
27457  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED rmf"
27458  INTERNAL_FORMAT_rmf_ENABLED=no
27459fi
27460
27461# Check whether --enable-driver-rs2 was given.
27462if test "${enable_driver_rs2+set}" = set; then :
27463  enableval=$enable_driver_rs2;
27464fi
27465cur_driver_enabled=yes
27466requested=$enable_driver_rs2
27467if test "$all_drivers_disabled" = "yes"; then :
27468  if test "x$requested" = "xyes"; then :
27469    cur_driver_enabled=yes
27470  else
27471    cur_driver_enabled=no
27472  fi
27473else
27474  if test "x$requested" != "xno"; then :
27475    cur_driver_enabled=yes
27476  else
27477    cur_driver_enabled=no
27478  fi
27479fi
27480
27481if test "$cur_driver_enabled" = "yes"; then :
27482  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED rs2"
27483  INTERNAL_FORMAT_rs2_ENABLED=yes
27484else
27485  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED rs2"
27486  INTERNAL_FORMAT_rs2_ENABLED=no
27487fi
27488
27489# Check whether --enable-driver-safe was given.
27490if test "${enable_driver_safe+set}" = set; then :
27491  enableval=$enable_driver_safe;
27492fi
27493cur_driver_enabled=yes
27494requested=$enable_driver_safe
27495if test "$all_drivers_disabled" = "yes"; then :
27496  if test "x$requested" = "xyes"; then :
27497    cur_driver_enabled=yes
27498  else
27499    cur_driver_enabled=no
27500  fi
27501else
27502  if test "x$requested" != "xno"; then :
27503    cur_driver_enabled=yes
27504  else
27505    cur_driver_enabled=no
27506  fi
27507fi
27508
27509if test "$cur_driver_enabled" = "yes"; then :
27510  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED safe"
27511  INTERNAL_FORMAT_safe_ENABLED=yes
27512else
27513  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED safe"
27514  INTERNAL_FORMAT_safe_ENABLED=no
27515fi
27516
27517# Check whether --enable-driver-saga was given.
27518if test "${enable_driver_saga+set}" = set; then :
27519  enableval=$enable_driver_saga;
27520fi
27521cur_driver_enabled=yes
27522requested=$enable_driver_saga
27523if test "$all_drivers_disabled" = "yes"; then :
27524  if test "x$requested" = "xyes"; then :
27525    cur_driver_enabled=yes
27526  else
27527    cur_driver_enabled=no
27528  fi
27529else
27530  if test "x$requested" != "xno"; then :
27531    cur_driver_enabled=yes
27532  else
27533    cur_driver_enabled=no
27534  fi
27535fi
27536
27537if test "$cur_driver_enabled" = "yes"; then :
27538  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED saga"
27539  INTERNAL_FORMAT_saga_ENABLED=yes
27540else
27541  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED saga"
27542  INTERNAL_FORMAT_saga_ENABLED=no
27543fi
27544
27545# Check whether --enable-driver-sdts was given.
27546if test "${enable_driver_sdts+set}" = set; then :
27547  enableval=$enable_driver_sdts;
27548fi
27549cur_driver_enabled=yes
27550requested=$enable_driver_sdts
27551if test "$all_drivers_disabled" = "yes"; then :
27552  if test "x$requested" = "xyes"; then :
27553    cur_driver_enabled=yes
27554  else
27555    cur_driver_enabled=no
27556  fi
27557else
27558  if test "x$requested" != "xno"; then :
27559    cur_driver_enabled=yes
27560  else
27561    cur_driver_enabled=no
27562  fi
27563fi
27564
27565if test "$cur_driver_enabled" = "yes"; then :
27566  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED sdts"
27567  INTERNAL_FORMAT_sdts_ENABLED=yes
27568else
27569  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED sdts"
27570  INTERNAL_FORMAT_sdts_ENABLED=no
27571fi
27572
27573# Check whether --enable-driver-sentinel2 was given.
27574if test "${enable_driver_sentinel2+set}" = set; then :
27575  enableval=$enable_driver_sentinel2;
27576fi
27577cur_driver_enabled=yes
27578requested=$enable_driver_sentinel2
27579if test "$all_drivers_disabled" = "yes"; then :
27580  if test "x$requested" = "xyes"; then :
27581    cur_driver_enabled=yes
27582  else
27583    cur_driver_enabled=no
27584  fi
27585else
27586  if test "x$requested" != "xno"; then :
27587    cur_driver_enabled=yes
27588  else
27589    cur_driver_enabled=no
27590  fi
27591fi
27592
27593if test "$cur_driver_enabled" = "yes"; then :
27594  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED sentinel2"
27595  INTERNAL_FORMAT_sentinel2_ENABLED=yes
27596else
27597  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED sentinel2"
27598  INTERNAL_FORMAT_sentinel2_ENABLED=no
27599fi
27600
27601# Check whether --enable-driver-sgi was given.
27602if test "${enable_driver_sgi+set}" = set; then :
27603  enableval=$enable_driver_sgi;
27604fi
27605cur_driver_enabled=yes
27606requested=$enable_driver_sgi
27607if test "$all_drivers_disabled" = "yes"; then :
27608  if test "x$requested" = "xyes"; then :
27609    cur_driver_enabled=yes
27610  else
27611    cur_driver_enabled=no
27612  fi
27613else
27614  if test "x$requested" != "xno"; then :
27615    cur_driver_enabled=yes
27616  else
27617    cur_driver_enabled=no
27618  fi
27619fi
27620
27621if test "$cur_driver_enabled" = "yes"; then :
27622  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED sgi"
27623  INTERNAL_FORMAT_sgi_ENABLED=yes
27624else
27625  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED sgi"
27626  INTERNAL_FORMAT_sgi_ENABLED=no
27627fi
27628
27629# Check whether --enable-driver-sigdem was given.
27630if test "${enable_driver_sigdem+set}" = set; then :
27631  enableval=$enable_driver_sigdem;
27632fi
27633cur_driver_enabled=yes
27634requested=$enable_driver_sigdem
27635if test "$all_drivers_disabled" = "yes"; then :
27636  if test "x$requested" = "xyes"; then :
27637    cur_driver_enabled=yes
27638  else
27639    cur_driver_enabled=no
27640  fi
27641else
27642  if test "x$requested" != "xno"; then :
27643    cur_driver_enabled=yes
27644  else
27645    cur_driver_enabled=no
27646  fi
27647fi
27648
27649if test "$cur_driver_enabled" = "yes"; then :
27650  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED sigdem"
27651  INTERNAL_FORMAT_sigdem_ENABLED=yes
27652else
27653  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED sigdem"
27654  INTERNAL_FORMAT_sigdem_ENABLED=no
27655fi
27656
27657# Check whether --enable-driver-srtmhgt was given.
27658if test "${enable_driver_srtmhgt+set}" = set; then :
27659  enableval=$enable_driver_srtmhgt;
27660fi
27661cur_driver_enabled=yes
27662requested=$enable_driver_srtmhgt
27663if test "$all_drivers_disabled" = "yes"; then :
27664  if test "x$requested" = "xyes"; then :
27665    cur_driver_enabled=yes
27666  else
27667    cur_driver_enabled=no
27668  fi
27669else
27670  if test "x$requested" != "xno"; then :
27671    cur_driver_enabled=yes
27672  else
27673    cur_driver_enabled=no
27674  fi
27675fi
27676
27677if test "$cur_driver_enabled" = "yes"; then :
27678  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED srtmhgt"
27679  INTERNAL_FORMAT_srtmhgt_ENABLED=yes
27680else
27681  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED srtmhgt"
27682  INTERNAL_FORMAT_srtmhgt_ENABLED=no
27683fi
27684
27685# Check whether --enable-driver-stacta was given.
27686if test "${enable_driver_stacta+set}" = set; then :
27687  enableval=$enable_driver_stacta;
27688fi
27689cur_driver_enabled=yes
27690requested=$enable_driver_stacta
27691if test "$all_drivers_disabled" = "yes"; then :
27692  if test "x$requested" = "xyes"; then :
27693    cur_driver_enabled=yes
27694  else
27695    cur_driver_enabled=no
27696  fi
27697else
27698  if test "x$requested" != "xno"; then :
27699    cur_driver_enabled=yes
27700  else
27701    cur_driver_enabled=no
27702  fi
27703fi
27704
27705if test "$cur_driver_enabled" = "yes"; then :
27706  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED stacta"
27707  INTERNAL_FORMAT_stacta_ENABLED=yes
27708else
27709  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED stacta"
27710  INTERNAL_FORMAT_stacta_ENABLED=no
27711fi
27712
27713# Check whether --enable-driver-terragen was given.
27714if test "${enable_driver_terragen+set}" = set; then :
27715  enableval=$enable_driver_terragen;
27716fi
27717cur_driver_enabled=yes
27718requested=$enable_driver_terragen
27719if test "$all_drivers_disabled" = "yes"; then :
27720  if test "x$requested" = "xyes"; then :
27721    cur_driver_enabled=yes
27722  else
27723    cur_driver_enabled=no
27724  fi
27725else
27726  if test "x$requested" != "xno"; then :
27727    cur_driver_enabled=yes
27728  else
27729    cur_driver_enabled=no
27730  fi
27731fi
27732
27733if test "$cur_driver_enabled" = "yes"; then :
27734  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED terragen"
27735  INTERNAL_FORMAT_terragen_ENABLED=yes
27736else
27737  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED terragen"
27738  INTERNAL_FORMAT_terragen_ENABLED=no
27739fi
27740
27741# Check whether --enable-driver-tga was given.
27742if test "${enable_driver_tga+set}" = set; then :
27743  enableval=$enable_driver_tga;
27744fi
27745cur_driver_enabled=yes
27746requested=$enable_driver_tga
27747if test "$all_drivers_disabled" = "yes"; then :
27748  if test "x$requested" = "xyes"; then :
27749    cur_driver_enabled=yes
27750  else
27751    cur_driver_enabled=no
27752  fi
27753else
27754  if test "x$requested" != "xno"; then :
27755    cur_driver_enabled=yes
27756  else
27757    cur_driver_enabled=no
27758  fi
27759fi
27760
27761if test "$cur_driver_enabled" = "yes"; then :
27762  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED tga"
27763  INTERNAL_FORMAT_tga_ENABLED=yes
27764else
27765  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED tga"
27766  INTERNAL_FORMAT_tga_ENABLED=no
27767fi
27768
27769# Check whether --enable-driver-til was given.
27770if test "${enable_driver_til+set}" = set; then :
27771  enableval=$enable_driver_til;
27772fi
27773cur_driver_enabled=yes
27774requested=$enable_driver_til
27775if test "$all_drivers_disabled" = "yes"; then :
27776  if test "x$requested" = "xyes"; then :
27777    cur_driver_enabled=yes
27778  else
27779    cur_driver_enabled=no
27780  fi
27781else
27782  if test "x$requested" != "xno"; then :
27783    cur_driver_enabled=yes
27784  else
27785    cur_driver_enabled=no
27786  fi
27787fi
27788
27789if test "$cur_driver_enabled" = "yes"; then :
27790  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED til"
27791  INTERNAL_FORMAT_til_ENABLED=yes
27792else
27793  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED til"
27794  INTERNAL_FORMAT_til_ENABLED=no
27795fi
27796
27797# Check whether --enable-driver-tsx was given.
27798if test "${enable_driver_tsx+set}" = set; then :
27799  enableval=$enable_driver_tsx;
27800fi
27801cur_driver_enabled=yes
27802requested=$enable_driver_tsx
27803if test "$all_drivers_disabled" = "yes"; then :
27804  if test "x$requested" = "xyes"; then :
27805    cur_driver_enabled=yes
27806  else
27807    cur_driver_enabled=no
27808  fi
27809else
27810  if test "x$requested" != "xno"; then :
27811    cur_driver_enabled=yes
27812  else
27813    cur_driver_enabled=no
27814  fi
27815fi
27816
27817if test "$cur_driver_enabled" = "yes"; then :
27818  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED tsx"
27819  INTERNAL_FORMAT_tsx_ENABLED=yes
27820else
27821  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED tsx"
27822  INTERNAL_FORMAT_tsx_ENABLED=no
27823fi
27824
27825# Check whether --enable-driver-usgsdem was given.
27826if test "${enable_driver_usgsdem+set}" = set; then :
27827  enableval=$enable_driver_usgsdem;
27828fi
27829cur_driver_enabled=yes
27830requested=$enable_driver_usgsdem
27831if test "$all_drivers_disabled" = "yes"; then :
27832  if test "x$requested" = "xyes"; then :
27833    cur_driver_enabled=yes
27834  else
27835    cur_driver_enabled=no
27836  fi
27837else
27838  if test "x$requested" != "xno"; then :
27839    cur_driver_enabled=yes
27840  else
27841    cur_driver_enabled=no
27842  fi
27843fi
27844
27845if test "$cur_driver_enabled" = "yes"; then :
27846  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED usgsdem"
27847  INTERNAL_FORMAT_usgsdem_ENABLED=yes
27848else
27849  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED usgsdem"
27850  INTERNAL_FORMAT_usgsdem_ENABLED=no
27851fi
27852
27853# Check whether --enable-driver-xpm was given.
27854if test "${enable_driver_xpm+set}" = set; then :
27855  enableval=$enable_driver_xpm;
27856fi
27857cur_driver_enabled=yes
27858requested=$enable_driver_xpm
27859if test "$all_drivers_disabled" = "yes"; then :
27860  if test "x$requested" = "xyes"; then :
27861    cur_driver_enabled=yes
27862  else
27863    cur_driver_enabled=no
27864  fi
27865else
27866  if test "x$requested" != "xno"; then :
27867    cur_driver_enabled=yes
27868  else
27869    cur_driver_enabled=no
27870  fi
27871fi
27872
27873if test "$cur_driver_enabled" = "yes"; then :
27874  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED xpm"
27875  INTERNAL_FORMAT_xpm_ENABLED=yes
27876else
27877  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED xpm"
27878  INTERNAL_FORMAT_xpm_ENABLED=no
27879fi
27880
27881# Check whether --enable-driver-xyz was given.
27882if test "${enable_driver_xyz+set}" = set; then :
27883  enableval=$enable_driver_xyz;
27884fi
27885cur_driver_enabled=yes
27886requested=$enable_driver_xyz
27887if test "$all_drivers_disabled" = "yes"; then :
27888  if test "x$requested" = "xyes"; then :
27889    cur_driver_enabled=yes
27890  else
27891    cur_driver_enabled=no
27892  fi
27893else
27894  if test "x$requested" != "xno"; then :
27895    cur_driver_enabled=yes
27896  else
27897    cur_driver_enabled=no
27898  fi
27899fi
27900
27901if test "$cur_driver_enabled" = "yes"; then :
27902  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED xyz"
27903  INTERNAL_FORMAT_xyz_ENABLED=yes
27904else
27905  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED xyz"
27906  INTERNAL_FORMAT_xyz_ENABLED=no
27907fi
27908
27909# Check whether --enable-driver-zmap was given.
27910if test "${enable_driver_zmap+set}" = set; then :
27911  enableval=$enable_driver_zmap;
27912fi
27913cur_driver_enabled=yes
27914requested=$enable_driver_zmap
27915if test "$all_drivers_disabled" = "yes"; then :
27916  if test "x$requested" = "xyes"; then :
27917    cur_driver_enabled=yes
27918  else
27919    cur_driver_enabled=no
27920  fi
27921else
27922  if test "x$requested" != "xno"; then :
27923    cur_driver_enabled=yes
27924  else
27925    cur_driver_enabled=no
27926  fi
27927fi
27928
27929if test "$cur_driver_enabled" = "yes"; then :
27930  GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED zmap"
27931  INTERNAL_FORMAT_zmap_ENABLED=yes
27932else
27933  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED zmap"
27934  INTERNAL_FORMAT_zmap_ENABLED=no
27935fi
27936
27937
27938
27939# Check whether --enable-driver-grib was given.
27940if test "${enable_driver_grib+set}" = set; then :
27941  enableval=$enable_driver_grib;
27942fi
27943cur_driver_enabled=yes
27944requested=$enable_driver_grib
27945if test "$all_drivers_disabled" = "yes"; then :
27946  if test "x$requested" = "xyes"; then :
27947    cur_driver_enabled=yes
27948  else
27949    cur_driver_enabled=no
27950  fi
27951else
27952  if test "x$requested" != "xno"; then :
27953    cur_driver_enabled=yes
27954  else
27955    cur_driver_enabled=no
27956  fi
27957fi
27958
27959if test "$cur_driver_enabled" = "yes"; then :
27960  INTERNAL_FORMAT_grib_ENABLED=yes
27961else
27962  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED grib"
27963  INTERNAL_FORMAT_grib_ENABLED=no
27964fi
27965
27966# Check whether --enable-driver-ozi was given.
27967if test "${enable_driver_ozi+set}" = set; then :
27968  enableval=$enable_driver_ozi;
27969fi
27970cur_driver_enabled=yes
27971requested=$enable_driver_ozi
27972if test "$all_drivers_disabled" = "yes"; then :
27973  if test "x$requested" = "xyes"; then :
27974    cur_driver_enabled=yes
27975  else
27976    cur_driver_enabled=no
27977  fi
27978else
27979  if test "x$requested" != "xno"; then :
27980    cur_driver_enabled=yes
27981  else
27982    cur_driver_enabled=no
27983  fi
27984fi
27985
27986if test "$cur_driver_enabled" = "yes"; then :
27987  INTERNAL_FORMAT_ozi_ENABLED=yes
27988else
27989  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ozi"
27990  INTERNAL_FORMAT_ozi_ENABLED=no
27991fi
27992
27993# Check whether --enable-driver-pdf was given.
27994if test "${enable_driver_pdf+set}" = set; then :
27995  enableval=$enable_driver_pdf;
27996fi
27997cur_driver_enabled=yes
27998requested=$enable_driver_pdf
27999if test "$all_drivers_disabled" = "yes"; then :
28000  if test "x$requested" = "xyes"; then :
28001    cur_driver_enabled=yes
28002  else
28003    cur_driver_enabled=no
28004  fi
28005else
28006  if test "x$requested" != "xno"; then :
28007    cur_driver_enabled=yes
28008  else
28009    cur_driver_enabled=no
28010  fi
28011fi
28012
28013if test "$cur_driver_enabled" = "yes"; then :
28014  INTERNAL_FORMAT_pdf_ENABLED=yes
28015else
28016  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED pdf"
28017  INTERNAL_FORMAT_pdf_ENABLED=no
28018fi
28019
28020# Check whether --enable-driver-rik was given.
28021if test "${enable_driver_rik+set}" = set; then :
28022  enableval=$enable_driver_rik;
28023fi
28024cur_driver_enabled=yes
28025requested=$enable_driver_rik
28026if test "$all_drivers_disabled" = "yes"; then :
28027  if test "x$requested" = "xyes"; then :
28028    cur_driver_enabled=yes
28029  else
28030    cur_driver_enabled=no
28031  fi
28032else
28033  if test "x$requested" != "xno"; then :
28034    cur_driver_enabled=yes
28035  else
28036    cur_driver_enabled=no
28037  fi
28038fi
28039
28040if test "$cur_driver_enabled" = "yes"; then :
28041  INTERNAL_FORMAT_rik_ENABLED=yes
28042else
28043  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED rik"
28044  INTERNAL_FORMAT_rik_ENABLED=no
28045fi
28046
28047
28048
28049
28050
28051# Check whether --enable-driver-arcgen was given.
28052if test "${enable_driver_arcgen+set}" = set; then :
28053  enableval=$enable_driver_arcgen;
28054fi
28055cur_driver_enabled=yes
28056requested=$enable_driver_arcgen
28057if test "$all_drivers_disabled" = "yes"; then :
28058  if test "x$requested" = "xyes"; then :
28059    cur_driver_enabled=yes
28060  else
28061    cur_driver_enabled=no
28062  fi
28063else
28064  if test "x$requested" != "xno"; then :
28065    cur_driver_enabled=yes
28066  else
28067    cur_driver_enabled=no
28068  fi
28069fi
28070
28071if test "$cur_driver_enabled" = "yes"; then :
28072  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED arcgen"
28073  INTERNAL_FORMAT_arcgen_ENABLED=yes
28074  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DARCGEN_ENABLED"
28075else
28076  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED arcgen"
28077  INTERNAL_FORMAT_arcgen_ENABLED=no
28078fi
28079
28080# Check whether --enable-driver-avc was given.
28081if test "${enable_driver_avc+set}" = set; then :
28082  enableval=$enable_driver_avc;
28083fi
28084cur_driver_enabled=yes
28085requested=$enable_driver_avc
28086if test "$all_drivers_disabled" = "yes"; then :
28087  if test "x$requested" = "xyes"; then :
28088    cur_driver_enabled=yes
28089  else
28090    cur_driver_enabled=no
28091  fi
28092else
28093  if test "x$requested" != "xno"; then :
28094    cur_driver_enabled=yes
28095  else
28096    cur_driver_enabled=no
28097  fi
28098fi
28099
28100if test "$cur_driver_enabled" = "yes"; then :
28101  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED avc"
28102  INTERNAL_FORMAT_avc_ENABLED=yes
28103  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DAVC_ENABLED"
28104else
28105  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED avc"
28106  INTERNAL_FORMAT_avc_ENABLED=no
28107fi
28108
28109# Check whether --enable-driver-cad was given.
28110if test "${enable_driver_cad+set}" = set; then :
28111  enableval=$enable_driver_cad;
28112fi
28113cur_driver_enabled=yes
28114requested=$enable_driver_cad
28115if test "$all_drivers_disabled" = "yes"; then :
28116  if test "x$requested" = "xyes"; then :
28117    cur_driver_enabled=yes
28118  else
28119    cur_driver_enabled=no
28120  fi
28121else
28122  if test "x$requested" != "xno"; then :
28123    cur_driver_enabled=yes
28124  else
28125    cur_driver_enabled=no
28126  fi
28127fi
28128
28129if test "$cur_driver_enabled" = "yes"; then :
28130  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED cad"
28131  INTERNAL_FORMAT_cad_ENABLED=yes
28132  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DCAD_ENABLED"
28133else
28134  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED cad"
28135  INTERNAL_FORMAT_cad_ENABLED=no
28136fi
28137
28138# Check whether --enable-driver-csv was given.
28139if test "${enable_driver_csv+set}" = set; then :
28140  enableval=$enable_driver_csv;
28141fi
28142cur_driver_enabled=yes
28143requested=$enable_driver_csv
28144if test "$all_drivers_disabled" = "yes"; then :
28145  if test "x$requested" = "xyes"; then :
28146    cur_driver_enabled=yes
28147  else
28148    cur_driver_enabled=no
28149  fi
28150else
28151  if test "x$requested" != "xno"; then :
28152    cur_driver_enabled=yes
28153  else
28154    cur_driver_enabled=no
28155  fi
28156fi
28157
28158if test "$cur_driver_enabled" = "yes"; then :
28159  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED csv"
28160  INTERNAL_FORMAT_csv_ENABLED=yes
28161  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DCSV_ENABLED"
28162else
28163  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED csv"
28164  INTERNAL_FORMAT_csv_ENABLED=no
28165fi
28166
28167# Check whether --enable-driver-dgn was given.
28168if test "${enable_driver_dgn+set}" = set; then :
28169  enableval=$enable_driver_dgn;
28170fi
28171cur_driver_enabled=yes
28172requested=$enable_driver_dgn
28173if test "$all_drivers_disabled" = "yes"; then :
28174  if test "x$requested" = "xyes"; then :
28175    cur_driver_enabled=yes
28176  else
28177    cur_driver_enabled=no
28178  fi
28179else
28180  if test "x$requested" != "xno"; then :
28181    cur_driver_enabled=yes
28182  else
28183    cur_driver_enabled=no
28184  fi
28185fi
28186
28187if test "$cur_driver_enabled" = "yes"; then :
28188  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED dgn"
28189  INTERNAL_FORMAT_dgn_ENABLED=yes
28190  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DDGN_ENABLED"
28191else
28192  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED dgn"
28193  INTERNAL_FORMAT_dgn_ENABLED=no
28194fi
28195
28196# Check whether --enable-driver-dxf was given.
28197if test "${enable_driver_dxf+set}" = set; then :
28198  enableval=$enable_driver_dxf;
28199fi
28200cur_driver_enabled=yes
28201requested=$enable_driver_dxf
28202if test "$all_drivers_disabled" = "yes"; then :
28203  if test "x$requested" = "xyes"; then :
28204    cur_driver_enabled=yes
28205  else
28206    cur_driver_enabled=no
28207  fi
28208else
28209  if test "x$requested" != "xno"; then :
28210    cur_driver_enabled=yes
28211  else
28212    cur_driver_enabled=no
28213  fi
28214fi
28215
28216if test "$cur_driver_enabled" = "yes"; then :
28217  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED dxf"
28218  INTERNAL_FORMAT_dxf_ENABLED=yes
28219  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DDXF_ENABLED"
28220else
28221  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED dxf"
28222  INTERNAL_FORMAT_dxf_ENABLED=no
28223fi
28224
28225# Check whether --enable-driver-edigeo was given.
28226if test "${enable_driver_edigeo+set}" = set; then :
28227  enableval=$enable_driver_edigeo;
28228fi
28229cur_driver_enabled=yes
28230requested=$enable_driver_edigeo
28231if test "$all_drivers_disabled" = "yes"; then :
28232  if test "x$requested" = "xyes"; then :
28233    cur_driver_enabled=yes
28234  else
28235    cur_driver_enabled=no
28236  fi
28237else
28238  if test "x$requested" != "xno"; then :
28239    cur_driver_enabled=yes
28240  else
28241    cur_driver_enabled=no
28242  fi
28243fi
28244
28245if test "$cur_driver_enabled" = "yes"; then :
28246  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED edigeo"
28247  INTERNAL_FORMAT_edigeo_ENABLED=yes
28248  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DEDIGEO_ENABLED"
28249else
28250  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED edigeo"
28251  INTERNAL_FORMAT_edigeo_ENABLED=no
28252fi
28253
28254# Check whether --enable-driver-flatgeobuf was given.
28255if test "${enable_driver_flatgeobuf+set}" = set; then :
28256  enableval=$enable_driver_flatgeobuf;
28257fi
28258cur_driver_enabled=yes
28259requested=$enable_driver_flatgeobuf
28260if test "$all_drivers_disabled" = "yes"; then :
28261  if test "x$requested" = "xyes"; then :
28262    cur_driver_enabled=yes
28263  else
28264    cur_driver_enabled=no
28265  fi
28266else
28267  if test "x$requested" != "xno"; then :
28268    cur_driver_enabled=yes
28269  else
28270    cur_driver_enabled=no
28271  fi
28272fi
28273
28274if test "$cur_driver_enabled" = "yes"; then :
28275  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED flatgeobuf"
28276  INTERNAL_FORMAT_flatgeobuf_ENABLED=yes
28277  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DFLATGEOBUF_ENABLED"
28278else
28279  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED flatgeobuf"
28280  INTERNAL_FORMAT_flatgeobuf_ENABLED=no
28281fi
28282
28283# Check whether --enable-driver-geoconcept was given.
28284if test "${enable_driver_geoconcept+set}" = set; then :
28285  enableval=$enable_driver_geoconcept;
28286fi
28287cur_driver_enabled=yes
28288requested=$enable_driver_geoconcept
28289if test "$all_drivers_disabled" = "yes"; then :
28290  if test "x$requested" = "xyes"; then :
28291    cur_driver_enabled=yes
28292  else
28293    cur_driver_enabled=no
28294  fi
28295else
28296  if test "x$requested" != "xno"; then :
28297    cur_driver_enabled=yes
28298  else
28299    cur_driver_enabled=no
28300  fi
28301fi
28302
28303if test "$cur_driver_enabled" = "yes"; then :
28304  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED geoconcept"
28305  INTERNAL_FORMAT_geoconcept_ENABLED=yes
28306  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGEOCONCEPT_ENABLED"
28307else
28308  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED geoconcept"
28309  INTERNAL_FORMAT_geoconcept_ENABLED=no
28310fi
28311
28312# Check whether --enable-driver-georss was given.
28313if test "${enable_driver_georss+set}" = set; then :
28314  enableval=$enable_driver_georss;
28315fi
28316cur_driver_enabled=yes
28317requested=$enable_driver_georss
28318if test "$all_drivers_disabled" = "yes"; then :
28319  if test "x$requested" = "xyes"; then :
28320    cur_driver_enabled=yes
28321  else
28322    cur_driver_enabled=no
28323  fi
28324else
28325  if test "x$requested" != "xno"; then :
28326    cur_driver_enabled=yes
28327  else
28328    cur_driver_enabled=no
28329  fi
28330fi
28331
28332if test "$cur_driver_enabled" = "yes"; then :
28333  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED georss"
28334  INTERNAL_FORMAT_georss_ENABLED=yes
28335  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGEORSS_ENABLED"
28336else
28337  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED georss"
28338  INTERNAL_FORMAT_georss_ENABLED=no
28339fi
28340
28341# Check whether --enable-driver-gml was given.
28342if test "${enable_driver_gml+set}" = set; then :
28343  enableval=$enable_driver_gml;
28344fi
28345cur_driver_enabled=yes
28346requested=$enable_driver_gml
28347if test "$all_drivers_disabled" = "yes"; then :
28348  if test "x$requested" = "xyes"; then :
28349    cur_driver_enabled=yes
28350  else
28351    cur_driver_enabled=no
28352  fi
28353else
28354  if test "x$requested" != "xno"; then :
28355    cur_driver_enabled=yes
28356  else
28357    cur_driver_enabled=no
28358  fi
28359fi
28360
28361if test "$cur_driver_enabled" = "yes"; then :
28362  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gml"
28363  INTERNAL_FORMAT_gml_ENABLED=yes
28364  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGML_ENABLED"
28365else
28366  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gml"
28367  INTERNAL_FORMAT_gml_ENABLED=no
28368fi
28369
28370# Check whether --enable-driver-gmt was given.
28371if test "${enable_driver_gmt+set}" = set; then :
28372  enableval=$enable_driver_gmt;
28373fi
28374cur_driver_enabled=yes
28375requested=$enable_driver_gmt
28376if test "$all_drivers_disabled" = "yes"; then :
28377  if test "x$requested" = "xyes"; then :
28378    cur_driver_enabled=yes
28379  else
28380    cur_driver_enabled=no
28381  fi
28382else
28383  if test "x$requested" != "xno"; then :
28384    cur_driver_enabled=yes
28385  else
28386    cur_driver_enabled=no
28387  fi
28388fi
28389
28390if test "$cur_driver_enabled" = "yes"; then :
28391  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gmt"
28392  INTERNAL_FORMAT_gmt_ENABLED=yes
28393  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGMT_ENABLED"
28394else
28395  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gmt"
28396  INTERNAL_FORMAT_gmt_ENABLED=no
28397fi
28398
28399# Check whether --enable-driver-gpsbabel was given.
28400if test "${enable_driver_gpsbabel+set}" = set; then :
28401  enableval=$enable_driver_gpsbabel;
28402fi
28403cur_driver_enabled=yes
28404requested=$enable_driver_gpsbabel
28405if test "$all_drivers_disabled" = "yes"; then :
28406  if test "x$requested" = "xyes"; then :
28407    cur_driver_enabled=yes
28408  else
28409    cur_driver_enabled=no
28410  fi
28411else
28412  if test "x$requested" != "xno"; then :
28413    cur_driver_enabled=yes
28414  else
28415    cur_driver_enabled=no
28416  fi
28417fi
28418
28419if test "$cur_driver_enabled" = "yes"; then :
28420  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gpsbabel"
28421  INTERNAL_FORMAT_gpsbabel_ENABLED=yes
28422  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGPSBABEL_ENABLED"
28423else
28424  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gpsbabel"
28425  INTERNAL_FORMAT_gpsbabel_ENABLED=no
28426fi
28427
28428# Check whether --enable-driver-gpx was given.
28429if test "${enable_driver_gpx+set}" = set; then :
28430  enableval=$enable_driver_gpx;
28431fi
28432cur_driver_enabled=yes
28433requested=$enable_driver_gpx
28434if test "$all_drivers_disabled" = "yes"; then :
28435  if test "x$requested" = "xyes"; then :
28436    cur_driver_enabled=yes
28437  else
28438    cur_driver_enabled=no
28439  fi
28440else
28441  if test "x$requested" != "xno"; then :
28442    cur_driver_enabled=yes
28443  else
28444    cur_driver_enabled=no
28445  fi
28446fi
28447
28448if test "$cur_driver_enabled" = "yes"; then :
28449  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gpx"
28450  INTERNAL_FORMAT_gpx_ENABLED=yes
28451  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGPX_ENABLED"
28452else
28453  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gpx"
28454  INTERNAL_FORMAT_gpx_ENABLED=no
28455fi
28456
28457# Check whether --enable-driver-gtm was given.
28458if test "${enable_driver_gtm+set}" = set; then :
28459  enableval=$enable_driver_gtm;
28460fi
28461cur_driver_enabled=yes
28462requested=$enable_driver_gtm
28463if test "$all_drivers_disabled" = "yes"; then :
28464  if test "x$requested" = "xyes"; then :
28465    cur_driver_enabled=yes
28466  else
28467    cur_driver_enabled=no
28468  fi
28469else
28470  if test "x$requested" != "xno"; then :
28471    cur_driver_enabled=yes
28472  else
28473    cur_driver_enabled=no
28474  fi
28475fi
28476
28477if test "$cur_driver_enabled" = "yes"; then :
28478  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gtm"
28479  INTERNAL_FORMAT_gtm_ENABLED=yes
28480  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGTM_ENABLED"
28481else
28482  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gtm"
28483  INTERNAL_FORMAT_gtm_ENABLED=no
28484fi
28485
28486# Check whether --enable-driver-jml was given.
28487if test "${enable_driver_jml+set}" = set; then :
28488  enableval=$enable_driver_jml;
28489fi
28490cur_driver_enabled=yes
28491requested=$enable_driver_jml
28492if test "$all_drivers_disabled" = "yes"; then :
28493  if test "x$requested" = "xyes"; then :
28494    cur_driver_enabled=yes
28495  else
28496    cur_driver_enabled=no
28497  fi
28498else
28499  if test "x$requested" != "xno"; then :
28500    cur_driver_enabled=yes
28501  else
28502    cur_driver_enabled=no
28503  fi
28504fi
28505
28506if test "$cur_driver_enabled" = "yes"; then :
28507  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED jml"
28508  INTERNAL_FORMAT_jml_ENABLED=yes
28509  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DJML_ENABLED"
28510else
28511  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED jml"
28512  INTERNAL_FORMAT_jml_ENABLED=no
28513fi
28514
28515# Check whether --enable-driver-mapml was given.
28516if test "${enable_driver_mapml+set}" = set; then :
28517  enableval=$enable_driver_mapml;
28518fi
28519cur_driver_enabled=yes
28520requested=$enable_driver_mapml
28521if test "$all_drivers_disabled" = "yes"; then :
28522  if test "x$requested" = "xyes"; then :
28523    cur_driver_enabled=yes
28524  else
28525    cur_driver_enabled=no
28526  fi
28527else
28528  if test "x$requested" != "xno"; then :
28529    cur_driver_enabled=yes
28530  else
28531    cur_driver_enabled=no
28532  fi
28533fi
28534
28535if test "$cur_driver_enabled" = "yes"; then :
28536  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED mapml"
28537  INTERNAL_FORMAT_mapml_ENABLED=yes
28538  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DMAPML_ENABLED"
28539else
28540  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED mapml"
28541  INTERNAL_FORMAT_mapml_ENABLED=no
28542fi
28543
28544# Check whether --enable-driver-mvt was given.
28545if test "${enable_driver_mvt+set}" = set; then :
28546  enableval=$enable_driver_mvt;
28547fi
28548cur_driver_enabled=yes
28549requested=$enable_driver_mvt
28550if test "$all_drivers_disabled" = "yes"; then :
28551  if test "x$requested" = "xyes"; then :
28552    cur_driver_enabled=yes
28553  else
28554    cur_driver_enabled=no
28555  fi
28556else
28557  if test "x$requested" != "xno"; then :
28558    cur_driver_enabled=yes
28559  else
28560    cur_driver_enabled=no
28561  fi
28562fi
28563
28564if test "$cur_driver_enabled" = "yes"; then :
28565  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED mvt"
28566  INTERNAL_FORMAT_mvt_ENABLED=yes
28567  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DMVT_ENABLED"
28568else
28569  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED mvt"
28570  INTERNAL_FORMAT_mvt_ENABLED=no
28571fi
28572
28573# Check whether --enable-driver-ntf was given.
28574if test "${enable_driver_ntf+set}" = set; then :
28575  enableval=$enable_driver_ntf;
28576fi
28577cur_driver_enabled=yes
28578requested=$enable_driver_ntf
28579if test "$all_drivers_disabled" = "yes"; then :
28580  if test "x$requested" = "xyes"; then :
28581    cur_driver_enabled=yes
28582  else
28583    cur_driver_enabled=no
28584  fi
28585else
28586  if test "x$requested" != "xno"; then :
28587    cur_driver_enabled=yes
28588  else
28589    cur_driver_enabled=no
28590  fi
28591fi
28592
28593if test "$cur_driver_enabled" = "yes"; then :
28594  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED ntf"
28595  INTERNAL_FORMAT_ntf_ENABLED=yes
28596  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DNTF_ENABLED"
28597else
28598  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED ntf"
28599  INTERNAL_FORMAT_ntf_ENABLED=no
28600fi
28601
28602# Check whether --enable-driver-openfilegdb was given.
28603if test "${enable_driver_openfilegdb+set}" = set; then :
28604  enableval=$enable_driver_openfilegdb;
28605fi
28606cur_driver_enabled=yes
28607requested=$enable_driver_openfilegdb
28608if test "$all_drivers_disabled" = "yes"; then :
28609  if test "x$requested" = "xyes"; then :
28610    cur_driver_enabled=yes
28611  else
28612    cur_driver_enabled=no
28613  fi
28614else
28615  if test "x$requested" != "xno"; then :
28616    cur_driver_enabled=yes
28617  else
28618    cur_driver_enabled=no
28619  fi
28620fi
28621
28622if test "$cur_driver_enabled" = "yes"; then :
28623  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED openfilegdb"
28624  INTERNAL_FORMAT_openfilegdb_ENABLED=yes
28625  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DOPENFILEGDB_ENABLED"
28626else
28627  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED openfilegdb"
28628  INTERNAL_FORMAT_openfilegdb_ENABLED=no
28629fi
28630
28631# Check whether --enable-driver-pgdump was given.
28632if test "${enable_driver_pgdump+set}" = set; then :
28633  enableval=$enable_driver_pgdump;
28634fi
28635cur_driver_enabled=yes
28636requested=$enable_driver_pgdump
28637if test "$all_drivers_disabled" = "yes"; then :
28638  if test "x$requested" = "xyes"; then :
28639    cur_driver_enabled=yes
28640  else
28641    cur_driver_enabled=no
28642  fi
28643else
28644  if test "x$requested" != "xno"; then :
28645    cur_driver_enabled=yes
28646  else
28647    cur_driver_enabled=no
28648  fi
28649fi
28650
28651if test "$cur_driver_enabled" = "yes"; then :
28652  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED pgdump"
28653  INTERNAL_FORMAT_pgdump_ENABLED=yes
28654  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DPGDUMP_ENABLED"
28655else
28656  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED pgdump"
28657  INTERNAL_FORMAT_pgdump_ENABLED=no
28658fi
28659
28660# Check whether --enable-driver-rec was given.
28661if test "${enable_driver_rec+set}" = set; then :
28662  enableval=$enable_driver_rec;
28663fi
28664cur_driver_enabled=yes
28665requested=$enable_driver_rec
28666if test "$all_drivers_disabled" = "yes"; then :
28667  if test "x$requested" = "xyes"; then :
28668    cur_driver_enabled=yes
28669  else
28670    cur_driver_enabled=no
28671  fi
28672else
28673  if test "x$requested" != "xno"; then :
28674    cur_driver_enabled=yes
28675  else
28676    cur_driver_enabled=no
28677  fi
28678fi
28679
28680if test "$cur_driver_enabled" = "yes"; then :
28681  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED rec"
28682  INTERNAL_FORMAT_rec_ENABLED=yes
28683  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DREC_ENABLED"
28684else
28685  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED rec"
28686  INTERNAL_FORMAT_rec_ENABLED=no
28687fi
28688
28689# Check whether --enable-driver-s57 was given.
28690if test "${enable_driver_s57+set}" = set; then :
28691  enableval=$enable_driver_s57;
28692fi
28693cur_driver_enabled=yes
28694requested=$enable_driver_s57
28695if test "$all_drivers_disabled" = "yes"; then :
28696  if test "x$requested" = "xyes"; then :
28697    cur_driver_enabled=yes
28698  else
28699    cur_driver_enabled=no
28700  fi
28701else
28702  if test "x$requested" != "xno"; then :
28703    cur_driver_enabled=yes
28704  else
28705    cur_driver_enabled=no
28706  fi
28707fi
28708
28709if test "$cur_driver_enabled" = "yes"; then :
28710  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED s57"
28711  INTERNAL_FORMAT_s57_ENABLED=yes
28712  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DS57_ENABLED"
28713else
28714  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED s57"
28715  INTERNAL_FORMAT_s57_ENABLED=no
28716fi
28717
28718# Check whether --enable-driver-selafin was given.
28719if test "${enable_driver_selafin+set}" = set; then :
28720  enableval=$enable_driver_selafin;
28721fi
28722cur_driver_enabled=yes
28723requested=$enable_driver_selafin
28724if test "$all_drivers_disabled" = "yes"; then :
28725  if test "x$requested" = "xyes"; then :
28726    cur_driver_enabled=yes
28727  else
28728    cur_driver_enabled=no
28729  fi
28730else
28731  if test "x$requested" != "xno"; then :
28732    cur_driver_enabled=yes
28733  else
28734    cur_driver_enabled=no
28735  fi
28736fi
28737
28738if test "$cur_driver_enabled" = "yes"; then :
28739  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED selafin"
28740  INTERNAL_FORMAT_selafin_ENABLED=yes
28741  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DSELAFIN_ENABLED"
28742else
28743  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED selafin"
28744  INTERNAL_FORMAT_selafin_ENABLED=no
28745fi
28746
28747# Check whether --enable-driver-shape was given.
28748if test "${enable_driver_shape+set}" = set; then :
28749  enableval=$enable_driver_shape;
28750fi
28751cur_driver_enabled=yes
28752requested=$enable_driver_shape
28753if test "$all_drivers_disabled" = "yes"; then :
28754  if test "x$requested" = "xyes"; then :
28755    cur_driver_enabled=yes
28756  else
28757    cur_driver_enabled=no
28758  fi
28759else
28760  if test "x$requested" != "xno"; then :
28761    cur_driver_enabled=yes
28762  else
28763    cur_driver_enabled=no
28764  fi
28765fi
28766
28767if test "$cur_driver_enabled" = "yes"; then :
28768  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED shape"
28769  INTERNAL_FORMAT_shape_ENABLED=yes
28770  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DSHAPE_ENABLED"
28771else
28772  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED shape"
28773  INTERNAL_FORMAT_shape_ENABLED=no
28774fi
28775
28776# Check whether --enable-driver-svg was given.
28777if test "${enable_driver_svg+set}" = set; then :
28778  enableval=$enable_driver_svg;
28779fi
28780cur_driver_enabled=yes
28781requested=$enable_driver_svg
28782if test "$all_drivers_disabled" = "yes"; then :
28783  if test "x$requested" = "xyes"; then :
28784    cur_driver_enabled=yes
28785  else
28786    cur_driver_enabled=no
28787  fi
28788else
28789  if test "x$requested" != "xno"; then :
28790    cur_driver_enabled=yes
28791  else
28792    cur_driver_enabled=no
28793  fi
28794fi
28795
28796if test "$cur_driver_enabled" = "yes"; then :
28797  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED svg"
28798  INTERNAL_FORMAT_svg_ENABLED=yes
28799  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DSVG_ENABLED"
28800else
28801  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED svg"
28802  INTERNAL_FORMAT_svg_ENABLED=no
28803fi
28804
28805# Check whether --enable-driver-sxf was given.
28806if test "${enable_driver_sxf+set}" = set; then :
28807  enableval=$enable_driver_sxf;
28808fi
28809cur_driver_enabled=yes
28810requested=$enable_driver_sxf
28811if test "$all_drivers_disabled" = "yes"; then :
28812  if test "x$requested" = "xyes"; then :
28813    cur_driver_enabled=yes
28814  else
28815    cur_driver_enabled=no
28816  fi
28817else
28818  if test "x$requested" != "xno"; then :
28819    cur_driver_enabled=yes
28820  else
28821    cur_driver_enabled=no
28822  fi
28823fi
28824
28825if test "$cur_driver_enabled" = "yes"; then :
28826  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED sxf"
28827  INTERNAL_FORMAT_sxf_ENABLED=yes
28828  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DSXF_ENABLED"
28829else
28830  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED sxf"
28831  INTERNAL_FORMAT_sxf_ENABLED=no
28832fi
28833
28834# Check whether --enable-driver-tiger was given.
28835if test "${enable_driver_tiger+set}" = set; then :
28836  enableval=$enable_driver_tiger;
28837fi
28838cur_driver_enabled=yes
28839requested=$enable_driver_tiger
28840if test "$all_drivers_disabled" = "yes"; then :
28841  if test "x$requested" = "xyes"; then :
28842    cur_driver_enabled=yes
28843  else
28844    cur_driver_enabled=no
28845  fi
28846else
28847  if test "x$requested" != "xno"; then :
28848    cur_driver_enabled=yes
28849  else
28850    cur_driver_enabled=no
28851  fi
28852fi
28853
28854if test "$cur_driver_enabled" = "yes"; then :
28855  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED tiger"
28856  INTERNAL_FORMAT_tiger_ENABLED=yes
28857  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DTIGER_ENABLED"
28858else
28859  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED tiger"
28860  INTERNAL_FORMAT_tiger_ENABLED=no
28861fi
28862
28863# Check whether --enable-driver-vdv was given.
28864if test "${enable_driver_vdv+set}" = set; then :
28865  enableval=$enable_driver_vdv;
28866fi
28867cur_driver_enabled=yes
28868requested=$enable_driver_vdv
28869if test "$all_drivers_disabled" = "yes"; then :
28870  if test "x$requested" = "xyes"; then :
28871    cur_driver_enabled=yes
28872  else
28873    cur_driver_enabled=no
28874  fi
28875else
28876  if test "x$requested" != "xno"; then :
28877    cur_driver_enabled=yes
28878  else
28879    cur_driver_enabled=no
28880  fi
28881fi
28882
28883if test "$cur_driver_enabled" = "yes"; then :
28884  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED vdv"
28885  INTERNAL_FORMAT_vdv_ENABLED=yes
28886  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DVDV_ENABLED"
28887else
28888  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED vdv"
28889  INTERNAL_FORMAT_vdv_ENABLED=no
28890fi
28891
28892# Check whether --enable-driver-wasp was given.
28893if test "${enable_driver_wasp+set}" = set; then :
28894  enableval=$enable_driver_wasp;
28895fi
28896cur_driver_enabled=yes
28897requested=$enable_driver_wasp
28898if test "$all_drivers_disabled" = "yes"; then :
28899  if test "x$requested" = "xyes"; then :
28900    cur_driver_enabled=yes
28901  else
28902    cur_driver_enabled=no
28903  fi
28904else
28905  if test "x$requested" != "xno"; then :
28906    cur_driver_enabled=yes
28907  else
28908    cur_driver_enabled=no
28909  fi
28910fi
28911
28912if test "$cur_driver_enabled" = "yes"; then :
28913  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED wasp"
28914  INTERNAL_FORMAT_wasp_ENABLED=yes
28915  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DWASP_ENABLED"
28916else
28917  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED wasp"
28918  INTERNAL_FORMAT_wasp_ENABLED=no
28919fi
28920
28921
28922
28923driver_enabled=$INTERNAL_FORMAT_idrisi_ENABLED
28924if test "x$driver_enabled" != "xno"; then :
28925  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED idrisi"
28926  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DIDRISI_ENABLED"
28927else
28928  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED idrisi"
28929fi
28930
28931driver_enabled=$INTERNAL_FORMAT_pds_ENABLED
28932if test "x$driver_enabled" != "xno"; then :
28933  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED pds"
28934  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DPDS_ENABLED"
28935else
28936  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED pds"
28937fi
28938
28939driver_enabled=$INTERNAL_FORMAT_sdts_ENABLED
28940if test "x$driver_enabled" != "xno"; then :
28941  OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED sdts"
28942  OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DSDTS_ENABLED"
28943else
28944  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED sdts"
28945fi
28946
28947
28948
28949# Check whether --enable-driver-eeda was given.
28950if test "${enable_driver_eeda+set}" = set; then :
28951  enableval=$enable_driver_eeda;
28952fi
28953cur_driver_enabled=yes
28954requested=$enable_driver_eeda
28955if test "$all_drivers_disabled" = "yes"; then :
28956  if test "x$requested" = "xyes"; then :
28957    cur_driver_enabled=yes
28958  else
28959    cur_driver_enabled=no
28960  fi
28961else
28962  if test "x$requested" != "xno"; then :
28963    cur_driver_enabled=yes
28964  else
28965    cur_driver_enabled=no
28966  fi
28967fi
28968
28969if test "$cur_driver_enabled" = "yes"; then :
28970  INTERNAL_FORMAT_eeda_ENABLED=yes
28971else
28972  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED eeda"
28973  INTERNAL_FORMAT_eeda_ENABLED=no
28974fi
28975
28976# Check whether --enable-driver-plmosaic was given.
28977if test "${enable_driver_plmosaic+set}" = set; then :
28978  enableval=$enable_driver_plmosaic;
28979fi
28980cur_driver_enabled=yes
28981requested=$enable_driver_plmosaic
28982if test "$all_drivers_disabled" = "yes"; then :
28983  if test "x$requested" = "xyes"; then :
28984    cur_driver_enabled=yes
28985  else
28986    cur_driver_enabled=no
28987  fi
28988else
28989  if test "x$requested" != "xno"; then :
28990    cur_driver_enabled=yes
28991  else
28992    cur_driver_enabled=no
28993  fi
28994fi
28995
28996if test "$cur_driver_enabled" = "yes"; then :
28997  INTERNAL_FORMAT_plmosaic_ENABLED=yes
28998else
28999  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED plmosaic"
29000  INTERNAL_FORMAT_plmosaic_ENABLED=no
29001fi
29002
29003# Check whether --enable-driver-rda was given.
29004if test "${enable_driver_rda+set}" = set; then :
29005  enableval=$enable_driver_rda;
29006fi
29007cur_driver_enabled=yes
29008requested=$enable_driver_rda
29009if test "$all_drivers_disabled" = "yes"; then :
29010  if test "x$requested" = "xyes"; then :
29011    cur_driver_enabled=yes
29012  else
29013    cur_driver_enabled=no
29014  fi
29015else
29016  if test "x$requested" != "xno"; then :
29017    cur_driver_enabled=yes
29018  else
29019    cur_driver_enabled=no
29020  fi
29021fi
29022
29023if test "$cur_driver_enabled" = "yes"; then :
29024  INTERNAL_FORMAT_rda_ENABLED=yes
29025else
29026  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED rda"
29027  INTERNAL_FORMAT_rda_ENABLED=no
29028fi
29029
29030# Check whether --enable-driver-wcs was given.
29031if test "${enable_driver_wcs+set}" = set; then :
29032  enableval=$enable_driver_wcs;
29033fi
29034cur_driver_enabled=yes
29035requested=$enable_driver_wcs
29036if test "$all_drivers_disabled" = "yes"; then :
29037  if test "x$requested" = "xyes"; then :
29038    cur_driver_enabled=yes
29039  else
29040    cur_driver_enabled=no
29041  fi
29042else
29043  if test "x$requested" != "xno"; then :
29044    cur_driver_enabled=yes
29045  else
29046    cur_driver_enabled=no
29047  fi
29048fi
29049
29050if test "$cur_driver_enabled" = "yes"; then :
29051  INTERNAL_FORMAT_wcs_ENABLED=yes
29052else
29053  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED wcs"
29054  INTERNAL_FORMAT_wcs_ENABLED=no
29055fi
29056
29057# Check whether --enable-driver-wms was given.
29058if test "${enable_driver_wms+set}" = set; then :
29059  enableval=$enable_driver_wms;
29060fi
29061cur_driver_enabled=yes
29062requested=$enable_driver_wms
29063if test "$all_drivers_disabled" = "yes"; then :
29064  if test "x$requested" = "xyes"; then :
29065    cur_driver_enabled=yes
29066  else
29067    cur_driver_enabled=no
29068  fi
29069else
29070  if test "x$requested" != "xno"; then :
29071    cur_driver_enabled=yes
29072  else
29073    cur_driver_enabled=no
29074  fi
29075fi
29076
29077if test "$cur_driver_enabled" = "yes"; then :
29078  INTERNAL_FORMAT_wms_ENABLED=yes
29079else
29080  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED wms"
29081  INTERNAL_FORMAT_wms_ENABLED=no
29082fi
29083
29084# Check whether --enable-driver-wmts was given.
29085if test "${enable_driver_wmts+set}" = set; then :
29086  enableval=$enable_driver_wmts;
29087fi
29088cur_driver_enabled=yes
29089requested=$enable_driver_wmts
29090if test "$all_drivers_disabled" = "yes"; then :
29091  if test "x$requested" = "xyes"; then :
29092    cur_driver_enabled=yes
29093  else
29094    cur_driver_enabled=no
29095  fi
29096else
29097  if test "x$requested" != "xno"; then :
29098    cur_driver_enabled=yes
29099  else
29100    cur_driver_enabled=no
29101  fi
29102fi
29103
29104if test "$cur_driver_enabled" = "yes"; then :
29105  INTERNAL_FORMAT_wmts_ENABLED=yes
29106else
29107  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED wmts"
29108  INTERNAL_FORMAT_wmts_ENABLED=no
29109fi
29110
29111# Check whether --enable-driver-daas was given.
29112if test "${enable_driver_daas+set}" = set; then :
29113  enableval=$enable_driver_daas;
29114fi
29115cur_driver_enabled=yes
29116requested=$enable_driver_daas
29117if test "$all_drivers_disabled" = "yes"; then :
29118  if test "x$requested" = "xyes"; then :
29119    cur_driver_enabled=yes
29120  else
29121    cur_driver_enabled=no
29122  fi
29123else
29124  if test "x$requested" != "xno"; then :
29125    cur_driver_enabled=yes
29126  else
29127    cur_driver_enabled=no
29128  fi
29129fi
29130
29131if test "$cur_driver_enabled" = "yes"; then :
29132  INTERNAL_FORMAT_daas_ENABLED=yes
29133else
29134  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED daas"
29135  INTERNAL_FORMAT_daas_ENABLED=no
29136fi
29137
29138# Check whether --enable-driver-ogcapi was given.
29139if test "${enable_driver_ogcapi+set}" = set; then :
29140  enableval=$enable_driver_ogcapi;
29141fi
29142cur_driver_enabled=yes
29143requested=$enable_driver_ogcapi
29144if test "$all_drivers_disabled" = "yes"; then :
29145  if test "x$requested" = "xyes"; then :
29146    cur_driver_enabled=yes
29147  else
29148    cur_driver_enabled=no
29149  fi
29150else
29151  if test "x$requested" != "xno"; then :
29152    cur_driver_enabled=yes
29153  else
29154    cur_driver_enabled=no
29155  fi
29156fi
29157
29158if test "$cur_driver_enabled" = "yes"; then :
29159  INTERNAL_FORMAT_ogcapi_ENABLED=yes
29160else
29161  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED ogcapi"
29162  INTERNAL_FORMAT_ogcapi_ENABLED=no
29163fi
29164
29165
29166
29167# Check whether --enable-driver-amigocloud was given.
29168if test "${enable_driver_amigocloud+set}" = set; then :
29169  enableval=$enable_driver_amigocloud;
29170fi
29171cur_driver_enabled=yes
29172requested=$enable_driver_amigocloud
29173if test "$all_drivers_disabled" = "yes"; then :
29174  if test "x$requested" = "xyes"; then :
29175    cur_driver_enabled=yes
29176  else
29177    cur_driver_enabled=no
29178  fi
29179else
29180  if test "x$requested" != "xno"; then :
29181    cur_driver_enabled=yes
29182  else
29183    cur_driver_enabled=no
29184  fi
29185fi
29186
29187if test "$cur_driver_enabled" = "yes"; then :
29188  INTERNAL_FORMAT_amigocloud_ENABLED=yes
29189else
29190  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED amigocloud"
29191  INTERNAL_FORMAT_amigocloud_ENABLED=no
29192fi
29193
29194# Check whether --enable-driver-carto was given.
29195if test "${enable_driver_carto+set}" = set; then :
29196  enableval=$enable_driver_carto;
29197fi
29198cur_driver_enabled=yes
29199requested=$enable_driver_carto
29200if test "$all_drivers_disabled" = "yes"; then :
29201  if test "x$requested" = "xyes"; then :
29202    cur_driver_enabled=yes
29203  else
29204    cur_driver_enabled=no
29205  fi
29206else
29207  if test "x$requested" != "xno"; then :
29208    cur_driver_enabled=yes
29209  else
29210    cur_driver_enabled=no
29211  fi
29212fi
29213
29214if test "$cur_driver_enabled" = "yes"; then :
29215  INTERNAL_FORMAT_carto_ENABLED=yes
29216else
29217  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED carto"
29218  INTERNAL_FORMAT_carto_ENABLED=no
29219fi
29220
29221# Check whether --enable-driver-cloudant was given.
29222if test "${enable_driver_cloudant+set}" = set; then :
29223  enableval=$enable_driver_cloudant;
29224fi
29225cur_driver_enabled=yes
29226requested=$enable_driver_cloudant
29227if test "$all_drivers_disabled" = "yes"; then :
29228  if test "x$requested" = "xyes"; then :
29229    cur_driver_enabled=yes
29230  else
29231    cur_driver_enabled=no
29232  fi
29233else
29234  if test "x$requested" != "xno"; then :
29235    cur_driver_enabled=yes
29236  else
29237    cur_driver_enabled=no
29238  fi
29239fi
29240
29241if test "$cur_driver_enabled" = "yes"; then :
29242  INTERNAL_FORMAT_cloudant_ENABLED=yes
29243else
29244  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED cloudant"
29245  INTERNAL_FORMAT_cloudant_ENABLED=no
29246fi
29247
29248# Check whether --enable-driver-couchdb was given.
29249if test "${enable_driver_couchdb+set}" = set; then :
29250  enableval=$enable_driver_couchdb;
29251fi
29252cur_driver_enabled=yes
29253requested=$enable_driver_couchdb
29254if test "$all_drivers_disabled" = "yes"; then :
29255  if test "x$requested" = "xyes"; then :
29256    cur_driver_enabled=yes
29257  else
29258    cur_driver_enabled=no
29259  fi
29260else
29261  if test "x$requested" != "xno"; then :
29262    cur_driver_enabled=yes
29263  else
29264    cur_driver_enabled=no
29265  fi
29266fi
29267
29268if test "$cur_driver_enabled" = "yes"; then :
29269  INTERNAL_FORMAT_couchdb_ENABLED=yes
29270else
29271  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED couchdb"
29272  INTERNAL_FORMAT_couchdb_ENABLED=no
29273fi
29274
29275# Check whether --enable-driver-csw was given.
29276if test "${enable_driver_csw+set}" = set; then :
29277  enableval=$enable_driver_csw;
29278fi
29279cur_driver_enabled=yes
29280requested=$enable_driver_csw
29281if test "$all_drivers_disabled" = "yes"; then :
29282  if test "x$requested" = "xyes"; then :
29283    cur_driver_enabled=yes
29284  else
29285    cur_driver_enabled=no
29286  fi
29287else
29288  if test "x$requested" != "xno"; then :
29289    cur_driver_enabled=yes
29290  else
29291    cur_driver_enabled=no
29292  fi
29293fi
29294
29295if test "$cur_driver_enabled" = "yes"; then :
29296  INTERNAL_FORMAT_csw_ENABLED=yes
29297else
29298  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED csw"
29299  INTERNAL_FORMAT_csw_ENABLED=no
29300fi
29301
29302# Check whether --enable-driver-elastic was given.
29303if test "${enable_driver_elastic+set}" = set; then :
29304  enableval=$enable_driver_elastic;
29305fi
29306cur_driver_enabled=yes
29307requested=$enable_driver_elastic
29308if test "$all_drivers_disabled" = "yes"; then :
29309  if test "x$requested" = "xyes"; then :
29310    cur_driver_enabled=yes
29311  else
29312    cur_driver_enabled=no
29313  fi
29314else
29315  if test "x$requested" != "xno"; then :
29316    cur_driver_enabled=yes
29317  else
29318    cur_driver_enabled=no
29319  fi
29320fi
29321
29322if test "$cur_driver_enabled" = "yes"; then :
29323  INTERNAL_FORMAT_elastic_ENABLED=yes
29324else
29325  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED elastic"
29326  INTERNAL_FORMAT_elastic_ENABLED=no
29327fi
29328
29329# Check whether --enable-driver-ngw was given.
29330if test "${enable_driver_ngw+set}" = set; then :
29331  enableval=$enable_driver_ngw;
29332fi
29333cur_driver_enabled=yes
29334requested=$enable_driver_ngw
29335if test "$all_drivers_disabled" = "yes"; then :
29336  if test "x$requested" = "xyes"; then :
29337    cur_driver_enabled=yes
29338  else
29339    cur_driver_enabled=no
29340  fi
29341else
29342  if test "x$requested" != "xno"; then :
29343    cur_driver_enabled=yes
29344  else
29345    cur_driver_enabled=no
29346  fi
29347fi
29348
29349if test "$cur_driver_enabled" = "yes"; then :
29350  INTERNAL_FORMAT_ngw_ENABLED=yes
29351else
29352  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED ngw"
29353  INTERNAL_FORMAT_ngw_ENABLED=no
29354fi
29355
29356# Check whether --enable-driver-plscenes was given.
29357if test "${enable_driver_plscenes+set}" = set; then :
29358  enableval=$enable_driver_plscenes;
29359fi
29360cur_driver_enabled=yes
29361requested=$enable_driver_plscenes
29362if test "$all_drivers_disabled" = "yes"; then :
29363  if test "x$requested" = "xyes"; then :
29364    cur_driver_enabled=yes
29365  else
29366    cur_driver_enabled=no
29367  fi
29368else
29369  if test "x$requested" != "xno"; then :
29370    cur_driver_enabled=yes
29371  else
29372    cur_driver_enabled=no
29373  fi
29374fi
29375
29376if test "$cur_driver_enabled" = "yes"; then :
29377  INTERNAL_FORMAT_plscenes_ENABLED=yes
29378else
29379  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED plscenes"
29380  INTERNAL_FORMAT_plscenes_ENABLED=no
29381fi
29382
29383# Check whether --enable-driver-wfs was given.
29384if test "${enable_driver_wfs+set}" = set; then :
29385  enableval=$enable_driver_wfs;
29386fi
29387cur_driver_enabled=yes
29388requested=$enable_driver_wfs
29389if test "$all_drivers_disabled" = "yes"; then :
29390  if test "x$requested" = "xyes"; then :
29391    cur_driver_enabled=yes
29392  else
29393    cur_driver_enabled=no
29394  fi
29395else
29396  if test "x$requested" != "xno"; then :
29397    cur_driver_enabled=yes
29398  else
29399    cur_driver_enabled=no
29400  fi
29401fi
29402
29403if test "$cur_driver_enabled" = "yes"; then :
29404  INTERNAL_FORMAT_wfs_ENABLED=yes
29405else
29406  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED wfs"
29407  INTERNAL_FORMAT_wfs_ENABLED=no
29408fi
29409
29410
29411
29412# Check whether --enable-driver-rasterlite was given.
29413if test "${enable_driver_rasterlite+set}" = set; then :
29414  enableval=$enable_driver_rasterlite;
29415fi
29416cur_driver_enabled=yes
29417requested=$enable_driver_rasterlite
29418if test "$all_drivers_disabled" = "yes"; then :
29419  if test "x$requested" = "xyes"; then :
29420    cur_driver_enabled=yes
29421  else
29422    cur_driver_enabled=no
29423  fi
29424else
29425  if test "x$requested" != "xno"; then :
29426    cur_driver_enabled=yes
29427  else
29428    cur_driver_enabled=no
29429  fi
29430fi
29431
29432if test "$cur_driver_enabled" = "yes"; then :
29433  INTERNAL_FORMAT_rasterlite_ENABLED=yes
29434else
29435  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED rasterlite"
29436  INTERNAL_FORMAT_rasterlite_ENABLED=no
29437fi
29438
29439# Check whether --enable-driver-mbtiles was given.
29440if test "${enable_driver_mbtiles+set}" = set; then :
29441  enableval=$enable_driver_mbtiles;
29442fi
29443cur_driver_enabled=yes
29444requested=$enable_driver_mbtiles
29445if test "$all_drivers_disabled" = "yes"; then :
29446  if test "x$requested" = "xyes"; then :
29447    cur_driver_enabled=yes
29448  else
29449    cur_driver_enabled=no
29450  fi
29451else
29452  if test "x$requested" != "xno"; then :
29453    cur_driver_enabled=yes
29454  else
29455    cur_driver_enabled=no
29456  fi
29457fi
29458
29459if test "$cur_driver_enabled" = "yes"; then :
29460  INTERNAL_FORMAT_mbtiles_ENABLED=yes
29461else
29462  GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED mbtiles"
29463  INTERNAL_FORMAT_mbtiles_ENABLED=no
29464fi
29465
29466
29467
29468# Check whether --enable-driver-gpkg was given.
29469if test "${enable_driver_gpkg+set}" = set; then :
29470  enableval=$enable_driver_gpkg;
29471fi
29472cur_driver_enabled=yes
29473requested=$enable_driver_gpkg
29474if test "$all_drivers_disabled" = "yes"; then :
29475  if test "x$requested" = "xyes"; then :
29476    cur_driver_enabled=yes
29477  else
29478    cur_driver_enabled=no
29479  fi
29480else
29481  if test "x$requested" != "xno"; then :
29482    cur_driver_enabled=yes
29483  else
29484    cur_driver_enabled=no
29485  fi
29486fi
29487
29488if test "$cur_driver_enabled" = "yes"; then :
29489  INTERNAL_FORMAT_gpkg_ENABLED=yes
29490else
29491  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gpkg"
29492  INTERNAL_FORMAT_gpkg_ENABLED=no
29493fi
29494
29495# Check whether --enable-driver-vfk was given.
29496if test "${enable_driver_vfk+set}" = set; then :
29497  enableval=$enable_driver_vfk;
29498fi
29499cur_driver_enabled=yes
29500requested=$enable_driver_vfk
29501if test "$all_drivers_disabled" = "yes"; then :
29502  if test "x$requested" = "xyes"; then :
29503    cur_driver_enabled=yes
29504  else
29505    cur_driver_enabled=no
29506  fi
29507else
29508  if test "x$requested" != "xno"; then :
29509    cur_driver_enabled=yes
29510  else
29511    cur_driver_enabled=no
29512  fi
29513fi
29514
29515if test "$cur_driver_enabled" = "yes"; then :
29516  INTERNAL_FORMAT_vfk_ENABLED=yes
29517else
29518  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED vfk"
29519  INTERNAL_FORMAT_vfk_ENABLED=no
29520fi
29521
29522# Check whether --enable-driver-osm was given.
29523if test "${enable_driver_osm+set}" = set; then :
29524  enableval=$enable_driver_osm;
29525fi
29526cur_driver_enabled=yes
29527requested=$enable_driver_osm
29528if test "$all_drivers_disabled" = "yes"; then :
29529  if test "x$requested" = "xyes"; then :
29530    cur_driver_enabled=yes
29531  else
29532    cur_driver_enabled=no
29533  fi
29534else
29535  if test "x$requested" != "xno"; then :
29536    cur_driver_enabled=yes
29537  else
29538    cur_driver_enabled=no
29539  fi
29540fi
29541
29542if test "$cur_driver_enabled" = "yes"; then :
29543  INTERNAL_FORMAT_osm_ENABLED=yes
29544else
29545  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED osm"
29546  INTERNAL_FORMAT_osm_ENABLED=no
29547fi
29548
29549
29550
29551# Check whether --enable-driver-ods was given.
29552if test "${enable_driver_ods+set}" = set; then :
29553  enableval=$enable_driver_ods;
29554fi
29555cur_driver_enabled=yes
29556requested=$enable_driver_ods
29557if test "$all_drivers_disabled" = "yes"; then :
29558  if test "x$requested" = "xyes"; then :
29559    cur_driver_enabled=yes
29560  else
29561    cur_driver_enabled=no
29562  fi
29563else
29564  if test "x$requested" != "xno"; then :
29565    cur_driver_enabled=yes
29566  else
29567    cur_driver_enabled=no
29568  fi
29569fi
29570
29571if test "$cur_driver_enabled" = "yes"; then :
29572  INTERNAL_FORMAT_ods_ENABLED=yes
29573else
29574  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED ods"
29575  INTERNAL_FORMAT_ods_ENABLED=no
29576fi
29577
29578# Check whether --enable-driver-xlsx was given.
29579if test "${enable_driver_xlsx+set}" = set; then :
29580  enableval=$enable_driver_xlsx;
29581fi
29582cur_driver_enabled=yes
29583requested=$enable_driver_xlsx
29584if test "$all_drivers_disabled" = "yes"; then :
29585  if test "x$requested" = "xyes"; then :
29586    cur_driver_enabled=yes
29587  else
29588    cur_driver_enabled=no
29589  fi
29590else
29591  if test "x$requested" != "xno"; then :
29592    cur_driver_enabled=yes
29593  else
29594    cur_driver_enabled=no
29595  fi
29596fi
29597
29598if test "$cur_driver_enabled" = "yes"; then :
29599  INTERNAL_FORMAT_xlsx_ENABLED=yes
29600else
29601  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED xlsx"
29602  INTERNAL_FORMAT_xlsx_ENABLED=no
29603fi
29604
29605# Check whether --enable-driver-lvbag was given.
29606if test "${enable_driver_lvbag+set}" = set; then :
29607  enableval=$enable_driver_lvbag;
29608fi
29609cur_driver_enabled=yes
29610requested=$enable_driver_lvbag
29611if test "$all_drivers_disabled" = "yes"; then :
29612  if test "x$requested" = "xyes"; then :
29613    cur_driver_enabled=yes
29614  else
29615    cur_driver_enabled=no
29616  fi
29617else
29618  if test "x$requested" != "xno"; then :
29619    cur_driver_enabled=yes
29620  else
29621    cur_driver_enabled=no
29622  fi
29623fi
29624
29625if test "$cur_driver_enabled" = "yes"; then :
29626  INTERNAL_FORMAT_lvbag_ENABLED=yes
29627else
29628  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED lvbag"
29629  INTERNAL_FORMAT_lvbag_ENABLED=no
29630fi
29631
29632
29633
29634# Check whether --enable-driver-nas was given.
29635if test "${enable_driver_nas+set}" = set; then :
29636  enableval=$enable_driver_nas;
29637fi
29638cur_driver_enabled=yes
29639requested=$enable_driver_nas
29640if test "$all_drivers_disabled" = "yes"; then :
29641  if test "x$requested" = "xyes"; then :
29642    cur_driver_enabled=yes
29643  else
29644    cur_driver_enabled=no
29645  fi
29646else
29647  if test "x$requested" != "xno"; then :
29648    cur_driver_enabled=yes
29649  else
29650    cur_driver_enabled=no
29651  fi
29652fi
29653
29654if test "$cur_driver_enabled" = "yes"; then :
29655  INTERNAL_FORMAT_nas_ENABLED=yes
29656else
29657  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED nas"
29658  INTERNAL_FORMAT_nas_ENABLED=no
29659fi
29660
29661# Check whether --enable-driver-ili was given.
29662if test "${enable_driver_ili+set}" = set; then :
29663  enableval=$enable_driver_ili;
29664fi
29665cur_driver_enabled=yes
29666requested=$enable_driver_ili
29667if test "$all_drivers_disabled" = "yes"; then :
29668  if test "x$requested" = "xyes"; then :
29669    cur_driver_enabled=yes
29670  else
29671    cur_driver_enabled=no
29672  fi
29673else
29674  if test "x$requested" != "xno"; then :
29675    cur_driver_enabled=yes
29676  else
29677    cur_driver_enabled=no
29678  fi
29679fi
29680
29681if test "$cur_driver_enabled" = "yes"; then :
29682  INTERNAL_FORMAT_ili_ENABLED=yes
29683else
29684  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED ili"
29685  INTERNAL_FORMAT_ili_ENABLED=no
29686fi
29687
29688# Check whether --enable-driver-gmlas was given.
29689if test "${enable_driver_gmlas+set}" = set; then :
29690  enableval=$enable_driver_gmlas;
29691fi
29692cur_driver_enabled=yes
29693requested=$enable_driver_gmlas
29694if test "$all_drivers_disabled" = "yes"; then :
29695  if test "x$requested" = "xyes"; then :
29696    cur_driver_enabled=yes
29697  else
29698    cur_driver_enabled=no
29699  fi
29700else
29701  if test "x$requested" != "xno"; then :
29702    cur_driver_enabled=yes
29703  else
29704    cur_driver_enabled=no
29705  fi
29706fi
29707
29708if test "$cur_driver_enabled" = "yes"; then :
29709  INTERNAL_FORMAT_gmlas_ENABLED=yes
29710else
29711  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED gmlas"
29712  INTERNAL_FORMAT_gmlas_ENABLED=no
29713fi
29714
29715
29716
29717# Check whether --enable-driver-odbc was given.
29718if test "${enable_driver_odbc+set}" = set; then :
29719  enableval=$enable_driver_odbc;
29720fi
29721cur_driver_enabled=yes
29722requested=$enable_driver_odbc
29723if test "$all_drivers_disabled" = "yes"; then :
29724  if test "x$requested" = "xyes"; then :
29725    cur_driver_enabled=yes
29726  else
29727    cur_driver_enabled=no
29728  fi
29729else
29730  if test "x$requested" != "xno"; then :
29731    cur_driver_enabled=yes
29732  else
29733    cur_driver_enabled=no
29734  fi
29735fi
29736
29737if test "$cur_driver_enabled" = "yes"; then :
29738  INTERNAL_FORMAT_odbc_ENABLED=yes
29739else
29740  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED odbc"
29741  INTERNAL_FORMAT_odbc_ENABLED=no
29742fi
29743
29744# Check whether --enable-driver-pgeo was given.
29745if test "${enable_driver_pgeo+set}" = set; then :
29746  enableval=$enable_driver_pgeo;
29747fi
29748cur_driver_enabled=yes
29749requested=$enable_driver_pgeo
29750if test "$all_drivers_disabled" = "yes"; then :
29751  if test "x$requested" = "xyes"; then :
29752    cur_driver_enabled=yes
29753  else
29754    cur_driver_enabled=no
29755  fi
29756else
29757  if test "x$requested" != "xno"; then :
29758    cur_driver_enabled=yes
29759  else
29760    cur_driver_enabled=no
29761  fi
29762fi
29763
29764if test "$cur_driver_enabled" = "yes"; then :
29765  INTERNAL_FORMAT_pgeo_ENABLED=yes
29766else
29767  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED pgeo"
29768  INTERNAL_FORMAT_pgeo_ENABLED=no
29769fi
29770
29771# Check whether --enable-driver-mssqlspatial was given.
29772if test "${enable_driver_mssqlspatial+set}" = set; then :
29773  enableval=$enable_driver_mssqlspatial;
29774fi
29775cur_driver_enabled=yes
29776requested=$enable_driver_mssqlspatial
29777if test "$all_drivers_disabled" = "yes"; then :
29778  if test "x$requested" = "xyes"; then :
29779    cur_driver_enabled=yes
29780  else
29781    cur_driver_enabled=no
29782  fi
29783else
29784  if test "x$requested" != "xno"; then :
29785    cur_driver_enabled=yes
29786  else
29787    cur_driver_enabled=no
29788  fi
29789fi
29790
29791if test "$cur_driver_enabled" = "yes"; then :
29792  INTERNAL_FORMAT_mssqlspatial_ENABLED=yes
29793else
29794  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED mssqlspatial"
29795  INTERNAL_FORMAT_mssqlspatial_ENABLED=no
29796fi
29797
29798# Check whether --enable-driver-geomedia was given.
29799if test "${enable_driver_geomedia+set}" = set; then :
29800  enableval=$enable_driver_geomedia;
29801fi
29802cur_driver_enabled=yes
29803requested=$enable_driver_geomedia
29804if test "$all_drivers_disabled" = "yes"; then :
29805  if test "x$requested" = "xyes"; then :
29806    cur_driver_enabled=yes
29807  else
29808    cur_driver_enabled=no
29809  fi
29810else
29811  if test "x$requested" != "xno"; then :
29812    cur_driver_enabled=yes
29813  else
29814    cur_driver_enabled=no
29815  fi
29816fi
29817
29818if test "$cur_driver_enabled" = "yes"; then :
29819  INTERNAL_FORMAT_geomedia_ENABLED=yes
29820else
29821  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED geomedia"
29822  INTERNAL_FORMAT_geomedia_ENABLED=no
29823fi
29824
29825# Check whether --enable-driver-walk was given.
29826if test "${enable_driver_walk+set}" = set; then :
29827  enableval=$enable_driver_walk;
29828fi
29829cur_driver_enabled=yes
29830requested=$enable_driver_walk
29831if test "$all_drivers_disabled" = "yes"; then :
29832  if test "x$requested" = "xyes"; then :
29833    cur_driver_enabled=yes
29834  else
29835    cur_driver_enabled=no
29836  fi
29837else
29838  if test "x$requested" != "xno"; then :
29839    cur_driver_enabled=yes
29840  else
29841    cur_driver_enabled=no
29842  fi
29843fi
29844
29845if test "$cur_driver_enabled" = "yes"; then :
29846  INTERNAL_FORMAT_walk_ENABLED=yes
29847else
29848  OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED walk"
29849  INTERNAL_FORMAT_walk_ENABLED=no
29850fi
29851
29852
29853OGRFORMATS_ENABLED=$OGRFORMATS_ENABLED
29854
29855OGRFORMATS_ENABLED_CFLAGS=$OGRFORMATS_ENABLED_CFLAGS
29856
29857GDALFORMATS_ENABLED=$GDALFORMATS_ENABLED
29858
29859
29860if test "$LIBZ_SETTING" != "no" ; then
29861  if test "x$INTERNAL_FORMAT_rik_ENABLED" = "xyes"; then
29862      GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED rik"
29863  fi
29864  if test "x$INTERNAL_FORMAT_ozi_ENABLED" = "xyes"; then
29865      GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ozi"
29866  fi
29867fi
29868
29869if test "$CURL_SETTING" = "yes" ; then
29870
29871  CURL_INC=`$LIBCURL_CONFIG --cflags`
29872  CURL_LIB=`$LIBCURL_CONFIG --libs`
29873
29874  driver_enabled=$INTERNAL_FORMAT_eeda_ENABLED
29875  if test "x$driver_enabled" = "xyes"; then
29876    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED eeda"
29877  fi
29878
29879  driver_enabled=$INTERNAL_FORMAT_plmosaic_ENABLED
29880  if test "x$driver_enabled" = "xyes"; then
29881    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED plmosaic"
29882  fi
29883
29884  driver_enabled=$INTERNAL_FORMAT_rda_ENABLED
29885  if test "x$driver_enabled" = "xyes"; then
29886    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED rda"
29887  fi
29888
29889  driver_enabled=$INTERNAL_FORMAT_wcs_ENABLED
29890  if test "x$driver_enabled" = "xyes"; then
29891    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED wcs"
29892  fi
29893
29894  driver_enabled=$INTERNAL_FORMAT_wms_ENABLED
29895  if test "x$driver_enabled" = "xyes"; then
29896    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED wms"
29897  fi
29898
29899  driver_enabled=$INTERNAL_FORMAT_wmts_ENABLED
29900  if test "x$driver_enabled" = "xyes"; then
29901    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED wmts"
29902  fi
29903
29904  driver_enabled=$INTERNAL_FORMAT_daas_ENABLED
29905  if test "x$driver_enabled" = "xyes"; then
29906    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED daas"
29907  fi
29908
29909  driver_enabled=$INTERNAL_FORMAT_ogcapi_ENABLED
29910  if test "x$driver_enabled" = "xyes"; then
29911    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED ogcapi"
29912  fi
29913
29914
29915  driver_enabled=$INTERNAL_FORMAT_amigocloud_ENABLED
29916  if test "x$driver_enabled" = "xyes"; then
29917    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED amigocloud"
29918    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DAMIGOCLOUD_ENABLED"
29919  fi
29920
29921  driver_enabled=$INTERNAL_FORMAT_carto_ENABLED
29922  if test "x$driver_enabled" = "xyes"; then
29923    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED carto"
29924    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DCARTO_ENABLED"
29925  fi
29926
29927  driver_enabled=$INTERNAL_FORMAT_cloudant_ENABLED
29928  if test "x$driver_enabled" = "xyes"; then
29929    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED cloudant"
29930    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DCLOUDANT_ENABLED"
29931  fi
29932
29933  driver_enabled=$INTERNAL_FORMAT_couchdb_ENABLED
29934  if test "x$driver_enabled" = "xyes"; then
29935    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED couchdb"
29936    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DCOUCHDB_ENABLED"
29937  fi
29938
29939  driver_enabled=$INTERNAL_FORMAT_csw_ENABLED
29940  if test "x$driver_enabled" = "xyes"; then
29941    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED csw"
29942    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DCSW_ENABLED"
29943  fi
29944
29945  driver_enabled=$INTERNAL_FORMAT_elastic_ENABLED
29946  if test "x$driver_enabled" = "xyes"; then
29947    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED elastic"
29948    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DELASTIC_ENABLED"
29949  fi
29950
29951  driver_enabled=$INTERNAL_FORMAT_ngw_ENABLED
29952  if test "x$driver_enabled" = "xyes"; then
29953    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED ngw"
29954    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DNGW_ENABLED"
29955  fi
29956
29957  driver_enabled=$INTERNAL_FORMAT_plscenes_ENABLED
29958  if test "x$driver_enabled" = "xyes"; then
29959    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED plscenes"
29960    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DPLSCENES_ENABLED"
29961  fi
29962
29963  driver_enabled=$INTERNAL_FORMAT_wfs_ENABLED
29964  if test "x$driver_enabled" = "xyes"; then
29965    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED wfs"
29966    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DWFS_ENABLED"
29967  fi
29968
29969
29970fi
29971
29972if test "$HAVE_SQLITE3" = "yes"; then
29973
29974  driver_enabled=$INTERNAL_FORMAT_rasterlite_ENABLED
29975  if test "x$driver_enabled" = "xyes"; then
29976    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED rasterlite"
29977  fi
29978
29979  driver_enabled=$INTERNAL_FORMAT_mbtiles_ENABLED
29980  if test "x$driver_enabled" = "xyes"; then
29981    GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED mbtiles"
29982  fi
29983
29984
29985
29986  driver_enabled=$INTERNAL_FORMAT_gpkg_ENABLED
29987  if test "x$driver_enabled" = "xyes"; then
29988    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gpkg"
29989    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGPKG_ENABLED"
29990  fi
29991
29992  driver_enabled=$INTERNAL_FORMAT_vfk_ENABLED
29993  if test "x$driver_enabled" = "xyes"; then
29994    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED vfk"
29995    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DVFK_ENABLED"
29996  fi
29997
29998  driver_enabled=$INTERNAL_FORMAT_osm_ENABLED
29999  if test "x$driver_enabled" = "xyes"; then
30000    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED osm"
30001    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DOSM_ENABLED"
30002  fi
30003
30004
30005fi
30006
30007
30008PG_CONFIG=no
30009
30010
30011# Check whether --with-pg was given.
30012if test "${with_pg+set}" = set; then :
30013  withval=$with_pg;
30014fi
30015
30016
30017if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then
30018  PG_CONFIG=yes
30019elif test "x$with_pg" != "xno"; then
30020  as_fn_error $? "Only --with-pg=yes/no supported" "$LINENO" 5
30021fi
30022
30023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL" >&5
30024$as_echo_n "checking for PostgreSQL... " >&6; }
30025
30026if test "x$PG_CONFIG" = "xno" ; then
30027
30028  HAVE_PG=no
30029  PG_LIB=
30030  PG_INC=
30031
30032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30033$as_echo "no" >&6; }
30034
30035else
30036
30037
30038
30039if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
30040	if test -n "$ac_tool_prefix"; then
30041  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
30042set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
30043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30044$as_echo_n "checking for $ac_word... " >&6; }
30045if ${ac_cv_path_PKG_CONFIG+:} false; then :
30046  $as_echo_n "(cached) " >&6
30047else
30048  case $PKG_CONFIG in
30049  [\\/]* | ?:[\\/]*)
30050  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
30051  ;;
30052  *)
30053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30054for as_dir in $PATH
30055do
30056  IFS=$as_save_IFS
30057  test -z "$as_dir" && as_dir=.
30058    for ac_exec_ext in '' $ac_executable_extensions; do
30059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30060    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
30061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30062    break 2
30063  fi
30064done
30065  done
30066IFS=$as_save_IFS
30067
30068  ;;
30069esac
30070fi
30071PKG_CONFIG=$ac_cv_path_PKG_CONFIG
30072if test -n "$PKG_CONFIG"; then
30073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
30074$as_echo "$PKG_CONFIG" >&6; }
30075else
30076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30077$as_echo "no" >&6; }
30078fi
30079
30080
30081fi
30082if test -z "$ac_cv_path_PKG_CONFIG"; then
30083  ac_pt_PKG_CONFIG=$PKG_CONFIG
30084  # Extract the first word of "pkg-config", so it can be a program name with args.
30085set dummy pkg-config; ac_word=$2
30086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30087$as_echo_n "checking for $ac_word... " >&6; }
30088if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
30089  $as_echo_n "(cached) " >&6
30090else
30091  case $ac_pt_PKG_CONFIG in
30092  [\\/]* | ?:[\\/]*)
30093  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
30094  ;;
30095  *)
30096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30097for as_dir in $PATH
30098do
30099  IFS=$as_save_IFS
30100  test -z "$as_dir" && as_dir=.
30101    for ac_exec_ext in '' $ac_executable_extensions; do
30102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30103    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
30104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30105    break 2
30106  fi
30107done
30108  done
30109IFS=$as_save_IFS
30110
30111  ;;
30112esac
30113fi
30114ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
30115if test -n "$ac_pt_PKG_CONFIG"; then
30116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
30117$as_echo "$ac_pt_PKG_CONFIG" >&6; }
30118else
30119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30120$as_echo "no" >&6; }
30121fi
30122
30123  if test "x$ac_pt_PKG_CONFIG" = x; then
30124    PKG_CONFIG=""
30125  else
30126    case $cross_compiling:$ac_tool_warned in
30127yes:)
30128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30130ac_tool_warned=yes ;;
30131esac
30132    PKG_CONFIG=$ac_pt_PKG_CONFIG
30133  fi
30134else
30135  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
30136fi
30137
30138fi
30139if test -n "$PKG_CONFIG"; then
30140	_pkg_min_version=0.21
30141	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
30142$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
30143	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
30144		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30145$as_echo "yes" >&6; }
30146	else
30147		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30148$as_echo "no" >&6; }
30149		PKG_CONFIG=""
30150	fi
30151
30152fi
30153
30154pkg_failed=no
30155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQ" >&5
30156$as_echo_n "checking for PQ... " >&6; }
30157
30158if test -n "$PKG_CONFIG"; then
30159    if test -n "$PQ_CFLAGS"; then
30160        pkg_cv_PQ_CFLAGS="$PQ_CFLAGS"
30161    else
30162        if test -n "$PKG_CONFIG" && \
30163    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq > 9.1\""; } >&5
30164  ($PKG_CONFIG --exists --print-errors "libpq > 9.1") 2>&5
30165  ac_status=$?
30166  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30167  test $ac_status = 0; }; then
30168  pkg_cv_PQ_CFLAGS=`$PKG_CONFIG --cflags "libpq > 9.1" 2>/dev/null`
30169else
30170  pkg_failed=yes
30171fi
30172    fi
30173else
30174	pkg_failed=untried
30175fi
30176if test -n "$PKG_CONFIG"; then
30177    if test -n "$PQ_LIBS"; then
30178        pkg_cv_PQ_LIBS="$PQ_LIBS"
30179    else
30180        if test -n "$PKG_CONFIG" && \
30181    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq > 9.1\""; } >&5
30182  ($PKG_CONFIG --exists --print-errors "libpq > 9.1") 2>&5
30183  ac_status=$?
30184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30185  test $ac_status = 0; }; then
30186  pkg_cv_PQ_LIBS=`$PKG_CONFIG --libs "libpq > 9.1" 2>/dev/null`
30187else
30188  pkg_failed=yes
30189fi
30190    fi
30191else
30192	pkg_failed=untried
30193fi
30194
30195
30196
30197if test $pkg_failed = yes; then
30198
30199if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30200        _pkg_short_errors_supported=yes
30201else
30202        _pkg_short_errors_supported=no
30203fi
30204        if test $_pkg_short_errors_supported = yes; then
30205	        PQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpq > 9.1"`
30206        else
30207	        PQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpq > 9.1"`
30208        fi
30209	# Put the nasty error message in config.log where it belongs
30210	echo "$PQ_PKG_ERRORS" >&5
30211
30212	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30213$as_echo "no" >&6; }
30214                HAVE_PG=no
30215elif test $pkg_failed = untried; then
30216	HAVE_PG=no
30217else
30218	PQ_CFLAGS=$pkg_cv_PQ_CFLAGS
30219	PQ_LIBS=$pkg_cv_PQ_LIBS
30220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30221$as_echo "yes" >&6; }
30222	HAVE_PG=yes
30223fi
30224
30225  if test "${HAVE_PG}" = "yes" ; then
30226    PG_LIB="${PQ_LIBS}"
30227    PG_INC="${PQ_CFLAGS}"
30228    SAVED_LIBS="${LIBS}"
30229    LIBS="${PG_LIB}"
30230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5
30231$as_echo_n "checking for PQconnectdb in -lpq... " >&6; }
30232if ${ac_cv_lib_pq_PQconnectdb+:} false; then :
30233  $as_echo_n "(cached) " >&6
30234else
30235  ac_check_lib_save_LIBS=$LIBS
30236LIBS="-lpq  $LIBS"
30237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30238/* end confdefs.h.  */
30239
30240/* Override any GCC internal prototype to avoid an error.
30241   Use char because int might match the return type of a GCC
30242   builtin and then its argument prototype would still apply.  */
30243#ifdef __cplusplus
30244extern "C"
30245#endif
30246char PQconnectdb ();
30247int
30248main ()
30249{
30250return PQconnectdb ();
30251  ;
30252  return 0;
30253}
30254_ACEOF
30255if ac_fn_c_try_link "$LINENO"; then :
30256  ac_cv_lib_pq_PQconnectdb=yes
30257else
30258  ac_cv_lib_pq_PQconnectdb=no
30259fi
30260rm -f core conftest.err conftest.$ac_objext \
30261    conftest$ac_exeext conftest.$ac_ext
30262LIBS=$ac_check_lib_save_LIBS
30263fi
30264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQconnectdb" >&5
30265$as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; }
30266if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then :
30267  HAVE_PG=yes
30268else
30269  HAVE_PG=no
30270fi
30271
30272    LIBS="${SAVED_LIBS}"
30273    if test "${HAVE_PG}" = "yes" ; then
30274      LIBS="${PG_LIB} ${LIBS}"
30275    fi
30276  else
30277    if test "x$with_pg" = "xyes"; then
30278      as_fn_error $? "--with-pg was requested, but libpq is not available" "$LINENO" 5
30279    fi
30280  fi
30281
30282fi
30283
30284HAVE_PG=$HAVE_PG
30285
30286PG_INC=$PG_INC
30287
30288PG_LIB=$PG_LIB
30289
30290
30291
30292GRASS_SETTING=no
30293GRASS_INCLUDE=
30294HAVE_GRASS=no
30295export GRASS_INCLUDE GRASS_SETTING
30296
30297
30298# Check whether --with-grass was given.
30299if test "${with_grass+set}" = set; then :
30300  withval=$with_grass;
30301fi
30302
30303
30304
30305# Check whether --with-libgrass was given.
30306if test "${with_libgrass+set}" = set; then :
30307  withval=$with_libgrass;
30308fi
30309
30310
30311# default use of grass libraries off since we can't easily auto-find them.
30312if test "$with_grass" = "" ; then
30313  with_grass=no
30314fi
30315
30316# Check for GRASS 5.7.0 or later library use.
30317# TODO: separate libs for rasters and vectors
30318if test "$with_grass" != "yes" -a "$with_grass" != "no" ; then
30319
30320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for G_is_initialized in -lgrass_gis" >&5
30321$as_echo_n "checking for G_is_initialized in -lgrass_gis... " >&6; }
30322if ${ac_cv_lib_grass_gis_G_is_initialized+:} false; then :
30323  $as_echo_n "(cached) " >&6
30324else
30325  ac_check_lib_save_LIBS=$LIBS
30326LIBS="-lgrass_gis -L$with_grass/lib -lgrass_datetime $LIBS"
30327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30328/* end confdefs.h.  */
30329
30330/* Override any GCC internal prototype to avoid an error.
30331   Use char because int might match the return type of a GCC
30332   builtin and then its argument prototype would still apply.  */
30333#ifdef __cplusplus
30334extern "C"
30335#endif
30336char G_is_initialized ();
30337int
30338main ()
30339{
30340return G_is_initialized ();
30341  ;
30342  return 0;
30343}
30344_ACEOF
30345if ac_fn_c_try_link "$LINENO"; then :
30346  ac_cv_lib_grass_gis_G_is_initialized=yes
30347else
30348  ac_cv_lib_grass_gis_G_is_initialized=no
30349fi
30350rm -f core conftest.err conftest.$ac_objext \
30351    conftest$ac_exeext conftest.$ac_ext
30352LIBS=$ac_check_lib_save_LIBS
30353fi
30354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grass_gis_G_is_initialized" >&5
30355$as_echo "$ac_cv_lib_grass_gis_G_is_initialized" >&6; }
30356if test "x$ac_cv_lib_grass_gis_G_is_initialized" = xyes; then :
30357  GRASS_SETTING=grass70+
30358else
30359  GRASS_SETTING=no
30360fi
30361
30362  if test "$GRASS_SETTING" = "no" ; then
30363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for G_asprintf in -lgrass_gis" >&5
30364$as_echo_n "checking for G_asprintf in -lgrass_gis... " >&6; }
30365if ${ac_cv_lib_grass_gis_G_asprintf+:} false; then :
30366  $as_echo_n "(cached) " >&6
30367else
30368  ac_check_lib_save_LIBS=$LIBS
30369LIBS="-lgrass_gis -L$with_grass/lib -lgrass_datetime $LIBS"
30370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30371/* end confdefs.h.  */
30372
30373/* Override any GCC internal prototype to avoid an error.
30374   Use char because int might match the return type of a GCC
30375   builtin and then its argument prototype would still apply.  */
30376#ifdef __cplusplus
30377extern "C"
30378#endif
30379char G_asprintf ();
30380int
30381main ()
30382{
30383return G_asprintf ();
30384  ;
30385  return 0;
30386}
30387_ACEOF
30388if ac_fn_c_try_link "$LINENO"; then :
30389  ac_cv_lib_grass_gis_G_asprintf=yes
30390else
30391  ac_cv_lib_grass_gis_G_asprintf=no
30392fi
30393rm -f core conftest.err conftest.$ac_objext \
30394    conftest$ac_exeext conftest.$ac_ext
30395LIBS=$ac_check_lib_save_LIBS
30396fi
30397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grass_gis_G_asprintf" >&5
30398$as_echo "$ac_cv_lib_grass_gis_G_asprintf" >&6; }
30399if test "x$ac_cv_lib_grass_gis_G_asprintf" = xyes; then :
30400  GRASS_SETTING=grass57+
30401else
30402  GRASS_SETTING=no
30403fi
30404
30405  fi
30406
30407  if test "$GRASS_SETTING" != "no" ; then
30408    if test "$GRASS_SETTING" = "grass70+" ; then
30409      G_RASTLIBS="-lgrass_raster -lgrass_imagery"
30410      G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
30411      LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
30412    else
30413      G_RASTLIBS="-lgrass_I"
30414      G_VECTLIBS="-lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
30415      LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
30416    fi
30417    GRASS_INCLUDE="-I$with_grass/include"
30418    GRASS_GISBASE="$with_grass"
30419    HAVE_GRASS=yes
30420  else
30421    as_fn_error $? "--with-grass=$with_grass requested, but libraries not found!" "$LINENO" 5
30422  fi
30423
30424# Check if libgrass is disabled.
30425elif test "$with_libgrass" = "no" ; then
30426
30427  echo "GRASS support disabled."
30428
30429elif test "$with_libgrass" = "yes" -o "$with_libgrass" = "" ; then
30430
30431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for G_gisinit_2 in -lgrass5" >&5
30432$as_echo_n "checking for G_gisinit_2 in -lgrass5... " >&6; }
30433if ${ac_cv_lib_grass5_G_gisinit_2+:} false; then :
30434  $as_echo_n "(cached) " >&6
30435else
30436  ac_check_lib_save_LIBS=$LIBS
30437LIBS="-lgrass5  $LIBS"
30438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30439/* end confdefs.h.  */
30440
30441/* Override any GCC internal prototype to avoid an error.
30442   Use char because int might match the return type of a GCC
30443   builtin and then its argument prototype would still apply.  */
30444#ifdef __cplusplus
30445extern "C"
30446#endif
30447char G_gisinit_2 ();
30448int
30449main ()
30450{
30451return G_gisinit_2 ();
30452  ;
30453  return 0;
30454}
30455_ACEOF
30456if ac_fn_c_try_link "$LINENO"; then :
30457  ac_cv_lib_grass5_G_gisinit_2=yes
30458else
30459  ac_cv_lib_grass5_G_gisinit_2=no
30460fi
30461rm -f core conftest.err conftest.$ac_objext \
30462    conftest$ac_exeext conftest.$ac_ext
30463LIBS=$ac_check_lib_save_LIBS
30464fi
30465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grass5_G_gisinit_2" >&5
30466$as_echo "$ac_cv_lib_grass5_G_gisinit_2" >&6; }
30467if test "x$ac_cv_lib_grass5_G_gisinit_2" = xyes; then :
30468  GRASS_SETTING=libgrass
30469else
30470  GRASS_SETTING=no
30471fi
30472
30473
30474  if test "$GRASS_SETTING" = "libgrass" ; then
30475    LIBS="-lgrass5 $LIBS"
30476  fi
30477
30478else
30479
30480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for G_gisinit_2 in -lgrass5" >&5
30481$as_echo_n "checking for G_gisinit_2 in -lgrass5... " >&6; }
30482if ${ac_cv_lib_grass5_G_gisinit_2+:} false; then :
30483  $as_echo_n "(cached) " >&6
30484else
30485  ac_check_lib_save_LIBS=$LIBS
30486LIBS="-lgrass5 -L$with_libgrass/lib $LIBS"
30487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30488/* end confdefs.h.  */
30489
30490/* Override any GCC internal prototype to avoid an error.
30491   Use char because int might match the return type of a GCC
30492   builtin and then its argument prototype would still apply.  */
30493#ifdef __cplusplus
30494extern "C"
30495#endif
30496char G_gisinit_2 ();
30497int
30498main ()
30499{
30500return G_gisinit_2 ();
30501  ;
30502  return 0;
30503}
30504_ACEOF
30505if ac_fn_c_try_link "$LINENO"; then :
30506  ac_cv_lib_grass5_G_gisinit_2=yes
30507else
30508  ac_cv_lib_grass5_G_gisinit_2=no
30509fi
30510rm -f core conftest.err conftest.$ac_objext \
30511    conftest$ac_exeext conftest.$ac_ext
30512LIBS=$ac_check_lib_save_LIBS
30513fi
30514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_grass5_G_gisinit_2" >&5
30515$as_echo "$ac_cv_lib_grass5_G_gisinit_2" >&6; }
30516if test "x$ac_cv_lib_grass5_G_gisinit_2" = xyes; then :
30517  GRASS_SETTING=libgrass
30518else
30519  GRASS_SETTING=no
30520fi
30521
30522
30523  if test "$GRASS_SETTING" = "libgrass" ; then
30524    LIBS="-L$with_libgrass -L$with_libgrass/lib -lgrass5 $LIBS"
30525    GRASS_INCLUDE="-I$with_libgrass -I$with_libgrass/include $EXTRA_INCLUDES"
30526  else
30527    as_fn_error $? "--with-libgrass=$with_grass requested, but libgrass5 not found!" "$LINENO" 5
30528  fi
30529fi
30530
30531GRASS_SETTING=$GRASS_SETTING
30532
30533GRASS_INCLUDE=$GRASS_INCLUDE
30534
30535GRASS_GISBASE=$GRASS_GISBASE
30536
30537
30538
30539if test "$GRASS_SETTING" != "no" ; then
30540  OPT_GDAL_FORMATS="grass $OPT_GDAL_FORMATS"
30541fi
30542
30543
30544
30545# Check whether --with-cfitsio was given.
30546if test "${with_cfitsio+set}" = set; then :
30547  withval=$with_cfitsio;
30548fi
30549
30550
30551if test "$with_cfitsio" = "no" ; then
30552
30553  FITS_SETTING=no
30554
30555  echo "FITS support disabled."
30556
30557elif test "$with_cfitsio" = "yes" -o "$with_cfitsio" = "" ; then
30558
30559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffopen in -lcfitsio" >&5
30560$as_echo_n "checking for ffopen in -lcfitsio... " >&6; }
30561if ${ac_cv_lib_cfitsio_ffopen+:} false; then :
30562  $as_echo_n "(cached) " >&6
30563else
30564  ac_check_lib_save_LIBS=$LIBS
30565LIBS="-lcfitsio  $LIBS"
30566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30567/* end confdefs.h.  */
30568
30569/* Override any GCC internal prototype to avoid an error.
30570   Use char because int might match the return type of a GCC
30571   builtin and then its argument prototype would still apply.  */
30572#ifdef __cplusplus
30573extern "C"
30574#endif
30575char ffopen ();
30576int
30577main ()
30578{
30579return ffopen ();
30580  ;
30581  return 0;
30582}
30583_ACEOF
30584if ac_fn_c_try_link "$LINENO"; then :
30585  ac_cv_lib_cfitsio_ffopen=yes
30586else
30587  ac_cv_lib_cfitsio_ffopen=no
30588fi
30589rm -f core conftest.err conftest.$ac_objext \
30590    conftest$ac_exeext conftest.$ac_ext
30591LIBS=$ac_check_lib_save_LIBS
30592fi
30593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfitsio_ffopen" >&5
30594$as_echo "$ac_cv_lib_cfitsio_ffopen" >&6; }
30595if test "x$ac_cv_lib_cfitsio_ffopen" = xyes; then :
30596  FITS_SETTING=external
30597else
30598  FITS_SETTING=no
30599fi
30600
30601
30602  if test "$FITS_SETTING" = "external" ; then
30603    LIBS="-lcfitsio $LIBS"
30604    echo "using pre-installed libcfitsio."
30605  else
30606    echo "libcfitsio not found - FITS support disabled"
30607  fi
30608
30609  if test "$FITS_SETTING" = "external" -a -d /usr/include/cfitsio ; then
30610    EXTRA_INCLUDES="-I/usr/include/cfitsio $EXTRA_INCLUDES"
30611  fi
30612
30613else
30614
30615  FITS_SETTING=external
30616  LIBS="-L$with_cfitsio -L$with_cfitsio/lib -lcfitsio $LIBS"
30617  EXTRA_INCLUDES="-I$with_cfitsio -I$with_cfitsio/include $EXTRA_INCLUDES"
30618
30619  echo "using libcfitsio from $with_cfitsio."
30620fi
30621
30622FITS_SETTING=$FITS_SETTING
30623
30624
30625if test "$FITS_SETTING" != "no" ; then
30626  OPT_GDAL_FORMATS="fits $OPT_GDAL_FORMATS"
30627fi
30628
30629
30630
30631# Check whether --with-pcraster was given.
30632if test "${with_pcraster+set}" = set; then :
30633  withval=$with_pcraster;
30634fi
30635
30636
30637if test "$with_pcraster" = "no" ; then
30638
30639  PCRASTER_SETTING=no
30640
30641  echo "PCRaster support disabled."
30642
30643elif test "$with_pcraster" = "yes" -o "$with_pcraster" = "" ; then
30644
30645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mopen in -lcsf" >&5
30646$as_echo_n "checking for Mopen in -lcsf... " >&6; }
30647if ${ac_cv_lib_csf_Mopen+:} false; then :
30648  $as_echo_n "(cached) " >&6
30649else
30650  ac_check_lib_save_LIBS=$LIBS
30651LIBS="-lcsf $LIBS $LIBS"
30652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30653/* end confdefs.h.  */
30654
30655/* Override any GCC internal prototype to avoid an error.
30656   Use char because int might match the return type of a GCC
30657   builtin and then its argument prototype would still apply.  */
30658#ifdef __cplusplus
30659extern "C"
30660#endif
30661char Mopen ();
30662int
30663main ()
30664{
30665return Mopen ();
30666  ;
30667  return 0;
30668}
30669_ACEOF
30670if ac_fn_c_try_link "$LINENO"; then :
30671  ac_cv_lib_csf_Mopen=yes
30672else
30673  ac_cv_lib_csf_Mopen=no
30674fi
30675rm -f core conftest.err conftest.$ac_objext \
30676    conftest$ac_exeext conftest.$ac_ext
30677LIBS=$ac_check_lib_save_LIBS
30678fi
30679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csf_Mopen" >&5
30680$as_echo "$ac_cv_lib_csf_Mopen" >&6; }
30681if test "x$ac_cv_lib_csf_Mopen" = xyes; then :
30682  PCRASTER_SETTING=external
30683else
30684  PCRASTER_SETTING=internal
30685fi
30686
30687  for ac_header in csf.h
30688do :
30689  ac_fn_c_check_header_mongrel "$LINENO" "csf.h" "ac_cv_header_csf_h" "$ac_includes_default"
30690if test "x$ac_cv_header_csf_h" = xyes; then :
30691  cat >>confdefs.h <<_ACEOF
30692#define HAVE_CSF_H 1
30693_ACEOF
30694
30695fi
30696
30697done
30698
30699
30700  if test "$PCRASTER_SETTING" = "external" -a "$ac_cv_header_csf_h" = "no" ; then
30701    PCRASTER_SETTING=internal
30702  fi
30703
30704  if test "$PCRASTER_SETTING" = "external" ; then
30705    LIBS="-lcsf $LIBS"
30706    echo "using pre-installed libcsf."
30707  else
30708    echo "using internal csf code."
30709  fi
30710
30711elif test "$with_pcraster" = "internal" ; then
30712
30713  PCRASTER_SETTING=internal
30714
30715  echo "using internal csf code."
30716
30717else
30718
30719  PCRASTER_SETTING=external
30720  LIBS="-L$with_pcraster/lib -lcsf $LIBS"
30721  EXTRA_INCLUDES="-I$with_pcraster/include $EXTRA_INCLUDES"
30722
30723  echo "using libcsf from $with_pcraster."
30724
30725fi
30726
30727PCRASTER_SETTING=$PCRASTER_SETTING
30728
30729
30730if test "$PCRASTER_SETTING" != "no" ; then
30731  OPT_GDAL_FORMATS="pcraster $OPT_GDAL_FORMATS"
30732fi
30733
30734
30735
30736# Check whether --with-png was given.
30737if test "${with_png+set}" = set; then :
30738  withval=$with_png;
30739fi
30740
30741
30742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5
30743$as_echo_n "checking for libpng... " >&6; }
30744
30745if test "$with_png" = "no" ; then
30746
30747  PNG_SETTING=no
30748
30749  echo "png support disabled."
30750
30751elif test "$with_png" = "yes" -o "$with_png" = "" ; then
30752
30753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_set_IHDR in -lpng" >&5
30754$as_echo_n "checking for png_set_IHDR in -lpng... " >&6; }
30755if ${ac_cv_lib_png_png_set_IHDR+:} false; then :
30756  $as_echo_n "(cached) " >&6
30757else
30758  ac_check_lib_save_LIBS=$LIBS
30759LIBS="-lpng $LIBS $LIBS"
30760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30761/* end confdefs.h.  */
30762
30763/* Override any GCC internal prototype to avoid an error.
30764   Use char because int might match the return type of a GCC
30765   builtin and then its argument prototype would still apply.  */
30766#ifdef __cplusplus
30767extern "C"
30768#endif
30769char png_set_IHDR ();
30770int
30771main ()
30772{
30773return png_set_IHDR ();
30774  ;
30775  return 0;
30776}
30777_ACEOF
30778if ac_fn_c_try_link "$LINENO"; then :
30779  ac_cv_lib_png_png_set_IHDR=yes
30780else
30781  ac_cv_lib_png_png_set_IHDR=no
30782fi
30783rm -f core conftest.err conftest.$ac_objext \
30784    conftest$ac_exeext conftest.$ac_ext
30785LIBS=$ac_check_lib_save_LIBS
30786fi
30787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_set_IHDR" >&5
30788$as_echo "$ac_cv_lib_png_png_set_IHDR" >&6; }
30789if test "x$ac_cv_lib_png_png_set_IHDR" = xyes; then :
30790  PNG_SETTING=external
30791else
30792  PNG_SETTING=internal
30793fi
30794
30795  for ac_header in png.h
30796do :
30797  ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
30798if test "x$ac_cv_header_png_h" = xyes; then :
30799  cat >>confdefs.h <<_ACEOF
30800#define HAVE_PNG_H 1
30801_ACEOF
30802
30803fi
30804
30805done
30806
30807
30808  if test "$PNG_SETTING" = "external" -a "$ac_cv_header_png_h" = "no" ; then
30809    PNG_SETTING=internal
30810  fi
30811  if test "$PNG_SETTING" = "external" ; then
30812    LIBS="-lpng $LIBS"
30813    echo "using pre-installed libpng."
30814  else
30815    echo "using internal png code."
30816  fi
30817
30818elif test "$with_png" = "internal" ; then
30819
30820  PNG_SETTING=internal
30821
30822  echo "using internal png code."
30823
30824else
30825
30826  PNG_SETTING=external
30827  LIBS="-L$with_png -L$with_png/lib -lpng $LIBS"
30828  EXTRA_INCLUDES="-I$with_png -I$with_png/include $EXTRA_INCLUDES"
30829
30830  echo "using libpng from $with_png."
30831
30832fi
30833
30834PNG_SETTING=$PNG_SETTING
30835
30836
30837if test "$PNG_SETTING" != "no" ; then
30838  OPT_GDAL_FORMATS="png $OPT_GDAL_FORMATS"
30839  if test "x$INTERNAL_FORMAT_grib_ENABLED" = "xyes"; then
30840  	GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED grib"
30841  fi
30842fi
30843
30844
30845
30846# Check whether --with-dds was given.
30847if test "${with_dds+set}" = set; then :
30848  withval=$with_dds;
30849fi
30850
30851
30852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrunch" >&5
30853$as_echo_n "checking for libcrunch... " >&6; }
30854
30855if test "$with_dds" = "no" -o "$with_dds" = ""; then
30856
30857  DDS_SETTING="no"
30858  CRUNCHDIR=""
30859
30860  echo "dds support disabled."
30861
30862else
30863
30864  DDS_SETTING=yes
30865  CRUNCHDIR="$with_dds"
30866  LIBS="-L$with_dds/lib/ -lcrunch $LIBS"
30867  echo "using libcrunch from $with_dds."
30868
30869fi
30870
30871CRUNCHDIR=$CRUNCHDIR
30872
30873DDS_SETTING=$DDS_SETTING
30874
30875
30876if test "$DDS_SETTING" != "no" ; then
30877  OPT_GDAL_FORMATS="dds $OPT_GDAL_FORMATS"
30878fi
30879
30880
30881
30882# Check whether --with-gta was given.
30883if test "${with_gta+set}" = set; then :
30884  withval=$with_gta;
30885fi
30886
30887
30888if test "$with_gta" = "no" ; then
30889
30890  GTA_SETTING=no
30891
30892  echo "GTA support disabled."
30893
30894elif test "$with_gta" = "yes" -o "$with_gta" = "" ; then
30895
30896  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gta_version in -lgta" >&5
30897$as_echo_n "checking for gta_version in -lgta... " >&6; }
30898if ${ac_cv_lib_gta_gta_version+:} false; then :
30899  $as_echo_n "(cached) " >&6
30900else
30901  ac_check_lib_save_LIBS=$LIBS
30902LIBS="-lgta  $LIBS"
30903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30904/* end confdefs.h.  */
30905
30906/* Override any GCC internal prototype to avoid an error.
30907   Use char because int might match the return type of a GCC
30908   builtin and then its argument prototype would still apply.  */
30909#ifdef __cplusplus
30910extern "C"
30911#endif
30912char gta_version ();
30913int
30914main ()
30915{
30916return gta_version ();
30917  ;
30918  return 0;
30919}
30920_ACEOF
30921if ac_fn_c_try_link "$LINENO"; then :
30922  ac_cv_lib_gta_gta_version=yes
30923else
30924  ac_cv_lib_gta_gta_version=no
30925fi
30926rm -f core conftest.err conftest.$ac_objext \
30927    conftest$ac_exeext conftest.$ac_ext
30928LIBS=$ac_check_lib_save_LIBS
30929fi
30930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gta_gta_version" >&5
30931$as_echo "$ac_cv_lib_gta_gta_version" >&6; }
30932if test "x$ac_cv_lib_gta_gta_version" = xyes; then :
30933  GTA_SETTING=yes
30934else
30935  GTA_SETTING=no
30936fi
30937
30938
30939  if test "$GTA_SETTING" = "yes" ; then
30940    LIBS="-lgta $LIBS"
30941    echo "using pre-installed libgta."
30942  else
30943    echo "libgta not found - GTA support disabled"
30944  fi
30945
30946else
30947
30948  GTA_SETTING=yes
30949  LIBS="-L$with_gta -L$with_gta/lib -lgta $LIBS"
30950  EXTRA_INCLUDES="-I$with_gta -I$with_gta/include $EXTRA_INCLUDES"
30951
30952  echo "using libgta from $with_gta."
30953fi
30954
30955GTA_SETTING=$GTA_SETTING
30956
30957
30958if test "$GTA_SETTING" != "no" ; then
30959  OPT_GDAL_FORMATS="gta $OPT_GDAL_FORMATS"
30960fi
30961
30962
30963
30964# Check whether --with-pcidsk was given.
30965if test "${with_pcidsk+set}" = set; then :
30966  withval=$with_pcidsk;
30967fi
30968
30969
30970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIDSK" >&5
30971$as_echo_n "checking for PCIDSK... " >&6; }
30972
30973PCIDSK_LIB=
30974PCIDSK_INCLUDE=
30975
30976if test "$with_pcidsk" = "no" ; then
30977
30978  PCIDSK_SETTING=no
30979
30980  echo "pcidsk support disabled."
30981
30982elif test "$with_pcidsk" = "" -o "$with_pcidsk" = "yes" -o "$with_pcidsk" = "internal" ; then
30983
30984  PCIDSK_SETTING=internal
30985
30986  echo "using internal libpcidsk."
30987
30988else
30989
30990  PCIDSK_SETTING=external
30991  PCIDSK_LIB="-L$with_pcidsk/lib -lpcidsk"
30992  PCIDSK_INCLUDE="-I$with_pcidsk/include -I$with_pcidsk/include/pcidsk"
30993
30994  echo "using libpcidsk from $with_pcidsk."
30995
30996fi
30997
30998if test "$with_pcidsk" != "no" ; then
30999
31000  PCIDSK_SETTING=$PCIDSK_SETTING
31001
31002  PCIDSK_LIB=$PCIDSK_LIB
31003
31004  PCIDSK_INCLUDE=$PCIDSK_INCLUDE
31005
31006
31007fi
31008
31009
31010GEOTIFF_INCLUDE=
31011
31012# Check whether --with-geotiff was given.
31013if test "${with_geotiff+set}" = set; then :
31014  withval=$with_geotiff;
31015fi
31016
31017
31018if test "$with_geotiff" = "yes" -o "$with_geotiff" = "" ; then
31019
31020  if test "$TIFF_SETTING" = "internal" ; then
31021    GEOTIFF_SETTING=internal
31022  else
31023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTIFAttachPROJContext in -lgeotiff" >&5
31024$as_echo_n "checking for GTIFAttachPROJContext in -lgeotiff... " >&6; }
31025if ${ac_cv_lib_geotiff_GTIFAttachPROJContext+:} false; then :
31026  $as_echo_n "(cached) " >&6
31027else
31028  ac_check_lib_save_LIBS=$LIBS
31029LIBS="-lgeotiff  $LIBS"
31030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31031/* end confdefs.h.  */
31032
31033/* Override any GCC internal prototype to avoid an error.
31034   Use char because int might match the return type of a GCC
31035   builtin and then its argument prototype would still apply.  */
31036#ifdef __cplusplus
31037extern "C"
31038#endif
31039char GTIFAttachPROJContext ();
31040int
31041main ()
31042{
31043return GTIFAttachPROJContext ();
31044  ;
31045  return 0;
31046}
31047_ACEOF
31048if ac_fn_c_try_link "$LINENO"; then :
31049  ac_cv_lib_geotiff_GTIFAttachPROJContext=yes
31050else
31051  ac_cv_lib_geotiff_GTIFAttachPROJContext=no
31052fi
31053rm -f core conftest.err conftest.$ac_objext \
31054    conftest$ac_exeext conftest.$ac_ext
31055LIBS=$ac_check_lib_save_LIBS
31056fi
31057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_geotiff_GTIFAttachPROJContext" >&5
31058$as_echo "$ac_cv_lib_geotiff_GTIFAttachPROJContext" >&6; }
31059if test "x$ac_cv_lib_geotiff_GTIFAttachPROJContext" = xyes; then :
31060  GEOTIFF_SETTING=external
31061else
31062  GEOTIFF_SETTING=internal
31063fi
31064
31065
31066  fi
31067
31068  if test "$GEOTIFF_SETTING" = "external" ; then
31069
31070        if test -r /usr/include/geotiff.h ; then
31071      GEOTIFF_INCLUDE=
31072        elif test -r /usr/include/geotiff/geotiff.h ; then
31073      GEOTIFF_INCLUDE="-I/usr/include/geotiff"
31074        elif test -r /usr/include/libgeotiff/geotiff.h ; then
31075      GEOTIFF_INCLUDE="-I/usr/include/libgeotiff"
31076    else
31077      for ac_header in geotiff.h
31078do :
31079  ac_fn_c_check_header_mongrel "$LINENO" "geotiff.h" "ac_cv_header_geotiff_h" "$ac_includes_default"
31080if test "x$ac_cv_header_geotiff_h" = xyes; then :
31081  cat >>confdefs.h <<_ACEOF
31082#define HAVE_GEOTIFF_H 1
31083_ACEOF
31084
31085fi
31086
31087done
31088
31089      if test "$ac_cv_header_geotiff_h" = "no" ; then
31090        as_fn_error $? "cannot find geotiff.h" "$LINENO" 5
31091      fi
31092    fi
31093
31094    LIBS="-lgeotiff $LIBS"
31095    echo "using pre-installed libgeotiff."
31096
31097  else
31098
31099    echo "using internal GeoTIFF code."
31100
31101  fi
31102
31103elif test "$with_geotiff" = "internal" ; then
31104
31105  GEOTIFF_SETTING=internal
31106
31107  echo "using internal GeoTIFF code."
31108
31109elif test "x${with_geotiff}" = "xno" ; then
31110
31111  as_fn_error $? "libgeotiff is a required dependency" "$LINENO" 5
31112
31113else
31114
31115  GEOTIFF_SETTING=external
31116
31117      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTIFAttachPROJContext in -lgeotiff" >&5
31118$as_echo_n "checking for GTIFAttachPROJContext in -lgeotiff... " >&6; }
31119if ${ac_cv_lib_geotiff_GTIFAttachPROJContext+:} false; then :
31120  $as_echo_n "(cached) " >&6
31121else
31122  ac_check_lib_save_LIBS=$LIBS
31123LIBS="-lgeotiff -L$with_geotiff/lib $LIBS"
31124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31125/* end confdefs.h.  */
31126
31127/* Override any GCC internal prototype to avoid an error.
31128   Use char because int might match the return type of a GCC
31129   builtin and then its argument prototype would still apply.  */
31130#ifdef __cplusplus
31131extern "C"
31132#endif
31133char GTIFAttachPROJContext ();
31134int
31135main ()
31136{
31137return GTIFAttachPROJContext ();
31138  ;
31139  return 0;
31140}
31141_ACEOF
31142if ac_fn_c_try_link "$LINENO"; then :
31143  ac_cv_lib_geotiff_GTIFAttachPROJContext=yes
31144else
31145  ac_cv_lib_geotiff_GTIFAttachPROJContext=no
31146fi
31147rm -f core conftest.err conftest.$ac_objext \
31148    conftest$ac_exeext conftest.$ac_ext
31149LIBS=$ac_check_lib_save_LIBS
31150fi
31151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_geotiff_GTIFAttachPROJContext" >&5
31152$as_echo "$ac_cv_lib_geotiff_GTIFAttachPROJContext" >&6; }
31153if test "x$ac_cv_lib_geotiff_GTIFAttachPROJContext" = xyes; then :
31154  GEOTIFF_SETTING=external
31155else
31156  GEOTIFF_SETTING=not_found
31157fi
31158
31159
31160  if test $GEOTIFF_SETTING = "external" ; then
31161    LIBS="-L$with_geotiff/lib -lgeotiff $LIBS"
31162    if test  -d $with_geotiff/include ; then
31163      EXTRA_INCLUDES="-I$with_geotiff/include $EXTRA_INCLUDES"
31164    fi
31165  else
31166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTIFAttachPROJContext in -lgeotiff" >&5
31167$as_echo_n "checking for GTIFAttachPROJContext in -lgeotiff... " >&6; }
31168if ${ac_cv_lib_geotiff_GTIFAttachPROJContext+:} false; then :
31169  $as_echo_n "(cached) " >&6
31170else
31171  ac_check_lib_save_LIBS=$LIBS
31172LIBS="-lgeotiff -L$with_geotiff $LIBS"
31173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31174/* end confdefs.h.  */
31175
31176/* Override any GCC internal prototype to avoid an error.
31177   Use char because int might match the return type of a GCC
31178   builtin and then its argument prototype would still apply.  */
31179#ifdef __cplusplus
31180extern "C"
31181#endif
31182char GTIFAttachPROJContext ();
31183int
31184main ()
31185{
31186return GTIFAttachPROJContext ();
31187  ;
31188  return 0;
31189}
31190_ACEOF
31191if ac_fn_c_try_link "$LINENO"; then :
31192  ac_cv_lib_geotiff_GTIFAttachPROJContext=yes
31193else
31194  ac_cv_lib_geotiff_GTIFAttachPROJContext=no
31195fi
31196rm -f core conftest.err conftest.$ac_objext \
31197    conftest$ac_exeext conftest.$ac_ext
31198LIBS=$ac_check_lib_save_LIBS
31199fi
31200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_geotiff_GTIFAttachPROJContext" >&5
31201$as_echo "$ac_cv_lib_geotiff_GTIFAttachPROJContext" >&6; }
31202if test "x$ac_cv_lib_geotiff_GTIFAttachPROJContext" = xyes; then :
31203  GEOTIFF_SETTING=external
31204else
31205  as_fn_error $? "We require at least GeoTIFF 1.5.0. Consider using the one supplied with GDAL" "$LINENO" 5
31206fi
31207
31208    if test $GEOTIFF_SETTING = "external" ; then
31209      LIBS="-L$with_geotiff -lgeotiff $LIBS"
31210      EXTRA_INCLUDES="-I$with_geotiff $EXTRA_INCLUDES"
31211    fi
31212  fi
31213
31214  echo "using libgeotiff from $with_geotiff."
31215fi
31216
31217GEOTIFF_SETTING=$GEOTIFF_SETTING
31218
31219GEOTIFF_INCLUDE=$GEOTIFF_INCLUDE
31220
31221
31222
31223
31224
31225# Check whether --with-charls was given.
31226if test "${with_charls+set}" = set; then :
31227  withval=$with_charls;
31228fi
31229
31230
31231HAVE_CHARLS=no
31232CHARLS_INC=
31233
31234if test "$with_charls" = "yes" -o "$with_charls" = "" ; then
31235    for ac_header in charls/version.h
31236do :
31237  ac_fn_c_check_header_mongrel "$LINENO" "charls/version.h" "ac_cv_header_charls_version_h" "$ac_includes_default"
31238if test "x$ac_cv_header_charls_version_h" = xyes; then :
31239  cat >>confdefs.h <<_ACEOF
31240#define HAVE_CHARLS_VERSION_H 1
31241_ACEOF
31242
31243fi
31244
31245done
31246
31247  if test "$ac_cv_header_charls_version_h" = "yes"; then
31248    ac_ext=cpp
31249ac_cpp='$CXXCPP $CPPFLAGS'
31250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31253
31254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JpegLsDecode in -lcharls" >&5
31255$as_echo_n "checking for JpegLsDecode in -lcharls... " >&6; }
31256if ${ac_cv_lib_charls_JpegLsDecode+:} false; then :
31257  $as_echo_n "(cached) " >&6
31258else
31259  ac_check_lib_save_LIBS=$LIBS
31260LIBS="-lcharls  $LIBS"
31261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31262/* end confdefs.h.  */
31263
31264/* Override any GCC internal prototype to avoid an error.
31265   Use char because int might match the return type of a GCC
31266   builtin and then its argument prototype would still apply.  */
31267#ifdef __cplusplus
31268extern "C"
31269#endif
31270char JpegLsDecode ();
31271int
31272main ()
31273{
31274return JpegLsDecode ();
31275  ;
31276  return 0;
31277}
31278_ACEOF
31279if ac_fn_cxx_try_link "$LINENO"; then :
31280  ac_cv_lib_charls_JpegLsDecode=yes
31281else
31282  ac_cv_lib_charls_JpegLsDecode=no
31283fi
31284rm -f core conftest.err conftest.$ac_objext \
31285    conftest$ac_exeext conftest.$ac_ext
31286LIBS=$ac_check_lib_save_LIBS
31287fi
31288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_charls_JpegLsDecode" >&5
31289$as_echo "$ac_cv_lib_charls_JpegLsDecode" >&6; }
31290if test "x$ac_cv_lib_charls_JpegLsDecode" = xyes; then :
31291  HAVE_CHARLS=yes
31292fi
31293
31294    ac_ext=c
31295ac_cpp='$CPP $CPPFLAGS'
31296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31298ac_compiler_gnu=$ac_cv_c_compiler_gnu
31299
31300    if test "$HAVE_CHARLS" = "yes"; then
31301        LIBS="-lcharls $LIBS"
31302        CHARLS_INC="-DCHARLS_2_1"
31303    else
31304        ac_ext=cpp
31305ac_cpp='$CXXCPP $CPPFLAGS'
31306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31309
31310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JpegLsDecode in -lCharLS" >&5
31311$as_echo_n "checking for JpegLsDecode in -lCharLS... " >&6; }
31312if ${ac_cv_lib_CharLS_JpegLsDecode+:} false; then :
31313  $as_echo_n "(cached) " >&6
31314else
31315  ac_check_lib_save_LIBS=$LIBS
31316LIBS="-lCharLS  $LIBS"
31317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31318/* end confdefs.h.  */
31319
31320/* Override any GCC internal prototype to avoid an error.
31321   Use char because int might match the return type of a GCC
31322   builtin and then its argument prototype would still apply.  */
31323#ifdef __cplusplus
31324extern "C"
31325#endif
31326char JpegLsDecode ();
31327int
31328main ()
31329{
31330return JpegLsDecode ();
31331  ;
31332  return 0;
31333}
31334_ACEOF
31335if ac_fn_cxx_try_link "$LINENO"; then :
31336  ac_cv_lib_CharLS_JpegLsDecode=yes
31337else
31338  ac_cv_lib_CharLS_JpegLsDecode=no
31339fi
31340rm -f core conftest.err conftest.$ac_objext \
31341    conftest$ac_exeext conftest.$ac_ext
31342LIBS=$ac_check_lib_save_LIBS
31343fi
31344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_CharLS_JpegLsDecode" >&5
31345$as_echo "$ac_cv_lib_CharLS_JpegLsDecode" >&6; }
31346if test "x$ac_cv_lib_CharLS_JpegLsDecode" = xyes; then :
31347  HAVE_CHARLS=yes
31348fi
31349
31350        ac_ext=c
31351ac_cpp='$CPP $CPPFLAGS'
31352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31354ac_compiler_gnu=$ac_cv_c_compiler_gnu
31355
31356        if test "$HAVE_CHARLS" = "yes"; then
31357            LIBS="-lCharLS $LIBS"
31358            CHARLS_INC="-DCHARLS_2_1"
31359        fi
31360    fi
31361  else
31362        for ac_header in CharLS/interface.h
31363do :
31364  ac_fn_c_check_header_mongrel "$LINENO" "CharLS/interface.h" "ac_cv_header_CharLS_interface_h" "$ac_includes_default"
31365if test "x$ac_cv_header_CharLS_interface_h" = xyes; then :
31366  cat >>confdefs.h <<_ACEOF
31367#define HAVE_CHARLS_INTERFACE_H 1
31368_ACEOF
31369
31370fi
31371
31372done
31373
31374    if test "$ac_cv_header_CharLS_interface_h" = "yes"; then
31375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JpegLsDecode in -lCharLS" >&5
31376$as_echo_n "checking for JpegLsDecode in -lCharLS... " >&6; }
31377if ${ac_cv_lib_CharLS_JpegLsDecode+:} false; then :
31378  $as_echo_n "(cached) " >&6
31379else
31380  ac_check_lib_save_LIBS=$LIBS
31381LIBS="-lCharLS  $LIBS"
31382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31383/* end confdefs.h.  */
31384
31385/* Override any GCC internal prototype to avoid an error.
31386   Use char because int might match the return type of a GCC
31387   builtin and then its argument prototype would still apply.  */
31388#ifdef __cplusplus
31389extern "C"
31390#endif
31391char JpegLsDecode ();
31392int
31393main ()
31394{
31395return JpegLsDecode ();
31396  ;
31397  return 0;
31398}
31399_ACEOF
31400if ac_fn_c_try_link "$LINENO"; then :
31401  ac_cv_lib_CharLS_JpegLsDecode=yes
31402else
31403  ac_cv_lib_CharLS_JpegLsDecode=no
31404fi
31405rm -f core conftest.err conftest.$ac_objext \
31406    conftest$ac_exeext conftest.$ac_ext
31407LIBS=$ac_check_lib_save_LIBS
31408fi
31409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_CharLS_JpegLsDecode" >&5
31410$as_echo "$ac_cv_lib_CharLS_JpegLsDecode" >&6; }
31411if test "x$ac_cv_lib_CharLS_JpegLsDecode" = xyes; then :
31412  HAVE_CHARLS=yes
31413fi
31414
31415      if test "$HAVE_CHARLS" = "yes"; then
31416          LIBS="-lCharLS $LIBS"
31417          CHARLS_INC="-DCHARLS_INTERFACE_H"
31418      fi
31419    else
31420            for ac_header in CharLS/charls.h
31421do :
31422  ac_fn_c_check_header_mongrel "$LINENO" "CharLS/charls.h" "ac_cv_header_CharLS_charls_h" "$ac_includes_default"
31423if test "x$ac_cv_header_CharLS_charls_h" = xyes; then :
31424  cat >>confdefs.h <<_ACEOF
31425#define HAVE_CHARLS_CHARLS_H 1
31426_ACEOF
31427
31428fi
31429
31430done
31431
31432      if test "$ac_cv_header_CharLS_charls_h" = "yes"; then
31433        ac_ext=cpp
31434ac_cpp='$CXXCPP $CPPFLAGS'
31435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31438
31439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JpegLsDecode in -lCharLS" >&5
31440$as_echo_n "checking for JpegLsDecode in -lCharLS... " >&6; }
31441if ${ac_cv_lib_CharLS_JpegLsDecode+:} false; then :
31442  $as_echo_n "(cached) " >&6
31443else
31444  ac_check_lib_save_LIBS=$LIBS
31445LIBS="-lCharLS  $LIBS"
31446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31447/* end confdefs.h.  */
31448
31449/* Override any GCC internal prototype to avoid an error.
31450   Use char because int might match the return type of a GCC
31451   builtin and then its argument prototype would still apply.  */
31452#ifdef __cplusplus
31453extern "C"
31454#endif
31455char JpegLsDecode ();
31456int
31457main ()
31458{
31459return JpegLsDecode ();
31460  ;
31461  return 0;
31462}
31463_ACEOF
31464if ac_fn_cxx_try_link "$LINENO"; then :
31465  ac_cv_lib_CharLS_JpegLsDecode=yes
31466else
31467  ac_cv_lib_CharLS_JpegLsDecode=no
31468fi
31469rm -f core conftest.err conftest.$ac_objext \
31470    conftest$ac_exeext conftest.$ac_ext
31471LIBS=$ac_check_lib_save_LIBS
31472fi
31473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_CharLS_JpegLsDecode" >&5
31474$as_echo "$ac_cv_lib_CharLS_JpegLsDecode" >&6; }
31475if test "x$ac_cv_lib_CharLS_JpegLsDecode" = xyes; then :
31476  HAVE_CHARLS=yes
31477fi
31478
31479        ac_ext=c
31480ac_cpp='$CPP $CPPFLAGS'
31481ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31482ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31483ac_compiler_gnu=$ac_cv_c_compiler_gnu
31484
31485        if test "$HAVE_CHARLS" = "yes"; then
31486            LIBS="-lCharLS $LIBS"
31487            CHARLS_INC="-DCHARLS_2"
31488        fi
31489      fi
31490    fi
31491  fi
31492fi
31493
31494HAVE_CHARLS=$HAVE_CHARLS
31495
31496CHARLS_INC=$CHARLS_INC
31497
31498
31499
31500
31501# Check whether --with-jpeg12 was given.
31502if test "${with_jpeg12+set}" = set; then :
31503  withval=$with_jpeg12;
31504fi
31505
31506
31507TIFF_JPEG12_ENABLED=no
31508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg12" >&5
31509$as_echo_n "checking for jpeg12... " >&6; }
31510if test "$with_jpeg12" =  no ; then
31511    JPEG12_ENABLED=no
31512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled by user" >&5
31513$as_echo "disabled by user" >&6; }
31514
31515elif test "$JPEG_SETTING" = "internal" -a "$TIFF_SETTING" = "internal" ; then
31516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
31517$as_echo "enabled" >&6; }
31518    JPEG12_ENABLED=yes
31519    TIFF_JPEG12_ENABLED=yes
31520
31521elif test "$with_jpeg12" = yes ; then
31522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
31523$as_echo "enabled" >&6; }
31524    JPEG12_ENABLED=yes
31525
31526    echo '#include <stdlib.h>' > check_jpeg_abi.c
31527    echo '#include <stdio.h>' >> check_jpeg_abi.c
31528    echo '#include "jpeglib.h"' >> check_jpeg_abi.c
31529    echo '#if JPEG_LIB_VERSION == 62' >> check_jpeg_abi.c
31530    echo 'int main() { return 0; }' >> check_jpeg_abi.c
31531    echo '#else' >> check_jpeg_abi.c
31532    echo '#error "ABI difference"' >> check_jpeg_abi.c
31533    echo '#endif' >> check_jpeg_abi.c
31534    if test -z "`${CC} ${CFLAGS} ${EXTRA_INCLUDES} check_jpeg_abi.c -c -o check_jpeg_abi.o 2>&1`" ; then
31535      TIFF_JPEG12_ENABLED=yes
31536    else
31537      TIFF_JPEG12_ENABLED=no
31538      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Internal libjpeg12 has not the same ABI as libjpeg 8 bit. Disabling JPEG-in-TIFF 12 bit" >&5
31539$as_echo "$as_me: WARNING: Internal libjpeg12 has not the same ABI as libjpeg 8 bit. Disabling JPEG-in-TIFF 12 bit" >&2;}
31540    fi
31541    rm -f check_jpeg_abi.*
31542
31543else
31544    JPEG12_ENABLED=no
31545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled, libjpeg or libtiff not internal" >&5
31546$as_echo "disabled, libjpeg or libtiff not internal" >&6; }
31547fi
31548
31549JPEG12_ENABLED=$JPEG12_ENABLED
31550
31551TIFF_JPEG12_ENABLED=$TIFF_JPEG12_ENABLED
31552
31553
31554
31555
31556# Check whether --with-gif was given.
31557if test "${with_gif+set}" = set; then :
31558  withval=$with_gif;
31559fi
31560
31561
31562if test "$with_gif" = "no" ; then
31563
31564  GIF_SETTING=no
31565
31566  echo "gif support disabled."
31567
31568elif test "$with_gif" = "yes" -o "$with_gif" = "" ; then
31569
31570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifOpenFileName in -lgif" >&5
31571$as_echo_n "checking for DGifOpenFileName in -lgif... " >&6; }
31572if ${ac_cv_lib_gif_DGifOpenFileName+:} false; then :
31573  $as_echo_n "(cached) " >&6
31574else
31575  ac_check_lib_save_LIBS=$LIBS
31576LIBS="-lgif  $LIBS"
31577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31578/* end confdefs.h.  */
31579
31580/* Override any GCC internal prototype to avoid an error.
31581   Use char because int might match the return type of a GCC
31582   builtin and then its argument prototype would still apply.  */
31583#ifdef __cplusplus
31584extern "C"
31585#endif
31586char DGifOpenFileName ();
31587int
31588main ()
31589{
31590return DGifOpenFileName ();
31591  ;
31592  return 0;
31593}
31594_ACEOF
31595if ac_fn_c_try_link "$LINENO"; then :
31596  ac_cv_lib_gif_DGifOpenFileName=yes
31597else
31598  ac_cv_lib_gif_DGifOpenFileName=no
31599fi
31600rm -f core conftest.err conftest.$ac_objext \
31601    conftest$ac_exeext conftest.$ac_ext
31602LIBS=$ac_check_lib_save_LIBS
31603fi
31604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifOpenFileName" >&5
31605$as_echo "$ac_cv_lib_gif_DGifOpenFileName" >&6; }
31606if test "x$ac_cv_lib_gif_DGifOpenFileName" = xyes; then :
31607  GIF_SETTING=external
31608else
31609  GIF_SETTING=internal
31610fi
31611
31612  for ac_header in gif_lib.h
31613do :
31614  ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31615if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31616  cat >>confdefs.h <<_ACEOF
31617#define HAVE_GIF_LIB_H 1
31618_ACEOF
31619
31620fi
31621
31622done
31623
31624
31625  if test "$GIF_SETTING" = "external" ; then
31626    LIBS="-lgif $LIBS"
31627    echo "using pre-installed libgif."
31628  else
31629    echo "using internal gif code."
31630  fi
31631
31632elif test "$with_gif" = "internal" ; then
31633
31634  GIF_SETTING=internal
31635
31636  echo "using internal gif code."
31637
31638else
31639
31640  GIF_SETTING=external
31641  LIBS="-L$with_gif -L$with_gif/lib -lgif $LIBS"
31642  EXTRA_INCLUDES="-I$with_gif -I$with_gif/include $EXTRA_INCLUDES"
31643
31644  echo "using libgif from $with_gif."
31645
31646fi
31647
31648GIF_SETTING=$GIF_SETTING
31649
31650
31651if test "$GIF_SETTING" != "no" ; then
31652  OPT_GDAL_FORMATS="gif $OPT_GDAL_FORMATS"
31653fi
31654
31655
31656OGDI_INCLUDE=
31657export OGDI_INCLUDE
31658
31659
31660# Check whether --with-ogdi was given.
31661if test "${with_ogdi+set}" = set; then :
31662  withval=$with_ogdi;
31663fi
31664
31665
31666if test "$with_ogdi" = "no" ; then
31667
31668  HAVE_OGDI=no
31669
31670  echo "ogdi support disabled."
31671
31672elif test "$with_ogdi" = "yes" -o "$with_ogdi" = "" ; then
31673
31674
31675pkg_failed=no
31676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OGDI" >&5
31677$as_echo_n "checking for OGDI... " >&6; }
31678
31679if test -n "$PKG_CONFIG"; then
31680    if test -n "$OGDI_CFLAGS"; then
31681        pkg_cv_OGDI_CFLAGS="$OGDI_CFLAGS"
31682    else
31683        if test -n "$PKG_CONFIG" && \
31684    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ogdi\""; } >&5
31685  ($PKG_CONFIG --exists --print-errors "ogdi") 2>&5
31686  ac_status=$?
31687  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31688  test $ac_status = 0; }; then
31689  pkg_cv_OGDI_CFLAGS=`$PKG_CONFIG --cflags "ogdi" 2>/dev/null`
31690else
31691  pkg_failed=yes
31692fi
31693    fi
31694else
31695	pkg_failed=untried
31696fi
31697if test -n "$PKG_CONFIG"; then
31698    if test -n "$OGDI_LIBS"; then
31699        pkg_cv_OGDI_LIBS="$OGDI_LIBS"
31700    else
31701        if test -n "$PKG_CONFIG" && \
31702    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ogdi\""; } >&5
31703  ($PKG_CONFIG --exists --print-errors "ogdi") 2>&5
31704  ac_status=$?
31705  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31706  test $ac_status = 0; }; then
31707  pkg_cv_OGDI_LIBS=`$PKG_CONFIG --libs "ogdi" 2>/dev/null`
31708else
31709  pkg_failed=yes
31710fi
31711    fi
31712else
31713	pkg_failed=untried
31714fi
31715
31716
31717
31718if test $pkg_failed = yes; then
31719
31720if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31721        _pkg_short_errors_supported=yes
31722else
31723        _pkg_short_errors_supported=no
31724fi
31725        if test $_pkg_short_errors_supported = yes; then
31726	        OGDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ogdi"`
31727        else
31728	        OGDI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ogdi"`
31729        fi
31730	# Put the nasty error message in config.log where it belongs
31731	echo "$OGDI_PKG_ERRORS" >&5
31732
31733	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31734$as_echo "no" >&6; }
31735                :
31736elif test $pkg_failed = untried; then
31737	:
31738else
31739	OGDI_CFLAGS=$pkg_cv_OGDI_CFLAGS
31740	OGDI_LIBS=$pkg_cv_OGDI_LIBS
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31742$as_echo "yes" >&6; }
31743	HAVE_OGDI=yes
31744fi
31745  if test "$HAVE_OGDI" = yes; then
31746    OGDI_INCLUDE=$OGDI_CFLAGS
31747    LIBS="$OGDI_LIBS $LIBS"
31748  else
31749    for ac_header in ecs.h
31750do :
31751  ac_fn_c_check_header_mongrel "$LINENO" "ecs.h" "ac_cv_header_ecs_h" "$ac_includes_default"
31752if test "x$ac_cv_header_ecs_h" = xyes; then :
31753  cat >>confdefs.h <<_ACEOF
31754#define HAVE_ECS_H 1
31755_ACEOF
31756
31757fi
31758
31759done
31760
31761    if test "$ac_cv_header_ecs_h" = "no" ; then
31762      if test -f "/usr/include/ogdi/ecs.h"; then
31763          OGDI_INCLUDE="-I/usr/include/ogdi"
31764      elif test -f "/usr/local/include/ogdi/ecs.h"; then
31765          OGDI_INCLUDE="-I/usr/local/include/ogdi"
31766      elif test -f "/usr/include/ecs.h"; then
31767          OGDI_INCLUDE="-I/usr/include"
31768      elif test -f "/usr/local/include/ecs.h"; then
31769          OGDI_INCLUDE="-I/usr/local/include"
31770      fi
31771    fi
31772
31773    if test "$OGDI_INCLUDE" != "" -o "$ac_cv_header_ecs_h" = "yes"; then
31774      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cln_GetLayerCapabilities in -logdi" >&5
31775$as_echo_n "checking for cln_GetLayerCapabilities in -logdi... " >&6; }
31776if ${ac_cv_lib_ogdi_cln_GetLayerCapabilities+:} false; then :
31777  $as_echo_n "(cached) " >&6
31778else
31779  ac_check_lib_save_LIBS=$LIBS
31780LIBS="-logdi  $LIBS"
31781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31782/* end confdefs.h.  */
31783
31784/* Override any GCC internal prototype to avoid an error.
31785   Use char because int might match the return type of a GCC
31786   builtin and then its argument prototype would still apply.  */
31787#ifdef __cplusplus
31788extern "C"
31789#endif
31790char cln_GetLayerCapabilities ();
31791int
31792main ()
31793{
31794return cln_GetLayerCapabilities ();
31795  ;
31796  return 0;
31797}
31798_ACEOF
31799if ac_fn_c_try_link "$LINENO"; then :
31800  ac_cv_lib_ogdi_cln_GetLayerCapabilities=yes
31801else
31802  ac_cv_lib_ogdi_cln_GetLayerCapabilities=no
31803fi
31804rm -f core conftest.err conftest.$ac_objext \
31805    conftest$ac_exeext conftest.$ac_ext
31806LIBS=$ac_check_lib_save_LIBS
31807fi
31808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogdi_cln_GetLayerCapabilities" >&5
31809$as_echo "$ac_cv_lib_ogdi_cln_GetLayerCapabilities" >&6; }
31810if test "x$ac_cv_lib_ogdi_cln_GetLayerCapabilities" = xyes; then :
31811  HAVE_OGDI=yes
31812else
31813  HAVE_OGDI=no
31814fi
31815
31816      if test "$HAVE_OGDI" = "yes" ; then
31817        LIBS="-logdi $LIBS"
31818      else
31819                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cln_GetLayerCapabilities in -logdi31" >&5
31820$as_echo_n "checking for cln_GetLayerCapabilities in -logdi31... " >&6; }
31821if ${ac_cv_lib_ogdi31_cln_GetLayerCapabilities+:} false; then :
31822  $as_echo_n "(cached) " >&6
31823else
31824  ac_check_lib_save_LIBS=$LIBS
31825LIBS="-logdi31  $LIBS"
31826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31827/* end confdefs.h.  */
31828
31829/* Override any GCC internal prototype to avoid an error.
31830   Use char because int might match the return type of a GCC
31831   builtin and then its argument prototype would still apply.  */
31832#ifdef __cplusplus
31833extern "C"
31834#endif
31835char cln_GetLayerCapabilities ();
31836int
31837main ()
31838{
31839return cln_GetLayerCapabilities ();
31840  ;
31841  return 0;
31842}
31843_ACEOF
31844if ac_fn_c_try_link "$LINENO"; then :
31845  ac_cv_lib_ogdi31_cln_GetLayerCapabilities=yes
31846else
31847  ac_cv_lib_ogdi31_cln_GetLayerCapabilities=no
31848fi
31849rm -f core conftest.err conftest.$ac_objext \
31850    conftest$ac_exeext conftest.$ac_ext
31851LIBS=$ac_check_lib_save_LIBS
31852fi
31853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogdi31_cln_GetLayerCapabilities" >&5
31854$as_echo "$ac_cv_lib_ogdi31_cln_GetLayerCapabilities" >&6; }
31855if test "x$ac_cv_lib_ogdi31_cln_GetLayerCapabilities" = xyes; then :
31856  HAVE_OGDI=yes
31857else
31858  HAVE_OGDI=no
31859fi
31860
31861        if test "$HAVE_OGDI" = "yes" ; then
31862          LIBS="-logdi31 $LIBS"
31863        fi
31864      fi
31865    else
31866      HAVE_OGDI=no
31867    fi
31868  fi
31869
31870else
31871
31872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cln_GetLayerCapabilities in -logdi" >&5
31873$as_echo_n "checking for cln_GetLayerCapabilities in -logdi... " >&6; }
31874if ${ac_cv_lib_ogdi_cln_GetLayerCapabilities+:} false; then :
31875  $as_echo_n "(cached) " >&6
31876else
31877  ac_check_lib_save_LIBS=$LIBS
31878LIBS="-logdi -L$with_ogdi -L$with_ogdi/lib -logdi $LIBS"
31879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31880/* end confdefs.h.  */
31881
31882/* Override any GCC internal prototype to avoid an error.
31883   Use char because int might match the return type of a GCC
31884   builtin and then its argument prototype would still apply.  */
31885#ifdef __cplusplus
31886extern "C"
31887#endif
31888char cln_GetLayerCapabilities ();
31889int
31890main ()
31891{
31892return cln_GetLayerCapabilities ();
31893  ;
31894  return 0;
31895}
31896_ACEOF
31897if ac_fn_c_try_link "$LINENO"; then :
31898  ac_cv_lib_ogdi_cln_GetLayerCapabilities=yes
31899else
31900  ac_cv_lib_ogdi_cln_GetLayerCapabilities=no
31901fi
31902rm -f core conftest.err conftest.$ac_objext \
31903    conftest$ac_exeext conftest.$ac_ext
31904LIBS=$ac_check_lib_save_LIBS
31905fi
31906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogdi_cln_GetLayerCapabilities" >&5
31907$as_echo "$ac_cv_lib_ogdi_cln_GetLayerCapabilities" >&6; }
31908if test "x$ac_cv_lib_ogdi_cln_GetLayerCapabilities" = xyes; then :
31909  HAVE_OGDI=yes
31910else
31911  HAVE_OGDI=no
31912fi
31913
31914  if test "$HAVE_OGDI" = "yes" ; then
31915    if test -f "$with_ogdi/ecs.h" -o -f "$with_ogdi/include/ecs.h"; then
31916        LIBS="-L$with_ogdi -L$with_ogdi/lib -logdi $LIBS"
31917        OGDI_INCLUDE="-I$with_ogdi -I$with_ogdi/include"
31918
31919        echo "using libogdi from $with_ogdi."
31920     else
31921        HAVE_OGDI=no
31922        as_fn_error $? "ecs.h not found." "$LINENO" 5
31923     fi
31924  else
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cln_GetLayerCapabilities in -logdi31" >&5
31926$as_echo_n "checking for cln_GetLayerCapabilities in -logdi31... " >&6; }
31927if ${ac_cv_lib_ogdi31_cln_GetLayerCapabilities+:} false; then :
31928  $as_echo_n "(cached) " >&6
31929else
31930  ac_check_lib_save_LIBS=$LIBS
31931LIBS="-logdi31 -L$with_ogdi -L$with_ogdi/lib -logdi31 $LIBS"
31932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31933/* end confdefs.h.  */
31934
31935/* Override any GCC internal prototype to avoid an error.
31936   Use char because int might match the return type of a GCC
31937   builtin and then its argument prototype would still apply.  */
31938#ifdef __cplusplus
31939extern "C"
31940#endif
31941char cln_GetLayerCapabilities ();
31942int
31943main ()
31944{
31945return cln_GetLayerCapabilities ();
31946  ;
31947  return 0;
31948}
31949_ACEOF
31950if ac_fn_c_try_link "$LINENO"; then :
31951  ac_cv_lib_ogdi31_cln_GetLayerCapabilities=yes
31952else
31953  ac_cv_lib_ogdi31_cln_GetLayerCapabilities=no
31954fi
31955rm -f core conftest.err conftest.$ac_objext \
31956    conftest$ac_exeext conftest.$ac_ext
31957LIBS=$ac_check_lib_save_LIBS
31958fi
31959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogdi31_cln_GetLayerCapabilities" >&5
31960$as_echo "$ac_cv_lib_ogdi31_cln_GetLayerCapabilities" >&6; }
31961if test "x$ac_cv_lib_ogdi31_cln_GetLayerCapabilities" = xyes; then :
31962  HAVE_OGDI=yes
31963else
31964  HAVE_OGDI=no
31965fi
31966
31967    if test "$HAVE_OGDI" = "yes" ; then
31968      if test -f "$with_ogdi/ecs.h" -o -f "$with_ogdi/include/ecs.h"; then
31969        LIBS="-L$with_ogdi -L$with_ogdi/lib -logdi31 $LIBS"
31970        OGDI_INCLUDE="-I$with_ogdi -I$with_ogdi/include"
31971
31972        echo "using libogdi31 from $with_ogdi."
31973      else
31974        HAVE_OGDI=no
31975        as_fn_error $? "ecs.h not found." "$LINENO" 5
31976      fi
31977    else
31978      as_fn_error $? "libogdi not found." "$LINENO" 5
31979    fi
31980  fi
31981
31982fi
31983
31984HAVE_OGDI=$HAVE_OGDI
31985
31986OGDI_INCLUDE=$OGDI_INCLUDE
31987
31988
31989
31990X_FME_HOME=
31991export X_FME_HOME
31992
31993
31994# Check whether --with-fme was given.
31995if test "${with_fme+set}" = set; then :
31996  withval=$with_fme;
31997fi
31998
31999
32000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMEObjects" >&5
32001$as_echo_n "checking for FMEObjects... " >&6; }
32002
32003if test "$with_fme" = "no" ; then
32004
32005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled by user" >&5
32006$as_echo "disabled by user" >&6; }
32007
32008elif test "$with_fme" = "yes" ; then
32009
32010  if test "$FME_HOME" = "" ; then
32011    as_fn_error $? "no, FME_HOME not defined!" "$LINENO" 5
32012  elif test -f $FME_HOME/fmeobjects/cpp/isession.h ; then
32013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32014$as_echo "yes" >&6; }
32015    X_FME_HOME=$FME_HOME
32016  else
32017    as_fn_error $? "FME_HOME defined, but $FME_HOME/fmeobjects/cpp/issesion.h not found." "$LINENO" 5
32018  fi
32019
32020elif test "$with_fme" = "" ; then
32021
32022  if test "$FME_HOME" = "" ; then
32023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32024$as_echo "no" >&6; }
32025  elif test -f $FME_HOME/fmeobjects/cpp/isession.h ; then
32026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32027$as_echo "yes" >&6; }
32028    X_FME_HOME=$FME_HOME
32029  else
32030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, FME_HOME defined, but $FME_HOME/fmeobjects/cpp/issesion.h not found." >&5
32031$as_echo "no, FME_HOME defined, but $FME_HOME/fmeobjects/cpp/issesion.h not found." >&6; }
32032  fi
32033
32034else
32035
32036  if test -f $with_fme/fmeobjects/cpp/isession.h ; then
32037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32038$as_echo "yes" >&6; }
32039    X_FME_HOME=$with_fme
32040  else
32041    as_fn_error $? "$with_fme/fmeobjects/cpp/issesion.h not found!" "$LINENO" 5
32042  fi
32043
32044fi
32045
32046X_FME_HOME=$X_FME_HOME
32047
32048
32049
32050
32051# Check whether --with-sosi was given.
32052if test "${with_sosi+set}" = set; then :
32053  withval=$with_sosi;
32054fi
32055
32056
32057if test -z "$with_sosi" -o "$with_sosi" = "no" ; then
32058
32059  SOSI_ENABLED=no
32060
32061  echo "SOSI support disabled."
32062
32063elif test "$with_sosi" = "yes" ; then
32064
32065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfyba" >&5
32066$as_echo_n "checking for libfyba... " >&6; }
32067
32068    rm -f testfyba.*
32069    rm -f testfyba
32070    echo "#include <fyba.h>" > testfyba.cpp
32071    echo "int main() { LC_Init(); return 0; }" >> testfyba.cpp
32072    if test  -r /usr/include/fyba -a -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -I/usr/include/fyba -DLINUX testfyba.cpp -lfyba -lfygm -lfyut -o testfyba 2>&1`" ; then
32073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
32074$as_echo "found" >&6; }
32075        SOSI_ENABLED=yes
32076        SOSI_LIB="-lfyba -lfygm -lfyut"
32077        SOSI_INC="-I/usr/include/fyba"
32078    else
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32080$as_echo "not found" >&6; }
32081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfyba.a, libfygm.a and libfyut.a in /usr/local/lib" >&5
32082$as_echo_n "checking for libfyba.a, libfygm.a and libfyut.a in /usr/local/lib... " >&6; }
32083        if test -r /usr/local/lib/libfyba.a -a -r /usr/local/lib/libfygm.a -a -r /usr/local/lib/libfyut.a ; then
32084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
32085$as_echo "found" >&6; }
32086            SOSI_ENABLED=yes
32087            SOSI_LIB="/usr/local/lib/libfyba.a /usr/local/lib/libfygm.a /usr/local/lib/libfyut.a"
32088        else
32089            as_fn_error $? "not found." "$LINENO" 5
32090        fi
32091
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fyba.h, fygm.h and fyut.h in /usr/local/include/fyba" >&5
32093$as_echo_n "checking for fyba.h, fygm.h and fyut.h in /usr/local/include/fyba... " >&6; }
32094        if test -r /usr/local/include/fyba/fyba.h -a -r /usr/local/include/fyba/fygm.h -a -r /usr/local/include/fyba/fyut.h ; then
32095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
32096$as_echo "found" >&6; }
32097            SOSI_ENABLED=yes
32098            SOSI_INC="-I/usr/local/include/fyba"
32099        else
32100            as_fn_error $? "not found." "$LINENO" 5
32101        fi
32102    fi
32103
32104    rm -f testfyba.*
32105    rm -f testfyba
32106else
32107
32108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfyba.a, libfygm.a and libfyut.a in $with_sosi/lib" >&5
32109$as_echo_n "checking for libfyba.a, libfygm.a and libfyut.a in $with_sosi/lib... " >&6; }
32110  if test -r $with_sosi/lib/libfyba.a -a -r $with_sosi/lib/libfygm.a -a -r $with_sosi/lib/libfyut.a ; then
32111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
32112$as_echo "found." >&6; }
32113    SOSI_LIB="$with_sosi/lib/libfyba.a $with_sosi/lib/libfygm.a $with_sosi/lib/libfyut.a"
32114    SOSI_ENABLED=yes
32115  else
32116    as_fn_error $? "not found." "$LINENO" 5
32117  fi
32118
32119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fyba.h in $with_sosi/include/fyba" >&5
32120$as_echo_n "checking for fyba.h in $with_sosi/include/fyba... " >&6; }
32121  if test -r $with_sosi/include/fyba/fyba.h -a -r $with_sosi/include/fyba/fygm.h -a -r $with_sosi/include/fyba/fyut.h ; then
32122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
32123$as_echo "found." >&6; }
32124    SOSI_INC="-I$with_sosi/include/fyba"
32125    SOSI_ENABLED=yes
32126  else
32127    as_fn_error $? "not found." "$LINENO" 5
32128  fi
32129
32130fi
32131
32132SOSI_ENABLED=$SOSI_ENABLED
32133
32134SOSI_LIB=$SOSI_LIB
32135
32136SOSI_INC=$SOSI_INC
32137
32138
32139
32140
32141# Check whether --with-mongocxx was given.
32142if test "${with_mongocxx+set}" = set; then :
32143  withval=$with_mongocxx;
32144fi
32145
32146
32147MONGODB_ENABLED=no
32148
32149if test "$with_mongocxx" = "no" ; then
32150
32151  echo "MONGODB support disabled."
32152
32153elif test "$with_mongocxx" = "yes" -o "$with_mongocxx" = "" ; then
32154
32155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MongoCXX" >&5
32156$as_echo_n "checking for MongoCXX... " >&6; }
32157
32158    rm -f testmongocxx.*
32159    rm -f testmongocxx
32160    echo "#include <mongo/client/dbclient.h>" > testmongocxx.cpp
32161    echo "using namespace mongo;" >> testmongocxx.cpp
32162    echo "int main() { client::initialize(client::Options()); return 0; }" >> testmongocxx.cpp
32163    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testmongocxx.cpp -lmongoclient -lboost_system -lboost_thread -lboost_regex -o testmongocxx 2>&1`" ; then
32164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: MongoCXX found" >&5
32165$as_echo "MongoCXX found" >&6; }
32166        MONGODB_ENABLED="yes"
32167        MONGODB_LIB=" -lmongoclient -lboost_system -lboost_thread -lboost_regex"
32168    else
32169        if test "$with_mongocxx" = "yes"; then
32170            as_fn_error $? "MongoCXX not found." "$LINENO" 5
32171        else
32172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: MongoCXX not found." >&5
32173$as_echo "MongoCXX not found." >&6; }
32174        fi
32175    fi
32176    rm -f testmongocxx.*
32177    rm -f testmongocxx
32178
32179else
32180
32181
32182# Check whether --with-boost-lib-path was given.
32183if test "${with_boost_lib_path+set}" = set; then :
32184  withval=$with_boost_lib_path;
32185fi
32186
32187
32188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmongoclient.so in in $with_mongocxx/lib" >&5
32189$as_echo_n "checking for libmongoclient.so in in $with_mongocxx/lib... " >&6; }
32190  MONGODB_ENABLED=yes
32191  if test -r $with_mongocxx/lib/libmongoclient.so; then
32192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
32193$as_echo "found." >&6; }
32194    MONGODB_LIB="-L$with_mongocxx/lib -lmongoclient"
32195  elif test -r $with_mongocxx/lib/libmongoclient.dylib; then
32196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
32197$as_echo "found." >&6; }
32198    MONGODB_LIB="-L$with_mongocxx/lib -lmongoclient"
32199  else
32200    as_fn_error $? "not found." "$LINENO" 5
32201  fi
32202
32203  if test "$with_boost_lib_path" = "" ; then
32204    MONGODB_LIB="$MONGODB_LIB -lboost_system -lboost_thread -lboost_regex"
32205  else
32206    MONGODB_LIB="$MONGODB_LIB -L$with_boost_lib_path -lboost_system -lboost_thread -lboost_regex"
32207  fi
32208
32209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mongo/client/dbclient.h in $with_mongocxx/include" >&5
32210$as_echo_n "checking for mongo/client/dbclient.h in $with_mongocxx/include... " >&6; }
32211  if test -r $with_mongocxx/include/mongo/client/dbclient.h ; then
32212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
32213$as_echo "found." >&6; }
32214    MONGODB_INC="-I$with_mongocxx/include"
32215  else
32216    as_fn_error $? "not found." "$LINENO" 5
32217  fi
32218
32219fi
32220
32221MONGODB_ENABLED=$MONGODB_ENABLED
32222
32223MONGODB_LIB=$MONGODB_LIB
32224
32225MONGODB_INC=$MONGODB_INC
32226
32227
32228
32229
32230
32231# Check whether --with-mongocxxv3 was given.
32232if test "${with_mongocxxv3+set}" = set; then :
32233  withval=$with_mongocxxv3;
32234fi
32235
32236
32237MONGOCXXV3_ENABLED=no
32238
32239if test "$with_mongocxxv3" = "no" ; then
32240
32241  echo "MONGODBv3 support disabled."
32242
32243elif test "$with_mongocxxv3" = "yes" -o "$with_mongocxxv3" = "" ; then
32244
32245
32246
32247if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
32248	if test -n "$ac_tool_prefix"; then
32249  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
32250set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
32251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32252$as_echo_n "checking for $ac_word... " >&6; }
32253if ${ac_cv_path_PKG_CONFIG+:} false; then :
32254  $as_echo_n "(cached) " >&6
32255else
32256  case $PKG_CONFIG in
32257  [\\/]* | ?:[\\/]*)
32258  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
32259  ;;
32260  *)
32261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32262for as_dir in $PATH
32263do
32264  IFS=$as_save_IFS
32265  test -z "$as_dir" && as_dir=.
32266    for ac_exec_ext in '' $ac_executable_extensions; do
32267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32268    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
32269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32270    break 2
32271  fi
32272done
32273  done
32274IFS=$as_save_IFS
32275
32276  ;;
32277esac
32278fi
32279PKG_CONFIG=$ac_cv_path_PKG_CONFIG
32280if test -n "$PKG_CONFIG"; then
32281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
32282$as_echo "$PKG_CONFIG" >&6; }
32283else
32284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32285$as_echo "no" >&6; }
32286fi
32287
32288
32289fi
32290if test -z "$ac_cv_path_PKG_CONFIG"; then
32291  ac_pt_PKG_CONFIG=$PKG_CONFIG
32292  # Extract the first word of "pkg-config", so it can be a program name with args.
32293set dummy pkg-config; ac_word=$2
32294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32295$as_echo_n "checking for $ac_word... " >&6; }
32296if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
32297  $as_echo_n "(cached) " >&6
32298else
32299  case $ac_pt_PKG_CONFIG in
32300  [\\/]* | ?:[\\/]*)
32301  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
32302  ;;
32303  *)
32304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32305for as_dir in $PATH
32306do
32307  IFS=$as_save_IFS
32308  test -z "$as_dir" && as_dir=.
32309    for ac_exec_ext in '' $ac_executable_extensions; do
32310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32311    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
32312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32313    break 2
32314  fi
32315done
32316  done
32317IFS=$as_save_IFS
32318
32319  ;;
32320esac
32321fi
32322ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
32323if test -n "$ac_pt_PKG_CONFIG"; then
32324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
32325$as_echo "$ac_pt_PKG_CONFIG" >&6; }
32326else
32327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32328$as_echo "no" >&6; }
32329fi
32330
32331  if test "x$ac_pt_PKG_CONFIG" = x; then
32332    PKG_CONFIG=""
32333  else
32334    case $cross_compiling:$ac_tool_warned in
32335yes:)
32336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32338ac_tool_warned=yes ;;
32339esac
32340    PKG_CONFIG=$ac_pt_PKG_CONFIG
32341  fi
32342else
32343  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
32344fi
32345
32346fi
32347if test -n "$PKG_CONFIG"; then
32348	_pkg_min_version=0.21
32349	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
32350$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
32351	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
32352		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32353$as_echo "yes" >&6; }
32354	else
32355		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32356$as_echo "no" >&6; }
32357		PKG_CONFIG=""
32358	fi
32359
32360fi
32361
32362pkg_failed=no
32363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MONGOCXXV3" >&5
32364$as_echo_n "checking for MONGOCXXV3... " >&6; }
32365
32366if test -n "$PKG_CONFIG"; then
32367    if test -n "$MONGOCXXV3_CFLAGS"; then
32368        pkg_cv_MONGOCXXV3_CFLAGS="$MONGOCXXV3_CFLAGS"
32369    else
32370        if test -n "$PKG_CONFIG" && \
32371    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmongocxx >= 3.4.0\""; } >&5
32372  ($PKG_CONFIG --exists --print-errors "libmongocxx >= 3.4.0") 2>&5
32373  ac_status=$?
32374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32375  test $ac_status = 0; }; then
32376  pkg_cv_MONGOCXXV3_CFLAGS=`$PKG_CONFIG --cflags "libmongocxx >= 3.4.0" 2>/dev/null`
32377else
32378  pkg_failed=yes
32379fi
32380    fi
32381else
32382	pkg_failed=untried
32383fi
32384if test -n "$PKG_CONFIG"; then
32385    if test -n "$MONGOCXXV3_LIBS"; then
32386        pkg_cv_MONGOCXXV3_LIBS="$MONGOCXXV3_LIBS"
32387    else
32388        if test -n "$PKG_CONFIG" && \
32389    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmongocxx >= 3.4.0\""; } >&5
32390  ($PKG_CONFIG --exists --print-errors "libmongocxx >= 3.4.0") 2>&5
32391  ac_status=$?
32392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32393  test $ac_status = 0; }; then
32394  pkg_cv_MONGOCXXV3_LIBS=`$PKG_CONFIG --libs "libmongocxx >= 3.4.0" 2>/dev/null`
32395else
32396  pkg_failed=yes
32397fi
32398    fi
32399else
32400	pkg_failed=untried
32401fi
32402
32403
32404
32405if test $pkg_failed = yes; then
32406
32407if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32408        _pkg_short_errors_supported=yes
32409else
32410        _pkg_short_errors_supported=no
32411fi
32412        if test $_pkg_short_errors_supported = yes; then
32413	        MONGOCXXV3_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libmongocxx >= 3.4.0"`
32414        else
32415	        MONGOCXXV3_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libmongocxx >= 3.4.0"`
32416        fi
32417	# Put the nasty error message in config.log where it belongs
32418	echo "$MONGOCXXV3_PKG_ERRORS" >&5
32419
32420	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32421$as_echo "no" >&6; }
32422                MONGOCXXV3_ENABLED=no
32423elif test $pkg_failed = untried; then
32424	MONGOCXXV3_ENABLED=no
32425else
32426	MONGOCXXV3_CFLAGS=$pkg_cv_MONGOCXXV3_CFLAGS
32427	MONGOCXXV3_LIBS=$pkg_cv_MONGOCXXV3_LIBS
32428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32429$as_echo "yes" >&6; }
32430	MONGOCXXV3_ENABLED=yes
32431fi
32432
32433  if test "$MONGOCXXV3_ENABLED" = "no" -a "$with_mongocxxv3" = "yes" ; then
32434    as_fn_error $? "mongocxxv3 requested but no found" "$LINENO" 5
32435  fi
32436
32437fi
32438
32439MONGOCXXV3_ENABLED=$MONGOCXXV3_ENABLED
32440
32441MONGOCXXV3_LIBS=$MONGOCXXV3_LIBS
32442
32443MONGOCXXV3_CFLAGS=$MONGOCXXV3_CFLAGS
32444
32445
32446
32447
32448HDF4_INCLUDE=""
32449
32450
32451# Check whether --with-hdf4 was given.
32452if test "${with_hdf4+set}" = set; then :
32453  withval=$with_hdf4;
32454fi
32455
32456
32457if test x"$with_hdf4" = x"no" ; then
32458
32459  HAVE_HDF4=no
32460
32461  echo "hdf4 support disabled."
32462
32463else
32464
32465  if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then
32466    if test -d /usr/lib64/hdf; then
32467      HDF_LIB_DIR="/usr/lib64/hdf"
32468    elif test -d /usr/lib/hdf; then
32469      HDF_LIB_DIR="/usr/lib/hdf"
32470    else
32471      HDF_LIB_DIR=""
32472    fi
32473  else
32474    if test -d $with_hdf4/lib ; then
32475      HDF_LIB_DIR="$with_hdf4/lib"
32476    else
32477      HDF_LIB_DIR="$with_hdf4"
32478    fi
32479  fi
32480
32481  ORIG_LIBS="$LIBS"
32482  if test "$HDF_LIB_DIR" != "" ; then
32483    LIBS="-L$HDF_LIB_DIR $LIBS"
32484  fi
32485
32486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDreaddata in -lmfhdfalt" >&5
32487$as_echo_n "checking for SDreaddata in -lmfhdfalt... " >&6; }
32488if ${ac_cv_lib_mfhdfalt_SDreaddata+:} false; then :
32489  $as_echo_n "(cached) " >&6
32490else
32491  ac_check_lib_save_LIBS=$LIBS
32492LIBS="-lmfhdfalt -ldfalt $LIBS"
32493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32494/* end confdefs.h.  */
32495
32496/* Override any GCC internal prototype to avoid an error.
32497   Use char because int might match the return type of a GCC
32498   builtin and then its argument prototype would still apply.  */
32499#ifdef __cplusplus
32500extern "C"
32501#endif
32502char SDreaddata ();
32503int
32504main ()
32505{
32506return SDreaddata ();
32507  ;
32508  return 0;
32509}
32510_ACEOF
32511if ac_fn_c_try_link "$LINENO"; then :
32512  ac_cv_lib_mfhdfalt_SDreaddata=yes
32513else
32514  ac_cv_lib_mfhdfalt_SDreaddata=no
32515fi
32516rm -f core conftest.err conftest.$ac_objext \
32517    conftest$ac_exeext conftest.$ac_ext
32518LIBS=$ac_check_lib_save_LIBS
32519fi
32520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdfalt_SDreaddata" >&5
32521$as_echo "$ac_cv_lib_mfhdfalt_SDreaddata" >&6; }
32522if test "x$ac_cv_lib_mfhdfalt_SDreaddata" = xyes; then :
32523  HDF_LIB_NAME="-lmfhdfalt -ldfalt"
32524else
32525  HDF_LIB_NAME=missing
32526fi
32527
32528
32529  if test "$HDF_LIB_NAME" = "missing" ; then
32530    unset ac_cv_lib_mfhdf_SDreaddata
32531    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDreaddata in -lmfhdf" >&5
32532$as_echo_n "checking for SDreaddata in -lmfhdf... " >&6; }
32533if ${ac_cv_lib_mfhdf_SDreaddata+:} false; then :
32534  $as_echo_n "(cached) " >&6
32535else
32536  ac_check_lib_save_LIBS=$LIBS
32537LIBS="-lmfhdf -ldf $LIBS"
32538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32539/* end confdefs.h.  */
32540
32541/* Override any GCC internal prototype to avoid an error.
32542   Use char because int might match the return type of a GCC
32543   builtin and then its argument prototype would still apply.  */
32544#ifdef __cplusplus
32545extern "C"
32546#endif
32547char SDreaddata ();
32548int
32549main ()
32550{
32551return SDreaddata ();
32552  ;
32553  return 0;
32554}
32555_ACEOF
32556if ac_fn_c_try_link "$LINENO"; then :
32557  ac_cv_lib_mfhdf_SDreaddata=yes
32558else
32559  ac_cv_lib_mfhdf_SDreaddata=no
32560fi
32561rm -f core conftest.err conftest.$ac_objext \
32562    conftest$ac_exeext conftest.$ac_ext
32563LIBS=$ac_check_lib_save_LIBS
32564fi
32565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
32566$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
32567if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
32568  HDF_LIB_NAME="-lmfhdf -ldf"
32569else
32570  HDF_LIB_NAME=missing
32571fi
32572
32573    if test "$HDF_LIB_NAME" = "missing" ; then
32574      unset ac_cv_lib_mfhdf_SDreaddata
32575      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDreaddata in -lhdf4" >&5
32576$as_echo_n "checking for SDreaddata in -lhdf4... " >&6; }
32577if ${ac_cv_lib_hdf4_SDreaddata+:} false; then :
32578  $as_echo_n "(cached) " >&6
32579else
32580  ac_check_lib_save_LIBS=$LIBS
32581LIBS="-lhdf4  $LIBS"
32582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32583/* end confdefs.h.  */
32584
32585/* Override any GCC internal prototype to avoid an error.
32586   Use char because int might match the return type of a GCC
32587   builtin and then its argument prototype would still apply.  */
32588#ifdef __cplusplus
32589extern "C"
32590#endif
32591char SDreaddata ();
32592int
32593main ()
32594{
32595return SDreaddata ();
32596  ;
32597  return 0;
32598}
32599_ACEOF
32600if ac_fn_c_try_link "$LINENO"; then :
32601  ac_cv_lib_hdf4_SDreaddata=yes
32602else
32603  ac_cv_lib_hdf4_SDreaddata=no
32604fi
32605rm -f core conftest.err conftest.$ac_objext \
32606    conftest$ac_exeext conftest.$ac_ext
32607LIBS=$ac_check_lib_save_LIBS
32608fi
32609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf4_SDreaddata" >&5
32610$as_echo "$ac_cv_lib_hdf4_SDreaddata" >&6; }
32611if test "x$ac_cv_lib_hdf4_SDreaddata" = xyes; then :
32612  HDF_LIB_NAME=-lhdf4
32613else
32614  HDF_LIB_NAME=missing
32615fi
32616
32617    fi
32618  fi
32619
32620  if test "$HDF_LIB_NAME" = "missing" ; then
32621    unset ac_cv_lib_mfhdf_SDreaddata
32622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDreaddata in -lmfhdf" >&5
32623$as_echo_n "checking for SDreaddata in -lmfhdf... " >&6; }
32624if ${ac_cv_lib_mfhdf_SDreaddata+:} false; then :
32625  $as_echo_n "(cached) " >&6
32626else
32627  ac_check_lib_save_LIBS=$LIBS
32628LIBS="-lmfhdf -ldf -ljpeg -lz $LIBS"
32629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32630/* end confdefs.h.  */
32631
32632/* Override any GCC internal prototype to avoid an error.
32633   Use char because int might match the return type of a GCC
32634   builtin and then its argument prototype would still apply.  */
32635#ifdef __cplusplus
32636extern "C"
32637#endif
32638char SDreaddata ();
32639int
32640main ()
32641{
32642return SDreaddata ();
32643  ;
32644  return 0;
32645}
32646_ACEOF
32647if ac_fn_c_try_link "$LINENO"; then :
32648  ac_cv_lib_mfhdf_SDreaddata=yes
32649else
32650  ac_cv_lib_mfhdf_SDreaddata=no
32651fi
32652rm -f core conftest.err conftest.$ac_objext \
32653    conftest$ac_exeext conftest.$ac_ext
32654LIBS=$ac_check_lib_save_LIBS
32655fi
32656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
32657$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
32658if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
32659  HDF_LIB_NAME="-lmfhdf -ldf"
32660else
32661  HDF_LIB_NAME=missing
32662fi
32663
32664  fi
32665
32666  if test "$HDF_LIB_NAME" = "missing" ; then
32667    unset ac_cv_lib_mfhdf_SDreaddata
32668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDreaddata in -lmfhdf" >&5
32669$as_echo_n "checking for SDreaddata in -lmfhdf... " >&6; }
32670if ${ac_cv_lib_mfhdf_SDreaddata+:} false; then :
32671  $as_echo_n "(cached) " >&6
32672else
32673  ac_check_lib_save_LIBS=$LIBS
32674LIBS="-lmfhdf -ldf -lsz -ljpeg -lz $LIBS"
32675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32676/* end confdefs.h.  */
32677
32678/* Override any GCC internal prototype to avoid an error.
32679   Use char because int might match the return type of a GCC
32680   builtin and then its argument prototype would still apply.  */
32681#ifdef __cplusplus
32682extern "C"
32683#endif
32684char SDreaddata ();
32685int
32686main ()
32687{
32688return SDreaddata ();
32689  ;
32690  return 0;
32691}
32692_ACEOF
32693if ac_fn_c_try_link "$LINENO"; then :
32694  ac_cv_lib_mfhdf_SDreaddata=yes
32695else
32696  ac_cv_lib_mfhdf_SDreaddata=no
32697fi
32698rm -f core conftest.err conftest.$ac_objext \
32699    conftest$ac_exeext conftest.$ac_ext
32700LIBS=$ac_check_lib_save_LIBS
32701fi
32702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
32703$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
32704if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
32705  HDF_LIB_NAME="-lmfhdf -ldf -lsz"
32706else
32707  HDF_LIB_NAME=missing
32708fi
32709
32710  fi
32711
32712  if test "$HDF_LIB_NAME" != "missing" ; then
32713
32714    if test "$HDF_LIB_DIR" != "" ; then
32715      LIBS="-L$HDF_LIB_DIR $HDF_LIB_NAME $ORIG_LIBS"
32716    else
32717      LIBS="$HDF_LIB_NAME $ORIG_LIBS"
32718    fi
32719
32720                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDget_maxopenfiles in -lmfhdfalt" >&5
32721$as_echo_n "checking for SDget_maxopenfiles in -lmfhdfalt... " >&6; }
32722if ${ac_cv_lib_mfhdfalt_SDget_maxopenfiles+:} false; then :
32723  $as_echo_n "(cached) " >&6
32724else
32725  ac_check_lib_save_LIBS=$LIBS
32726LIBS="-lmfhdfalt $HDF_LIB_NAME $LIBS"
32727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32728/* end confdefs.h.  */
32729
32730/* Override any GCC internal prototype to avoid an error.
32731   Use char because int might match the return type of a GCC
32732   builtin and then its argument prototype would still apply.  */
32733#ifdef __cplusplus
32734extern "C"
32735#endif
32736char SDget_maxopenfiles ();
32737int
32738main ()
32739{
32740return SDget_maxopenfiles ();
32741  ;
32742  return 0;
32743}
32744_ACEOF
32745if ac_fn_c_try_link "$LINENO"; then :
32746  ac_cv_lib_mfhdfalt_SDget_maxopenfiles=yes
32747else
32748  ac_cv_lib_mfhdfalt_SDget_maxopenfiles=no
32749fi
32750rm -f core conftest.err conftest.$ac_objext \
32751    conftest$ac_exeext conftest.$ac_ext
32752LIBS=$ac_check_lib_save_LIBS
32753fi
32754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdfalt_SDget_maxopenfiles" >&5
32755$as_echo "$ac_cv_lib_mfhdfalt_SDget_maxopenfiles" >&6; }
32756if test "x$ac_cv_lib_mfhdfalt_SDget_maxopenfiles" = xyes; then :
32757  HDF4_HAS_MAXOPENFILES=yes
32758else
32759  HDF4_HAS_MAXOPENFILES=no
32760fi
32761
32762    if test "$HDF4_HAS_MAXOPENFILES" = "no" ; then
32763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDget_maxopenfiles in -lmfhdf" >&5
32764$as_echo_n "checking for SDget_maxopenfiles in -lmfhdf... " >&6; }
32765if ${ac_cv_lib_mfhdf_SDget_maxopenfiles+:} false; then :
32766  $as_echo_n "(cached) " >&6
32767else
32768  ac_check_lib_save_LIBS=$LIBS
32769LIBS="-lmfhdf $HDF_LIB_NAME $LIBS"
32770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32771/* end confdefs.h.  */
32772
32773/* Override any GCC internal prototype to avoid an error.
32774   Use char because int might match the return type of a GCC
32775   builtin and then its argument prototype would still apply.  */
32776#ifdef __cplusplus
32777extern "C"
32778#endif
32779char SDget_maxopenfiles ();
32780int
32781main ()
32782{
32783return SDget_maxopenfiles ();
32784  ;
32785  return 0;
32786}
32787_ACEOF
32788if ac_fn_c_try_link "$LINENO"; then :
32789  ac_cv_lib_mfhdf_SDget_maxopenfiles=yes
32790else
32791  ac_cv_lib_mfhdf_SDget_maxopenfiles=no
32792fi
32793rm -f core conftest.err conftest.$ac_objext \
32794    conftest$ac_exeext conftest.$ac_ext
32795LIBS=$ac_check_lib_save_LIBS
32796fi
32797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDget_maxopenfiles" >&5
32798$as_echo "$ac_cv_lib_mfhdf_SDget_maxopenfiles" >&6; }
32799if test "x$ac_cv_lib_mfhdf_SDget_maxopenfiles" = xyes; then :
32800  HDF4_HAS_MAXOPENFILES=yes
32801else
32802  HDF4_HAS_MAXOPENFILES=no
32803fi
32804
32805    fi
32806
32807      if test "$with_hdf4" = "yes" -o "$with_hdf4" = "" -a -r /usr/include/hdf/hdf.h ; then
32808      HDF4_INCLUDE="-I/usr/include/hdf"
32809    elif test -r "$with_hdf4/hdf/hdf.h" ; then
32810      HDF4_INCLUDE="-I$with_hdf4/hdf"
32811    elif test -r "$with_hdf4/include/hdf/hdf.h" ; then
32812      HDF4_INCLUDE="-I$with_hdf4/include/hdf"
32813    elif test -r "$with_hdf4/include/hdf.h" ; then
32814      HDF4_INCLUDE="-I$with_hdf4/include"
32815    elif test -r "$with_hdf4/hdf.h" ; then
32816      HDF4_INCLUDE="-I$with_hdf4"
32817    fi
32818
32819    HAVE_HDF4=yes
32820
32821  else
32822
32823    if test x"$with_hdf4" != x"" ; then
32824      as_fn_error $? "HDF4 support requested with arg \"$with_hdf4\", but neither hdf4 nor mfhdf lib found" "$LINENO" 5
32825    else
32826      LIBS="$ORIG_LIBS"
32827      HAVE_HDF4=no
32828    fi
32829
32830  fi
32831
32832fi
32833
32834HAVE_HDF4=$HAVE_HDF4
32835
32836HDF4_INCLUDE=$HDF4_INCLUDE
32837
32838HDF4_HAS_MAXOPENFILES=$HDF4_HAS_MAXOPENFILES
32839
32840
32841if test "$HAVE_HDF4" != "no" ; then
32842  OPT_GDAL_FORMATS="hdf4 $OPT_GDAL_FORMATS"
32843fi
32844
32845
32846
32847HDF5_INCLUDE=""
32848
32849
32850# Check whether --with-hdf5 was given.
32851if test "${with_hdf5+set}" = set; then :
32852  withval=$with_hdf5;
32853fi
32854
32855
32856if test "$with_hdf5" = "no" ; then
32857
32858  HAVE_HDF5=no
32859
32860  echo "hdf5 support disabled."
32861
32862elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then
32863
32864  HDF5_CFLAGS=""
32865  HDF5_LIBS=""
32866
32867
32868if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
32869	if test -n "$ac_tool_prefix"; then
32870  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
32871set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
32872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32873$as_echo_n "checking for $ac_word... " >&6; }
32874if ${ac_cv_path_PKG_CONFIG+:} false; then :
32875  $as_echo_n "(cached) " >&6
32876else
32877  case $PKG_CONFIG in
32878  [\\/]* | ?:[\\/]*)
32879  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
32880  ;;
32881  *)
32882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32883for as_dir in $PATH
32884do
32885  IFS=$as_save_IFS
32886  test -z "$as_dir" && as_dir=.
32887    for ac_exec_ext in '' $ac_executable_extensions; do
32888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32889    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
32890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32891    break 2
32892  fi
32893done
32894  done
32895IFS=$as_save_IFS
32896
32897  ;;
32898esac
32899fi
32900PKG_CONFIG=$ac_cv_path_PKG_CONFIG
32901if test -n "$PKG_CONFIG"; then
32902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
32903$as_echo "$PKG_CONFIG" >&6; }
32904else
32905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32906$as_echo "no" >&6; }
32907fi
32908
32909
32910fi
32911if test -z "$ac_cv_path_PKG_CONFIG"; then
32912  ac_pt_PKG_CONFIG=$PKG_CONFIG
32913  # Extract the first word of "pkg-config", so it can be a program name with args.
32914set dummy pkg-config; ac_word=$2
32915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32916$as_echo_n "checking for $ac_word... " >&6; }
32917if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
32918  $as_echo_n "(cached) " >&6
32919else
32920  case $ac_pt_PKG_CONFIG in
32921  [\\/]* | ?:[\\/]*)
32922  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
32923  ;;
32924  *)
32925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32926for as_dir in $PATH
32927do
32928  IFS=$as_save_IFS
32929  test -z "$as_dir" && as_dir=.
32930    for ac_exec_ext in '' $ac_executable_extensions; do
32931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32932    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
32933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32934    break 2
32935  fi
32936done
32937  done
32938IFS=$as_save_IFS
32939
32940  ;;
32941esac
32942fi
32943ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
32944if test -n "$ac_pt_PKG_CONFIG"; then
32945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
32946$as_echo "$ac_pt_PKG_CONFIG" >&6; }
32947else
32948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32949$as_echo "no" >&6; }
32950fi
32951
32952  if test "x$ac_pt_PKG_CONFIG" = x; then
32953    PKG_CONFIG=""
32954  else
32955    case $cross_compiling:$ac_tool_warned in
32956yes:)
32957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32959ac_tool_warned=yes ;;
32960esac
32961    PKG_CONFIG=$ac_pt_PKG_CONFIG
32962  fi
32963else
32964  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
32965fi
32966
32967fi
32968if test -n "$PKG_CONFIG"; then
32969	_pkg_min_version=0.21
32970	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
32971$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
32972	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
32973		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32974$as_echo "yes" >&6; }
32975	else
32976		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32977$as_echo "no" >&6; }
32978		PKG_CONFIG=""
32979	fi
32980
32981fi # check and set $PKG_CONFIG
32982
32983pkg_failed=no
32984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5
32985$as_echo_n "checking for HDF5... " >&6; }
32986
32987if test -n "$PKG_CONFIG"; then
32988    if test -n "$HDF5_CFLAGS"; then
32989        pkg_cv_HDF5_CFLAGS="$HDF5_CFLAGS"
32990    else
32991        if test -n "$PKG_CONFIG" && \
32992    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hdf5\""; } >&5
32993  ($PKG_CONFIG --exists --print-errors "hdf5") 2>&5
32994  ac_status=$?
32995  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32996  test $ac_status = 0; }; then
32997  pkg_cv_HDF5_CFLAGS=`$PKG_CONFIG --cflags "hdf5" 2>/dev/null`
32998else
32999  pkg_failed=yes
33000fi
33001    fi
33002else
33003	pkg_failed=untried
33004fi
33005if test -n "$PKG_CONFIG"; then
33006    if test -n "$HDF5_LIBS"; then
33007        pkg_cv_HDF5_LIBS="$HDF5_LIBS"
33008    else
33009        if test -n "$PKG_CONFIG" && \
33010    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hdf5\""; } >&5
33011  ($PKG_CONFIG --exists --print-errors "hdf5") 2>&5
33012  ac_status=$?
33013  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33014  test $ac_status = 0; }; then
33015  pkg_cv_HDF5_LIBS=`$PKG_CONFIG --libs "hdf5" 2>/dev/null`
33016else
33017  pkg_failed=yes
33018fi
33019    fi
33020else
33021	pkg_failed=untried
33022fi
33023
33024
33025
33026if test $pkg_failed = yes; then
33027
33028if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
33029        _pkg_short_errors_supported=yes
33030else
33031        _pkg_short_errors_supported=no
33032fi
33033        if test $_pkg_short_errors_supported = yes; then
33034	        HDF5_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hdf5"`
33035        else
33036	        HDF5_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hdf5"`
33037        fi
33038	# Put the nasty error message in config.log where it belongs
33039	echo "$HDF5_PKG_ERRORS" >&5
33040
33041	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33042$as_echo "no" >&6; }
33043                HAVE_HDF5=no
33044elif test $pkg_failed = untried; then
33045	HAVE_HDF5=no
33046else
33047	HDF5_CFLAGS=$pkg_cv_HDF5_CFLAGS
33048	HDF5_LIBS=$pkg_cv_HDF5_LIBS
33049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33050$as_echo "yes" >&6; }
33051	HAVE_HDF5=yes
33052fi
33053
33054  if test "$HAVE_HDF5" = "yes"; then
33055
33056    # Test that the package found is for the right architecture
33057    saved_LIBS="$LIBS"
33058    LIBS="$HDF5_LIBS"
33059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5
33060$as_echo_n "checking for H5Fopen in -lhdf5... " >&6; }
33061if ${ac_cv_lib_hdf5_H5Fopen+:} false; then :
33062  $as_echo_n "(cached) " >&6
33063else
33064  ac_check_lib_save_LIBS=$LIBS
33065LIBS="-lhdf5  $LIBS"
33066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33067/* end confdefs.h.  */
33068
33069/* Override any GCC internal prototype to avoid an error.
33070   Use char because int might match the return type of a GCC
33071   builtin and then its argument prototype would still apply.  */
33072#ifdef __cplusplus
33073extern "C"
33074#endif
33075char H5Fopen ();
33076int
33077main ()
33078{
33079return H5Fopen ();
33080  ;
33081  return 0;
33082}
33083_ACEOF
33084if ac_fn_c_try_link "$LINENO"; then :
33085  ac_cv_lib_hdf5_H5Fopen=yes
33086else
33087  ac_cv_lib_hdf5_H5Fopen=no
33088fi
33089rm -f core conftest.err conftest.$ac_objext \
33090    conftest$ac_exeext conftest.$ac_ext
33091LIBS=$ac_check_lib_save_LIBS
33092fi
33093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5
33094$as_echo "$ac_cv_lib_hdf5_H5Fopen" >&6; }
33095if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes; then :
33096  HAVE_HDF5=yes
33097else
33098  HAVE_HDF5=no
33099fi
33100
33101    LIBS="$saved_LIBS"
33102
33103    if test "$HAVE_HDF5" = "yes"; then
33104        LIBS="$HDF5_LIBS $LIBS"
33105        HDF5_INCLUDE="$HDF5_CFLAGS"
33106    fi
33107
33108  else
33109
33110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5
33111$as_echo_n "checking for H5Fopen in -lhdf5... " >&6; }
33112if ${ac_cv_lib_hdf5_H5Fopen+:} false; then :
33113  $as_echo_n "(cached) " >&6
33114else
33115  ac_check_lib_save_LIBS=$LIBS
33116LIBS="-lhdf5  $LIBS"
33117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33118/* end confdefs.h.  */
33119
33120/* Override any GCC internal prototype to avoid an error.
33121   Use char because int might match the return type of a GCC
33122   builtin and then its argument prototype would still apply.  */
33123#ifdef __cplusplus
33124extern "C"
33125#endif
33126char H5Fopen ();
33127int
33128main ()
33129{
33130return H5Fopen ();
33131  ;
33132  return 0;
33133}
33134_ACEOF
33135if ac_fn_c_try_link "$LINENO"; then :
33136  ac_cv_lib_hdf5_H5Fopen=yes
33137else
33138  ac_cv_lib_hdf5_H5Fopen=no
33139fi
33140rm -f core conftest.err conftest.$ac_objext \
33141    conftest$ac_exeext conftest.$ac_ext
33142LIBS=$ac_check_lib_save_LIBS
33143fi
33144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5
33145$as_echo "$ac_cv_lib_hdf5_H5Fopen" >&6; }
33146if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes; then :
33147  HAVE_HDF5=yes
33148else
33149  HAVE_HDF5=no
33150fi
33151
33152
33153    if test "$HAVE_HDF5" = "yes" ; then
33154        LIBS="-lhdf5 $LIBS"
33155    fi
33156
33157        if test "$HAVE_HDF5" = "yes" -a -r /usr/include/hdf5.h ; then
33158        HDF5_INCLUDE="-I/usr/include"
33159    fi
33160  fi
33161
33162else
33163
33164  if test -d $with_hdf5/lib ; then
33165    HDF5_LIB_DIR=$with_hdf5/lib
33166  else
33167    HDF5_LIB_DIR=$with_hdf5
33168  fi
33169
33170  ORIG_LIBS="$LIBS"
33171  LIBS="-L$HDF5_LIB_DIR $LIBS -lhdf5"
33172
33173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5
33174$as_echo_n "checking for H5Fopen in -lhdf5... " >&6; }
33175if ${ac_cv_lib_hdf5_H5Fopen+:} false; then :
33176  $as_echo_n "(cached) " >&6
33177else
33178  ac_check_lib_save_LIBS=$LIBS
33179LIBS="-lhdf5 -lhdf5 $LIBS"
33180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33181/* end confdefs.h.  */
33182
33183/* Override any GCC internal prototype to avoid an error.
33184   Use char because int might match the return type of a GCC
33185   builtin and then its argument prototype would still apply.  */
33186#ifdef __cplusplus
33187extern "C"
33188#endif
33189char H5Fopen ();
33190int
33191main ()
33192{
33193return H5Fopen ();
33194  ;
33195  return 0;
33196}
33197_ACEOF
33198if ac_fn_c_try_link "$LINENO"; then :
33199  ac_cv_lib_hdf5_H5Fopen=yes
33200else
33201  ac_cv_lib_hdf5_H5Fopen=no
33202fi
33203rm -f core conftest.err conftest.$ac_objext \
33204    conftest$ac_exeext conftest.$ac_ext
33205LIBS=$ac_check_lib_save_LIBS
33206fi
33207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5
33208$as_echo "$ac_cv_lib_hdf5_H5Fopen" >&6; }
33209if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes; then :
33210  HDF5_LIB_NAME="-lhdf5 "
33211else
33212  HDF5_LIB_NAME=missing
33213fi
33214
33215
33216  if test "$HDF5_LIB_NAME" = "missing" ; then
33217    as_fn_error $? "HDF5 support requested with arg $with_hdf5, but no hdf5 lib found" "$LINENO" 5
33218  fi
33219
33220  LIBS="-L$HDF5_LIB_DIR $HDF5_LIB_NAME $ORIG_LIBS"
33221
33222  if test -r "$with_hdf5/hdf5/hdf5.h" ; then
33223    HDF5_INCLUDE="-I$with_hdf5/hdf5"
33224  elif test -r "$with_hdf5/include/hdf5/hdf5.h" ; then
33225    HDF5_INCLUDE="-I$with_hdf5/include/hdf5"
33226  elif test -r "$with_hdf5/include/hdf5.h" ; then
33227    HDF5_INCLUDE="-I$with_hdf5/include"
33228  elif test -r "$with_hdf5/hdf.h" ; then
33229    HDF5_INCLUDE="-I$with_hdf5"
33230  fi
33231
33232  HAVE_HDF5=yes
33233fi
33234
33235HAVE_HDF5=$HAVE_HDF5
33236
33237HDF5_INCLUDE=$HDF5_INCLUDE
33238
33239
33240if test "$HAVE_HDF5" != "no" ; then
33241  OPT_GDAL_FORMATS="hdf5 $OPT_GDAL_FORMATS"
33242fi
33243
33244
33245KEA_CONFIG=no
33246
33247
33248# Check whether --with-kea was given.
33249if test "${with_kea+set}" = set; then :
33250  withval=$with_kea;
33251fi
33252
33253
33254if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then
33255  # Extract the first word of "kea-config", so it can be a program name with args.
33256set dummy kea-config; ac_word=$2
33257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33258$as_echo_n "checking for $ac_word... " >&6; }
33259if ${ac_cv_path_KEA_CONFIG+:} false; then :
33260  $as_echo_n "(cached) " >&6
33261else
33262  case $KEA_CONFIG in
33263  [\\/]* | ?:[\\/]*)
33264  ac_cv_path_KEA_CONFIG="$KEA_CONFIG" # Let the user override the test with a path.
33265  ;;
33266  *)
33267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33268for as_dir in $PATH
33269do
33270  IFS=$as_save_IFS
33271  test -z "$as_dir" && as_dir=.
33272    for ac_exec_ext in '' $ac_executable_extensions; do
33273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33274    ac_cv_path_KEA_CONFIG="$as_dir/$ac_word$ac_exec_ext"
33275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33276    break 2
33277  fi
33278done
33279  done
33280IFS=$as_save_IFS
33281
33282  test -z "$ac_cv_path_KEA_CONFIG" && ac_cv_path_KEA_CONFIG="no"
33283  ;;
33284esac
33285fi
33286KEA_CONFIG=$ac_cv_path_KEA_CONFIG
33287if test -n "$KEA_CONFIG"; then
33288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KEA_CONFIG" >&5
33289$as_echo "$KEA_CONFIG" >&6; }
33290else
33291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33292$as_echo "no" >&6; }
33293fi
33294
33295
33296else
33297   KEA_CONFIG=$with_kea
33298fi
33299
33300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kea" >&5
33301$as_echo_n "checking for kea... " >&6; }
33302
33303if test "$KEA_CONFIG" = "no" ; then
33304
33305  HAVE_KEA=no
33306  KEA_LIB=
33307  KEA_INC=
33308
33309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33310$as_echo "no" >&6; }
33311
33312else
33313  if test -d $KEA_CONFIG ; then
33314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33315$as_echo "no" >&6; }
33316      as_fn_error $? "--with-kea argument is a directory.  It should be the path to the kea_config script, often somewhere like /usr/local/bin/kea_config." "$LINENO" 5
33317  fi
33318
33319  if test \! -x $KEA_CONFIG ; then
33320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33321$as_echo "no" >&6; }
33322      as_fn_error $? "--with-kea argument is a not an executable file.  It should be the path to the kea_config script, often somewhere like /usr/local/bin/kea_config." "$LINENO" 5
33323  fi
33324
33325  HAVE_KEA=yes
33326  KEA_LIB="`$KEA_CONFIG --libs --hdflibs`"
33327  KEA_INC="`$KEA_CONFIG --cflags --hdfcflags`"
33328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33329$as_echo "yes" >&6; }
33330fi
33331
33332HAVE_KEA=$HAVE_KEA
33333
33334KEA_INC=$KEA_INC
33335
33336KEA_LIB=$KEA_LIB
33337
33338
33339if test "$HAVE_KEA" != "no" ; then
33340  OPT_GDAL_FORMATS="kea $OPT_GDAL_FORMATS"
33341fi
33342
33343
33344NETCDF_SETTING=
33345NETCDF_MEM=
33346NETCDF_ROOT=
33347NETCDF_HAS_NC4=
33348NETCDF_HAS_HDF4=
33349NETCDF_NCCONFIG=
33350
33351
33352# Check whether --with-netcdf was given.
33353if test "${with_netcdf+set}" = set; then :
33354  withval=$with_netcdf;
33355fi
33356
33357
33358if test "$with_netcdf" = "no" ; then
33359
33360  NETCDF_SETTING=no
33361  NETCDF_MEM=no
33362
33363  echo "netCDF support disabled."
33364
33365else
33366
33367    unset ac_cv_path_NETCDF_NCCONFIG
33368  if test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then
33369    # Extract the first word of "nc-config", so it can be a program name with args.
33370set dummy nc-config; ac_word=$2
33371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33372$as_echo_n "checking for $ac_word... " >&6; }
33373if ${ac_cv_path_NETCDF_NCCONFIG+:} false; then :
33374  $as_echo_n "(cached) " >&6
33375else
33376  case $NETCDF_NCCONFIG in
33377  [\\/]* | ?:[\\/]*)
33378  ac_cv_path_NETCDF_NCCONFIG="$NETCDF_NCCONFIG" # Let the user override the test with a path.
33379  ;;
33380  *)
33381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33382for as_dir in $PATH
33383do
33384  IFS=$as_save_IFS
33385  test -z "$as_dir" && as_dir=.
33386    for ac_exec_ext in '' $ac_executable_extensions; do
33387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33388    ac_cv_path_NETCDF_NCCONFIG="$as_dir/$ac_word$ac_exec_ext"
33389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33390    break 2
33391  fi
33392done
33393  done
33394IFS=$as_save_IFS
33395
33396  test -z "$ac_cv_path_NETCDF_NCCONFIG" && ac_cv_path_NETCDF_NCCONFIG="no"
33397  ;;
33398esac
33399fi
33400NETCDF_NCCONFIG=$ac_cv_path_NETCDF_NCCONFIG
33401if test -n "$NETCDF_NCCONFIG"; then
33402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDF_NCCONFIG" >&5
33403$as_echo "$NETCDF_NCCONFIG" >&6; }
33404else
33405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33406$as_echo "no" >&6; }
33407fi
33408
33409
33410  else
33411    tmp_path="$with_netcdf/bin$PATH_SEPARATOR$with_netcdf"
33412    # Extract the first word of "nc-config", so it can be a program name with args.
33413set dummy nc-config; ac_word=$2
33414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33415$as_echo_n "checking for $ac_word... " >&6; }
33416if ${ac_cv_path_NETCDF_NCCONFIG+:} false; then :
33417  $as_echo_n "(cached) " >&6
33418else
33419  case $NETCDF_NCCONFIG in
33420  [\\/]* | ?:[\\/]*)
33421  ac_cv_path_NETCDF_NCCONFIG="$NETCDF_NCCONFIG" # Let the user override the test with a path.
33422  ;;
33423  *)
33424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33425for as_dir in $tmp_path
33426do
33427  IFS=$as_save_IFS
33428  test -z "$as_dir" && as_dir=.
33429    for ac_exec_ext in '' $ac_executable_extensions; do
33430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33431    ac_cv_path_NETCDF_NCCONFIG="$as_dir/$ac_word$ac_exec_ext"
33432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33433    break 2
33434  fi
33435done
33436  done
33437IFS=$as_save_IFS
33438
33439  test -z "$ac_cv_path_NETCDF_NCCONFIG" && ac_cv_path_NETCDF_NCCONFIG="no"
33440  ;;
33441esac
33442fi
33443NETCDF_NCCONFIG=$ac_cv_path_NETCDF_NCCONFIG
33444if test -n "$NETCDF_NCCONFIG"; then
33445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDF_NCCONFIG" >&5
33446$as_echo "$NETCDF_NCCONFIG" >&6; }
33447else
33448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33449$as_echo "no" >&6; }
33450fi
33451
33452
33453  fi
33454
33455    if test "$NETCDF_NCCONFIG" = "no" ; then
33456    echo "        did not find nc-config, some features may be missing"
33457    echo "        use --with-netcdf=/path/to/netcdf or add nc-config to PATH"
33458    NETCDF_NCCONFIG=
33459  elif test "`$NETCDF_NCCONFIG --version`" = "" ; then
33460    echo "did not get netCDF version from $NETCDF_NCCONFIG ... using fallback"
33461    NETCDF_NCCONFIG=
33462  fi
33463
33464    if test "$NETCDF_NCCONFIG" != "" ; then
33465
33466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking libnetcdf compiler and linker flags with nc-config" >&5
33467$as_echo_n "checking libnetcdf compiler and linker flags with nc-config... " >&6; }
33468    NETCDF_VERSION=`$NETCDF_NCCONFIG --version`
33469    NETCDF_PREFIX=`$NETCDF_NCCONFIG --prefix`
33470    NETCDF_INCLUDEDIR=`$NETCDF_NCCONFIG --includedir`
33471    NETCDF_LIBS=`$NETCDF_NCCONFIG --libs`
33472
33473    if echo "x" | sed -E "s/x/y/" >/dev/null 2>/dev/null; then
33474        STRIPPED_LIBRARY_NAME="$(echo "${NETCDF_LIBS}" | sed -E 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
33475    elif echo "x" | sed -r "s/x/y/" >/dev/null 2>/dev/null; then
33476                STRIPPED_LIBRARY_NAME="$(echo "${NETCDF_LIBS}" | sed -r 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
33477    else
33478        STRIPPED_LIBRARY_NAME="$(echo "${NETCDF_LIBS}")"
33479    fi
33480
33481    NETCDF_LIBS="$STRIPPED_LIBRARY_NAME"
33482    echo ""
33483    { $as_echo "$as_me:${as_lineno-$LINENO}: result:  got version=\"$NETCDF_VERSION\", prefix=\"$NETCDF_PREFIX\",
33484 libs=\"$NETCDF_LIBS\", includedir=\"$NETCDF_INCLUDEDIR\"" >&5
33485$as_echo " got version=\"$NETCDF_VERSION\", prefix=\"$NETCDF_PREFIX\",
33486 libs=\"$NETCDF_LIBS\", includedir=\"$NETCDF_INCLUDEDIR\"" >&6; }
33487
33488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc_open in -lnetcdf" >&5
33489$as_echo_n "checking for nc_open in -lnetcdf... " >&6; }
33490if ${ac_cv_lib_netcdf_nc_open+:} false; then :
33491  $as_echo_n "(cached) " >&6
33492else
33493  ac_check_lib_save_LIBS=$LIBS
33494LIBS="-lnetcdf $NETCDF_LIBS $LIBS"
33495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33496/* end confdefs.h.  */
33497
33498/* Override any GCC internal prototype to avoid an error.
33499   Use char because int might match the return type of a GCC
33500   builtin and then its argument prototype would still apply.  */
33501#ifdef __cplusplus
33502extern "C"
33503#endif
33504char nc_open ();
33505int
33506main ()
33507{
33508return nc_open ();
33509  ;
33510  return 0;
33511}
33512_ACEOF
33513if ac_fn_c_try_link "$LINENO"; then :
33514  ac_cv_lib_netcdf_nc_open=yes
33515else
33516  ac_cv_lib_netcdf_nc_open=no
33517fi
33518rm -f core conftest.err conftest.$ac_objext \
33519    conftest$ac_exeext conftest.$ac_ext
33520LIBS=$ac_check_lib_save_LIBS
33521fi
33522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netcdf_nc_open" >&5
33523$as_echo "$ac_cv_lib_netcdf_nc_open" >&6; }
33524if test "x$ac_cv_lib_netcdf_nc_open" = xyes; then :
33525  NETCDF_SETTING=yes
33526else
33527  NETCDF_SETTING=no
33528fi
33529
33530
33531    if test "$NETCDF_SETTING" = "yes" ; then
33532      EXTRA_INCLUDES="-I$NETCDF_INCLUDEDIR $EXTRA_INCLUDES"
33533      NETCDF_ROOT=$NETCDF_PREFIX
33534      LIBS="$NETCDF_LIBS $LIBS"
33535    fi
33536
33537
33538elif test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then
33539
33540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc_open in -lnetcdf" >&5
33541$as_echo_n "checking for nc_open in -lnetcdf... " >&6; }
33542if ${ac_cv_lib_netcdf_nc_open+:} false; then :
33543  $as_echo_n "(cached) " >&6
33544else
33545  ac_check_lib_save_LIBS=$LIBS
33546LIBS="-lnetcdf  $LIBS"
33547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33548/* end confdefs.h.  */
33549
33550/* Override any GCC internal prototype to avoid an error.
33551   Use char because int might match the return type of a GCC
33552   builtin and then its argument prototype would still apply.  */
33553#ifdef __cplusplus
33554extern "C"
33555#endif
33556char nc_open ();
33557int
33558main ()
33559{
33560return nc_open ();
33561  ;
33562  return 0;
33563}
33564_ACEOF
33565if ac_fn_c_try_link "$LINENO"; then :
33566  ac_cv_lib_netcdf_nc_open=yes
33567else
33568  ac_cv_lib_netcdf_nc_open=no
33569fi
33570rm -f core conftest.err conftest.$ac_objext \
33571    conftest$ac_exeext conftest.$ac_ext
33572LIBS=$ac_check_lib_save_LIBS
33573fi
33574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netcdf_nc_open" >&5
33575$as_echo "$ac_cv_lib_netcdf_nc_open" >&6; }
33576if test "x$ac_cv_lib_netcdf_nc_open" = xyes; then :
33577  NETCDF_SETTING=yes
33578else
33579  NETCDF_SETTING=no
33580fi
33581
33582
33583  if test "$NETCDF_SETTING" = "yes" ; then
33584
33585        if test -d /usr/include/netcdf ; then
33586      EXTRA_INCLUDES="-I/usr/include/netcdf $EXTRA_INCLUDES"
33587      NETCDF_ROOT="/usr"
33588        elif test -d /usr/include/netcdf-3 ; then
33589      EXTRA_INCLUDES="-I/usr/include/netcdf-3 $EXTRA_INCLUDES"
33590      NETCDF_ROOT="/usr"
33591        elif test -f /usr/include/netcdf.h ; then
33592      NETCDF_ROOT="/usr"
33593        elif test -f /usr/local/include/netcdf.h ; then
33594      NETCDF_ROOT="/usr/local"
33595        else
33596      echo "using pre-installed libnetcdf."
33597      echo -n "libnetcdf is installed but its location cannot be found, "
33598      echo "use --with-netcdf=/path_to_netcdf for proper support"
33599    fi
33600    NETCDF_INCLUDEDIR="$NETCDF_ROOT/include/"
33601
33602    LIBS="-lnetcdf $LIBS"
33603    if test "$NETCDF_ROOT" != "" ; then
33604      echo "using pre-installed libnetcdf from "$NETCDF_ROOT
33605    fi
33606
33607  else
33608    echo "libnetcdf not found ... netCDF support disabled"
33609  fi
33610
33611else
33612
33613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc_open in -lnetcdf" >&5
33614$as_echo_n "checking for nc_open in -lnetcdf... " >&6; }
33615if ${ac_cv_lib_netcdf_nc_open+:} false; then :
33616  $as_echo_n "(cached) " >&6
33617else
33618  ac_check_lib_save_LIBS=$LIBS
33619LIBS="-lnetcdf -L$with_netcdf -L$with_netcdf/lib $LIBS"
33620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33621/* end confdefs.h.  */
33622
33623/* Override any GCC internal prototype to avoid an error.
33624   Use char because int might match the return type of a GCC
33625   builtin and then its argument prototype would still apply.  */
33626#ifdef __cplusplus
33627extern "C"
33628#endif
33629char nc_open ();
33630int
33631main ()
33632{
33633return nc_open ();
33634  ;
33635  return 0;
33636}
33637_ACEOF
33638if ac_fn_c_try_link "$LINENO"; then :
33639  ac_cv_lib_netcdf_nc_open=yes
33640else
33641  ac_cv_lib_netcdf_nc_open=no
33642fi
33643rm -f core conftest.err conftest.$ac_objext \
33644    conftest$ac_exeext conftest.$ac_ext
33645LIBS=$ac_check_lib_save_LIBS
33646fi
33647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netcdf_nc_open" >&5
33648$as_echo "$ac_cv_lib_netcdf_nc_open" >&6; }
33649if test "x$ac_cv_lib_netcdf_nc_open" = xyes; then :
33650  NETCDF_SETTING=yes
33651else
33652  NETCDF_SETTING=no
33653fi
33654
33655
33656  if test "$NETCDF_SETTING" = "yes" ; then
33657
33658    NETCDF_SETTING=yes
33659    NETCDF_ROOT="$with_netcdf"
33660
33661    if test -d $with_netcdf/lib ; then
33662      LIBS="-L$with_netcdf/lib -lnetcdf $LIBS"
33663      EXTRA_INCLUDES="-I$with_netcdf/include $EXTRA_INCLUDES"
33664    else
33665      LIBS="-L$with_netcdf -lnetcdf $LIBS"
33666      EXTRA_INCLUDES="-I$with_netcdf $EXTRA_INCLUDES"
33667    fi
33668    NETCDF_INCLUDEDIR="$with_netcdf/include/"
33669
33670    echo "using libnetcdf from $with_netcdf"
33671
33672  else
33673    echo "libnetcdf not found in "$with_netcdf" ... netCDF support disabled"
33674  fi
33675
33676fi
33677
33678  if test "$NETCDF_SETTING" = "yes" ; then
33679
33680    if test "$NETCDF_NCCONFIG" != "" ; then
33681
33682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for netcdf-4 (and HDF5) support in libnetcdf" >&5
33683$as_echo_n "checking for netcdf-4 (and HDF5) support in libnetcdf... " >&6; }
33684        if test "x$($NETCDF_NCCONFIG --has-nc4)" = "xyes"; then :
33685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33686$as_echo "yes" >&6; }
33687          NETCDF_HAS_NC4=yes
33688        else
33689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33690$as_echo "no" >&6; }
33691          NETCDF_HAS_NC4=no
33692        fi
33693
33694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF4 support in libnetcdf" >&5
33695$as_echo_n "checking for HDF4 support in libnetcdf... " >&6; }
33696        if test "x$($NETCDF_NCCONFIG --has-hdf4)" = "xyes"; then :
33697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33698$as_echo "yes" >&6; }
33699          NETCDF_HAS_HDF4=yes
33700        else
33701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33702$as_echo "no" >&6; }
33703          NETCDF_HAS_HDF4=no
33704        fi
33705
33706    else
33707      NETCDF_HAS_NC4=no
33708      NETCDF_HAS_HDF4=no
33709    fi
33710fi
33711
33712fi
33713
33714
33715NETCDF_SETTING=$NETCDF_SETTING
33716
33717
33718if test "$NETCDF_SETTING" != "no" ; then
33719
33720   for ac_header in $NETCDF_INCLUDEDIR/netcdf_mem.h
33721do :
33722  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
33723ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <$NETCDF_INCLUDEDIR/netcdf.h>
33724"
33725if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
33726  cat >>confdefs.h <<_ACEOF
33727#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
33728_ACEOF
33729 NETCDF_MEM=yes
33730else
33731  NETCDF_MEM=no
33732fi
33733
33734done
33735
33736
33737   NETCDF_MEM=$NETCDF_MEM
33738
33739   NETCDF_ROOT=$NETCDF_ROOT
33740
33741   NETCDF_HAS_NC4=$NETCDF_HAS_NC4
33742
33743   NETCDF_HAS_HDF4=$NETCDF_HAS_HDF4
33744
33745
33746   OPT_GDAL_FORMATS="netcdf $OPT_GDAL_FORMATS"
33747
33748fi
33749
33750
33751
33752
33753# Check whether --with-jasper was given.
33754if test "${with_jasper+set}" = set; then :
33755  withval=$with_jasper;
33756fi
33757
33758
33759if test "$with_jasper" = "no" ; then
33760
33761  HAVE_JASPER=no
33762
33763  { $as_echo "$as_me:${as_lineno-$LINENO}: JasPer (JPEG2000) support disabled." >&5
33764$as_echo "$as_me: JasPer (JPEG2000) support disabled." >&6;}
33765
33766elif test "$with_jasper" = "yes" -o "$with_jasper" = "" ; then
33767
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpc_decode in -ljasper" >&5
33769$as_echo_n "checking for jpc_decode in -ljasper... " >&6; }
33770if ${ac_cv_lib_jasper_jpc_decode+:} false; then :
33771  $as_echo_n "(cached) " >&6
33772else
33773  ac_check_lib_save_LIBS=$LIBS
33774LIBS="-ljasper  $LIBS"
33775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33776/* end confdefs.h.  */
33777
33778/* Override any GCC internal prototype to avoid an error.
33779   Use char because int might match the return type of a GCC
33780   builtin and then its argument prototype would still apply.  */
33781#ifdef __cplusplus
33782extern "C"
33783#endif
33784char jpc_decode ();
33785int
33786main ()
33787{
33788return jpc_decode ();
33789  ;
33790  return 0;
33791}
33792_ACEOF
33793if ac_fn_c_try_link "$LINENO"; then :
33794  ac_cv_lib_jasper_jpc_decode=yes
33795else
33796  ac_cv_lib_jasper_jpc_decode=no
33797fi
33798rm -f core conftest.err conftest.$ac_objext \
33799    conftest$ac_exeext conftest.$ac_ext
33800LIBS=$ac_check_lib_save_LIBS
33801fi
33802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jasper_jpc_decode" >&5
33803$as_echo "$ac_cv_lib_jasper_jpc_decode" >&6; }
33804if test "x$ac_cv_lib_jasper_jpc_decode" = xyes; then :
33805  HAVE_JASPER=yes
33806else
33807  HAVE_JASPER=no
33808fi
33809
33810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jp2_decode in -ljasper" >&5
33811$as_echo_n "checking for jp2_decode in -ljasper... " >&6; }
33812if ${ac_cv_lib_jasper_jp2_decode+:} false; then :
33813  $as_echo_n "(cached) " >&6
33814else
33815  ac_check_lib_save_LIBS=$LIBS
33816LIBS="-ljasper  $LIBS"
33817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33818/* end confdefs.h.  */
33819
33820/* Override any GCC internal prototype to avoid an error.
33821   Use char because int might match the return type of a GCC
33822   builtin and then its argument prototype would still apply.  */
33823#ifdef __cplusplus
33824extern "C"
33825#endif
33826char jp2_decode ();
33827int
33828main ()
33829{
33830return jp2_decode ();
33831  ;
33832  return 0;
33833}
33834_ACEOF
33835if ac_fn_c_try_link "$LINENO"; then :
33836  ac_cv_lib_jasper_jp2_decode=yes
33837else
33838  ac_cv_lib_jasper_jp2_decode=no
33839fi
33840rm -f core conftest.err conftest.$ac_objext \
33841    conftest$ac_exeext conftest.$ac_ext
33842LIBS=$ac_check_lib_save_LIBS
33843fi
33844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jasper_jp2_decode" >&5
33845$as_echo "$ac_cv_lib_jasper_jp2_decode" >&6; }
33846if test "x$ac_cv_lib_jasper_jp2_decode" = xyes; then :
33847  HAVE_JASPER=yes
33848else
33849  HAVE_JASPER=no
33850fi
33851
33852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgx_decode in -ljasper" >&5
33853$as_echo_n "checking for pgx_decode in -ljasper... " >&6; }
33854if ${ac_cv_lib_jasper_pgx_decode+:} false; then :
33855  $as_echo_n "(cached) " >&6
33856else
33857  ac_check_lib_save_LIBS=$LIBS
33858LIBS="-ljasper  $LIBS"
33859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33860/* end confdefs.h.  */
33861
33862/* Override any GCC internal prototype to avoid an error.
33863   Use char because int might match the return type of a GCC
33864   builtin and then its argument prototype would still apply.  */
33865#ifdef __cplusplus
33866extern "C"
33867#endif
33868char pgx_decode ();
33869int
33870main ()
33871{
33872return pgx_decode ();
33873  ;
33874  return 0;
33875}
33876_ACEOF
33877if ac_fn_c_try_link "$LINENO"; then :
33878  ac_cv_lib_jasper_pgx_decode=yes
33879else
33880  ac_cv_lib_jasper_pgx_decode=no
33881fi
33882rm -f core conftest.err conftest.$ac_objext \
33883    conftest$ac_exeext conftest.$ac_ext
33884LIBS=$ac_check_lib_save_LIBS
33885fi
33886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jasper_pgx_decode" >&5
33887$as_echo "$ac_cv_lib_jasper_pgx_decode" >&6; }
33888if test "x$ac_cv_lib_jasper_pgx_decode" = xyes; then :
33889  HAVE_JASPER=yes
33890else
33891  HAVE_JASPER=no
33892fi
33893
33894
33895  if test "$HAVE_JASPER" = "yes" ; then
33896    LIBS="-ljasper $LIBS"
33897  fi
33898else
33899
33900  HAVE_JASPER=yes
33901  LIBS="-L$with_jasper -L$with_jasper/lib -ljasper $LIBS"
33902  EXTRA_INCLUDES="-I$with_jasper -I$with_jasper/include $EXTRA_INCLUDES"
33903
33904  { $as_echo "$as_me:${as_lineno-$LINENO}: using JasPer library from $with_jasper." >&5
33905$as_echo "$as_me: using JasPer library from $with_jasper." >&6;}
33906fi
33907
33908if test "$HAVE_JASPER" != "no" ; then
33909  OPT_GDAL_FORMATS="jpeg2000 $OPT_GDAL_FORMATS"
33910
33911
33912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jp2_encode_uuid in -ljasper" >&5
33913$as_echo_n "checking for jp2_encode_uuid in -ljasper... " >&6; }
33914if ${ac_cv_lib_jasper_jp2_encode_uuid+:} false; then :
33915  $as_echo_n "(cached) " >&6
33916else
33917  ac_check_lib_save_LIBS=$LIBS
33918LIBS="-ljasper  $LIBS"
33919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33920/* end confdefs.h.  */
33921
33922/* Override any GCC internal prototype to avoid an error.
33923   Use char because int might match the return type of a GCC
33924   builtin and then its argument prototype would still apply.  */
33925#ifdef __cplusplus
33926extern "C"
33927#endif
33928char jp2_encode_uuid ();
33929int
33930main ()
33931{
33932return jp2_encode_uuid ();
33933  ;
33934  return 0;
33935}
33936_ACEOF
33937if ac_fn_c_try_link "$LINENO"; then :
33938  ac_cv_lib_jasper_jp2_encode_uuid=yes
33939else
33940  ac_cv_lib_jasper_jp2_encode_uuid=no
33941fi
33942rm -f core conftest.err conftest.$ac_objext \
33943    conftest$ac_exeext conftest.$ac_ext
33944LIBS=$ac_check_lib_save_LIBS
33945fi
33946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jasper_jp2_encode_uuid" >&5
33947$as_echo "$ac_cv_lib_jasper_jp2_encode_uuid" >&6; }
33948if test "x$ac_cv_lib_jasper_jp2_encode_uuid" = xyes; then :
33949  HAVE_JASPER_UUID=yes
33950else
33951  HAVE_JASPER_UUID=no
33952fi
33953
33954
33955  if test "$HAVE_JASPER_UUID" = "yes" ; then
33956    { $as_echo "$as_me:${as_lineno-$LINENO}: hacked JasPer version found (JasPer UUID), GeoJP2 enabled." >&5
33957$as_echo "$as_me: hacked JasPer version found (JasPer UUID), GeoJP2 enabled." >&6;}
33958    JASPER_FLAGS=-DHAVE_JASPER_UUID
33959  else
33960    { $as_echo "$as_me:${as_lineno-$LINENO}: hacked JasPer version not found, GeoJP2 disabled." >&5
33961$as_echo "$as_me: hacked JasPer version not found, GeoJP2 disabled." >&6;}
33962  fi
33963fi
33964
33965HAVE_JASPER=$HAVE_JASPER
33966
33967JASPER_FLAGS=$JASPER_FLAGS
33968
33969
33970
33971
33972
33973# Check whether --with-openjpeg was given.
33974if test "${with_openjpeg+set}" = set; then :
33975  withval=$with_openjpeg;
33976fi
33977
33978
33979HAVE_OPENJPEG=no
33980
33981if test "$with_openjpeg" = "no" ; then
33982
33983  { $as_echo "$as_me:${as_lineno-$LINENO}: OpenJPEG (JPEG2000) support disabled." >&5
33984$as_echo "$as_me: OpenJPEG (JPEG2000) support disabled." >&6;}
33985
33986else
33987
33988
33989
33990if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
33991	if test -n "$ac_tool_prefix"; then
33992  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
33993set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
33994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33995$as_echo_n "checking for $ac_word... " >&6; }
33996if ${ac_cv_path_PKG_CONFIG+:} false; then :
33997  $as_echo_n "(cached) " >&6
33998else
33999  case $PKG_CONFIG in
34000  [\\/]* | ?:[\\/]*)
34001  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
34002  ;;
34003  *)
34004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34005for as_dir in $PATH
34006do
34007  IFS=$as_save_IFS
34008  test -z "$as_dir" && as_dir=.
34009    for ac_exec_ext in '' $ac_executable_extensions; do
34010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34011    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
34012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34013    break 2
34014  fi
34015done
34016  done
34017IFS=$as_save_IFS
34018
34019  ;;
34020esac
34021fi
34022PKG_CONFIG=$ac_cv_path_PKG_CONFIG
34023if test -n "$PKG_CONFIG"; then
34024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
34025$as_echo "$PKG_CONFIG" >&6; }
34026else
34027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34028$as_echo "no" >&6; }
34029fi
34030
34031
34032fi
34033if test -z "$ac_cv_path_PKG_CONFIG"; then
34034  ac_pt_PKG_CONFIG=$PKG_CONFIG
34035  # Extract the first word of "pkg-config", so it can be a program name with args.
34036set dummy pkg-config; ac_word=$2
34037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34038$as_echo_n "checking for $ac_word... " >&6; }
34039if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
34040  $as_echo_n "(cached) " >&6
34041else
34042  case $ac_pt_PKG_CONFIG in
34043  [\\/]* | ?:[\\/]*)
34044  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
34045  ;;
34046  *)
34047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34048for as_dir in $PATH
34049do
34050  IFS=$as_save_IFS
34051  test -z "$as_dir" && as_dir=.
34052    for ac_exec_ext in '' $ac_executable_extensions; do
34053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34054    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
34055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34056    break 2
34057  fi
34058done
34059  done
34060IFS=$as_save_IFS
34061
34062  ;;
34063esac
34064fi
34065ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
34066if test -n "$ac_pt_PKG_CONFIG"; then
34067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
34068$as_echo "$ac_pt_PKG_CONFIG" >&6; }
34069else
34070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34071$as_echo "no" >&6; }
34072fi
34073
34074  if test "x$ac_pt_PKG_CONFIG" = x; then
34075    PKG_CONFIG=""
34076  else
34077    case $cross_compiling:$ac_tool_warned in
34078yes:)
34079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34081ac_tool_warned=yes ;;
34082esac
34083    PKG_CONFIG=$ac_pt_PKG_CONFIG
34084  fi
34085else
34086  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
34087fi
34088
34089fi
34090if test -n "$PKG_CONFIG"; then
34091	_pkg_min_version=0.21
34092	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
34093$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
34094	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
34095		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34096$as_echo "yes" >&6; }
34097	else
34098		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34099$as_echo "no" >&6; }
34100		PKG_CONFIG=""
34101	fi
34102
34103fi
34104
34105pkg_failed=no
34106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENJPEG" >&5
34107$as_echo_n "checking for OPENJPEG... " >&6; }
34108
34109if test -n "$PKG_CONFIG"; then
34110    if test -n "$OPENJPEG_CFLAGS"; then
34111        pkg_cv_OPENJPEG_CFLAGS="$OPENJPEG_CFLAGS"
34112    else
34113        if test -n "$PKG_CONFIG" && \
34114    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjp2 >= 2.1.0\""; } >&5
34115  ($PKG_CONFIG --exists --print-errors "libopenjp2 >= 2.1.0") 2>&5
34116  ac_status=$?
34117  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34118  test $ac_status = 0; }; then
34119  pkg_cv_OPENJPEG_CFLAGS=`$PKG_CONFIG --cflags "libopenjp2 >= 2.1.0" 2>/dev/null`
34120else
34121  pkg_failed=yes
34122fi
34123    fi
34124else
34125	pkg_failed=untried
34126fi
34127if test -n "$PKG_CONFIG"; then
34128    if test -n "$OPENJPEG_LIBS"; then
34129        pkg_cv_OPENJPEG_LIBS="$OPENJPEG_LIBS"
34130    else
34131        if test -n "$PKG_CONFIG" && \
34132    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjp2 >= 2.1.0\""; } >&5
34133  ($PKG_CONFIG --exists --print-errors "libopenjp2 >= 2.1.0") 2>&5
34134  ac_status=$?
34135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34136  test $ac_status = 0; }; then
34137  pkg_cv_OPENJPEG_LIBS=`$PKG_CONFIG --libs "libopenjp2 >= 2.1.0" 2>/dev/null`
34138else
34139  pkg_failed=yes
34140fi
34141    fi
34142else
34143	pkg_failed=untried
34144fi
34145
34146
34147
34148if test $pkg_failed = yes; then
34149
34150if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34151        _pkg_short_errors_supported=yes
34152else
34153        _pkg_short_errors_supported=no
34154fi
34155        if test $_pkg_short_errors_supported = yes; then
34156	        OPENJPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libopenjp2 >= 2.1.0"`
34157        else
34158	        OPENJPEG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libopenjp2 >= 2.1.0"`
34159        fi
34160	# Put the nasty error message in config.log where it belongs
34161	echo "$OPENJPEG_PKG_ERRORS" >&5
34162
34163	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34164$as_echo "no" >&6; }
34165                OPENJPEG_VERSION=;
34166elif test $pkg_failed = untried; then
34167	OPENJPEG_VERSION=;
34168else
34169	OPENJPEG_CFLAGS=$pkg_cv_OPENJPEG_CFLAGS
34170	OPENJPEG_LIBS=$pkg_cv_OPENJPEG_LIBS
34171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34172$as_echo "yes" >&6; }
34173	OPENJPEG_VERSION=`$PKG_CONFIG --modversion libopenjp2`
34174fi
34175
34176  if test -n "$OPENJPEG_CFLAGS"; then
34177
34178    # Test that the package found is for the right architecture
34179    saved_LIBS="$LIBS"
34180    LIBS="$OPENJPEG_LIBS"
34181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_setup_decoder in -lopenjp2" >&5
34182$as_echo_n "checking for opj_setup_decoder in -lopenjp2... " >&6; }
34183if ${ac_cv_lib_openjp2_opj_setup_decoder+:} false; then :
34184  $as_echo_n "(cached) " >&6
34185else
34186  ac_check_lib_save_LIBS=$LIBS
34187LIBS="-lopenjp2  $LIBS"
34188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34189/* end confdefs.h.  */
34190
34191/* Override any GCC internal prototype to avoid an error.
34192   Use char because int might match the return type of a GCC
34193   builtin and then its argument prototype would still apply.  */
34194#ifdef __cplusplus
34195extern "C"
34196#endif
34197char opj_setup_decoder ();
34198int
34199main ()
34200{
34201return opj_setup_decoder ();
34202  ;
34203  return 0;
34204}
34205_ACEOF
34206if ac_fn_c_try_link "$LINENO"; then :
34207  ac_cv_lib_openjp2_opj_setup_decoder=yes
34208else
34209  ac_cv_lib_openjp2_opj_setup_decoder=no
34210fi
34211rm -f core conftest.err conftest.$ac_objext \
34212    conftest$ac_exeext conftest.$ac_ext
34213LIBS=$ac_check_lib_save_LIBS
34214fi
34215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjp2_opj_setup_decoder" >&5
34216$as_echo "$ac_cv_lib_openjp2_opj_setup_decoder" >&6; }
34217if test "x$ac_cv_lib_openjp2_opj_setup_decoder" = xyes; then :
34218  HAVE_OPENJPEG=yes
34219else
34220  HAVE_OPENJPEG=no
34221fi
34222
34223    LIBS="$saved_LIBS"
34224
34225    if test "$HAVE_OPENJPEG" = "yes"; then
34226        EXTRA_INCLUDES="$OPENJPEG_CFLAGS $EXTRA_INCLUDES"
34227        LIBS="$OPENJPEG_LIBS $LIBS"
34228    fi
34229  fi
34230fi
34231
34232if test "$HAVE_OPENJPEG" != "no" ; then
34233  OPT_GDAL_FORMATS="openjpeg $OPT_GDAL_FORMATS"
34234fi
34235
34236
34237
34238# Check whether --with-fgdb was given.
34239if test "${with_fgdb+set}" = set; then :
34240  withval=$with_fgdb;
34241fi
34242
34243
34244FGDB_ENABLED=no
34245FGDB_LIB=
34246
34247if test "$with_fgdb" = "no" ; then
34248
34249  echo "FGDB support disabled."
34250
34251elif test "$with_fgdb" = "yes" -o "$with_fgdb" = "" ; then
34252
34253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FileGDBAPI" >&5
34254$as_echo_n "checking for FileGDBAPI... " >&6; }
34255
34256    rm -f testfgdb.*
34257    rm -f testfgdb
34258    echo "#include <FileGDBAPI.h>" > testfgdb.cpp
34259    echo "using namespace FileGDBAPI;" >> testfgdb.cpp
34260    echo "int main() { Geodatabase oDB; std::wstring osStr; ::OpenGeodatabase(osStr, oDB); return 0; }" >> testfgdb.cpp
34261    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testfgdb.cpp -lFileGDBAPI -lfgdbunixrtl -o testfgdb 2>&1`" ; then
34262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: FileGDBAPI found" >&5
34263$as_echo "FileGDBAPI found" >&6; }
34264        FGDB_ENABLED="yes"
34265        FGDB_LIB="-lFileGDBAPI -lfgdbunixrtl"
34266    else
34267        if test "$with_fgdb" = "yes"; then
34268            as_fn_error $? "FileGDBAPI not found." "$LINENO" 5
34269        else
34270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: FileGDBAPI not found." >&5
34271$as_echo "FileGDBAPI not found." >&6; }
34272        fi
34273    fi
34274    rm -f testfgdb.*
34275    rm -f testfgdb
34276
34277else
34278
34279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libFileGDBAPI.so in in $with_fgdb/lib" >&5
34280$as_echo_n "checking for libFileGDBAPI.so in in $with_fgdb/lib... " >&6; }
34281  FGDB_ENABLED=yes
34282  if test -r $with_fgdb/lib/libFileGDBAPI.so -a -r $with_fgdb/lib/libfgdbunixrtl.so ; then
34283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
34284$as_echo "found." >&6; }
34285    FGDB_LIB="-L$with_fgdb/lib -lFileGDBAPI -lfgdbunixrtl"
34286  elif test -r $with_fgdb/lib/libFileGDBAPI.dylib -a -r $with_fgdb/lib/libfgdbunixrtl.dylib ; then
34287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
34288$as_echo "found." >&6; }
34289    FGDB_LIB="-L$with_fgdb/lib -lFileGDBAPI -lfgdbunixrtl"
34290  else
34291    as_fn_error $? "not found." "$LINENO" 5
34292  fi
34293
34294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FileGDBAPI.h in $with_fgdb/include" >&5
34295$as_echo_n "checking for FileGDBAPI.h in $with_fgdb/include... " >&6; }
34296  if test -r $with_fgdb/include/FileGDBAPI.h ; then
34297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
34298$as_echo "found." >&6; }
34299    FGDB_INC="-I$with_fgdb/include"
34300  else
34301    as_fn_error $? "not found." "$LINENO" 5
34302  fi
34303
34304fi
34305
34306if test "$FGDB_LIB" != ""; then
34307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_datums in -lFileGDBAPI" >&5
34308$as_echo_n "checking for pj_datums in -lFileGDBAPI... " >&6; }
34309if ${ac_cv_lib_FileGDBAPI_pj_datums+:} false; then :
34310  $as_echo_n "(cached) " >&6
34311else
34312  ac_check_lib_save_LIBS=$LIBS
34313LIBS="-lFileGDBAPI $FGDB_LIB $LIBS"
34314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34315/* end confdefs.h.  */
34316
34317/* Override any GCC internal prototype to avoid an error.
34318   Use char because int might match the return type of a GCC
34319   builtin and then its argument prototype would still apply.  */
34320#ifdef __cplusplus
34321extern "C"
34322#endif
34323char pj_datums ();
34324int
34325main ()
34326{
34327return pj_datums ();
34328  ;
34329  return 0;
34330}
34331_ACEOF
34332if ac_fn_c_try_link "$LINENO"; then :
34333  ac_cv_lib_FileGDBAPI_pj_datums=yes
34334else
34335  ac_cv_lib_FileGDBAPI_pj_datums=no
34336fi
34337rm -f core conftest.err conftest.$ac_objext \
34338    conftest$ac_exeext conftest.$ac_ext
34339LIBS=$ac_check_lib_save_LIBS
34340fi
34341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_FileGDBAPI_pj_datums" >&5
34342$as_echo "$ac_cv_lib_FileGDBAPI_pj_datums" >&6; }
34343if test "x$ac_cv_lib_FileGDBAPI_pj_datums" = xyes; then :
34344  FGDB_HAS_PROJ4=yes
34345else
34346  FGDB_HAS_PROJ4=no
34347fi
34348
34349fi
34350
34351FGDB_ENABLED=$FGDB_ENABLED
34352
34353FGDB_LIB=$FGDB_LIB
34354
34355FGDB_INC=$FGDB_INC
34356
34357
34358ECW_FLAGS=
34359ECW_LIBS=
34360ECW_INCLUDE=
34361ECW_54=
34362
34363
34364# Check whether --with-ecw was given.
34365if test "${with_ecw+set}" = set; then :
34366  withval=$with_ecw;
34367fi
34368
34369
34370if test ! -z "`uname | grep Darwin`" ; then
34371  CARBON_FRAMEWORK="-framework Carbon"
34372else
34373  CARBON_FRAMEWORK=
34374fi
34375
34376if test "$with_ecw" = "no" ; then
34377
34378  ECW_SETTING=no
34379
34380  echo "ECW support disabled."
34381
34382elif test "$with_ecw" = "yes" -o "$with_ecw" = "" ; then
34383
34384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCScbmOpenFileView in -lNCSEcw" >&5
34385$as_echo_n "checking for NCScbmOpenFileView in -lNCSEcw... " >&6; }
34386if ${ac_cv_lib_NCSEcw_NCScbmOpenFileView+:} false; then :
34387  $as_echo_n "(cached) " >&6
34388else
34389  ac_check_lib_save_LIBS=$LIBS
34390LIBS="-lNCSEcw -lNCSCnet -lNCSUtil $LIBS"
34391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34392/* end confdefs.h.  */
34393
34394/* Override any GCC internal prototype to avoid an error.
34395   Use char because int might match the return type of a GCC
34396   builtin and then its argument prototype would still apply.  */
34397#ifdef __cplusplus
34398extern "C"
34399#endif
34400char NCScbmOpenFileView ();
34401int
34402main ()
34403{
34404return NCScbmOpenFileView ();
34405  ;
34406  return 0;
34407}
34408_ACEOF
34409if ac_fn_c_try_link "$LINENO"; then :
34410  ac_cv_lib_NCSEcw_NCScbmOpenFileView=yes
34411else
34412  ac_cv_lib_NCSEcw_NCScbmOpenFileView=no
34413fi
34414rm -f core conftest.err conftest.$ac_objext \
34415    conftest$ac_exeext conftest.$ac_ext
34416LIBS=$ac_check_lib_save_LIBS
34417fi
34418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_NCSEcw_NCScbmOpenFileView" >&5
34419$as_echo "$ac_cv_lib_NCSEcw_NCScbmOpenFileView" >&6; }
34420if test "x$ac_cv_lib_NCSEcw_NCScbmOpenFileView" = xyes; then :
34421  ECW_SETTING=yes
34422else
34423  ECW_SETTING=no
34424fi
34425
34426
34427  if test "$ECW_SETTING" = "yes" ; then
34428    ECW_LIBS="-lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
34429  fi
34430
34431  if test "$ECW_SETTING" = "no" ; then
34432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCScbmOpenFileView in -lecwj2" >&5
34433$as_echo_n "checking for NCScbmOpenFileView in -lecwj2... " >&6; }
34434if ${ac_cv_lib_ecwj2_NCScbmOpenFileView+:} false; then :
34435  $as_echo_n "(cached) " >&6
34436else
34437  ac_check_lib_save_LIBS=$LIBS
34438LIBS="-lecwj2 $CARBON_FRAMEWORK $LIBS"
34439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34440/* end confdefs.h.  */
34441
34442/* Override any GCC internal prototype to avoid an error.
34443   Use char because int might match the return type of a GCC
34444   builtin and then its argument prototype would still apply.  */
34445#ifdef __cplusplus
34446extern "C"
34447#endif
34448char NCScbmOpenFileView ();
34449int
34450main ()
34451{
34452return NCScbmOpenFileView ();
34453  ;
34454  return 0;
34455}
34456_ACEOF
34457if ac_fn_c_try_link "$LINENO"; then :
34458  ac_cv_lib_ecwj2_NCScbmOpenFileView=yes
34459else
34460  ac_cv_lib_ecwj2_NCScbmOpenFileView=no
34461fi
34462rm -f core conftest.err conftest.$ac_objext \
34463    conftest$ac_exeext conftest.$ac_ext
34464LIBS=$ac_check_lib_save_LIBS
34465fi
34466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ecwj2_NCScbmOpenFileView" >&5
34467$as_echo "$ac_cv_lib_ecwj2_NCScbmOpenFileView" >&6; }
34468if test "x$ac_cv_lib_ecwj2_NCScbmOpenFileView" = xyes; then :
34469  ECW_SETTING=yes
34470else
34471  ECW_SETTING=no
34472fi
34473
34474    if test "$ECW_SETTING" = "yes" ; then
34475      ECW_LIBS="-lecwj2 $CARBON_FRAMEWORK"
34476    fi
34477  fi
34478else
34479
34480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libNCSEcw.a or libecwj2" >&5
34481$as_echo_n "checking for libNCSEcw.a or libecwj2... " >&6; }
34482  ECW_ARCH=x86
34483  ECW_CONF="release"
34484  ECW_FLAGS="-DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION"
34485  ECW_FRAMEWORK_COCOA=""
34486  if test "`arch`" = "x86_64" ; then
34487    ECW_ARCH="x64"
34488  fi
34489  if test ! -z "`uname | grep Darwin`" ; then
34490    ECW_ARCH=""
34491    ECW_CONF=""
34492    ECW_FLAGS=""
34493    ECW_FRAMEWORK_COCOA=" -framework Cocoa "
34494  fi
34495
34496  ECW_SETTING=yes
34497  if test -r $with_ecw/lib/libNCSCnet.so -o -r $with_ecw/lib/libNCSCnet.dylib ; then
34498    ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
34499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/lib." >&5
34500$as_echo "found in $with_ecw/lib." >&6; }
34501  elif test -r $with_ecw/lib/libNCSCNet.so -o -r $with_ecw/lib/libNCSCNet.dylib ; then
34502    ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCNet -lNCSUtil"
34503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/lib." >&5
34504$as_echo "found in $with_ecw/lib." >&6; }
34505  elif test -r $with_ecw/bin/libNCSEcw.so -o -r $with_ecw/bin/libNCSEcw.dylib ; then
34506    ECW_LIBS="-L$with_ecw/bin -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
34507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/bin." >&5
34508$as_echo "found in $with_ecw/bin." >&6; }
34509  elif test -r $with_ecw/lib/libecwj2.dylib ; then
34510    ECW_LIBS="-L$with_ecw/lib -lecwj2 $CARBON_FRAMEWORK"
34511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found libecwj2 in $with_ecw/lib." >&5
34512$as_echo "found libecwj2 in $with_ecw/lib." >&6; }
34513
34514  # ECW SDK 5.0 style and also for the case where license type is included in path i.e. specific license type is requested.
34515  elif test -r $with_ecw/lib/$ECW_ARCH/$ECW_CONF/libNCSEcw.a ; then
34516    # Test if we must use the newabi/cpp11abi version (SDK 5.4+)
34517    if test -r $with_ecw/lib/newabi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a || test -r $with_ecw/lib/cpp11abi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a; then
34518        if test -d $with_ecw/lib/newabi; then
34519            ECW_ABIDIR=newabi
34520        else
34521            ECW_ABIDIR=cpp11abi
34522        fi
34523        echo "#include <string>" > testnewabi.cpp
34524        echo "namespace NCS { class CString { public: static std::wstring Utf8Decode (const std::string &sUtf8); }; }" >> testnewabi.cpp
34525        echo "int main() { return static_cast<int>(NCS::CString::Utf8Decode(std::string()).size()); }" >> testnewabi.cpp
34526        if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testnewabi.cpp -L$with_ecw/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF -lNCSEcw -o testnewabi 2>&1`" ; then
34527            ECW_LIBDIR=$with_ecw/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF
34528            ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA"
34529            with_ecw=$with_ecw/$ecw_license_type
34530            ECW_54="yes"
34531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Intergraph 5.4+ SDK with ${ECW_ABIDIR} in ${ECW_LIBDIR}." >&5
34532$as_echo "found Intergraph 5.4+ SDK with ${ECW_ABIDIR} in ${ECW_LIBDIR}." >&6; }
34533            rm -f testnewabi.*
34534            rm -f testnewabi
34535            break
34536        fi
34537        rm -f testnewabi.*
34538        rm -f testnewabi
34539    fi
34540    if test "$ECW_LIBS" = ""; then
34541        ECW_LIBDIR=$with_ecw/lib/$ECW_ARCH/$ECW_CONF
34542        ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA"
34543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Intergraph 5.x+ SDK in ${ECW_LIBDIR}." >&5
34544$as_echo "found Intergraph 5.x+ SDK in ${ECW_LIBDIR}." >&6; }
34545    fi
34546 # ECWJP2 SDK 5.1 style
34547  elif test -d $with_ecw; then
34548    for ecw_license_type in "Desktop_Read-Write" "Server_Read-Only_EndUser" "Server_Read-Only" "Server_Read-Write" "Desktop_Read-Only"
34549      do
34550        # Test if we must use the newabi/cpp11abi version (SDK 5.4+)
34551        if test -r $with_ecw/$ecw_license_type/lib/newabi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a || test -r $with_ecw/$ecw_license_type/lib/cpp11abi/$ECW_ARCH/$ECW_CONF/libNCSEcw.a; then
34552            if test -d $with_ecw/lib/newabi; then
34553                ECW_ABIDIR=newabi
34554            else
34555                ECW_ABIDIR=cpp11abi
34556            fi
34557            echo "#include <string>" > testnewabi.cpp
34558            echo "namespace NCS { class CString { public: static std::wstring Utf8Decode (const std::string &sUtf8); }; }" >> testnewabi.cpp
34559            echo "int main() { return static_cast<int>(NCS::CString::Utf8Decode(std::string()).size()); }" >> testnewabi.cpp
34560            if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testnewabi.cpp -L$with_ecw/$ecw_license_type/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF -lNCSEcw -o testnewabi 2>&1`" ; then
34561                ECW_LIBDIR=$with_ecw/$ecw_license_type/lib/$ECW_ABIDIR/$ECW_ARCH/$ECW_CONF
34562                ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA"
34563                with_ecw=$with_ecw/$ecw_license_type
34564                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Intergraph 5.4+ SDK with ${ECW_ABIDIR} in ${ECW_LIBDIR}." >&5
34565$as_echo "found Intergraph 5.4+ SDK with ${ECW_ABIDIR} in ${ECW_LIBDIR}." >&6; }
34566                ECW_54="yes"
34567                rm -f testnewabi.*
34568                rm -f testnewabi
34569                break
34570            fi
34571            rm -f testnewabi.*
34572            rm -f testnewabi
34573        fi
34574        if test "$ECW_LIBS" = ""; then
34575            ECW_LIBDIR=$with_ecw/$ecw_license_type/lib/$ECW_ARCH/$ECW_CONF
34576            if test -r $ECW_LIBDIR/libNCSEcw.a; then
34577                ECW_LIBS="-L$ECW_LIBDIR -lNCSEcw $ECW_FRAMEWORK_COCOA"
34578                with_ecw=$with_ecw/$ecw_license_type
34579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Intergraph 5.x+ SDK in ${ECW_LIBDIR}." >&5
34580$as_echo "found Intergraph 5.x+ SDK in ${ECW_LIBDIR}." >&6; }
34581                break
34582            fi
34583        fi
34584      done
34585 else
34586    as_fn_error $? "not found in $with_ecw." "$LINENO" 5
34587  fi
34588
34589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCSECWClient.h in $with_ecw/include" >&5
34590$as_echo_n "checking for NCSECWClient.h in $with_ecw/include... " >&6; }
34591  if test -r $with_ecw/include/NCSECWClient.h ; then
34592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
34593$as_echo "found." >&6; }
34594    ECW_INCLUDE="-I$with_ecw/include"
34595  else
34596    as_fn_error $? "not found." "$LINENO" 5
34597  fi
34598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECWJP2BuildNumber.h in $with_ecw/include" >&5
34599$as_echo_n "checking for ECWJP2BuildNumber.h in $with_ecw/include... " >&6; }
34600  if test -r $with_ecw/include/ECWJP2BuildNumber.h ; then
34601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5
34602$as_echo "found." >&6; }
34603    ECW_FLAGS="-DHAVE_ECW_BUILDNUMBER_H $ECW_FLAGS"
34604  else
34605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5
34606$as_echo "not found." >&6; }
34607  fi
34608fi
34609
34610ECW_SETTING=$ECW_SETTING
34611
34612ECW_LIBS=$ECW_LIBS
34613
34614ECW_FLAGS=$ECW_FLAGS
34615
34616ECW_INCLUDE=$ECW_INCLUDE
34617
34618
34619if test "$ECW_SETTING" != "no" ; then
34620  OPT_GDAL_FORMATS="ecw $OPT_GDAL_FORMATS"
34621fi
34622
34623
34624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kakadu JPEG2000 support" >&5
34625$as_echo_n "checking for Kakadu JPEG2000 support... " >&6; }
34626
34627
34628# Check whether --with-kakadu was given.
34629if test "${with_kakadu+set}" = set; then :
34630  withval=$with_kakadu;
34631fi
34632
34633
34634if test "$with_kakadu" = "no" -o "$with_kakadu" = "" ; then
34635  KAKDIR=
34636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not requested." >&5
34637$as_echo "not requested." >&6; }
34638  HAVE_KAKADU=no
34639elif test "$with_kakadu" = "yes" ; then
34640  as_fn_error $? "
34641For JPEG2000 support using Kakadu you need provide the path to the Kakadu
34642build directory.  Note that Kakadu is *not* free software." "$LINENO" 5
34643else
34644  KAKDIR=$with_kakadu
34645  OPT_GDAL_FORMATS="jp2kak jpipkak $OPT_GDAL_FORMATS"
34646  LIBS="$LIBS -L$with_kakadu/lib -lkdu"
34647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: requested." >&5
34648$as_echo "requested." >&6; }
34649  HAVE_KAKADU=yes
34650fi
34651
34652KAKDIR=$KAKDIR
34653
34654
34655MRSID_FLAGS=
34656HAVE_MRSID=no
34657
34658
34659# Check whether --with-mrsid was given.
34660if test "${with_mrsid+set}" = set; then :
34661  withval=$with_mrsid;
34662fi
34663
34664
34665
34666# Check whether --with-jp2mrsid was given.
34667if test "${with_jp2mrsid+set}" = set; then :
34668  withval=$with_jp2mrsid;
34669fi
34670
34671
34672if test "x$with_mrsid" = "xno"  -o "x$with_mrsid" = "x" ; then
34673
34674  HAVE_MRSID=no
34675
34676  { $as_echo "$as_me:${as_lineno-$LINENO}: MrSID support disabled." >&5
34677$as_echo "$as_me: MrSID support disabled." >&6;}
34678
34679else
34680
34681  MRSID_BASE="$with_mrsid/include"
34682
34683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_base.h in $MRSID_BASE/support" >&5
34684$as_echo_n "checking for lt_base.h in $MRSID_BASE/support... " >&6; }
34685  if test -r "$MRSID_BASE/support/lt_base.h" ; then
34686
34687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found MrSID DSDK version 4.x or newer." >&5
34688$as_echo "found MrSID DSDK version 4.x or newer." >&6; }
34689    HAVE_MRSID=yes
34690    MRSID_INCLUDE="-I$MRSID_BASE/base -I$MRSID_BASE/metadata -I$MRSID_BASE/mrsid_readers -I$MRSID_BASE/j2k_readers -I$MRSID_BASE/support"
34691
34692  else
34693
34694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5
34695$as_echo "not found." >&6; }
34696
34697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_base.h in $MRSID_BASE" >&5
34698$as_echo_n "checking for lt_base.h in $MRSID_BASE... " >&6; }
34699    if test -r "$MRSID_BASE/lt_base.h" ; then
34700
34701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: found MrSID DSDK version 7.x or newer." >&5
34702$as_echo "found MrSID DSDK version 7.x or newer." >&6; };
34703      HAVE_MRSID=yes
34704      MRSID_INCLUDE="-I$MRSID_BASE"
34705
34706    fi
34707
34708  fi
34709
34710  if test $HAVE_MRSID = yes ; then
34711
34712    MRSID_LIBS="-lpthread"
34713
34714    if test -r "$with_mrsid/lib/libltiesdk.a" ; then # v8+ esdk contains dsdk
34715      _LIBPART=lib
34716      MRSID_LIBS="-lltiesdk $MRSID_LIBS"
34717    elif test -e "$with_mrsid/lib/libltidsdk.a" \
34718           -o -e "$with_mrsid/lib/libltidsdk.so" \
34719           -o -e "$with_mrsid/lib/libltidsdk.dylib" ; then
34720      _LIBPART=lib
34721      MRSID_LIBS="-lltidsdk $MRSID_LIBS"
34722    else
34723      _LIBPART=lib/Release
34724      MRSID_LIBS="-lltidsdk $MRSID_LIBS"
34725    fi
34726
34727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MG3ImageWriter.h in $with_mrsid/include/mrsid_writers" >&5
34728$as_echo_n "checking for MG3ImageWriter.h in $with_mrsid/include/mrsid_writers... " >&6; }
34729    if test -r "$with_mrsid/include/mrsid_writers/MG3ImageWriter.h" ; then
34730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: found MrSID ESDK version 4.x or newer." >&5
34731$as_echo "found MrSID ESDK version 4.x or newer." >&6; }
34732      MRSID_FLAGS="-DMRSID_ESDK $MRSID_FLAGS"
34733      MRSID_INCLUDE="-I$with_mrsid/include/mrsid_writers -I$with_mrsid/include/j2k_writers $MRSID_INCLUDE"
34734      if test -r $with_mrsid/3rd-party/lib/Release/libcryptopp.a ; then
34735        MRSID_LIBS="-lltiesdk -lcryptopp -lxmlparse $MRSID_LIBS"
34736      else
34737        MRSID_LIBS="-lltiesdk -lxmlparse $MRSID_LIBS"
34738      fi
34739    else
34740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no encoding support." >&5
34741$as_echo "no encoding support." >&6; }
34742    fi
34743
34744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MrSID JPEG2000 support" >&5
34745$as_echo_n "checking for MrSID JPEG2000 support... " >&6; }
34746    if test "x$with_jp2mrsid" = "xyes" -a "$HAVE_KAKADU" = "yes" ; then
34747      # SDK v8 or later don't seem to conflict with Kakadu
34748      major_version=`cat $with_mrsid/include/lti_version.h | grep MAJOR | sed 's/#define LTI_SDK_MAJOR[ ]*\(.*\)/\1/'`
34749      if test "x$major_version" != "x"; then
34750        if test "$major_version" -ge 8; then
34751            V8_OR_LATER=yes
34752        fi
34753      fi
34754      if test "x$V8_OR_LATER" = "x"; then
34755        as_fn_error $? "MrSID JPEG2000 support requested, but this is incompatible with use of standalone Kakadu" "$LINENO" 5
34756      fi
34757    fi
34758
34759    MRSID_KAKADU_LIB=""
34760    if test "$HAVE_KAKADU" = "no" ; then
34761      if test x"$with_jp2mrsid" = x"" -o x"$with_jp2mrsid" = x"yes" ; then
34762        if test -r "$with_mrsid/3rd-party/$_LIBPART/libltikdu.a" ; then
34763          with_jp2mrsid=yes
34764          MRSID_KAKADU_LIB=-lltikdu
34765        elif test -r "$with_mrsid/3rd-party/$_LIBPART/liblt_kakadu.a" ; then
34766          with_jp2mrsid=yes
34767          MRSID_KAKADU_LIB=-llt_kakadu
34768        elif test -e "$with_mrsid/lib/libltidsdk.so" \
34769               -o -e "$with_mrsid/lib/libltidsdk.dylib"; then # v8+ .so has kdu
34770          with_jp2mrsid=yes
34771        elif test x"$with_jp2mrsid" = x"yes" ; then
34772          as_fn_error $? "MrSID JPEG2000 support requested, but libltikdu.a not found." "$LINENO" 5
34773        else
34774          with_jp2mrsid=no
34775        fi
34776      fi
34777    fi
34778
34779    if test "x$with_jp2mrsid" = "xyes" ; then
34780      MRSID_LIBS="$MRSID_LIBS $MRSID_KAKADU_LIB"
34781      MRSID_FLAGS="-DMRSID_J2K $MRSID_FLAGS"
34782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
34783$as_echo "enabled" >&6; }
34784    else
34785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34786$as_echo "disabled" >&6; }
34787    fi
34788
34789    MRSID_LIBS="-L$with_mrsid/$_LIBPART $MRSID_LIBS"
34790    MRSID_LIBS="-L$with_mrsid/3rd-party/$_LIBPART $MRSID_LIBS"
34791
34792  else
34793    HAVE_MRSID=no
34794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5
34795$as_echo "not found." >&6; }
34796    as_fn_error $? "  MrSID requested, but components not found." "$LINENO" 5
34797  fi
34798fi
34799
34800MRSID_INCLUDE=$MRSID_INCLUDE
34801
34802MRSID_FLAGS=$MRSID_FLAGS
34803
34804MRSID_LIBS=$MRSID_LIBS
34805
34806
34807if test "$HAVE_MRSID" != "no" ; then
34808  CPPFLAGS="-D_REENTRANT $CPPFLAGS"
34809  OPT_GDAL_FORMATS="mrsid $OPT_GDAL_FORMATS"
34810fi
34811
34812
34813MRSID_LIDAR_FLAGS=
34814HAVE_MRSID_LIDAR=no
34815
34816
34817# Check whether --with-mrsid_lidar was given.
34818if test "${with_mrsid_lidar+set}" = set; then :
34819  withval=$with_mrsid_lidar;
34820fi
34821
34822
34823if test "x$with_mrsid_lidar" = "xno"  -o "x$with_mrsid_lidar" = "x" ; then
34824  HAVE_MRSID_LIDAR=no
34825  { $as_echo "$as_me:${as_lineno-$LINENO}: MrSID/MG4 Lidar support disabled." >&5
34826$as_echo "$as_me: MrSID/MG4 Lidar support disabled." >&6;}
34827else
34828  MRSID_LIDAR_BASE="$with_mrsid_lidar"
34829
34830  if test -r "$MRSID_LIDAR_BASE/include/lidar/Version.h" ; then
34831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found LizardTech LiDAR SDK 1.1 or newer." >&5
34832$as_echo "found LizardTech LiDAR SDK 1.1 or newer." >&6; }
34833    HAVE_MRSID_LIDAR=yes
34834  else
34835    HAVE_MRSID_LIDAR=no
34836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5
34837$as_echo "not found." >&6; }
34838    as_fn_error $? "  MrSID/MG4 Lidar requested, but components not found." "$LINENO" 5
34839  fi
34840
34841  if test $HAVE_MRSID_LIDAR = yes ; then
34842    if test -e "$MRSID_LIDAR_BASE/lib/liblti_lidar_dsdk.so" \
34843         -o -e "$MRSID_LIDAR_BASE/lib/liblti_lidar_dsdk.dylib"; then
34844      MRSID_LIDAR_LIBS="-L$MRSID_LIDAR_BASE/lib -llti_lidar_dsdk"
34845      MRSID_LIDAR_INCLUDE="-I$MRSID_LIDAR_BASE/include"
34846    else
34847      MRSID_LIDAR_LIBS="-L$MRSID_LIDAR_BASE/lib/Release -llti_lidar_dsdk"
34848      MRSID_LIDAR_INCLUDE="-I$MRSID_LIDAR_BASE/include"
34849    fi
34850  fi
34851fi
34852
34853MRSID_LIDAR_INCLUDE=$MRSID_LIDAR_INCLUDE
34854
34855MRSID_LIDAR_LIBS=$MRSID_LIDAR_LIBS
34856
34857
34858if test "$HAVE_MRSID_LIDAR" != "no" ; then
34859  OPT_GDAL_FORMATS="mrsid_lidar $OPT_GDAL_FORMATS"
34860fi
34861
34862
34863
34864# Check whether --with-jp2lura was given.
34865if test "${with_jp2lura+set}" = set; then :
34866  withval=$with_jp2lura;
34867fi
34868
34869
34870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JP2Lura support" >&5
34871$as_echo_n "checking for JP2Lura support... " >&6; }
34872
34873HAVE_JP2LURA=no
34874JP2LURA_INCLUDE=
34875
34876if test "$with_jp2lura" != "" -a "$with_jp2lura" != "no" ; then
34877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwf_jp2.h" >&5
34878$as_echo_n "checking for lwf_jp2.h... " >&6; }
34879  if test -f "$with_jp2lura/include/lwf_jp2.h"; then
34880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34881$as_echo "yes" >&6; }
34882  else
34883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34884$as_echo "no" >&6; }
34885    as_fn_error $? "JP2Lura support requested but header not found" "$LINENO" 5
34886  fi
34887  JP2LURA_INCLUDE="-I$with_jp2lura/include"
34888
34889  # mingw support
34890  if test -f "$with_jp2lura/library/lwf_jp2.lib"; then
34891      ln -s "$with_jp2lura/library/lwf_jp2.lib" "$with_jp2lura/library/lib_lwf_jp2.a"
34892  fi
34893
34894  ORIG_LIBS="$LIBS"
34895  LIBS="-L$with_jp2lura/library"
34896
34897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JP2_Decompress_SetLicense in -l_lwf_jp2" >&5
34898$as_echo_n "checking for JP2_Decompress_SetLicense in -l_lwf_jp2... " >&6; }
34899if ${ac_cv_lib__lwf_jp2_JP2_Decompress_SetLicense+:} false; then :
34900  $as_echo_n "(cached) " >&6
34901else
34902  ac_check_lib_save_LIBS=$LIBS
34903LIBS="-l_lwf_jp2 -lm $LIBS"
34904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34905/* end confdefs.h.  */
34906
34907/* Override any GCC internal prototype to avoid an error.
34908   Use char because int might match the return type of a GCC
34909   builtin and then its argument prototype would still apply.  */
34910#ifdef __cplusplus
34911extern "C"
34912#endif
34913char JP2_Decompress_SetLicense ();
34914int
34915main ()
34916{
34917return JP2_Decompress_SetLicense ();
34918  ;
34919  return 0;
34920}
34921_ACEOF
34922if ac_fn_c_try_link "$LINENO"; then :
34923  ac_cv_lib__lwf_jp2_JP2_Decompress_SetLicense=yes
34924else
34925  ac_cv_lib__lwf_jp2_JP2_Decompress_SetLicense=no
34926fi
34927rm -f core conftest.err conftest.$ac_objext \
34928    conftest$ac_exeext conftest.$ac_ext
34929LIBS=$ac_check_lib_save_LIBS
34930fi
34931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib__lwf_jp2_JP2_Decompress_SetLicense" >&5
34932$as_echo "$ac_cv_lib__lwf_jp2_JP2_Decompress_SetLicense" >&6; }
34933if test "x$ac_cv_lib__lwf_jp2_JP2_Decompress_SetLicense" = xyes; then :
34934  HAVE_JP2LURA="yes"
34935fi
34936
34937
34938  if test "$HAVE_JP2LURA" = "no" ; then
34939    as_fn_error $? "JP2Lura support requested but library not found" "$LINENO" 5
34940  fi
34941
34942  LIBS="-L$with_jp2lura/library -l_lwf_jp2 -lm $ORIG_LIBS"
34943fi
34944
34945JP2LURA_INCLUDE=$JP2LURA_INCLUDE
34946
34947
34948if test "$HAVE_JP2LURA" != "no" ; then
34949  OPT_GDAL_FORMATS="jp2lura $OPT_GDAL_FORMATS"
34950fi
34951
34952
34953
34954# Check whether --with-msg was given.
34955if test "${with_msg+set}" = set; then :
34956  withval=$with_msg;
34957fi
34958
34959
34960HAVE_MSG=no
34961HAVE_EUMETSATWT=no
34962
34963if test "x$with_msg" = "xyes" ; then
34964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EUMETSAT Wavelet Transformation Software" >&5
34965$as_echo_n "checking for EUMETSAT Wavelet Transformation Software... " >&6; }
34966
34967    if test -d "frmts/msg/PublicDecompWT" -a \
34968        -f "frmts/msg/PublicDecompWT/COMP/Inc/CImage.h"; then
34969        HAVE_EUMETSATWT=yes
34970    else
34971        HAVE_EUMETSATWT=no
34972    fi
34973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_EUMETSATWT" >&5
34974$as_echo "$HAVE_EUMETSATWT" >&6; }
34975fi
34976
34977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG" >&5
34978$as_echo_n "checking for MSG... " >&6; }
34979
34980if test "x$with_msg" = "xyes" -o "x$with_msg" = "x" \
34981    -a "x$HAVE_EUMETSATWT" = "xyes"; then
34982    OPT_GDAL_FORMATS="msg $OPT_GDAL_FORMATS"
34983    HAVE_MSG=yes
34984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
34985$as_echo "enabled" >&6; }
34986else
34987    HAVE_MSG=no
34988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not requested" >&5
34989$as_echo "not requested" >&6; }
34990fi
34991
34992
34993
34994ORACLE_OCI_REQ_VERSION="10.0.1"
34995
34996
34997# Check whether --with-oci was given.
34998if test "${with_oci+set}" = set; then :
34999  withval=$with_oci;
35000        if test "$withval" = "yes"; then
35001            if test -n "$ORACLE_HOME"; then
35002                oracle_home_dir="$ORACLE_HOME"
35003            else
35004                oracle_home_dir=""
35005            fi
35006        elif test -d "$withval"; then
35007            oracle_home_dir="$withval"
35008        else
35009            oracle_home_dir=""
35010        fi
35011
35012else
35013
35014        if test -n "$ORACLE_HOME"; then
35015            oracle_home_dir="$ORACLE_HOME"
35016        else
35017            oracle_home_dir=""
35018        fi
35019
35020
35021fi
35022
35023
35024
35025# Check whether --with-oci-include was given.
35026if test "${with_oci_include+set}" = set; then :
35027  withval=$with_oci_include; oracle_home_include_dir="$withval"
35028else
35029  oracle_home_include_dir=""
35030
35031fi
35032
35033
35034# Check whether --with-oci-lib was given.
35035if test "${with_oci_lib+set}" = set; then :
35036  withval=$with_oci_lib; oracle_home_lib_dir="$withval"
35037else
35038  oracle_home_lib_dir=""
35039
35040fi
35041
35042
35043    ORACLE_OCI_CFLAGS=""
35044    ORACLE_OCI_LDFLAGS=""
35045    ORACLE_OCI_VERSION=""
35046
35047                want_oracle_but_no_path="no"
35048
35049    if test -n "$oracle_home_dir"; then
35050
35051        if test "$oracle_home_dir" != "no" -a "$oracle_home_dir" != "yes"; then
35052
35053                        if test -d "$oracle_home_dir/rdbms/public"; then
35054                oracle_include_dir="$oracle_home_dir/rdbms/public"
35055            fi
35056
35057                        if test -d "$oracle_home_dir/rdbms/demo"; then
35058                oracle_include_dir="$oracle_home_dir/rdbms/demo"
35059            fi
35060
35061                        if test -d "$oracle_home_dir/sdk/include"; then
35062                oracle_include_dir="$oracle_home_dir/sdk/include"
35063            fi
35064
35065                        oracle_lib_dir="$oracle_home_dir/lib"
35066
35067                        oracle_lib_dir2="$oracle_home_dir"
35068
35069        elif test "$oracle_home_dir" = "yes"; then
35070            want_oracle_but_no_path="yes"
35071        fi
35072
35073    elif test -n "$oracle_home_include_dir" -o -n "$oracle_home_lib_dir"; then
35074
35075        if test "$oracle_home_include_dir" != "no" -a "$oracle_home_include_dir" != "yes"; then
35076            oracle_include_dir="$oracle_home_include_dir"
35077        elif test "$oracle_home_include_dir" = "yes"; then
35078            want_oracle_but_no_path="yes"
35079        fi
35080
35081        if test "$oracle_home_lib_dir" != "no" -a "$oracle_home_lib_dir" != "yes"; then
35082            oracle_lib_dir="$oracle_home_lib_dir"
35083        elif test "$oracle_home_lib_dir" = "yes"; then
35084            want_oracle_but_no_path="yes"
35085        fi
35086    fi
35087
35088    if test "$want_oracle_but_no_path" = "yes"; then
35089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle support is requested but no Oracle paths have been provided. \
35090Please, locate Oracle directories using --with-oci or \
35091--with-oci-include and --with-oci-lib options." >&5
35092$as_echo "$as_me: WARNING: Oracle support is requested but no Oracle paths have been provided. \
35093Please, locate Oracle directories using --with-oci or \
35094--with-oci-include and --with-oci-lib options." >&2;}
35095    fi
35096
35097                if test -n "$oracle_include_dir" -a -n "$oracle_lib_dir" -o -n "$oracle_lib_dir2"; then
35098
35099        saved_CPPFLAGS="$CPPFLAGS"
35100        CPPFLAGS="$CPPFLAGS -I$oracle_include_dir"
35101
35102                        if test -n "$oracle_include_dir" ; then
35103          oci_ldflags="-L$oracle_lib_dir -lclntsh"
35104        else
35105          oci_ldflags="-L$oracle_lib_dir -L$oracle_lib_dir2 -lclntsh"
35106        fi
35107
35108        saved_LIBS="$LIBS"
35109        LIBS="$LIBS $oci_ldflags"
35110
35111                                if test -f "$oracle_include_dir/oci.h"; then
35112            ACTIVE_INCLUDE_DIR="$oracle_include_dir"
35113        fi
35114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI headers in $ACTIVE_INCLUDE_DIR" >&5
35115$as_echo_n "checking for Oracle OCI headers in $ACTIVE_INCLUDE_DIR... " >&6; }
35116
35117        ac_ext=cpp
35118ac_cpp='$CXXCPP $CPPFLAGS'
35119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35122
35123        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35124/* end confdefs.h.  */
35125
35126            #include <oci.h>
35127int
35128main ()
35129{
35130
35131#if defined(OCI_MAJOR_VERSION)
35132#if OCI_MAJOR_VERSION == 10 && OCI_MINOR_VERSION == 2
35133// Oracle 10.2 detected
35134#endif
35135#elif defined(OCI_V7_SYNTAX)
35136// OK, older Oracle detected
35137// TODO - mloskot: find better macro to check for older versions;
35138#else
35139#  error Oracle oci.h header not found
35140#endif
35141
35142
35143  ;
35144  return 0;
35145}
35146_ACEOF
35147if ac_fn_cxx_try_compile "$LINENO"; then :
35148
35149            ORACLE_OCI_CFLAGS="-I$oracle_include_dir"
35150
35151            oci_header_found="yes"
35152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35153$as_echo "yes" >&6; }
35154
35155else
35156
35157            oci_header_found="no"
35158            { $as_echo "$as_me:${as_lineno-$LINENO}: result:  header not found" >&5
35159$as_echo " header not found" >&6; }
35160
35161
35162fi
35163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35164        ac_ext=c
35165ac_cpp='$CPP $CPPFLAGS'
35166ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35167ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35168ac_compiler_gnu=$ac_cv_c_compiler_gnu
35169
35170
35171                                if test "$oci_header_found" = "yes"; then
35172
35173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI libraries in $oracle_lib_dir" >&5
35174$as_echo_n "checking for Oracle OCI libraries in $oracle_lib_dir... " >&6; }
35175
35176            ac_ext=cpp
35177ac_cpp='$CXXCPP $CPPFLAGS'
35178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35181
35182            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35183/* end confdefs.h.  */
35184
35185                #include <oci.h>
35186int
35187main ()
35188{
35189
35190OCIEnv* envh = 0;
35191OCIEnvCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0);
35192if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
35193
35194
35195  ;
35196  return 0;
35197}
35198_ACEOF
35199if ac_fn_cxx_try_link "$LINENO"; then :
35200
35201                ORACLE_OCI_LDFLAGS="$oci_ldflags"
35202                oci_lib_found="yes"
35203                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35204$as_echo "yes" >&6; }
35205
35206else
35207
35208                oci_lib_found="no"
35209                { $as_echo "$as_me:${as_lineno-$LINENO}: result: library not found" >&5
35210$as_echo "library not found" >&6; }
35211
35212
35213fi
35214rm -f core conftest.err conftest.$ac_objext \
35215    conftest$ac_exeext conftest.$ac_ext
35216            ac_ext=c
35217ac_cpp='$CPP $CPPFLAGS'
35218ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35219ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35220ac_compiler_gnu=$ac_cv_c_compiler_gnu
35221
35222        fi
35223
35224        CPPFLAGS="$saved_CPPFLAGS"
35225        LIBS="$saved_LIBS"
35226    fi
35227
35228                oracle_version_req=$ORACLE_OCI_REQ_VERSION
35229
35230    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes" -a \
35231        -n "$oracle_version_req"; then
35232
35233        if test -f "$oracle_include_dir/oci.h"; then
35234            ACTIVE_INCLUDE_DIR="$oracle_include_dir"
35235        fi
35236
35237        oracle_version_major=$(sed -n '/^#define OCI_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
35238		$ACTIVE_INCLUDE_DIR/oci.h)
35239        oracle_version_minor=$(sed -n '/^#define OCI_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
35240		$ACTIVE_INCLUDE_DIR/oci.h)
35241
35242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle OCI version is >= $oracle_version_req " >&5
35243$as_echo_n "checking if Oracle OCI version is >= $oracle_version_req ... " >&6; }
35244
35245        if test -n "$oracle_version_major" -a -n $"oracle_version_minor"; then
35246
35247            ORACLE_OCI_VERSION="$oracle_version_major.$oracle_version_minor"
35248
35249                                    oracle_version_req_major=`expr $oracle_version_req : '\([0-9]*\)'`
35250            oracle_version_req_minor=`expr $oracle_version_req : '[0-9]*\.\([0-9]*\)'`
35251
35252            oracle_version_req_number=`expr $oracle_version_req_major \* 1000000 \
35253                                       \+ $oracle_version_req_minor \* 1000`
35254
35255                        oracle_version_number=`expr $oracle_version_major \* 1000000 \
35256                                  \+ $oracle_version_minor \* 1000`
35257
35258            oracle_version_check=`expr $oracle_version_number \>\= $oracle_version_req_number`
35259            if test "$oracle_version_check" = "1"; then
35260
35261                oracle_version_checked="yes"
35262                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35263$as_echo "yes" >&6; }
35264
35265                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle version >= 10.x to use -lnnz10 flag" >&5
35266$as_echo_n "checking for Oracle version >= 10.x to use -lnnz10 flag... " >&6; }
35267                oracle_nnz10_check=`expr $oracle_version_number \>\= 10 \* 1000000`
35268                if test "$oracle_nnz10_check" = "1"; then
35269                    ORACLE_OCI_LDFLAGS="$ORACLE_OCI_LDFLAGS -lnnz$oracle_version_major"
35270                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35271$as_echo "yes" >&6; }
35272                else
35273                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35274$as_echo "no" >&6; }
35275                fi
35276            else
35277                oracle_version_checked="no"
35278                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35279$as_echo "no" >&6; }
35280                as_fn_error $? "Oracle $ORACLE_OCI_VERSION found, but required version is $oracle_version_req" "$LINENO" 5
35281            fi
35282        else
35283            ORACLE_OCI_VERSION="UNKNOWN"
35284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35285$as_echo "no" >&6; }
35286            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&5
35287$as_echo "$as_me: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&2;}
35288        fi
35289    fi
35290
35291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle support is enabled" >&5
35292$as_echo_n "checking if Oracle support is enabled... " >&6; }
35293
35294    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes"; then
35295
35296
35297
35298
35299
35300        HAVE_ORACLE_OCI="yes"
35301    else
35302        HAVE_ORACLE_OCI="no"
35303    fi
35304
35305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ORACLE_OCI" >&5
35306$as_echo "$HAVE_ORACLE_OCI" >&6; }
35307
35308
35309if test "$HAVE_ORACLE_OCI" = "yes"; then
35310    OPT_GDAL_FORMATS="georaster $OPT_GDAL_FORMATS"
35311    HAVE_GEORASTER=yes
35312else
35313    HAVE_GEORASTER=no
35314fi
35315
35316
35317
35318OPT_GDAL_FORMATS=$OPT_GDAL_FORMATS
35319
35320
35321
35322GNM_ENABLED=yes
35323
35324
35325# Check whether --with-gnm was given.
35326if test "${with_gnm+set}" = set; then :
35327  withval=$with_gnm;
35328fi
35329
35330
35331if test "$with_gnm" = "no" ; then
35332  GNM_ENABLED=no
35333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled by user" >&5
35334$as_echo "disabled by user" >&6; }
35335else
35336  GNM_ENABLED=yes
35337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
35338$as_echo "enabled" >&6; }
35339fi
35340GNM_ENABLED=$GNM_ENABLED
35341
35342
35343
35344MYSQL_CONFIG=no
35345
35346
35347# Check whether --with-mysql was given.
35348if test "${with_mysql+set}" = set; then :
35349  withval=$with_mysql;
35350fi
35351
35352
35353if test "$with_mysql" = "yes" ; then
35354  # Extract the first word of "mysql_config", so it can be a program name with args.
35355set dummy mysql_config; ac_word=$2
35356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35357$as_echo_n "checking for $ac_word... " >&6; }
35358if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
35359  $as_echo_n "(cached) " >&6
35360else
35361  case $MYSQL_CONFIG in
35362  [\\/]* | ?:[\\/]*)
35363  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
35364  ;;
35365  *)
35366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35367for as_dir in $PATH
35368do
35369  IFS=$as_save_IFS
35370  test -z "$as_dir" && as_dir=.
35371    for ac_exec_ext in '' $ac_executable_extensions; do
35372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35373    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
35374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35375    break 2
35376  fi
35377done
35378  done
35379IFS=$as_save_IFS
35380
35381  test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="no"
35382  ;;
35383esac
35384fi
35385MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
35386if test -n "$MYSQL_CONFIG"; then
35387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
35388$as_echo "$MYSQL_CONFIG" >&6; }
35389else
35390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35391$as_echo "no" >&6; }
35392fi
35393
35394
35395else
35396    if test "x$with_mysql" != "x" ; then
35397      MYSQL_CONFIG=$with_mysql
35398    fi
35399fi
35400
35401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL" >&5
35402$as_echo_n "checking for MySQL... " >&6; }
35403
35404if test "$MYSQL_CONFIG" = "no" ; then
35405
35406  HAVE_MYSQL=no
35407  MYSQL_LIB=
35408  MYSQL_INC=
35409
35410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35411$as_echo "no" >&6; }
35412
35413else
35414  if test -d $MYSQL_CONFIG ; then
35415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35416$as_echo "no" >&6; }
35417      as_fn_error $? "--with-mysql argument is a directory.  It should be the path to the mysql_config script, often somewhere like /usr/local/bin/mysql_config." "$LINENO" 5
35418  fi
35419
35420  if test \! -x $MYSQL_CONFIG ; then
35421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35422$as_echo "no" >&6; }
35423      as_fn_error $? "--with-mysql argument is a not an executable file.  It should be the path to the mysql_config script, often somewhere like /usr/local/bin/mysql_config." "$LINENO" 5
35424  fi
35425
35426  MYSQL_VERSION="`$MYSQL_CONFIG --version`"
35427  MYSQL_MAJOR_VERSION=${MYSQL_VERSION%%'.'*}
35428
35429  if test $MYSQL_MAJOR_VERSION -le 3 ; then
35430    HAVE_MYSQL=no
35431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, mysql is pre-4.x" >&5
35432$as_echo "no, mysql is pre-4.x" >&6; }
35433  else
35434      HAVE_MYSQL=yes
35435      MYSQL_LIB="`$MYSQL_CONFIG --libs`"
35436
35437    if echo "x" | sed -E "s/x/y/" >/dev/null 2>/dev/null; then
35438        STRIPPED_LIBRARY_NAME="$(echo "${MYSQL_LIB}" | sed -E 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
35439    elif echo "x" | sed -r "s/x/y/" >/dev/null 2>/dev/null; then
35440                STRIPPED_LIBRARY_NAME="$(echo "${MYSQL_LIB}" | sed -r 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
35441    else
35442        STRIPPED_LIBRARY_NAME="$(echo "${MYSQL_LIB}")"
35443    fi
35444
35445      MYSQL_LIB="$STRIPPED_LIBRARY_NAME"
35446      MYSQL_INC="`$MYSQL_CONFIG --include`"
35447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35448$as_echo "yes" >&6; }
35449  fi
35450fi
35451
35452HAVE_MYSQL=$HAVE_MYSQL
35453
35454MYSQL_INC=$MYSQL_INC
35455
35456MYSQL_LIB=$MYSQL_LIB
35457
35458
35459
35460
35461# Check whether --with-ingres was given.
35462if test "${with_ingres+set}" = set; then :
35463  withval=$with_ingres;
35464fi
35465
35466
35467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ingres" >&5
35468$as_echo_n "checking for Ingres... " >&6; }
35469
35470if test "$with_ingres" = "no" -o "x$with_ingres" = "x" ; then
35471  HAVE_INGRES=no
35472  II_SYSTEM=
35473  INGRES_LIB=
35474  INGRES_INC=
35475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35476$as_echo "no" >&6; }
35477elif test "$with_ingres" = "yes" ; then
35478  as_fn_error $? "--with-ingres requires a path argument ($II_SYSTEM)" "$LINENO" 5
35479else
35480  HAVE_INGRES=yes
35481  II_SYSTEM=$with_ingres
35482  INGRES_LIB="-L$II_SYSTEM/ingres/lib \
35483	-liiapi.1 -lcompat.1 -lq.1 -lframe.1"
35484  INGRES_INC=-I$II_SYSTEM/ingres/files
35485fi
35486
35487HAVE_INGRES=$HAVE_INGRES
35488
35489II_SYSTEM=$II_SYSTEM
35490
35491INGRES_LIB=$INGRES_LIB
35492
35493INGRES_INC=$INGRES_INC
35494
35495
35496
35497XERCES_REQ_VERSION="3.1.0"
35498
35499
35500# Check whether --with-xerces was given.
35501if test "${with_xerces+set}" = set; then :
35502  withval=$with_xerces;
35503        if test "$withval" = "yes"; then
35504            if test -d /usr/local/include/xercesc ; then
35505                xerces_prefix=/usr/local
35506            elif test -d /usr/include/xercesc ; then
35507                xerces_prefix=/usr
35508            else
35509                xerces_prefix=""
35510            fi
35511            xerces_requested="yes"
35512        elif test -d "$withval"; then
35513            xerces_prefix="$withval"
35514            xerces_requested="yes"
35515        else
35516            xerces_prefix=""
35517            xerces_requested="no"
35518        fi
35519
35520else
35521
35522                if test -d /usr/local/include/xercesc ; then
35523            xerces_prefix=/usr/local
35524        elif test -d /usr/include/xercesc ; then
35525            xerces_prefix=/usr
35526        else
35527            xerces_prefix=""
35528        fi
35529
35530
35531fi
35532
35533
35534
35535# Check whether --with-xerces-inc was given.
35536if test "${with_xerces_inc+set}" = set; then :
35537  withval=$with_xerces_inc; xerces_include_dir="$withval"
35538else
35539  xerces_include_dir=""
35540
35541fi
35542
35543
35544# Check whether --with-xerces-lib was given.
35545if test "${with_xerces_lib+set}" = set; then :
35546  withval=$with_xerces_lib; xerces_lib_flags="$withval"
35547else
35548  xerces_lib_flags=""
35549
35550fi
35551
35552
35553    XERCES_CFLAGS=""
35554    XERCES_LDFLAGS=""
35555    XERCES_VERSION=""
35556
35557                run_xerces_test="no"
35558
35559    if test -n "$xerces_prefix" -a -z "$xerces_include_dir" -a -z "$xerces_lib_flags"; then
35560        xerces_include_dir="$xerces_prefix/include"
35561        xerces_include_dir2="$xerces_prefix/include/xercesc"
35562        if test "$xerces_prefix" = "/usr"; then
35563            xerces_lib_flags="-lxerces-c -lpthread"
35564        else
35565            xerces_lib_flags="-L$xerces_prefix/lib -lxerces-c -lpthread"
35566        fi
35567        run_xerces_test="yes"
35568    elif test "$xerces_requested" = "yes"; then
35569        if test -n "$xerces_include_dir" -a -n "$xerces_lib_flags"; then
35570            xerces_include_dir2="$xerces_include_dir/xercesc"
35571            run_xerces_test="yes"
35572        fi
35573    else
35574        run_xerces_test="no"
35575    fi
35576
35577                if test "$run_xerces_test" = "yes"; then
35578
35579        saved_CPPFLAGS="$CPPFLAGS"
35580        CPPFLAGS="$CPPFLAGS -I$xerces_include_dir -I$xerces_include_dir2"
35581
35582        saved_LIBS="$LIBS"
35583        LIBS="$xerces_lib_flags $LIBS"
35584
35585                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xerces C++ Parser headers in $xerces_include_dir and $xerces_include_dir2" >&5
35586$as_echo_n "checking for Xerces C++ Parser headers in $xerces_include_dir and $xerces_include_dir2... " >&6; }
35587
35588        ac_ext=cpp
35589ac_cpp='$CXXCPP $CPPFLAGS'
35590ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35591ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35592ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35593
35594        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35595/* end confdefs.h.  */
35596
35597
35598#include <xercesc/util/XercesDefs.hpp>
35599#include <xercesc/util/PlatformUtils.hpp>
35600
35601int
35602main ()
35603{
35604
35605
35606  ;
35607  return 0;
35608}
35609_ACEOF
35610if ac_fn_cxx_try_compile "$LINENO"; then :
35611
35612            XERCES_CFLAGS="-I$xerces_include_dir -I$xerces_include_dir2"
35613            xerces_header_found="yes"
35614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
35615$as_echo "found" >&6; }
35616
35617else
35618
35619            xerces_header_found="no"
35620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35621$as_echo "not found" >&6; }
35622
35623
35624fi
35625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35626        ac_ext=c
35627ac_cpp='$CPP $CPPFLAGS'
35628ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35629ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35630ac_compiler_gnu=$ac_cv_c_compiler_gnu
35631
35632
35633                                if test "$xerces_header_found" = "yes"; then
35634
35635            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xerces C++ Parser libraries" >&5
35636$as_echo_n "checking for Xerces C++ Parser libraries... " >&6; }
35637
35638            ac_ext=cpp
35639ac_cpp='$CXXCPP $CPPFLAGS'
35640ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35641ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35642ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35643
35644            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35645/* end confdefs.h.  */
35646
35647
35648#include <xercesc/util/XercesDefs.hpp>
35649#include <xercesc/util/PlatformUtils.hpp>
35650#if (_XERCES_VERSION >= 20200)
35651XERCES_CPP_NAMESPACE_USE
35652#endif
35653
35654int
35655main ()
35656{
35657
35658XMLPlatformUtils::Initialize();
35659
35660
35661  ;
35662  return 0;
35663}
35664_ACEOF
35665if ac_fn_cxx_try_link "$LINENO"; then :
35666
35667                XERCES_LDFLAGS="$xerces_lib_flags"
35668                xerces_lib_found="yes"
35669                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
35670$as_echo "found" >&6; }
35671
35672else
35673
35674                xerces_lib_found="no"
35675                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35676$as_echo "not found" >&6; }
35677
35678
35679fi
35680rm -f core conftest.err conftest.$ac_objext \
35681    conftest$ac_exeext conftest.$ac_ext
35682            ac_ext=c
35683ac_cpp='$CPP $CPPFLAGS'
35684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35686ac_compiler_gnu=$ac_cv_c_compiler_gnu
35687
35688        fi
35689
35690        CPPFLAGS="$saved_CPPFLAGS"
35691        LIBS="$saved_LIBS"
35692    fi
35693
35694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xerces C++ Parser" >&5
35695$as_echo_n "checking for Xerces C++ Parser... " >&6; }
35696
35697    if test "$run_xerces_test" = "yes"; then
35698        if test "$xerces_header_found" = "yes" -a "$xerces_lib_found" = "yes"; then
35699            HAVE_XERCES="yes"
35700        else
35701            XERCES_CFLAGS=""
35702            XERCES_LDFLAGS=""
35703            HAVE_XERCES="no"
35704        fi
35705
35706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XERCES" >&5
35707$as_echo "$HAVE_XERCES" >&6; }
35708
35709                                if test "$HAVE_XERCES" = "yes"; then
35710
35711            xerces_version_req=$XERCES_REQ_VERSION
35712
35713            if test  -n "$xerces_version_req"; then
35714
35715                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xerces C++ Parser version is >= $xerces_version_req" >&5
35716$as_echo_n "checking if Xerces C++ Parser version is >= $xerces_version_req... " >&6; }
35717
35718                if test -f "$xerces_include_dir2/util/XercesVersion.hpp"; then
35719
35720                    xerces_major=$(sed -n '/^#define XERCES_VERSION_MAJOR.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
35721		    	$xerces_include_dir2/util/XercesVersion.hpp)
35722                    xerces_minor=$(sed -n '/^#define XERCES_VERSION_MINOR.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
35723		    	$xerces_include_dir2/util/XercesVersion.hpp)
35724                    xerces_revision=$(sed -n '/^#define XERCES_VERSION_REVISION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
35725		    	$xerces_include_dir2/util/XercesVersion.hpp)
35726
35727                    XERCES_VERSION="$xerces_major.$xerces_minor.$xerces_revision"
35728
35729
35730                                        xerces_version_req_major=`expr $xerces_version_req : '\([0-9]*\)'`
35731                    xerces_version_req_minor=`expr $xerces_version_req : '[0-9]*\.\([0-9]*\)'`
35732                    xerces_version_req_revision=`expr $xerces_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
35733                    if test "x$xerces_version_req_revision" = "x"; then
35734                        xerces_version_req_revision="0"
35735                    fi
35736
35737                    xerces_version_req_number=`expr $xerces_version_req_major \* 10000 \
35738                                               \+ $xerces_version_req_minor \* 100 \
35739                                               \+ $xerces_version_req_revision`
35740
35741                                        xerces_version_number=`expr $xerces_major \* 10000 \
35742                                          \+ $xerces_minor \* 100 \
35743                                           \+ $xerces_revision`
35744
35745                    xerces_version_check=`expr $xerces_version_number \>\= $xerces_version_req_number`
35746                    if test "$xerces_version_check" = "1"; then
35747                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35748$as_echo "yes" >&6; }
35749                    else
35750                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35751$as_echo "no" >&6; }
35752                        if test "$xerces_requested" = "yes"; then
35753                            as_fn_error $? "Found Xerces C++ Parser $XERCES_VERSION, which is older than required." "$LINENO" 5
35754                        else
35755                            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Xerces C++ Parser $XERCES_VERSION, which is older than required. Disabling it" >&5
35756$as_echo "$as_me: WARNING: Found Xerces C++ Parser $XERCES_VERSION, which is older than required. Disabling it" >&2;}
35757                            XERCES_CFLAGS=""
35758                            XERCES_LDFLAGS=""
35759                            HAVE_XERCES="no"
35760                        fi
35761                    fi
35762                else
35763                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35764$as_echo "no" >&6; }
35765                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Missing header XercesVersion.hpp. Unable to determine Xerces version." >&5
35766$as_echo "$as_me: WARNING: Missing header XercesVersion.hpp. Unable to determine Xerces version." >&2;}
35767                fi
35768            fi
35769        fi
35770
35771
35772
35773
35774    else
35775        HAVE_XERCES="no"
35776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XERCES" >&5
35777$as_echo "$HAVE_XERCES" >&6; }
35778
35779        if test "$xerces_requested" = "yes"; then
35780            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Xerces C++ Parser support requested but headers or library not found. Specify valid prefix of Xerces C++ using --with-xerces=[DIR] or provide include directory and linker flags using --with-xerces-inc and --with-xerces-lib" >&5
35781$as_echo "$as_me: WARNING: Xerces C++ Parser support requested but headers or library not found. Specify valid prefix of Xerces C++ using --with-xerces=[DIR] or provide include directory and linker flags using --with-xerces-inc and --with-xerces-lib" >&2;}
35782        fi
35783    fi
35784
35785
35786if test "$HAVE_XERCES" = "yes"; then
35787    LIBS="$XERCES_LDFLAGS $LIBS"
35788
35789
35790  driver_enabled=$INTERNAL_FORMAT_nas_ENABLED
35791  if test "x$driver_enabled" = "xyes"; then
35792    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED nas"
35793    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DNAS_ENABLED"
35794  fi
35795
35796  driver_enabled=$INTERNAL_FORMAT_ili_ENABLED
35797  if test "x$driver_enabled" = "xyes"; then
35798    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED ili"
35799    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DILI_ENABLED"
35800  fi
35801
35802  driver_enabled=$INTERNAL_FORMAT_gmlas_ENABLED
35803  if test "x$driver_enabled" = "xyes"; then
35804    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED gmlas"
35805    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGMLAS_ENABLED"
35806  fi
35807
35808
35809fi
35810
35811HAVE_XERCES=$HAVE_XERCES
35812
35813XERCES_INCLUDE=$XERCES_CFLAGS
35814
35815
35816
35817EXPAT_REQ_VERSION="1.95.0"
35818
35819
35820# Check whether --with-expat was given.
35821if test "${with_expat+set}" = set; then :
35822  withval=$with_expat;
35823        if test "$withval" = "yes"; then
35824            if test -f /usr/local/include/expat.h ; then
35825                expat_prefix=/usr/local
35826            elif test -f /usr/include/expat.h ; then
35827                expat_prefix=/usr
35828            else
35829                expat_prefix=""
35830            fi
35831            expat_requested="yes"
35832        elif test -d "$withval"; then
35833            expat_prefix="$withval"
35834            expat_requested="yes"
35835        else
35836            expat_prefix=""
35837            expat_requested="no"
35838        fi
35839
35840else
35841
35842                if test -f /usr/local/include/expat.h ; then
35843            expat_prefix=/usr/local
35844        elif test -f /usr/include/expat.h ; then
35845            expat_prefix=/usr
35846        else
35847            expat_prefix=""
35848        fi
35849
35850
35851
35852fi
35853
35854
35855
35856# Check whether --with-expat-inc was given.
35857if test "${with_expat_inc+set}" = set; then :
35858  withval=$with_expat_inc; expat_include_dir="$withval"
35859else
35860  expat_include_dir=""
35861
35862fi
35863
35864
35865# Check whether --with-expat-lib was given.
35866if test "${with_expat_lib+set}" = set; then :
35867  withval=$with_expat_lib; expat_lib_flags="$withval"
35868else
35869  expat_lib_flags=""
35870
35871fi
35872
35873
35874    EXPAT_CFLAGS=""
35875    EXPAT_LDFLAGS=""
35876    EXPAT_VERSION=""
35877
35878                run_expat_test="no"
35879
35880    if test -n "$expat_prefix"; then
35881        expat_include_dir="$expat_prefix/include"
35882        run_expat_test="yes"
35883    elif test "$expat_requested" = "yes"; then
35884        if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then
35885            run_expat_test="yes"
35886        fi
35887    else
35888        run_expat_test="no"
35889    fi
35890
35891    if test "$run_expat_test" = "yes"; then
35892        unset ac_cv_lib_expat_XML_ParserCreate
35893        saved_LIBS="$LIBS"
35894        LIBS=""
35895        if test -n "$expat_lib_flags"; then
35896            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
35897$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
35898if ${ac_cv_lib_expat_XML_ParserCreate+:} false; then :
35899  $as_echo_n "(cached) " >&6
35900else
35901  ac_check_lib_save_LIBS=$LIBS
35902LIBS="-lexpat $expat_lib_flags $LIBS"
35903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35904/* end confdefs.h.  */
35905
35906/* Override any GCC internal prototype to avoid an error.
35907   Use char because int might match the return type of a GCC
35908   builtin and then its argument prototype would still apply.  */
35909#ifdef __cplusplus
35910extern "C"
35911#endif
35912char XML_ParserCreate ();
35913int
35914main ()
35915{
35916return XML_ParserCreate ();
35917  ;
35918  return 0;
35919}
35920_ACEOF
35921if ac_fn_c_try_link "$LINENO"; then :
35922  ac_cv_lib_expat_XML_ParserCreate=yes
35923else
35924  ac_cv_lib_expat_XML_ParserCreate=no
35925fi
35926rm -f core conftest.err conftest.$ac_objext \
35927    conftest$ac_exeext conftest.$ac_ext
35928LIBS=$ac_check_lib_save_LIBS
35929fi
35930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
35931$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
35932if test "x$ac_cv_lib_expat_XML_ParserCreate" = xyes; then :
35933  run_expat_test="yes"
35934else
35935  run_expat_test="no"
35936fi
35937
35938        else
35939            if test "$expat_prefix" = "/usr"; then
35940                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
35941$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
35942if ${ac_cv_lib_expat_XML_ParserCreate+:} false; then :
35943  $as_echo_n "(cached) " >&6
35944else
35945  ac_check_lib_save_LIBS=$LIBS
35946LIBS="-lexpat  $LIBS"
35947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35948/* end confdefs.h.  */
35949
35950/* Override any GCC internal prototype to avoid an error.
35951   Use char because int might match the return type of a GCC
35952   builtin and then its argument prototype would still apply.  */
35953#ifdef __cplusplus
35954extern "C"
35955#endif
35956char XML_ParserCreate ();
35957int
35958main ()
35959{
35960return XML_ParserCreate ();
35961  ;
35962  return 0;
35963}
35964_ACEOF
35965if ac_fn_c_try_link "$LINENO"; then :
35966  ac_cv_lib_expat_XML_ParserCreate=yes
35967else
35968  ac_cv_lib_expat_XML_ParserCreate=no
35969fi
35970rm -f core conftest.err conftest.$ac_objext \
35971    conftest$ac_exeext conftest.$ac_ext
35972LIBS=$ac_check_lib_save_LIBS
35973fi
35974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
35975$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
35976if test "x$ac_cv_lib_expat_XML_ParserCreate" = xyes; then :
35977  run_expat_test="yes"
35978else
35979  run_expat_test="no"
35980fi
35981
35982                if test "$run_expat_test" = "yes"; then
35983                    expat_lib_flags="-lexpat"
35984                fi
35985            else
35986                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
35987$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
35988if ${ac_cv_lib_expat_XML_ParserCreate+:} false; then :
35989  $as_echo_n "(cached) " >&6
35990else
35991  ac_check_lib_save_LIBS=$LIBS
35992LIBS="-lexpat -L$expat_prefix/lib $LIBS"
35993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35994/* end confdefs.h.  */
35995
35996/* Override any GCC internal prototype to avoid an error.
35997   Use char because int might match the return type of a GCC
35998   builtin and then its argument prototype would still apply.  */
35999#ifdef __cplusplus
36000extern "C"
36001#endif
36002char XML_ParserCreate ();
36003int
36004main ()
36005{
36006return XML_ParserCreate ();
36007  ;
36008  return 0;
36009}
36010_ACEOF
36011if ac_fn_c_try_link "$LINENO"; then :
36012  ac_cv_lib_expat_XML_ParserCreate=yes
36013else
36014  ac_cv_lib_expat_XML_ParserCreate=no
36015fi
36016rm -f core conftest.err conftest.$ac_objext \
36017    conftest$ac_exeext conftest.$ac_ext
36018LIBS=$ac_check_lib_save_LIBS
36019fi
36020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
36021$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
36022if test "x$ac_cv_lib_expat_XML_ParserCreate" = xyes; then :
36023  run_expat_test="yes"
36024else
36025  run_expat_test="no"
36026fi
36027
36028                if test "$run_expat_test" = "yes"; then
36029                    expat_lib_flags="-L$expat_prefix/lib -lexpat"
36030                fi
36031            fi
36032        fi
36033        LIBS="$saved_LIBS"
36034    fi
36035
36036                if test "$run_expat_test" = "yes"; then
36037
36038        EXPAT_LDFLAGS="$expat_lib_flags"
36039
36040        saved_CPPFLAGS="$CPPFLAGS"
36041        CPPFLAGS="$CPPFLAGS -I$expat_include_dir"
36042
36043                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Expat XML Parser headers in $expat_include_dir" >&5
36044$as_echo_n "checking for Expat XML Parser headers in $expat_include_dir... " >&6; }
36045
36046        ac_ext=cpp
36047ac_cpp='$CXXCPP $CPPFLAGS'
36048ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36049ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36050ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36051
36052        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36053/* end confdefs.h.  */
36054
36055
36056#include <expat.h>
36057
36058int
36059main ()
36060{
36061
36062
36063  ;
36064  return 0;
36065}
36066_ACEOF
36067if ac_fn_cxx_try_compile "$LINENO"; then :
36068
36069            EXPAT_CFLAGS="-I$expat_include_dir"
36070            expat_header_found="yes"
36071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
36072$as_echo "found" >&6; }
36073
36074else
36075
36076            expat_header_found="no"
36077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36078$as_echo "not found" >&6; }
36079
36080
36081fi
36082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36083        ac_ext=c
36084ac_cpp='$CPP $CPPFLAGS'
36085ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36086ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36087ac_compiler_gnu=$ac_cv_c_compiler_gnu
36088
36089
36090        CPPFLAGS="$saved_CPPFLAGS"
36091    fi
36092
36093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Expat XML Parser" >&5
36094$as_echo_n "checking for Expat XML Parser... " >&6; }
36095
36096    if test "$run_expat_test" = "yes"; then
36097        if test "$expat_header_found" = "yes"; then
36098
36099
36100
36101
36102            HAVE_EXPAT="yes"
36103        else
36104            HAVE_EXPAT="no"
36105        fi
36106
36107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_EXPAT" >&5
36108$as_echo "$HAVE_EXPAT" >&6; }
36109
36110                                if test "$HAVE_EXPAT" = "yes"; then
36111
36112            expat_version_req=$EXPAT_REQ_VERSION
36113
36114            if test  -n "$expat_version_req"; then
36115
36116                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Expat XML Parser version is >= $expat_version_req" >&5
36117$as_echo_n "checking if Expat XML Parser version is >= $expat_version_req... " >&6; }
36118
36119                if test -f "$expat_include_dir/expat.h"; then
36120
36121                    expat_major=$(sed -n '/^#define XML_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
36122		    	$expat_include_dir/expat.h)
36123                    expat_minor=$(sed -n '/^#define XML_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
36124		    	$expat_include_dir/expat.h)
36125                    expat_revision=$(sed -n '/^#define XML_MICRO_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
36126		    	$expat_include_dir/expat.h)
36127
36128                    EXPAT_VERSION="$expat_major.$expat_minor.$expat_revision"
36129
36130
36131                                        expat_version_req_major=`expr $expat_version_req : '\([0-9]*\)'`
36132                    expat_version_req_minor=`expr $expat_version_req : '[0-9]*\.\([0-9]*\)'`
36133                    expat_version_req_revision=`expr $expat_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
36134                    if test "x$expat_version_req_revision" = "x"; then
36135                        expat_version_req_revision="0"
36136                    fi
36137
36138                    expat_version_req_number=`expr $expat_version_req_major \* 10000 \
36139                                               \+ $expat_version_req_minor \* 100 \
36140                                               \+ $expat_version_req_revision`
36141
36142                                        expat_version_number=`expr $expat_major \* 10000 \
36143                                          \+ $expat_minor \* 100 \
36144                                           \+ $expat_revision`
36145
36146                    expat_version_check=`expr $expat_version_number \>\= $expat_version_req_number`
36147                    if test "$expat_version_check" = "1"; then
36148                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36149$as_echo "yes" >&6; }
36150                    else
36151                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36152$as_echo "no" >&6; }
36153                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Expat XML Parser $EXPAT_VERSION, which is older than required. Possible compilation failure." >&5
36154$as_echo "$as_me: WARNING: Found Expat XML Parser $EXPAT_VERSION, which is older than required. Possible compilation failure." >&2;}
36155                    fi
36156                else
36157                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36158$as_echo "no" >&6; }
36159                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Missing expat.h header. Unable to determine Expat version." >&5
36160$as_echo "$as_me: WARNING: Missing expat.h header. Unable to determine Expat version." >&2;}
36161                fi
36162            fi
36163        fi
36164
36165    else
36166        HAVE_EXPAT="no"
36167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_EXPAT" >&5
36168$as_echo "$HAVE_EXPAT" >&6; }
36169
36170        if test "$expat_requested" = "yes"; then
36171            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=[DIR] or provide include directory and linker flags using --with-expat-inc and --with-expat-lib" >&5
36172$as_echo "$as_me: WARNING: Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=[DIR] or provide include directory and linker flags using --with-expat-inc and --with-expat-lib" >&2;}
36173        fi
36174    fi
36175
36176
36177if test "$HAVE_EXPAT" = "yes"; then
36178    LIBS="$EXPAT_LDFLAGS $LIBS"
36179
36180
36181  driver_enabled=$INTERNAL_FORMAT_ods_ENABLED
36182  if test "x$driver_enabled" = "xyes"; then
36183    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED ods"
36184    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DODS_ENABLED"
36185  fi
36186
36187  driver_enabled=$INTERNAL_FORMAT_xlsx_ENABLED
36188  if test "x$driver_enabled" = "xyes"; then
36189    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED xlsx"
36190    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DXLSX_ENABLED"
36191  fi
36192
36193  driver_enabled=$INTERNAL_FORMAT_lvbag_ENABLED
36194  if test "x$driver_enabled" = "xyes"; then
36195    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED lvbag"
36196    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DLVBAG_ENABLED"
36197  fi
36198
36199
36200fi
36201
36202HAVE_EXPAT=$HAVE_EXPAT
36203
36204EXPAT_INCLUDE=$EXPAT_CFLAGS
36205
36206
36207
36208LIBKML_REQ_VERSION="1.3.0"
36209
36210
36211# Check whether --with-libkml was given.
36212if test "${with_libkml+set}" = set; then :
36213  withval=$with_libkml;
36214        if test "$withval" = "yes"; then
36215            if test -d /usr/local/include/kml ; then
36216                libkml_prefix=/usr/local
36217            elif test -d /usr/include/kml ; then
36218                libkml_prefix=/usr
36219            else
36220                libkml_prefix=""
36221            fi
36222            libkml_requested="yes"
36223        elif test -d "$withval"; then
36224            libkml_prefix="$withval"
36225            libkml_requested="yes"
36226        else
36227            libkml_prefix=""
36228            libkml_requested="no"
36229        fi
36230
36231else
36232
36233                if test -d /usr/local/include/kml ; then
36234            libkml_prefix=/usr/local
36235        elif test -d /usr/include/kml ; then
36236            libkml_prefix=/usr
36237        else
36238            libkml_prefix=""
36239        fi
36240
36241
36242fi
36243
36244
36245
36246# Check whether --with-libkml-inc was given.
36247if test "${with_libkml_inc+set}" = set; then :
36248  withval=$with_libkml_inc; libkml_include_dir="$withval"
36249else
36250  libkml_include_dir=""
36251
36252fi
36253
36254
36255# Check whether --with-libkml-lib was given.
36256if test "${with_libkml_lib+set}" = set; then :
36257  withval=$with_libkml_lib; libkml_lib_flags="$withval"
36258else
36259  libkml_lib_flags=""
36260
36261fi
36262
36263
36264
36265
36266if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
36267	if test -n "$ac_tool_prefix"; then
36268  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
36269set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
36270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36271$as_echo_n "checking for $ac_word... " >&6; }
36272if ${ac_cv_path_PKG_CONFIG+:} false; then :
36273  $as_echo_n "(cached) " >&6
36274else
36275  case $PKG_CONFIG in
36276  [\\/]* | ?:[\\/]*)
36277  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
36278  ;;
36279  *)
36280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36281for as_dir in $PATH
36282do
36283  IFS=$as_save_IFS
36284  test -z "$as_dir" && as_dir=.
36285    for ac_exec_ext in '' $ac_executable_extensions; do
36286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36287    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
36288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36289    break 2
36290  fi
36291done
36292  done
36293IFS=$as_save_IFS
36294
36295  ;;
36296esac
36297fi
36298PKG_CONFIG=$ac_cv_path_PKG_CONFIG
36299if test -n "$PKG_CONFIG"; then
36300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
36301$as_echo "$PKG_CONFIG" >&6; }
36302else
36303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36304$as_echo "no" >&6; }
36305fi
36306
36307
36308fi
36309if test -z "$ac_cv_path_PKG_CONFIG"; then
36310  ac_pt_PKG_CONFIG=$PKG_CONFIG
36311  # Extract the first word of "pkg-config", so it can be a program name with args.
36312set dummy pkg-config; ac_word=$2
36313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36314$as_echo_n "checking for $ac_word... " >&6; }
36315if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
36316  $as_echo_n "(cached) " >&6
36317else
36318  case $ac_pt_PKG_CONFIG in
36319  [\\/]* | ?:[\\/]*)
36320  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
36321  ;;
36322  *)
36323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36324for as_dir in $PATH
36325do
36326  IFS=$as_save_IFS
36327  test -z "$as_dir" && as_dir=.
36328    for ac_exec_ext in '' $ac_executable_extensions; do
36329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36330    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
36331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36332    break 2
36333  fi
36334done
36335  done
36336IFS=$as_save_IFS
36337
36338  ;;
36339esac
36340fi
36341ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
36342if test -n "$ac_pt_PKG_CONFIG"; then
36343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
36344$as_echo "$ac_pt_PKG_CONFIG" >&6; }
36345else
36346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36347$as_echo "no" >&6; }
36348fi
36349
36350  if test "x$ac_pt_PKG_CONFIG" = x; then
36351    PKG_CONFIG=""
36352  else
36353    case $cross_compiling:$ac_tool_warned in
36354yes:)
36355{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36356$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36357ac_tool_warned=yes ;;
36358esac
36359    PKG_CONFIG=$ac_pt_PKG_CONFIG
36360  fi
36361else
36362  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
36363fi
36364
36365fi
36366if test -n "$PKG_CONFIG"; then
36367	_pkg_min_version=0.25
36368	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
36369$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
36370	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
36371		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36372$as_echo "yes" >&6; }
36373	else
36374		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36375$as_echo "no" >&6; }
36376		PKG_CONFIG=""
36377	fi
36378
36379fi # check and set $PKG_CONFIG
36380
36381
36382pkg_failed=no
36383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBKML" >&5
36384$as_echo_n "checking for LIBKML... " >&6; }
36385
36386if test -n "$PKG_CONFIG"; then
36387    if test -n "$LIBKML_CFLAGS"; then
36388        pkg_cv_LIBKML_CFLAGS="$LIBKML_CFLAGS"
36389    else
36390        if test -n "$PKG_CONFIG" && \
36391    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libkml >= \$LIBKML_REQ_VERSION\""; } >&5
36392  ($PKG_CONFIG --exists --print-errors "libkml >= $LIBKML_REQ_VERSION") 2>&5
36393  ac_status=$?
36394  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36395  test $ac_status = 0; }; then
36396  pkg_cv_LIBKML_CFLAGS=`$PKG_CONFIG --cflags "libkml >= $LIBKML_REQ_VERSION" 2>/dev/null`
36397else
36398  pkg_failed=yes
36399fi
36400    fi
36401else
36402	pkg_failed=untried
36403fi
36404if test -n "$PKG_CONFIG"; then
36405    if test -n "$LIBKML_LIBS"; then
36406        pkg_cv_LIBKML_LIBS="$LIBKML_LIBS"
36407    else
36408        if test -n "$PKG_CONFIG" && \
36409    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libkml >= \$LIBKML_REQ_VERSION\""; } >&5
36410  ($PKG_CONFIG --exists --print-errors "libkml >= $LIBKML_REQ_VERSION") 2>&5
36411  ac_status=$?
36412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36413  test $ac_status = 0; }; then
36414  pkg_cv_LIBKML_LIBS=`$PKG_CONFIG --libs "libkml >= $LIBKML_REQ_VERSION" 2>/dev/null`
36415else
36416  pkg_failed=yes
36417fi
36418    fi
36419else
36420	pkg_failed=untried
36421fi
36422
36423
36424
36425if test $pkg_failed = yes; then
36426
36427if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
36428        _pkg_short_errors_supported=yes
36429else
36430        _pkg_short_errors_supported=no
36431fi
36432        if test $_pkg_short_errors_supported = yes; then
36433	        LIBKML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libkml >= $LIBKML_REQ_VERSION"`
36434        else
36435	        LIBKML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libkml >= $LIBKML_REQ_VERSION"`
36436        fi
36437	# Put the nasty error message in config.log where it belongs
36438	echo "$LIBKML_PKG_ERRORS" >&5
36439
36440	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36441$as_echo "no" >&6; }
36442                LIBKML_VERSION=;
36443elif test $pkg_failed = untried; then
36444	LIBKML_VERSION=;
36445else
36446	LIBKML_CFLAGS=$pkg_cv_LIBKML_CFLAGS
36447	LIBKML_LIBS=$pkg_cv_LIBKML_LIBS
36448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36449$as_echo "yes" >&6; }
36450	LIBKML_VERSION=`$PKG_CONFIG --modversion libkml`
36451fi
36452
36453    if test -n "$LIBKML_VERSION" -a -n "$libkml_prefix"; then
36454        # Test that the package found is for the right architecture
36455        saved_CPPFLAGS="$CPPFLAGS"
36456        saved_LIBS="$LIBS"
36457        CPPFLAGS="$CPPFLAGS $LIBKML_CFLAGS"
36458        LIBS="$LIBKML_LIBS"
36459
36460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libkml can be linked" >&5
36461$as_echo_n "checking if libkml can be linked... " >&6; }
36462        ac_ext=cpp
36463ac_cpp='$CXXCPP $CPPFLAGS'
36464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36467
36468        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36469/* end confdefs.h.  */
36470
36471
36472#include <kml/dom.h>
36473
36474int
36475main ()
36476{
36477
36478kmldom::KmlFactory* factory = kmldom::KmlFactory::GetFactory();
36479
36480
36481  ;
36482  return 0;
36483}
36484_ACEOF
36485if ac_fn_cxx_try_link "$LINENO"; then :
36486
36487            HAVE_LIBKML=yes
36488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36489$as_echo "yes" >&6; }
36490
36491else
36492
36493            HAVE_LIBKML=no
36494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36495$as_echo "no" >&6; }
36496
36497
36498fi
36499rm -f core conftest.err conftest.$ac_objext \
36500    conftest$ac_exeext conftest.$ac_ext
36501        ac_ext=c
36502ac_cpp='$CPP $CPPFLAGS'
36503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36505ac_compiler_gnu=$ac_cv_c_compiler_gnu
36506
36507
36508        CPPFLAGS="$saved_CPPFLAGS"
36509        LIBS="$saved_LIBS"
36510    fi
36511
36512    if test "$HAVE_LIBKML" = "yes"; then
36513        HAVE_LIBKML="yes"
36514
36515	LIBKML_LDFLAGS="$LIBKML_LIBS"
36516
36517	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBKML CFLAGS" >&5
36518$as_echo_n "checking for LIBKML CFLAGS... " >&6; }
36519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBKML_CFLAGS" >&5
36520$as_echo "$LIBKML_CFLAGS" >&6; }
36521
36522	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBKML LDFLAGS" >&5
36523$as_echo_n "checking for LIBKML LDFLAGS... " >&6; }
36524	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBKML_LDFLAGS" >&5
36525$as_echo "$LIBKML_LDFLAGS" >&6; }
36526
36527	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBKML VERSION" >&5
36528$as_echo_n "checking for LIBKML VERSION... " >&6; }
36529	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBKML_VERSION" >&5
36530$as_echo "$LIBKML_VERSION" >&6; }
36531
36532
36533
36534
36535    else
36536        LIBKML_CFLAGS=""
36537        LIBKML_LDFLAGS=""
36538        LIBKML_VERSION=""
36539
36540                                run_libkml_test="no"
36541
36542        if test -n "$libkml_prefix"; then
36543            libkml_include_dir="$libkml_prefix/include"
36544            libkml_include_dir2="$libkml_prefix/include/kml"
36545            libkml_include_dir3="$libkml_prefix/include/kml/third_party/boost_1_34_1"
36546            if test "$libkml_prefix" = "/usr"; then
36547                libkml_lib_flags="-lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser"
36548            else
36549                libkml_lib_flags="-L$libkml_prefix/lib -lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser"
36550            fi
36551            run_libkml_test="yes"
36552        elif test "$libkml_requested" = "yes"; then
36553            if test -n "$libkml_include_dir" -a -n "$libkml_lib_flags"; then
36554                libkml_include_dir2="$libkml_include_dir/kml"
36555                libkml_include_dir3="$libkml_include_dir/kml/third_party/boost_1_34_1"
36556                run_libkml_test="yes"
36557            fi
36558        else
36559            run_libkml_test="no"
36560        fi
36561
36562                                if test "$run_libkml_test" = "yes"; then
36563
36564            saved_CPPFLAGS="$CPPFLAGS"
36565            CPPFLAGS="$CPPFLAGS -I$libkml_include_dir -I$libkml_include_dir2 -I$libkml_include_dir3"
36566
36567            saved_LIBS="$LIBS"
36568            LIBS="$LIBS $libkml_lib_flags"
36569
36570                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Google libkml headers in $libkml_include_dir, $libkml_include_dir2, and $libkml_include_dir3" >&5
36571$as_echo_n "checking for Google libkml headers in $libkml_include_dir, $libkml_include_dir2, and $libkml_include_dir3... " >&6; }
36572
36573            ac_ext=cpp
36574ac_cpp='$CXXCPP $CPPFLAGS'
36575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36578
36579            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36580/* end confdefs.h.  */
36581
36582
36583#include <kml/dom.h>
36584
36585int
36586main ()
36587{
36588
36589
36590  ;
36591  return 0;
36592}
36593_ACEOF
36594if ac_fn_cxx_try_compile "$LINENO"; then :
36595
36596                LIBKML_CFLAGS="-I$libkml_include_dir -I$libkml_include_dir2 -I$libkml_include_dir3"
36597                libkml_header_found="yes"
36598                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
36599$as_echo "found" >&6; }
36600
36601else
36602
36603                libkml_header_found="no"
36604                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36605$as_echo "not found" >&6; }
36606
36607
36608fi
36609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36610            ac_ext=c
36611ac_cpp='$CPP $CPPFLAGS'
36612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36614ac_compiler_gnu=$ac_cv_c_compiler_gnu
36615
36616
36617                                                if test "$libkml_header_found" = "yes"; then
36618
36619                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Google libkml libraries" >&5
36620$as_echo_n "checking for Google libkml libraries... " >&6; }
36621
36622                ac_ext=cpp
36623ac_cpp='$CXXCPP $CPPFLAGS'
36624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36627
36628                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36629/* end confdefs.h.  */
36630
36631
36632#include <kml/dom.h>
36633
36634int
36635main ()
36636{
36637
36638kmldom::KmlFactory* factory = kmldom::KmlFactory::GetFactory();
36639
36640
36641  ;
36642  return 0;
36643}
36644_ACEOF
36645if ac_fn_cxx_try_link "$LINENO"; then :
36646
36647                    LIBKML_LDFLAGS="$libkml_lib_flags"
36648                    libkml_lib_found="yes"
36649                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
36650$as_echo "found" >&6; }
36651
36652else
36653
36654                    libkml_lib_found="no"
36655                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36656$as_echo "not found" >&6; }
36657
36658
36659fi
36660rm -f core conftest.err conftest.$ac_objext \
36661    conftest$ac_exeext conftest.$ac_ext
36662                ac_ext=c
36663ac_cpp='$CPP $CPPFLAGS'
36664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36666ac_compiler_gnu=$ac_cv_c_compiler_gnu
36667
36668            fi
36669
36670            CPPFLAGS="$saved_CPPFLAGS"
36671            LIBS="$saved_LIBS"
36672        fi
36673
36674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Google libkml" >&5
36675$as_echo_n "checking for Google libkml... " >&6; }
36676
36677        if test "$run_libkml_test" = "yes"; then
36678            if test "$libkml_header_found" = "yes" -a "$libkml_lib_found" = "yes"; then
36679
36680
36681
36682
36683                HAVE_LIBKML="yes"
36684            else
36685                HAVE_LIBKML="no"
36686            fi
36687
36688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBKML" >&5
36689$as_echo "$HAVE_LIBKML" >&6; }
36690
36691                                                if test "$HAVE_LIBKML" = "yes"; then
36692
36693                libkml_version_req=$LIBKML_REQ_VERSION
36694
36695                if test  -n "$libkml_version_req"; then
36696
36697                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Google libkml version is >= $libkml_version_req" >&5
36698$as_echo_n "checking if Google libkml version is >= $libkml_version_req... " >&6; }
36699
36700                    if test -f "$libkml_include_dir2/base/version.h"; then
36701
36702                        libkml_major=$(sed -n '/^#define LIBKML_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
36703                            $libkml_include_dir2/base/version.h)
36704                        libkml_minor=$(sed -n '/^#define LIBKML_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
36705                            $libkml_include_dir2/base/version.h)
36706                        libkml_revision=$(sed -n '/^#define LIBKML_MICRO_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
36707                            $libkml_include_dir2/base/version.h)
36708
36709                        LIBKML_VERSION="$libkml_major.$libkml_minor.$libkml_revision"
36710
36711
36712                                                libkml_version_req_major=`expr $libkml_version_req : '\([0-9]*\)'`
36713                        libkml_version_req_minor=`expr $libkml_version_req : '[0-9]*\.\([0-9]*\)'`
36714                        libkml_version_req_revision=`expr $libkml_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
36715                        if test "x$libkml_version_req_revision" = "x"; then
36716                            libkml_version_req_revision="0"
36717                        fi
36718
36719                        libkml_version_req_number=`expr $libkml_version_req_major \* 10000 \
36720                                                   \+ $libkml_version_req_minor \* 100 \
36721                                                   \+ $libkml_version_req_revision`
36722
36723                                                libkml_version_number=`expr $libkml_major \* 10000 \
36724                                              \+ $libkml_minor \* 100 \
36725                                               \+ $libkml_revision`
36726
36727                        libkml_version_check=`expr $libkml_version_number \>\= $libkml_version_req_number`
36728                        if test "$libkml_version_check" = "1"; then
36729                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36730$as_echo "yes" >&6; }
36731                        else
36732                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36733$as_echo "no" >&6; }
36734                            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Google libkml ${LIBKML_VERSION}, which is older than required (${libkml_version_req}). KML support disabled." >&5
36735$as_echo "$as_me: WARNING: Found Google libkml ${LIBKML_VERSION}, which is older than required (${libkml_version_req}). KML support disabled." >&2;}
36736                            HAVE_LIBKML="no"
36737                        fi
36738                    else
36739                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36740$as_echo "no" >&6; }
36741                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Missing header $libkml_include_dir2/base/bersion.hpp. Unable to determine Google libkml version." >&5
36742$as_echo "$as_me: WARNING: Missing header $libkml_include_dir2/base/bersion.hpp. Unable to determine Google libkml version." >&2;}
36743                    fi
36744                fi
36745            fi
36746
36747        else
36748            HAVE_LIBKML="no"
36749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBKML" >&5
36750$as_echo "$HAVE_LIBKML" >&6; }
36751
36752            if test "$libkml_requested" = "yes"; then
36753                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Google libkml support requested but headers or library not found. Specify valid prefix of libkml using --with-libkml=[DIR] or provide include directory and linker flags using --with-libkml-inc and --with-libkml-lib" >&5
36754$as_echo "$as_me: WARNING: Google libkml support requested but headers or library not found. Specify valid prefix of libkml using --with-libkml=[DIR] or provide include directory and linker flags using --with-libkml-inc and --with-libkml-lib" >&2;}
36755            fi
36756        fi
36757    fi
36758
36759
36760if test "$HAVE_LIBKML" = "yes"; then
36761    LIBS="$LIBKML_LDFLAGS $LIBS"
36762fi
36763
36764HAVE_LIBKML=$HAVE_LIBKML
36765
36766LIBKML_INCLUDE=$LIBKML_CFLAGS
36767
36768
36769
36770
36771# Check whether --with-odbc was given.
36772if test "${with_odbc+set}" = set; then :
36773  withval=$with_odbc;
36774fi
36775
36776
36777if test "$with_odbc" = "no" ; then
36778
36779  ODBC_SETTING=no
36780
36781  echo "ODBC support disabled."
36782
36783elif test "$with_odbc" = "yes" -o "$with_odbc" = "" ; then
36784  ODBC_SETTING=no
36785
36786  echo "check for unixODBC"
36787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLConnect in -lodbc" >&5
36788$as_echo_n "checking for SQLConnect in -lodbc... " >&6; }
36789if ${ac_cv_lib_odbc_SQLConnect+:} false; then :
36790  $as_echo_n "(cached) " >&6
36791else
36792  ac_check_lib_save_LIBS=$LIBS
36793LIBS="-lodbc  $LIBS"
36794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36795/* end confdefs.h.  */
36796
36797/* Override any GCC internal prototype to avoid an error.
36798   Use char because int might match the return type of a GCC
36799   builtin and then its argument prototype would still apply.  */
36800#ifdef __cplusplus
36801extern "C"
36802#endif
36803char SQLConnect ();
36804int
36805main ()
36806{
36807return SQLConnect ();
36808  ;
36809  return 0;
36810}
36811_ACEOF
36812if ac_fn_c_try_link "$LINENO"; then :
36813  ac_cv_lib_odbc_SQLConnect=yes
36814else
36815  ac_cv_lib_odbc_SQLConnect=no
36816fi
36817rm -f core conftest.err conftest.$ac_objext \
36818    conftest$ac_exeext conftest.$ac_ext
36819LIBS=$ac_check_lib_save_LIBS
36820fi
36821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLConnect" >&5
36822$as_echo "$ac_cv_lib_odbc_SQLConnect" >&6; }
36823if test "x$ac_cv_lib_odbc_SQLConnect" = xyes; then :
36824  ODBC_LIBS="-lodbc -lodbcinst"
36825fi
36826
36827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLInstallDriverEx in -lodbcinst" >&5
36828$as_echo_n "checking for SQLInstallDriverEx in -lodbcinst... " >&6; }
36829if ${ac_cv_lib_odbcinst_SQLInstallDriverEx+:} false; then :
36830  $as_echo_n "(cached) " >&6
36831else
36832  ac_check_lib_save_LIBS=$LIBS
36833LIBS="-lodbcinst  $LIBS"
36834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36835/* end confdefs.h.  */
36836
36837/* Override any GCC internal prototype to avoid an error.
36838   Use char because int might match the return type of a GCC
36839   builtin and then its argument prototype would still apply.  */
36840#ifdef __cplusplus
36841extern "C"
36842#endif
36843char SQLInstallDriverEx ();
36844int
36845main ()
36846{
36847return SQLInstallDriverEx ();
36848  ;
36849  return 0;
36850}
36851_ACEOF
36852if ac_fn_c_try_link "$LINENO"; then :
36853  ac_cv_lib_odbcinst_SQLInstallDriverEx=yes
36854else
36855  ac_cv_lib_odbcinst_SQLInstallDriverEx=no
36856fi
36857rm -f core conftest.err conftest.$ac_objext \
36858    conftest$ac_exeext conftest.$ac_ext
36859LIBS=$ac_check_lib_save_LIBS
36860fi
36861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbcinst_SQLInstallDriverEx" >&5
36862$as_echo "$ac_cv_lib_odbcinst_SQLInstallDriverEx" >&6; }
36863if test "x$ac_cv_lib_odbcinst_SQLInstallDriverEx" = xyes; then :
36864  ODBC_SETTING=yes
36865fi
36866
36867
36868  if test "$ODBC_SETTING" = "no" ; then
36869    echo "check for windows ODBC"
36870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc32" >&5
36871$as_echo_n "checking for main in -lodbc32... " >&6; }
36872if ${ac_cv_lib_odbc32_main+:} false; then :
36873  $as_echo_n "(cached) " >&6
36874else
36875  ac_check_lib_save_LIBS=$LIBS
36876LIBS="-lodbc32  $LIBS"
36877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36878/* end confdefs.h.  */
36879
36880
36881int
36882main ()
36883{
36884return main ();
36885  ;
36886  return 0;
36887}
36888_ACEOF
36889if ac_fn_c_try_link "$LINENO"; then :
36890  ac_cv_lib_odbc32_main=yes
36891else
36892  ac_cv_lib_odbc32_main=no
36893fi
36894rm -f core conftest.err conftest.$ac_objext \
36895    conftest$ac_exeext conftest.$ac_ext
36896LIBS=$ac_check_lib_save_LIBS
36897fi
36898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_main" >&5
36899$as_echo "$ac_cv_lib_odbc32_main" >&6; }
36900if test "x$ac_cv_lib_odbc32_main" = xyes; then :
36901  ODBC_LIBS="-lodbc32 -lodbccp32"
36902fi
36903
36904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLInstallDriverEx in -lodbccp32" >&5
36905$as_echo_n "checking for SQLInstallDriverEx in -lodbccp32... " >&6; }
36906if ${ac_cv_lib_odbccp32_SQLInstallDriverEx+:} false; then :
36907  $as_echo_n "(cached) " >&6
36908else
36909  ac_check_lib_save_LIBS=$LIBS
36910LIBS="-lodbccp32  $LIBS"
36911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36912/* end confdefs.h.  */
36913
36914/* Override any GCC internal prototype to avoid an error.
36915   Use char because int might match the return type of a GCC
36916   builtin and then its argument prototype would still apply.  */
36917#ifdef __cplusplus
36918extern "C"
36919#endif
36920char SQLInstallDriverEx ();
36921int
36922main ()
36923{
36924return SQLInstallDriverEx ();
36925  ;
36926  return 0;
36927}
36928_ACEOF
36929if ac_fn_c_try_link "$LINENO"; then :
36930  ac_cv_lib_odbccp32_SQLInstallDriverEx=yes
36931else
36932  ac_cv_lib_odbccp32_SQLInstallDriverEx=no
36933fi
36934rm -f core conftest.err conftest.$ac_objext \
36935    conftest$ac_exeext conftest.$ac_ext
36936LIBS=$ac_check_lib_save_LIBS
36937fi
36938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbccp32_SQLInstallDriverEx" >&5
36939$as_echo "$ac_cv_lib_odbccp32_SQLInstallDriverEx" >&6; }
36940if test "x$ac_cv_lib_odbccp32_SQLInstallDriverEx" = xyes; then :
36941  ODBC_SETTING=yes
36942fi
36943
36944  fi
36945
36946  if test "$ODBC_SETTING" = "yes" ; then
36947    for ac_header in sql.h
36948do :
36949  ac_fn_c_check_header_compile "$LINENO" "sql.h" "ac_cv_header_sql_h" "#ifdef _WIN32
36950# include <windows.h>
36951#endif
36952
36953"
36954if test "x$ac_cv_header_sql_h" = xyes; then :
36955  cat >>confdefs.h <<_ACEOF
36956#define HAVE_SQL_H 1
36957_ACEOF
36958
36959else
36960  ODBC_SETTING=no
36961fi
36962
36963done
36964
36965    if test "$ODBC_SETTING" = "no" ; then
36966      if test -f /usr/local/include/sql.h ; then
36967        ODBC_SETTING=yes
36968        echo "using sql.h from /usr/local/include"
36969      elif test -f /usr/include/sql.h ; then
36970        ODBC_SETTING=yes
36971        echo "using sql.h from /usr/include"
36972      else
36973        echo "sql.h not found"
36974      fi
36975    fi
36976  fi
36977
36978  if test "$ODBC_SETTING" = "yes"  ; then
36979    LIBS="$ODBC_LIBS $LIBS"
36980  fi
36981
36982else
36983
36984  ODBC_SETTING=yes
36985  ODBC_LIBS=""
36986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLConnect in -lodbc" >&5
36987$as_echo_n "checking for SQLConnect in -lodbc... " >&6; }
36988if ${ac_cv_lib_odbc_SQLConnect+:} false; then :
36989  $as_echo_n "(cached) " >&6
36990else
36991  ac_check_lib_save_LIBS=$LIBS
36992LIBS="-lodbc  $LIBS"
36993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36994/* end confdefs.h.  */
36995
36996/* Override any GCC internal prototype to avoid an error.
36997   Use char because int might match the return type of a GCC
36998   builtin and then its argument prototype would still apply.  */
36999#ifdef __cplusplus
37000extern "C"
37001#endif
37002char SQLConnect ();
37003int
37004main ()
37005{
37006return SQLConnect ();
37007  ;
37008  return 0;
37009}
37010_ACEOF
37011if ac_fn_c_try_link "$LINENO"; then :
37012  ac_cv_lib_odbc_SQLConnect=yes
37013else
37014  ac_cv_lib_odbc_SQLConnect=no
37015fi
37016rm -f core conftest.err conftest.$ac_objext \
37017    conftest$ac_exeext conftest.$ac_ext
37018LIBS=$ac_check_lib_save_LIBS
37019fi
37020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLConnect" >&5
37021$as_echo "$ac_cv_lib_odbc_SQLConnect" >&6; }
37022if test "x$ac_cv_lib_odbc_SQLConnect" = xyes; then :
37023  ODBC_LIBS="-lodbc -lodbcinst"
37024fi
37025
37026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc32" >&5
37027$as_echo_n "checking for main in -lodbc32... " >&6; }
37028if ${ac_cv_lib_odbc32_main+:} false; then :
37029  $as_echo_n "(cached) " >&6
37030else
37031  ac_check_lib_save_LIBS=$LIBS
37032LIBS="-lodbc32  $LIBS"
37033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37034/* end confdefs.h.  */
37035
37036
37037int
37038main ()
37039{
37040return main ();
37041  ;
37042  return 0;
37043}
37044_ACEOF
37045if ac_fn_c_try_link "$LINENO"; then :
37046  ac_cv_lib_odbc32_main=yes
37047else
37048  ac_cv_lib_odbc32_main=no
37049fi
37050rm -f core conftest.err conftest.$ac_objext \
37051    conftest$ac_exeext conftest.$ac_ext
37052LIBS=$ac_check_lib_save_LIBS
37053fi
37054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_main" >&5
37055$as_echo "$ac_cv_lib_odbc32_main" >&6; }
37056if test "x$ac_cv_lib_odbc32_main" = xyes; then :
37057  ODBC_LIBS="-lodbc32 -lodbccp32"
37058fi
37059
37060  if test "$ODBC_LIBS" = ""; then
37061    as_fn_error $? "Cannot find ODBC libs" "$LINENO" 5
37062  fi
37063  LIBS="-L$with_odbc -L$with_odbc/lib $ODBC_LIBS $LIBS"
37064  EXTRA_INCLUDES="-I$with_odbc -I$with_odbc/include $EXTRA_INCLUDES"
37065
37066  echo "using odbc library from $with_odbc."
37067fi
37068
37069if test "$ODBC_SETTING" = "yes"  ; then
37070
37071  driver_enabled=$INTERNAL_FORMAT_odbc_ENABLED
37072  if test "x$driver_enabled" = "xyes"; then
37073    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED odbc"
37074    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DODBC_ENABLED"
37075  fi
37076
37077  driver_enabled=$INTERNAL_FORMAT_pgeo_ENABLED
37078  if test "x$driver_enabled" = "xyes"; then
37079    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED pgeo"
37080    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DPGEO_ENABLED"
37081  fi
37082
37083  driver_enabled=$INTERNAL_FORMAT_mssqlspatial_ENABLED
37084  if test "x$driver_enabled" = "xyes"; then
37085    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED mssqlspatial"
37086    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DMSSQLSPATIAL_ENABLED"
37087  fi
37088
37089  driver_enabled=$INTERNAL_FORMAT_geomedia_ENABLED
37090  if test "x$driver_enabled" = "xyes"; then
37091    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED geomedia"
37092    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DGEOMEDIA_ENABLED"
37093  fi
37094
37095  driver_enabled=$INTERNAL_FORMAT_walk_ENABLED
37096  if test "x$driver_enabled" = "xyes"; then
37097    OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED walk"
37098    OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS -DWALK_ENABLED"
37099  fi
37100
37101fi
37102
37103ODBC_SETTING=$ODBC_SETTING
37104
37105
37106
37107ORACLE_OCI_REQ_VERSION="8.1.7"
37108
37109
37110# Check whether --with-oci was given.
37111if test "${with_oci+set}" = set; then :
37112  withval=$with_oci;
37113        if test "$withval" = "yes"; then
37114            if test -n "$ORACLE_HOME"; then
37115                oracle_home_dir="$ORACLE_HOME"
37116            else
37117                oracle_home_dir=""
37118            fi
37119        elif test -d "$withval"; then
37120            oracle_home_dir="$withval"
37121        else
37122            oracle_home_dir=""
37123        fi
37124
37125else
37126
37127        if test -n "$ORACLE_HOME"; then
37128            oracle_home_dir="$ORACLE_HOME"
37129        else
37130            oracle_home_dir=""
37131        fi
37132
37133
37134fi
37135
37136
37137
37138# Check whether --with-oci-include was given.
37139if test "${with_oci_include+set}" = set; then :
37140  withval=$with_oci_include; oracle_home_include_dir="$withval"
37141else
37142  oracle_home_include_dir=""
37143
37144fi
37145
37146
37147# Check whether --with-oci-lib was given.
37148if test "${with_oci_lib+set}" = set; then :
37149  withval=$with_oci_lib; oracle_home_lib_dir="$withval"
37150else
37151  oracle_home_lib_dir=""
37152
37153fi
37154
37155
37156    ORACLE_OCI_CFLAGS=""
37157    ORACLE_OCI_LDFLAGS=""
37158    ORACLE_OCI_VERSION=""
37159
37160                want_oracle_but_no_path="no"
37161
37162    if test -n "$oracle_home_dir"; then
37163
37164        if test "$oracle_home_dir" != "no" -a "$oracle_home_dir" != "yes"; then
37165
37166                        if test -d "$oracle_home_dir/rdbms/public"; then
37167                oracle_include_dir="$oracle_home_dir/rdbms/public"
37168            fi
37169
37170                        if test -d "$oracle_home_dir/rdbms/demo"; then
37171                oracle_include_dir="$oracle_home_dir/rdbms/demo"
37172            fi
37173
37174                        if test -d "$oracle_home_dir/sdk/include"; then
37175                oracle_include_dir="$oracle_home_dir/sdk/include"
37176            fi
37177
37178                        oracle_lib_dir="$oracle_home_dir/lib"
37179
37180                        oracle_lib_dir2="$oracle_home_dir"
37181
37182        elif test "$oracle_home_dir" = "yes"; then
37183            want_oracle_but_no_path="yes"
37184        fi
37185
37186    elif test -n "$oracle_home_include_dir" -o -n "$oracle_home_lib_dir"; then
37187
37188        if test "$oracle_home_include_dir" != "no" -a "$oracle_home_include_dir" != "yes"; then
37189            oracle_include_dir="$oracle_home_include_dir"
37190        elif test "$oracle_home_include_dir" = "yes"; then
37191            want_oracle_but_no_path="yes"
37192        fi
37193
37194        if test "$oracle_home_lib_dir" != "no" -a "$oracle_home_lib_dir" != "yes"; then
37195            oracle_lib_dir="$oracle_home_lib_dir"
37196        elif test "$oracle_home_lib_dir" = "yes"; then
37197            want_oracle_but_no_path="yes"
37198        fi
37199    fi
37200
37201    if test "$want_oracle_but_no_path" = "yes"; then
37202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle support is requested but no Oracle paths have been provided. \
37203Please, locate Oracle directories using --with-oci or \
37204--with-oci-include and --with-oci-lib options." >&5
37205$as_echo "$as_me: WARNING: Oracle support is requested but no Oracle paths have been provided. \
37206Please, locate Oracle directories using --with-oci or \
37207--with-oci-include and --with-oci-lib options." >&2;}
37208    fi
37209
37210                if test -n "$oracle_include_dir" -a -n "$oracle_lib_dir" -o -n "$oracle_lib_dir2"; then
37211
37212        saved_CPPFLAGS="$CPPFLAGS"
37213        CPPFLAGS="$CPPFLAGS -I$oracle_include_dir"
37214
37215                        if test -n "$oracle_include_dir" ; then
37216          oci_ldflags="-L$oracle_lib_dir -lclntsh"
37217        else
37218          oci_ldflags="-L$oracle_lib_dir -L$oracle_lib_dir2 -lclntsh"
37219        fi
37220
37221        saved_LIBS="$LIBS"
37222        LIBS="$LIBS $oci_ldflags"
37223
37224                                if test -f "$oracle_include_dir/oci.h"; then
37225            ACTIVE_INCLUDE_DIR="$oracle_include_dir"
37226        fi
37227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI headers in $ACTIVE_INCLUDE_DIR" >&5
37228$as_echo_n "checking for Oracle OCI headers in $ACTIVE_INCLUDE_DIR... " >&6; }
37229
37230        ac_ext=cpp
37231ac_cpp='$CXXCPP $CPPFLAGS'
37232ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37233ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37234ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37235
37236        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37237/* end confdefs.h.  */
37238
37239            #include <oci.h>
37240int
37241main ()
37242{
37243
37244#if defined(OCI_MAJOR_VERSION)
37245#if OCI_MAJOR_VERSION == 10 && OCI_MINOR_VERSION == 2
37246// Oracle 10.2 detected
37247#endif
37248#elif defined(OCI_V7_SYNTAX)
37249// OK, older Oracle detected
37250// TODO - mloskot: find better macro to check for older versions;
37251#else
37252#  error Oracle oci.h header not found
37253#endif
37254
37255
37256  ;
37257  return 0;
37258}
37259_ACEOF
37260if ac_fn_cxx_try_compile "$LINENO"; then :
37261
37262            ORACLE_OCI_CFLAGS="-I$oracle_include_dir"
37263
37264            oci_header_found="yes"
37265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37266$as_echo "yes" >&6; }
37267
37268else
37269
37270            oci_header_found="no"
37271            { $as_echo "$as_me:${as_lineno-$LINENO}: result:  header not found" >&5
37272$as_echo " header not found" >&6; }
37273
37274
37275fi
37276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37277        ac_ext=c
37278ac_cpp='$CPP $CPPFLAGS'
37279ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37280ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37281ac_compiler_gnu=$ac_cv_c_compiler_gnu
37282
37283
37284                                if test "$oci_header_found" = "yes"; then
37285
37286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI libraries in $oracle_lib_dir" >&5
37287$as_echo_n "checking for Oracle OCI libraries in $oracle_lib_dir... " >&6; }
37288
37289            ac_ext=cpp
37290ac_cpp='$CXXCPP $CPPFLAGS'
37291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37294
37295            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37296/* end confdefs.h.  */
37297
37298                #include <oci.h>
37299int
37300main ()
37301{
37302
37303OCIEnv* envh = 0;
37304OCIEnvCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0);
37305if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
37306
37307
37308  ;
37309  return 0;
37310}
37311_ACEOF
37312if ac_fn_cxx_try_link "$LINENO"; then :
37313
37314                ORACLE_OCI_LDFLAGS="$oci_ldflags"
37315                oci_lib_found="yes"
37316                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37317$as_echo "yes" >&6; }
37318
37319else
37320
37321                oci_lib_found="no"
37322                { $as_echo "$as_me:${as_lineno-$LINENO}: result: library not found" >&5
37323$as_echo "library not found" >&6; }
37324
37325
37326fi
37327rm -f core conftest.err conftest.$ac_objext \
37328    conftest$ac_exeext conftest.$ac_ext
37329            ac_ext=c
37330ac_cpp='$CPP $CPPFLAGS'
37331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37333ac_compiler_gnu=$ac_cv_c_compiler_gnu
37334
37335        fi
37336
37337        CPPFLAGS="$saved_CPPFLAGS"
37338        LIBS="$saved_LIBS"
37339    fi
37340
37341                oracle_version_req=$ORACLE_OCI_REQ_VERSION
37342
37343    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes" -a \
37344        -n "$oracle_version_req"; then
37345
37346        if test -f "$oracle_include_dir/oci.h"; then
37347            ACTIVE_INCLUDE_DIR="$oracle_include_dir"
37348        fi
37349
37350        oracle_version_major=$(sed -n '/^#define OCI_MAJOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
37351		$ACTIVE_INCLUDE_DIR/oci.h)
37352        oracle_version_minor=$(sed -n '/^#define OCI_MINOR_VERSION.*$/{s/\([^0-9]*\)\([0-9]*\).*/\2/;P;}' \
37353		$ACTIVE_INCLUDE_DIR/oci.h)
37354
37355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle OCI version is >= $oracle_version_req " >&5
37356$as_echo_n "checking if Oracle OCI version is >= $oracle_version_req ... " >&6; }
37357
37358        if test -n "$oracle_version_major" -a -n $"oracle_version_minor"; then
37359
37360            ORACLE_OCI_VERSION="$oracle_version_major.$oracle_version_minor"
37361
37362                                    oracle_version_req_major=`expr $oracle_version_req : '\([0-9]*\)'`
37363            oracle_version_req_minor=`expr $oracle_version_req : '[0-9]*\.\([0-9]*\)'`
37364
37365            oracle_version_req_number=`expr $oracle_version_req_major \* 1000000 \
37366                                       \+ $oracle_version_req_minor \* 1000`
37367
37368                        oracle_version_number=`expr $oracle_version_major \* 1000000 \
37369                                  \+ $oracle_version_minor \* 1000`
37370
37371            oracle_version_check=`expr $oracle_version_number \>\= $oracle_version_req_number`
37372            if test "$oracle_version_check" = "1"; then
37373
37374                oracle_version_checked="yes"
37375                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37376$as_echo "yes" >&6; }
37377
37378                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle version >= 10.x to use -lnnz10 flag" >&5
37379$as_echo_n "checking for Oracle version >= 10.x to use -lnnz10 flag... " >&6; }
37380                oracle_nnz10_check=`expr $oracle_version_number \>\= 10 \* 1000000`
37381                if test "$oracle_nnz10_check" = "1"; then
37382                    ORACLE_OCI_LDFLAGS="$ORACLE_OCI_LDFLAGS -lnnz$oracle_version_major"
37383                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37384$as_echo "yes" >&6; }
37385                else
37386                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37387$as_echo "no" >&6; }
37388                fi
37389            else
37390                oracle_version_checked="no"
37391                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37392$as_echo "no" >&6; }
37393                as_fn_error $? "Oracle $ORACLE_OCI_VERSION found, but required version is $oracle_version_req" "$LINENO" 5
37394            fi
37395        else
37396            ORACLE_OCI_VERSION="UNKNOWN"
37397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37398$as_echo "no" >&6; }
37399            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&5
37400$as_echo "$as_me: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&2;}
37401        fi
37402    fi
37403
37404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle support is enabled" >&5
37405$as_echo_n "checking if Oracle support is enabled... " >&6; }
37406
37407    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes"; then
37408
37409
37410
37411
37412
37413        HAVE_ORACLE_OCI="yes"
37414    else
37415        HAVE_ORACLE_OCI="no"
37416    fi
37417
37418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ORACLE_OCI" >&5
37419$as_echo "$HAVE_ORACLE_OCI" >&6; }
37420
37421
37422if test "$HAVE_ORACLE_OCI" = "yes"; then
37423    OCI_INCLUDE="$ORACLE_OCI_CFLAGS"
37424    LIBS="$ORACLE_OCI_LDFLAGS $LIBS"
37425fi
37426
37427HAVE_OCI=$HAVE_ORACLE_OCI
37428
37429OCI_INCLUDE=$OCI_INCLUDE
37430
37431
37432
37433HAVE_DODS=no
37434
37435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DODS" >&5
37436$as_echo_n "checking for DODS... " >&6; }
37437
37438# Check whether --with-dods_root was given.
37439if test "${with_dods_root+set}" = set; then :
37440  withval=$with_dods_root;
37441fi
37442
37443
37444if test -z "$with_dods_root" -o "$with_dods_root" = "no"; then
37445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37446$as_echo "disabled" >&6; }
37447elif test "$with_dods_root" = "yes" ; then
37448    as_fn_error $? "--with-dods-root requires path to dods root as argument" "$LINENO" 5
37449else
37450    DODS_LIB=$with_dods_root/lib
37451    DODS_INC="-I$with_dods_root/include"
37452    if test -d "$with_dods_root/include/libdap"; then
37453       DODS_INC="$DODS_INC -I$with_dods_root/include/libdap";
37454    elif test -d "$with_dods_root/include/dap"; then
37455       DODS_INC="$DODS_INC -I$with_dods_root/include/dap";
37456   fi
37457    DODS_BIN=$with_dods_root/bin
37458
37459        if test -x $DODS_BIN/dap-config ; then
37460        LIBDAP_VER=`${DODS_BIN}/dap-config --version |awk '{print \$2}'`
37461        LIBDAP_CFLAGS=`${DODS_BIN}/dap-config --cflags`
37462                DODS_INC="$DODS_INC $LIBDAP_CFLAGS -DLIBDAP_310 -DLIBDAP_39"
37463                { $as_echo "$as_me:${as_lineno-$LINENO}: result: libdap $LIBDAP_VER" >&5
37464$as_echo "libdap $LIBDAP_VER" >&6; }
37465    else
37466
37467
37468if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
37469	if test -n "$ac_tool_prefix"; then
37470  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
37471set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
37472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37473$as_echo_n "checking for $ac_word... " >&6; }
37474if ${ac_cv_path_PKG_CONFIG+:} false; then :
37475  $as_echo_n "(cached) " >&6
37476else
37477  case $PKG_CONFIG in
37478  [\\/]* | ?:[\\/]*)
37479  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
37480  ;;
37481  *)
37482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37483for as_dir in $PATH
37484do
37485  IFS=$as_save_IFS
37486  test -z "$as_dir" && as_dir=.
37487    for ac_exec_ext in '' $ac_executable_extensions; do
37488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37489    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
37490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37491    break 2
37492  fi
37493done
37494  done
37495IFS=$as_save_IFS
37496
37497  ;;
37498esac
37499fi
37500PKG_CONFIG=$ac_cv_path_PKG_CONFIG
37501if test -n "$PKG_CONFIG"; then
37502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
37503$as_echo "$PKG_CONFIG" >&6; }
37504else
37505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37506$as_echo "no" >&6; }
37507fi
37508
37509
37510fi
37511if test -z "$ac_cv_path_PKG_CONFIG"; then
37512  ac_pt_PKG_CONFIG=$PKG_CONFIG
37513  # Extract the first word of "pkg-config", so it can be a program name with args.
37514set dummy pkg-config; ac_word=$2
37515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37516$as_echo_n "checking for $ac_word... " >&6; }
37517if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
37518  $as_echo_n "(cached) " >&6
37519else
37520  case $ac_pt_PKG_CONFIG in
37521  [\\/]* | ?:[\\/]*)
37522  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
37523  ;;
37524  *)
37525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37526for as_dir in $PATH
37527do
37528  IFS=$as_save_IFS
37529  test -z "$as_dir" && as_dir=.
37530    for ac_exec_ext in '' $ac_executable_extensions; do
37531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37532    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
37533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37534    break 2
37535  fi
37536done
37537  done
37538IFS=$as_save_IFS
37539
37540  ;;
37541esac
37542fi
37543ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
37544if test -n "$ac_pt_PKG_CONFIG"; then
37545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
37546$as_echo "$ac_pt_PKG_CONFIG" >&6; }
37547else
37548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37549$as_echo "no" >&6; }
37550fi
37551
37552  if test "x$ac_pt_PKG_CONFIG" = x; then
37553    PKG_CONFIG=""
37554  else
37555    case $cross_compiling:$ac_tool_warned in
37556yes:)
37557{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37558$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37559ac_tool_warned=yes ;;
37560esac
37561    PKG_CONFIG=$ac_pt_PKG_CONFIG
37562  fi
37563else
37564  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
37565fi
37566
37567fi
37568if test -n "$PKG_CONFIG"; then
37569	_pkg_min_version=0.21
37570	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
37571$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
37572	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
37573		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37574$as_echo "yes" >&6; }
37575	else
37576		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37577$as_echo "no" >&6; }
37578		PKG_CONFIG=""
37579	fi
37580
37581fi
37582
37583pkg_failed=no
37584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDAP" >&5
37585$as_echo_n "checking for LIBDAP... " >&6; }
37586
37587if test -n "$PKG_CONFIG"; then
37588    if test -n "$LIBDAP_CFLAGS"; then
37589        pkg_cv_LIBDAP_CFLAGS="$LIBDAP_CFLAGS"
37590    else
37591        if test -n "$PKG_CONFIG" && \
37592    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdap\""; } >&5
37593  ($PKG_CONFIG --exists --print-errors "libdap") 2>&5
37594  ac_status=$?
37595  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37596  test $ac_status = 0; }; then
37597  pkg_cv_LIBDAP_CFLAGS=`$PKG_CONFIG --cflags "libdap" 2>/dev/null`
37598else
37599  pkg_failed=yes
37600fi
37601    fi
37602else
37603	pkg_failed=untried
37604fi
37605if test -n "$PKG_CONFIG"; then
37606    if test -n "$LIBDAP_LIBS"; then
37607        pkg_cv_LIBDAP_LIBS="$LIBDAP_LIBS"
37608    else
37609        if test -n "$PKG_CONFIG" && \
37610    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdap\""; } >&5
37611  ($PKG_CONFIG --exists --print-errors "libdap") 2>&5
37612  ac_status=$?
37613  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37614  test $ac_status = 0; }; then
37615  pkg_cv_LIBDAP_LIBS=`$PKG_CONFIG --libs "libdap" 2>/dev/null`
37616else
37617  pkg_failed=yes
37618fi
37619    fi
37620else
37621	pkg_failed=untried
37622fi
37623
37624
37625
37626if test $pkg_failed = yes; then
37627
37628if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
37629        _pkg_short_errors_supported=yes
37630else
37631        _pkg_short_errors_supported=no
37632fi
37633        if test $_pkg_short_errors_supported = yes; then
37634	        LIBDAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdap"`
37635        else
37636	        LIBDAP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdap"`
37637        fi
37638	# Put the nasty error message in config.log where it belongs
37639	echo "$LIBDAP_PKG_ERRORS" >&5
37640
37641	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37642$as_echo "no" >&6; }
37643                HAVE_LIBDAP=no
37644elif test $pkg_failed = untried; then
37645	HAVE_LIBDAP=no
37646else
37647	LIBDAP_CFLAGS=$pkg_cv_LIBDAP_CFLAGS
37648	LIBDAP_LIBS=$pkg_cv_LIBDAP_LIBS
37649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37650$as_echo "yes" >&6; }
37651	HAVE_LIBDAP=yes
37652fi
37653
37654        if test "${HAVE_LIBDAP}" = "yes"; then
37655                        DODS_INC="$DODS_INC $LIBDAP_CFLAGS -DLIBDAP_310 -DLIBDAP_39"
37656        else
37657
37658                                    rm -f islibdappost310.*
37659            echo '#include "Connect.h"' > islibdappost310.cpp
37660            echo 'int main(int argc, char** argv) { return 0; } ' >> islibdappost310.cpp
37661            if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} islibdappost310.cpp -c ${DODS_INC} ${CPPFLAGS} 2>&1`" ; then
37662                            DODS_INC="$DODS_INC -DLIBDAP_310 -DLIBDAP_39"
37663                { $as_echo "$as_me:${as_lineno-$LINENO}: result: libdap >= 3.10" >&5
37664$as_echo "libdap >= 3.10" >&6; }
37665            else
37666                { $as_echo "$as_me:${as_lineno-$LINENO}: result: libdap < 3.10" >&5
37667$as_echo "libdap < 3.10" >&6; }
37668
37669                                                                rm -f islibdappre39.*
37670                echo '#include "DAS.h"' > islibdappre39.cpp
37671                echo '#include "AttrTable.h"' >> islibdappre39.cpp
37672                echo 'using namespace libdap;' >> islibdappre39.cpp
37673                echo 'int main(int argc, char** argv) { DAS oDAS; AttrTable& oAttrTable = oDAS; } ' >> islibdappre39.cpp
37674                if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} islibdappre39.cpp -c ${DODS_INC} 2>&1`" ; then
37675                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libdap < 3.9" >&5
37676$as_echo "libdap < 3.9" >&6; }
37677                else
37678                    DODS_INC="$DODS_INC -DLIBDAP_39"
37679                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libdap >= 3.9" >&5
37680$as_echo "libdap >= 3.9" >&6; }
37681                fi
37682                rm -f islibdappre39.*
37683
37684            fi
37685            rm -f islibdappost310.*
37686        fi
37687    fi
37688
37689
37690        if test -x $DODS_BIN/opendap-config ; then
37691            LIBS="$LIBS `$DODS_BIN/opendap-config --libs`"
37692    elif test -x $DODS_BIN/dap-config ; then
37693            LIBS="$LIBS `$DODS_BIN/dap-config --libs`"
37694    elif test "${HAVE_LIBDAP}" = "yes"; then
37695      LIBS="$LIBS $LIBDAP_LIBS"
37696    else
37697            LIBS="$LIBS -L$DODS_LIB -ldap++ -lpthread -lrx"
37698
37699            if test -x $DODS_BIN/curl-config; then
37700          LIBS="$LIBS  `$DODS_BIN/curl-config --libs`"
37701      elif which curl-config > /dev/null 2>&1; then
37702          LIBS="$LIBS  `curl-config --libs`"
37703      else
37704          as_fn_error $? "You gave a dods root, but I can't find curl!" "$LINENO" 5
37705      fi
37706
37707      if test -x $DODS_BIN/xml2-config; then
37708          LIBS="$LIBS `$DODS_BIN/xml2-config --libs`"
37709      elif which xml2-config > /dev/null 2>&1; then
37710          LIBS="$LIBS  `xml2-config --libs`"
37711      else
37712          as_fn_error $? "You gave a dods root, but I can't find xml2!" "$LINENO" 5
37713      fi
37714    fi
37715
37716    OPT_GDAL_FORMATS="dods $OPT_GDAL_FORMATS"
37717    DODSDEF=-DFRMT_dods
37718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting DODS root directory to $with_dods_root" >&5
37719$as_echo "setting DODS root directory to $with_dods_root" >&6; }
37720    HAVE_DODS=yes
37721fi
37722
37723
37724
37725
37726HAVE_LIBXML2=no
37727LIBXML2_INC=
37728LIBXML2_LIB=
37729
37730
37731# Check whether --with-xml2 was given.
37732if test "${with_xml2+set}" = set; then :
37733  withval=$with_xml2;
37734fi
37735
37736
37737if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then
37738
37739
37740
37741if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
37742	if test -n "$ac_tool_prefix"; then
37743  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
37744set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
37745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37746$as_echo_n "checking for $ac_word... " >&6; }
37747if ${ac_cv_path_PKG_CONFIG+:} false; then :
37748  $as_echo_n "(cached) " >&6
37749else
37750  case $PKG_CONFIG in
37751  [\\/]* | ?:[\\/]*)
37752  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
37753  ;;
37754  *)
37755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37756for as_dir in $PATH
37757do
37758  IFS=$as_save_IFS
37759  test -z "$as_dir" && as_dir=.
37760    for ac_exec_ext in '' $ac_executable_extensions; do
37761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37762    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
37763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37764    break 2
37765  fi
37766done
37767  done
37768IFS=$as_save_IFS
37769
37770  ;;
37771esac
37772fi
37773PKG_CONFIG=$ac_cv_path_PKG_CONFIG
37774if test -n "$PKG_CONFIG"; then
37775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
37776$as_echo "$PKG_CONFIG" >&6; }
37777else
37778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37779$as_echo "no" >&6; }
37780fi
37781
37782
37783fi
37784if test -z "$ac_cv_path_PKG_CONFIG"; then
37785  ac_pt_PKG_CONFIG=$PKG_CONFIG
37786  # Extract the first word of "pkg-config", so it can be a program name with args.
37787set dummy pkg-config; ac_word=$2
37788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37789$as_echo_n "checking for $ac_word... " >&6; }
37790if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
37791  $as_echo_n "(cached) " >&6
37792else
37793  case $ac_pt_PKG_CONFIG in
37794  [\\/]* | ?:[\\/]*)
37795  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
37796  ;;
37797  *)
37798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37799for as_dir in $PATH
37800do
37801  IFS=$as_save_IFS
37802  test -z "$as_dir" && as_dir=.
37803    for ac_exec_ext in '' $ac_executable_extensions; do
37804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37805    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
37806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37807    break 2
37808  fi
37809done
37810  done
37811IFS=$as_save_IFS
37812
37813  ;;
37814esac
37815fi
37816ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
37817if test -n "$ac_pt_PKG_CONFIG"; then
37818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
37819$as_echo "$ac_pt_PKG_CONFIG" >&6; }
37820else
37821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37822$as_echo "no" >&6; }
37823fi
37824
37825  if test "x$ac_pt_PKG_CONFIG" = x; then
37826    PKG_CONFIG=""
37827  else
37828    case $cross_compiling:$ac_tool_warned in
37829yes:)
37830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37832ac_tool_warned=yes ;;
37833esac
37834    PKG_CONFIG=$ac_pt_PKG_CONFIG
37835  fi
37836else
37837  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
37838fi
37839
37840fi
37841if test -n "$PKG_CONFIG"; then
37842	_pkg_min_version=0.21
37843	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
37844$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
37845	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
37846		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37847$as_echo "yes" >&6; }
37848	else
37849		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37850$as_echo "no" >&6; }
37851		PKG_CONFIG=""
37852	fi
37853
37854fi
37855
37856pkg_failed=no
37857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML2" >&5
37858$as_echo_n "checking for LIBXML2... " >&6; }
37859
37860if test -n "$PKG_CONFIG"; then
37861    if test -n "$LIBXML2_CFLAGS"; then
37862        pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS"
37863    else
37864        if test -n "$PKG_CONFIG" && \
37865    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
37866  ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
37867  ac_status=$?
37868  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37869  test $ac_status = 0; }; then
37870  pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
37871else
37872  pkg_failed=yes
37873fi
37874    fi
37875else
37876	pkg_failed=untried
37877fi
37878if test -n "$PKG_CONFIG"; then
37879    if test -n "$LIBXML2_LIBS"; then
37880        pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS"
37881    else
37882        if test -n "$PKG_CONFIG" && \
37883    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
37884  ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
37885  ac_status=$?
37886  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37887  test $ac_status = 0; }; then
37888  pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
37889else
37890  pkg_failed=yes
37891fi
37892    fi
37893else
37894	pkg_failed=untried
37895fi
37896
37897
37898
37899if test $pkg_failed = yes; then
37900
37901if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
37902        _pkg_short_errors_supported=yes
37903else
37904        _pkg_short_errors_supported=no
37905fi
37906        if test $_pkg_short_errors_supported = yes; then
37907	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
37908        else
37909	        LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
37910        fi
37911	# Put the nasty error message in config.log where it belongs
37912	echo "$LIBXML2_PKG_ERRORS" >&5
37913
37914	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37915$as_echo "no" >&6; }
37916                HAVE_LIBXML2=no
37917elif test $pkg_failed = untried; then
37918	HAVE_LIBXML2=no
37919else
37920	LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS
37921	LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS
37922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37923$as_echo "yes" >&6; }
37924	HAVE_LIBXML2=yes
37925fi
37926
37927  if test "${HAVE_LIBXML2}" = "yes"; then
37928    SAVED_LIBS="${LIBS}"
37929    LIBS="${LIBXML2_LIBS}"
37930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlParseDoc in -lxml2" >&5
37931$as_echo_n "checking for xmlParseDoc in -lxml2... " >&6; }
37932if ${ac_cv_lib_xml2_xmlParseDoc+:} false; then :
37933  $as_echo_n "(cached) " >&6
37934else
37935  ac_check_lib_save_LIBS=$LIBS
37936LIBS="-lxml2  $LIBS"
37937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37938/* end confdefs.h.  */
37939
37940/* Override any GCC internal prototype to avoid an error.
37941   Use char because int might match the return type of a GCC
37942   builtin and then its argument prototype would still apply.  */
37943#ifdef __cplusplus
37944extern "C"
37945#endif
37946char xmlParseDoc ();
37947int
37948main ()
37949{
37950return xmlParseDoc ();
37951  ;
37952  return 0;
37953}
37954_ACEOF
37955if ac_fn_c_try_link "$LINENO"; then :
37956  ac_cv_lib_xml2_xmlParseDoc=yes
37957else
37958  ac_cv_lib_xml2_xmlParseDoc=no
37959fi
37960rm -f core conftest.err conftest.$ac_objext \
37961    conftest$ac_exeext conftest.$ac_ext
37962LIBS=$ac_check_lib_save_LIBS
37963fi
37964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlParseDoc" >&5
37965$as_echo "$ac_cv_lib_xml2_xmlParseDoc" >&6; }
37966if test "x$ac_cv_lib_xml2_xmlParseDoc" = xyes; then :
37967  HAVE_LIBXML2=yes
37968else
37969  HAVE_LIBXML2=no
37970fi
37971
37972    LIBS="${SAVED_LIBS}"
37973  fi
37974
37975  if test "${HAVE_LIBXML2}" = "yes"; then
37976    LIBXML2_INC="${LIBXML2_CFLAGS}"
37977    LIBXML2_LIB="${LIBXML2_LIBS}"
37978  else
37979    if test "x$with_xml2" = "xyes"; then
37980      as_fn_error $? "--with-xml2 was requested, but libxml2 is not available" "$LINENO" 5
37981    fi
37982  fi
37983elif test "x$with_xml2" != "xno"; then
37984  as_fn_error $? "Only --with-xml2=yes/no supported" "$LINENO" 5
37985fi
37986
37987HAVE_LIBXML2=$HAVE_LIBXML2
37988
37989LIBXML2_INC=$LIBXML2_INC
37990
37991LIBXML2_LIB=$LIBXML2_LIB
37992
37993
37994
37995
37996# Check whether --with-rasterlite2 was given.
37997if test "${with_rasterlite2+set}" = set; then :
37998  withval=$with_rasterlite2;
37999fi
38000
38001
38002HAVE_RASTERLITE2=no
38003RASTERLITE2_CFLAGS=
38004
38005if test -z "$with_rasterlite2" -o "$with_rasterlite2" = "no"; then
38006    { $as_echo "$as_me:${as_lineno-$LINENO}: rasterlite2 support disabled" >&5
38007$as_echo "$as_me: rasterlite2 support disabled" >&6;}
38008elif test "$with_rasterlite2" = "yes"; then
38009    for ac_header in rasterlite2/rasterlite2.h
38010do :
38011  ac_fn_c_check_header_mongrel "$LINENO" "rasterlite2/rasterlite2.h" "ac_cv_header_rasterlite2_rasterlite2_h" "$ac_includes_default"
38012if test "x$ac_cv_header_rasterlite2_rasterlite2_h" = xyes; then :
38013  cat >>confdefs.h <<_ACEOF
38014#define HAVE_RASTERLITE2_RASTERLITE2_H 1
38015_ACEOF
38016
38017fi
38018
38019done
38020
38021    if test "$ac_cv_header_rasterlite2_rasterlite2_h" = "yes"; then
38022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl2_load_raw_tiles_into_dbms in -lrasterlite2" >&5
38023$as_echo_n "checking for rl2_load_raw_tiles_into_dbms in -lrasterlite2... " >&6; }
38024if ${ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms+:} false; then :
38025  $as_echo_n "(cached) " >&6
38026else
38027  ac_check_lib_save_LIBS=$LIBS
38028LIBS="-lrasterlite2  $LIBS"
38029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38030/* end confdefs.h.  */
38031
38032/* Override any GCC internal prototype to avoid an error.
38033   Use char because int might match the return type of a GCC
38034   builtin and then its argument prototype would still apply.  */
38035#ifdef __cplusplus
38036extern "C"
38037#endif
38038char rl2_load_raw_tiles_into_dbms ();
38039int
38040main ()
38041{
38042return rl2_load_raw_tiles_into_dbms ();
38043  ;
38044  return 0;
38045}
38046_ACEOF
38047if ac_fn_c_try_link "$LINENO"; then :
38048  ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms=yes
38049else
38050  ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms=no
38051fi
38052rm -f core conftest.err conftest.$ac_objext \
38053    conftest$ac_exeext conftest.$ac_ext
38054LIBS=$ac_check_lib_save_LIBS
38055fi
38056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms" >&5
38057$as_echo "$ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms" >&6; }
38058if test "x$ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms" = xyes; then :
38059  HAVE_RASTERLITE2=yes
38060else
38061  HAVE_RASTERLITE2=no
38062fi
38063
38064        if test "$HAVE_RASTERLITE2" = "yes"; then
38065            LIBS="$LIBS -lrasterlite2 -lsqlite3"
38066        else
38067            as_fn_error $? "did not find rl2_load_raw_tiles_into_dbms" "$LINENO" 5
38068        fi
38069    else
38070        as_fn_error $? "did not find rasterlite2.h" "$LINENO" 5
38071    fi
38072else
38073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for include/rasterlite2/rasterlite2.h" >&5
38074$as_echo_n "checking for include/rasterlite2/rasterlite2.h... " >&6; }
38075    if test -f "$with_rasterlite2/include/rasterlite2/rasterlite2.h"; then
38076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
38077$as_echo "found" >&6; }
38078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl2_load_raw_tiles_into_dbms in -lrasterlite2" >&5
38079$as_echo_n "checking for rl2_load_raw_tiles_into_dbms in -lrasterlite2... " >&6; }
38080if ${ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms+:} false; then :
38081  $as_echo_n "(cached) " >&6
38082else
38083  ac_check_lib_save_LIBS=$LIBS
38084LIBS="-lrasterlite2 -L$with_rasterlite2/lib $LIBS"
38085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38086/* end confdefs.h.  */
38087
38088/* Override any GCC internal prototype to avoid an error.
38089   Use char because int might match the return type of a GCC
38090   builtin and then its argument prototype would still apply.  */
38091#ifdef __cplusplus
38092extern "C"
38093#endif
38094char rl2_load_raw_tiles_into_dbms ();
38095int
38096main ()
38097{
38098return rl2_load_raw_tiles_into_dbms ();
38099  ;
38100  return 0;
38101}
38102_ACEOF
38103if ac_fn_c_try_link "$LINENO"; then :
38104  ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms=yes
38105else
38106  ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms=no
38107fi
38108rm -f core conftest.err conftest.$ac_objext \
38109    conftest$ac_exeext conftest.$ac_ext
38110LIBS=$ac_check_lib_save_LIBS
38111fi
38112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms" >&5
38113$as_echo "$ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms" >&6; }
38114if test "x$ac_cv_lib_rasterlite2_rl2_load_raw_tiles_into_dbms" = xyes; then :
38115  HAVE_RASTERLITE2=yes
38116else
38117  HAVE_RASTERLITE2=no
38118fi
38119
38120        if test "$HAVE_RASTERLITE2" = "yes"; then
38121            RASTERLITE2_CFLAGS="-I$with_rasterlite2/include"
38122            LIBS="$LIBS -L$with_rasterlite2/lib -lrasterlite2 -lsqlite3"
38123        else
38124            as_fn_error $? "did not find rl2_load_raw_tiles_into_dbms" "$LINENO" 5
38125        fi
38126    else
38127        as_fn_error $? "did not find rasterlite2.h" "$LINENO" 5
38128    fi
38129fi
38130
38131HAVE_RASTERLITE2=$HAVE_RASTERLITE2
38132
38133RASTERLITE2_CFLAGS=$RASTERLITE2_CFLAGS
38134
38135
38136
38137HAVE_PCRE=no
38138
38139
38140# Check whether --with-pcre was given.
38141if test "${with_pcre+set}" = set; then :
38142  withval=$with_pcre;
38143fi
38144
38145
38146if test "$with_pcre" = "no"; then
38147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38148$as_echo "disabled" >&6; }
38149    HAVE_PCRE=no
38150else
38151    for ac_header in pcre.h
38152do :
38153  ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
38154if test "x$ac_cv_header_pcre_h" = xyes; then :
38155  cat >>confdefs.h <<_ACEOF
38156#define HAVE_PCRE_H 1
38157_ACEOF
38158
38159fi
38160
38161done
38162
38163    if test "$ac_cv_header_pcre_h" = "no" ; then
38164        if test "$with_pcre" = "yes"; then
38165            as_fn_error $? "cannot find pcre.h" "$LINENO" 5
38166        fi
38167    else
38168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
38169$as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
38170if ${ac_cv_lib_pcre_pcre_compile+:} false; then :
38171  $as_echo_n "(cached) " >&6
38172else
38173  ac_check_lib_save_LIBS=$LIBS
38174LIBS="-lpcre  $LIBS"
38175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38176/* end confdefs.h.  */
38177
38178/* Override any GCC internal prototype to avoid an error.
38179   Use char because int might match the return type of a GCC
38180   builtin and then its argument prototype would still apply.  */
38181#ifdef __cplusplus
38182extern "C"
38183#endif
38184char pcre_compile ();
38185int
38186main ()
38187{
38188return pcre_compile ();
38189  ;
38190  return 0;
38191}
38192_ACEOF
38193if ac_fn_c_try_link "$LINENO"; then :
38194  ac_cv_lib_pcre_pcre_compile=yes
38195else
38196  ac_cv_lib_pcre_pcre_compile=no
38197fi
38198rm -f core conftest.err conftest.$ac_objext \
38199    conftest$ac_exeext conftest.$ac_ext
38200LIBS=$ac_check_lib_save_LIBS
38201fi
38202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
38203$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
38204if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
38205  HAVE_PCRE=yes
38206else
38207  HAVE_PCRE=no
38208fi
38209
38210        if test "$HAVE_PCRE" = "yes" ; then
38211            HAVE_PCRE=yes
38212            LIBS="$LIBS -lpcre"
38213        else
38214            if test "$with_pcre" = "yes"; then
38215                as_fn_error $? "cannot find libpcre" "$LINENO" 5
38216            fi
38217        fi
38218    fi
38219fi
38220
38221
38222
38223
38224TEIGHA_DIR=
38225TEIGHA_CPPFLAGS=
38226
38227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for Teigha" >&5
38228$as_echo_n "checking Checking for Teigha... " >&6; }
38229
38230# Check whether --with-teigha was given.
38231if test "${with_teigha+set}" = set; then :
38232  withval=$with_teigha;
38233fi
38234
38235
38236if test -z "$with_teigha" -o "$with_teigha" = "no"; then
38237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38238$as_echo "disabled" >&6; }
38239    HAVE_TEIGHA=no
38240else
38241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
38242$as_echo "enabled" >&6; }
38243
38244
38245# Check whether --with-teigha-plt was given.
38246if test "${with_teigha_plt+set}" = set; then :
38247  withval=$with_teigha_plt;
38248fi
38249
38250    if test "x$with_teigha_plt" != "x" ; then
38251        TEIGHA_DIR=$with_teigha
38252        HAVE_TEIGHA=yes
38253        TEIGHA_PLT=$with_teigha_plt
38254        LIBS="${LIBS} ${TEIGHA_DIR}/bin/${TEIGHA_PLT}/TG_Db.tx"
38255        if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/TD_DbEntities.tx"; then
38256            LIBS="${LIBS} ${TEIGHA_DIR}/bin/${TEIGHA_PLT}/TD_DbEntities.tx"
38257            LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTD_DrawingsExamplesCommon.a"
38258        fi
38259        LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTG_ExamplesCommon.a"
38260        LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTD_ExamplesCommon.a"
38261        LIBS="${LIBS} ${TEIGHA_DIR}/lib/${TEIGHA_PLT}/libTD_Key.a"
38262        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Db"
38263        if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/libTD_DbCore.*"; then
38264            LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_DbCore"
38265        fi
38266        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_DbRoot"
38267        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Gi"
38268        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_SpatialIndex"
38269        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Root"
38270        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Ge"
38271        if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/libTD_Zlib.*"; then
38272            LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Zlib"
38273        fi
38274        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -lTD_Alloc"
38275        LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -loless"
38276        if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/liblibcrypto.*"; then
38277            LIBS="${LIBS} -L${TEIGHA_DIR}/bin/${TEIGHA_PLT} -llibcrypto"
38278        fi
38279        if test -f "${TEIGHA_DIR}/bin/${TEIGHA_PLT}/libTD_Db.so"; then
38280            TEIGHA_CPPFLAGS="-D_TOOLKIT_IN_DLL_"
38281        fi
38282    else
38283        as_fn_error $? "--with-teigha-plt not specified" "$LINENO" 5
38284    fi
38285fi
38286
38287
38288
38289
38290
38291
38292HAVE_IDB=no
38293
38294
38295# Check whether --with-idb was given.
38296if test "${with_idb+set}" = set; then :
38297  withval=$with_idb;
38298fi
38299
38300
38301if test x"${with_idb}" = x"no" ; then
38302  { $as_echo "$as_me:${as_lineno-$LINENO}: \"IBM Informix DataBlade support disabled.\"" >&5
38303$as_echo "$as_me: \"IBM Informix DataBlade support disabled.\"" >&6;}
38304else
38305  if test x"${with_idb}" = x ; then
38306    with_idb=$INFORMIXDIR
38307  fi
38308
38309  if test -e "${with_idb}/incl/c++/it.h" ; then
38310
38311    LIBS_DIRS="-L${with_idb}/lib/ -L${with_idb}/lib/esql"
38312    LIBS_ESQL="-lifsql -lifasf -lifgen -lifos -lifgls -lifglx ${with_idb}/lib/esql/checkapi.o"
38313    LIBS_LIBMI="-L${with_idb}/lib/dmi -lifdmi"
38314    LIBS_CPPIF="-L${with_idb}/lib/c++ -lifc++"
38315
38316    IDB_INC="-I${with_idb}/incl/ -I${with_idb}/incl/dmi -I${with_idb}/incl/c++"
38317    IDB_LIB="${LIBS_CPPIF} ${LIBS_LIBMI} ${LIBS_DIRS} ${LIBS_ESQL}"
38318
38319    ax_save_LIBS="${LIBS}"
38320    LIBS="${IDB_LIB} -ldl -lcrypt"
38321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ifx_srvinfo in -lifsql" >&5
38322$as_echo_n "checking for ifx_srvinfo in -lifsql... " >&6; }
38323if ${ac_cv_lib_ifsql_ifx_srvinfo+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  ac_check_lib_save_LIBS=$LIBS
38327LIBS="-lifsql  $LIBS"
38328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38329/* end confdefs.h.  */
38330
38331/* Override any GCC internal prototype to avoid an error.
38332   Use char because int might match the return type of a GCC
38333   builtin and then its argument prototype would still apply.  */
38334#ifdef __cplusplus
38335extern "C"
38336#endif
38337char ifx_srvinfo ();
38338int
38339main ()
38340{
38341return ifx_srvinfo ();
38342  ;
38343  return 0;
38344}
38345_ACEOF
38346if ac_fn_c_try_link "$LINENO"; then :
38347  ac_cv_lib_ifsql_ifx_srvinfo=yes
38348else
38349  ac_cv_lib_ifsql_ifx_srvinfo=no
38350fi
38351rm -f core conftest.err conftest.$ac_objext \
38352    conftest$ac_exeext conftest.$ac_ext
38353LIBS=$ac_check_lib_save_LIBS
38354fi
38355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ifsql_ifx_srvinfo" >&5
38356$as_echo "$ac_cv_lib_ifsql_ifx_srvinfo" >&6; }
38357if test "x$ac_cv_lib_ifsql_ifx_srvinfo" = xyes; then :
38358  HAVE_IDB=yes
38359else
38360  HAVE_IDB=no
38361fi
38362
38363    LIBS="${ax_save_LIBS}"
38364
38365  fi
38366
38367  if test "${HAVE_IDB}" = "yes" ; then
38368    { $as_echo "$as_me:${as_lineno-$LINENO}: using Informix C++ client library from $with_idb." >&5
38369$as_echo "$as_me: using Informix C++ client library from $with_idb." >&6;}
38370  else
38371    { $as_echo "$as_me:${as_lineno-$LINENO}: IBM Informix DataBlade not supported." >&5
38372$as_echo "$as_me: IBM Informix DataBlade not supported." >&6;}
38373  fi
38374
38375fi
38376
38377HAVE_IDB=${HAVE_IDB}
38378
38379IDB_INC=${IDB_INC}
38380
38381IDB_LIB=${IDB_LIB}
38382
38383
38384
38385
38386# Check whether --with-webp was given.
38387if test "${with_webp+set}" = set; then :
38388  withval=$with_webp;
38389fi
38390
38391
38392WEBP_SETTING=no
38393
38394if test "$with_webp" = "yes" -o "$with_webp" = "" ; then
38395
38396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WebPDecodeRGB in -lwebp" >&5
38397$as_echo_n "checking for WebPDecodeRGB in -lwebp... " >&6; }
38398if ${ac_cv_lib_webp_WebPDecodeRGB+:} false; then :
38399  $as_echo_n "(cached) " >&6
38400else
38401  ac_check_lib_save_LIBS=$LIBS
38402LIBS="-lwebp  $LIBS"
38403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38404/* end confdefs.h.  */
38405
38406/* Override any GCC internal prototype to avoid an error.
38407   Use char because int might match the return type of a GCC
38408   builtin and then its argument prototype would still apply.  */
38409#ifdef __cplusplus
38410extern "C"
38411#endif
38412char WebPDecodeRGB ();
38413int
38414main ()
38415{
38416return WebPDecodeRGB ();
38417  ;
38418  return 0;
38419}
38420_ACEOF
38421if ac_fn_c_try_link "$LINENO"; then :
38422  ac_cv_lib_webp_WebPDecodeRGB=yes
38423else
38424  ac_cv_lib_webp_WebPDecodeRGB=no
38425fi
38426rm -f core conftest.err conftest.$ac_objext \
38427    conftest$ac_exeext conftest.$ac_ext
38428LIBS=$ac_check_lib_save_LIBS
38429fi
38430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_webp_WebPDecodeRGB" >&5
38431$as_echo "$ac_cv_lib_webp_WebPDecodeRGB" >&6; }
38432if test "x$ac_cv_lib_webp_WebPDecodeRGB" = xyes; then :
38433  WEBP_SETTING=yes
38434else
38435  WEBP_SETTING=no
38436fi
38437
38438
38439  if test "$WEBP_SETTING" = "yes" ; then
38440    LIBS="-lwebp $LIBS"
38441  else
38442    echo "libwebp not found - WEBP support disabled"
38443  fi
38444
38445elif test "$with_webp" != "no" -a "$with_webp" != ""; then
38446
38447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WebPDecodeRGB in -lwebp" >&5
38448$as_echo_n "checking for WebPDecodeRGB in -lwebp... " >&6; }
38449if ${ac_cv_lib_webp_WebPDecodeRGB+:} false; then :
38450  $as_echo_n "(cached) " >&6
38451else
38452  ac_check_lib_save_LIBS=$LIBS
38453LIBS="-lwebp -L$with_webp/lib -lwebp $LIBS"
38454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38455/* end confdefs.h.  */
38456
38457/* Override any GCC internal prototype to avoid an error.
38458   Use char because int might match the return type of a GCC
38459   builtin and then its argument prototype would still apply.  */
38460#ifdef __cplusplus
38461extern "C"
38462#endif
38463char WebPDecodeRGB ();
38464int
38465main ()
38466{
38467return WebPDecodeRGB ();
38468  ;
38469  return 0;
38470}
38471_ACEOF
38472if ac_fn_c_try_link "$LINENO"; then :
38473  ac_cv_lib_webp_WebPDecodeRGB=yes
38474else
38475  ac_cv_lib_webp_WebPDecodeRGB=no
38476fi
38477rm -f core conftest.err conftest.$ac_objext \
38478    conftest$ac_exeext conftest.$ac_ext
38479LIBS=$ac_check_lib_save_LIBS
38480fi
38481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_webp_WebPDecodeRGB" >&5
38482$as_echo "$ac_cv_lib_webp_WebPDecodeRGB" >&6; }
38483if test "x$ac_cv_lib_webp_WebPDecodeRGB" = xyes; then :
38484  WEBP_SETTING=yes
38485else
38486  WEBP_SETTING=no
38487fi
38488
38489
38490  if test "$WEBP_SETTING" = "yes" ; then
38491    LIBS="-L$with_webp/lib -lwebp $LIBS"
38492    EXTRA_INCLUDES="-I$with_webp/include $EXTRA_INCLUDES"
38493  else
38494    echo "libwebp not found - WEBP support disabled"
38495  fi
38496
38497fi
38498
38499WEBP_SETTING=$WEBP_SETTING
38500
38501
38502if test "$WEBP_SETTING" != "no" ; then
38503  OPT_GDAL_FORMATS="webp $OPT_GDAL_FORMATS"
38504fi
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514# Check whether --with-geos was given.
38515if test "${with_geos+set}" = set; then :
38516  withval=$with_geos;
38517fi
38518
38519
38520  ac_geos_config_auto=no
38521
38522  if test x"$with_geos" = x"no" ; then
38523
38524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: GEOS support disabled" >&5
38525$as_echo "GEOS support disabled" >&6; }
38526    GEOS_CONFIG=no
38527    HAVE_GEOS=no
38528
38529  elif test x"$with_geos" = x"yes" -o x"$with_geos" = x"" ; then
38530
38531    # Extract the first word of "geos-config", so it can be a program name with args.
38532set dummy geos-config; ac_word=$2
38533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38534$as_echo_n "checking for $ac_word... " >&6; }
38535if ${ac_cv_path_GEOS_CONFIG+:} false; then :
38536  $as_echo_n "(cached) " >&6
38537else
38538  case $GEOS_CONFIG in
38539  [\\/]* | ?:[\\/]*)
38540  ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
38541  ;;
38542  *)
38543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38544for as_dir in $PATH
38545do
38546  IFS=$as_save_IFS
38547  test -z "$as_dir" && as_dir=.
38548    for ac_exec_ext in '' $ac_executable_extensions; do
38549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38550    ac_cv_path_GEOS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
38551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38552    break 2
38553  fi
38554done
38555  done
38556IFS=$as_save_IFS
38557
38558  test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
38559  ;;
38560esac
38561fi
38562GEOS_CONFIG=$ac_cv_path_GEOS_CONFIG
38563if test -n "$GEOS_CONFIG"; then
38564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEOS_CONFIG" >&5
38565$as_echo "$GEOS_CONFIG" >&6; }
38566else
38567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38568$as_echo "no" >&6; }
38569fi
38570
38571
38572    if test x"$with_geos" = x"" ; then
38573      ac_geos_config_auto=yes
38574    fi
38575
38576  else
38577
38578   ac_geos_config=`basename "$with_geos"`
38579   ac_geos_config_dir=`$as_dirname -- "$with_geos" ||
38580$as_expr X"$with_geos" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38581	 X"$with_geos" : 'X\(//\)[^/]' \| \
38582	 X"$with_geos" : 'X\(//\)$' \| \
38583	 X"$with_geos" : 'X\(/\)' \| . 2>/dev/null ||
38584$as_echo X"$with_geos" |
38585    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38586	    s//\1/
38587	    q
38588	  }
38589	  /^X\(\/\/\)[^/].*/{
38590	    s//\1/
38591	    q
38592	  }
38593	  /^X\(\/\/\)$/{
38594	    s//\1/
38595	    q
38596	  }
38597	  /^X\(\/\).*/{
38598	    s//\1/
38599	    q
38600	  }
38601	  s/.*/./; q'`
38602
38603   # Extract the first word of ""$ac_geos_config"", so it can be a program name with args.
38604set dummy "$ac_geos_config"; ac_word=$2
38605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38606$as_echo_n "checking for $ac_word... " >&6; }
38607if ${ac_cv_prog_GEOS_CONFIG+:} false; then :
38608  $as_echo_n "(cached) " >&6
38609else
38610  if test -n "$GEOS_CONFIG"; then
38611  ac_cv_prog_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test.
38612else
38613  ac_prog_rejected=no
38614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38615for as_dir in "$ac_geos_config_dir"
38616do
38617  IFS=$as_save_IFS
38618  test -z "$as_dir" && as_dir=.
38619    for ac_exec_ext in '' $ac_executable_extensions; do
38620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38621    if test "$as_dir/$ac_word$ac_exec_ext" = "
38622   "; then
38623       ac_prog_rejected=yes
38624       continue
38625     fi
38626    ac_cv_prog_GEOS_CONFIG="$with_geos"
38627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38628    break 2
38629  fi
38630done
38631  done
38632IFS=$as_save_IFS
38633
38634if test $ac_prog_rejected = yes; then
38635  # We found a bogon in the path, so make sure we never use it.
38636  set dummy $ac_cv_prog_GEOS_CONFIG
38637  shift
38638  if test $# != 0; then
38639    # We chose a different compiler from the bogus one.
38640    # However, it has the same basename, so the bogon will be chosen
38641    # first if we set GEOS_CONFIG to just the basename; use the full file name.
38642    shift
38643    ac_cv_prog_GEOS_CONFIG="$as_dir/$ac_word${1+' '}$@"
38644  fi
38645fi
38646  test -z "$ac_cv_prog_GEOS_CONFIG" && ac_cv_prog_GEOS_CONFIG="no"
38647fi
38648fi
38649GEOS_CONFIG=$ac_cv_prog_GEOS_CONFIG
38650if test -n "$GEOS_CONFIG"; then
38651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEOS_CONFIG" >&5
38652$as_echo "$GEOS_CONFIG" >&6; }
38653else
38654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38655$as_echo "no" >&6; }
38656fi
38657
38658
38659
38660  fi
38661
38662  if test x"$GEOS_CONFIG" != x"no" ; then
38663
38664    min_geos_version=3.1.0
38665
38666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOS version >= $min_geos_version" >&5
38667$as_echo_n "checking for GEOS version >= $min_geos_version... " >&6; }
38668
38669    geos_major_version=`$GEOS_CONFIG --version | \
38670       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
38671    geos_minor_version=`$GEOS_CONFIG --version | \
38672       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
38673    geos_micro_version=`$GEOS_CONFIG --version | \
38674       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
38675
38676    req_major=`echo $min_geos_version | \
38677       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
38678    req_minor=`echo $min_geos_version | \
38679       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
38680    req_micro=`echo $min_geos_version | \
38681       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
38682
38683    version_ok="no"
38684    ac_req_version=`expr $req_major \* 100000 \+  $req_minor \* 100 \+ $req_micro`
38685    ac_geos_version=`expr $geos_major_version \* 100000 \+  $geos_minor_version \* 100 \+ $geos_micro_version`
38686
38687    if test $ac_req_version -le $ac_geos_version; then
38688        version_ok="yes"
38689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38690$as_echo "yes" >&6; }
38691    fi
38692
38693    if test $version_ok = "no"; then
38694
38695      HAVE_GEOS="no"
38696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38697$as_echo "no" >&6; }
38698
38699      if test $ac_geos_config_auto = "yes" ; then
38700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GEOS was found on your system, but geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version. GEOS support disabled." >&5
38701$as_echo "$as_me: WARNING: GEOS was found on your system, but geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version. GEOS support disabled." >&2;}
38702      else
38703        as_fn_error $? "geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version or configure --without-geos" "$LINENO" 5
38704      fi
38705
38706    else
38707
38708      HAVE_GEOS="no"
38709
38710      GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c"
38711      GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`"
38712      GEOS_VERSION="`${GEOS_CONFIG} --version`"
38713
38714      ax_save_LIBS="${LIBS}"
38715      LIBS=${GEOS_LIBS}
38716      ax_save_CFLAGS="${CFLAGS}"
38717      CFLAGS="${GEOS_CFLAGS} ${CFLAGS}"
38718
38719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOSversion in -lgeos_c" >&5
38720$as_echo_n "checking for GEOSversion in -lgeos_c... " >&6; }
38721if ${ac_cv_lib_geos_c_GEOSversion+:} false; then :
38722  $as_echo_n "(cached) " >&6
38723else
38724  ac_check_lib_save_LIBS=$LIBS
38725LIBS="-lgeos_c
38726       $LIBS"
38727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38728/* end confdefs.h.  */
38729
38730/* Override any GCC internal prototype to avoid an error.
38731   Use char because int might match the return type of a GCC
38732   builtin and then its argument prototype would still apply.  */
38733#ifdef __cplusplus
38734extern "C"
38735#endif
38736char GEOSversion ();
38737int
38738main ()
38739{
38740return GEOSversion ();
38741  ;
38742  return 0;
38743}
38744_ACEOF
38745if ac_fn_c_try_link "$LINENO"; then :
38746  ac_cv_lib_geos_c_GEOSversion=yes
38747else
38748  ac_cv_lib_geos_c_GEOSversion=no
38749fi
38750rm -f core conftest.err conftest.$ac_objext \
38751    conftest$ac_exeext conftest.$ac_ext
38752LIBS=$ac_check_lib_save_LIBS
38753fi
38754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_geos_c_GEOSversion" >&5
38755$as_echo "$ac_cv_lib_geos_c_GEOSversion" >&6; }
38756if test "x$ac_cv_lib_geos_c_GEOSversion" = xyes; then :
38757  HAVE_GEOS="yes"
38758else
38759  HAVE_GEOS="no"
38760fi
38761
38762
38763      if test x"$HAVE_GEOS" = "xno"; then
38764        if test $ac_geos_config_auto = "yes" ; then
38765          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GEOS was found on your system, but the library could not be linked. GEOS support disabled." >&5
38766$as_echo "$as_me: WARNING: GEOS was found on your system, but the library could not be linked. GEOS support disabled." >&2;}
38767        else
38768          as_fn_error $? "GEOS library could not be linked" "$LINENO" 5
38769        fi
38770
38771        GEOS_CFLAGS=""
38772
38773      fi
38774
38775      CFLAGS="${ax_save_CFLAGS}"
38776      LIBS="${ax_save_LIBS}"
38777
38778    fi
38779
38780  else
38781
38782    if test x"$with_geos" != x"no" -a x"$with_geos" != x ; then
38783      as_fn_error $? "GEOS support explicitly enabled, but geos-config could not be found" "$LINENO" 5
38784    fi
38785
38786  fi
38787
38788if test "${HAVE_GEOS}" = "yes" ; then
38789  { $as_echo "$as_me:${as_lineno-$LINENO}: Using C API from GEOS $GEOS_VERSION" >&5
38790$as_echo "$as_me: Using C API from GEOS $GEOS_VERSION" >&6;}
38791
38792    if echo "x" | sed -E "s/x/y/" >/dev/null 2>/dev/null; then
38793        STRIPPED_LIBRARY_NAME="$(echo "${GEOS_LIBS}" | sed -E 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
38794    elif echo "x" | sed -r "s/x/y/" >/dev/null 2>/dev/null; then
38795                STRIPPED_LIBRARY_NAME="$(echo "${GEOS_LIBS}" | sed -r 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
38796    else
38797        STRIPPED_LIBRARY_NAME="$(echo "${GEOS_LIBS}")"
38798    fi
38799
38800  GEOS_LIBS="$STRIPPED_LIBRARY_NAME"
38801  LIBS="${GEOS_LIBS} ${LIBS}"
38802fi
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812# Check whether --with-sfcgal was given.
38813if test "${with_sfcgal+set}" = set; then :
38814  withval=$with_sfcgal;
38815fi
38816
38817
38818  ac_sfcgal_config_auto=no
38819
38820  if test x"$with_sfcgal" = x"no" ; then
38821
38822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: SFCGAL support disabled" >&5
38823$as_echo "SFCGAL support disabled" >&6; }
38824    HAVE_SFCGAL=no
38825    SFCGAL_CONFIG=no
38826
38827  elif test x"$with_sfcgal" = x"yes" -o x"$with_sfcgal" = x"" ; then
38828
38829    # Extract the first word of "sfcgal-config", so it can be a program name with args.
38830set dummy sfcgal-config; ac_word=$2
38831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38832$as_echo_n "checking for $ac_word... " >&6; }
38833if ${ac_cv_path_SFCGAL_CONFIG+:} false; then :
38834  $as_echo_n "(cached) " >&6
38835else
38836  case $SFCGAL_CONFIG in
38837  [\\/]* | ?:[\\/]*)
38838  ac_cv_path_SFCGAL_CONFIG="$SFCGAL_CONFIG" # Let the user override the test with a path.
38839  ;;
38840  *)
38841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38842for as_dir in $PATH
38843do
38844  IFS=$as_save_IFS
38845  test -z "$as_dir" && as_dir=.
38846    for ac_exec_ext in '' $ac_executable_extensions; do
38847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38848    ac_cv_path_SFCGAL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
38849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38850    break 2
38851  fi
38852done
38853  done
38854IFS=$as_save_IFS
38855
38856  test -z "$ac_cv_path_SFCGAL_CONFIG" && ac_cv_path_SFCGAL_CONFIG="no"
38857  ;;
38858esac
38859fi
38860SFCGAL_CONFIG=$ac_cv_path_SFCGAL_CONFIG
38861if test -n "$SFCGAL_CONFIG"; then
38862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SFCGAL_CONFIG" >&5
38863$as_echo "$SFCGAL_CONFIG" >&6; }
38864else
38865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38866$as_echo "no" >&6; }
38867fi
38868
38869
38870    if test x"$with_sfcgal" = x"" ; then
38871      ac_sfcgal_config_auto=yes
38872    fi
38873
38874  else
38875
38876   ac_sfcgal_config=`basename "$with_sfcgal"`
38877   ac_sfcgal_config_dir=`$as_dirname -- "$with_sfcgal" ||
38878$as_expr X"$with_sfcgal" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38879	 X"$with_sfcgal" : 'X\(//\)[^/]' \| \
38880	 X"$with_sfcgal" : 'X\(//\)$' \| \
38881	 X"$with_sfcgal" : 'X\(/\)' \| . 2>/dev/null ||
38882$as_echo X"$with_sfcgal" |
38883    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38884	    s//\1/
38885	    q
38886	  }
38887	  /^X\(\/\/\)[^/].*/{
38888	    s//\1/
38889	    q
38890	  }
38891	  /^X\(\/\/\)$/{
38892	    s//\1/
38893	    q
38894	  }
38895	  /^X\(\/\).*/{
38896	    s//\1/
38897	    q
38898	  }
38899	  s/.*/./; q'`
38900
38901   # Extract the first word of ""$ac_sfcgal_config"", so it can be a program name with args.
38902set dummy "$ac_sfcgal_config"; ac_word=$2
38903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38904$as_echo_n "checking for $ac_word... " >&6; }
38905if ${ac_cv_prog_SFCGAL_CONFIG+:} false; then :
38906  $as_echo_n "(cached) " >&6
38907else
38908  if test -n "$SFCGAL_CONFIG"; then
38909  ac_cv_prog_SFCGAL_CONFIG="$SFCGAL_CONFIG" # Let the user override the test.
38910else
38911  ac_prog_rejected=no
38912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38913for as_dir in "$ac_sfcgal_config_dir"
38914do
38915  IFS=$as_save_IFS
38916  test -z "$as_dir" && as_dir=.
38917    for ac_exec_ext in '' $ac_executable_extensions; do
38918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38919    if test "$as_dir/$ac_word$ac_exec_ext" = "
38920   "; then
38921       ac_prog_rejected=yes
38922       continue
38923     fi
38924    ac_cv_prog_SFCGAL_CONFIG="$with_sfcgal"
38925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38926    break 2
38927  fi
38928done
38929  done
38930IFS=$as_save_IFS
38931
38932if test $ac_prog_rejected = yes; then
38933  # We found a bogon in the path, so make sure we never use it.
38934  set dummy $ac_cv_prog_SFCGAL_CONFIG
38935  shift
38936  if test $# != 0; then
38937    # We chose a different compiler from the bogus one.
38938    # However, it has the same basename, so the bogon will be chosen
38939    # first if we set SFCGAL_CONFIG to just the basename; use the full file name.
38940    shift
38941    ac_cv_prog_SFCGAL_CONFIG="$as_dir/$ac_word${1+' '}$@"
38942  fi
38943fi
38944  test -z "$ac_cv_prog_SFCGAL_CONFIG" && ac_cv_prog_SFCGAL_CONFIG="no"
38945fi
38946fi
38947SFCGAL_CONFIG=$ac_cv_prog_SFCGAL_CONFIG
38948if test -n "$SFCGAL_CONFIG"; then
38949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SFCGAL_CONFIG" >&5
38950$as_echo "$SFCGAL_CONFIG" >&6; }
38951else
38952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38953$as_echo "no" >&6; }
38954fi
38955
38956
38957
38958  fi
38959
38960  if test x"$SFCGAL_CONFIG" != x"no" ; then
38961
38962    min_sfcgal_version=1.2.2
38963
38964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SFCGAL version >= $min_sfcgal_version" >&5
38965$as_echo_n "checking for SFCGAL version >= $min_sfcgal_version... " >&6; }
38966
38967    sfcgal_major_version=`$SFCGAL_CONFIG --version | \
38968       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
38969    sfcgal_minor_version=`$SFCGAL_CONFIG --version | \
38970       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
38971    sfcgal_micro_version=`$SFCGAL_CONFIG --version | \
38972       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
38973
38974    req_major=`echo $min_sfcgal_version | \
38975       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
38976    req_minor=`echo $min_sfcgal_version | \
38977       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
38978    req_micro=`echo $min_sfcgal_version | \
38979       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
38980
38981    version_ok="no"
38982    ac_req_version=`expr $req_major \* 100000 \+  $req_minor \* 100 \+ $req_micro`
38983    ac_sfcgal_version=`expr $sfcgal_major_version \* 100000 \+  $sfcgal_minor_version \* 100 \+ $sfcgal_micro_version`
38984
38985    if test $ac_req_version -le $ac_sfcgal_version; then
38986        version_ok="yes"
38987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38988$as_echo "yes" >&6; }
38989    fi
38990
38991    if test $version_ok = "no"; then
38992
38993      HAVE_SFCGAL="no"
38994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38995$as_echo "no" >&6; }
38996
38997      if test $ac_sfcgal_config_auto = "yes" ; then
38998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SFCGAL was found on your system, but sfcgal-config reports version ${sfcgal_major_version}.${sfcgal_minor_version}.${sfcgal_micro_version}, need at least $min_sfcgal_version. SFCGAL support disabled." >&5
38999$as_echo "$as_me: WARNING: SFCGAL was found on your system, but sfcgal-config reports version ${sfcgal_major_version}.${sfcgal_minor_version}.${sfcgal_micro_version}, need at least $min_sfcgal_version. SFCGAL support disabled." >&2;}
39000      else
39001        as_fn_error $? "sfcgal-config reports version ${sfcgal_major_version}.${sfcgal_minor_version}.${sfcgal_micro_version}, need at least $min_sfcgal_version or configure --without-sfcgal" "$LINENO" 5
39002      fi
39003
39004    else
39005
39006      HAVE_SFCGAL="no"
39007
39008      SFCGAL_LIBS="`${SFCGAL_CONFIG} --libs`"
39009      SFCGAL_CFLAGS="`${SFCGAL_CONFIG} --cflags`"
39010      SFCGAL_VERSION="`${SFCGAL_CONFIG} --version`"
39011
39012      ax_save_LIBS="${LIBS}"
39013      LIBS=${SFCGAL_LIBS}
39014      ax_save_CFLAGS="${CFLAGS}"
39015      CFLAGS="${SFCGAL_CFLAGS} ${CFLAGS}"
39016
39017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sfcgal_version in -lSFCGAL" >&5
39018$as_echo_n "checking for sfcgal_version in -lSFCGAL... " >&6; }
39019if ${ac_cv_lib_SFCGAL_sfcgal_version+:} false; then :
39020  $as_echo_n "(cached) " >&6
39021else
39022  ac_check_lib_save_LIBS=$LIBS
39023LIBS="-lSFCGAL
39024       $LIBS"
39025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39026/* end confdefs.h.  */
39027
39028/* Override any GCC internal prototype to avoid an error.
39029   Use char because int might match the return type of a GCC
39030   builtin and then its argument prototype would still apply.  */
39031#ifdef __cplusplus
39032extern "C"
39033#endif
39034char sfcgal_version ();
39035int
39036main ()
39037{
39038return sfcgal_version ();
39039  ;
39040  return 0;
39041}
39042_ACEOF
39043if ac_fn_c_try_link "$LINENO"; then :
39044  ac_cv_lib_SFCGAL_sfcgal_version=yes
39045else
39046  ac_cv_lib_SFCGAL_sfcgal_version=no
39047fi
39048rm -f core conftest.err conftest.$ac_objext \
39049    conftest$ac_exeext conftest.$ac_ext
39050LIBS=$ac_check_lib_save_LIBS
39051fi
39052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SFCGAL_sfcgal_version" >&5
39053$as_echo "$ac_cv_lib_SFCGAL_sfcgal_version" >&6; }
39054if test "x$ac_cv_lib_SFCGAL_sfcgal_version" = xyes; then :
39055  HAVE_SFCGAL="yes"
39056else
39057  HAVE_SFCGAL="no"
39058fi
39059
39060
39061
39062      if test x"$HAVE_SFCGAL" = "xno"; then
39063        if test $ac_sfcgal_config_auto = "yes" ; then
39064          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SFCGAL was found on your system, but the library could not be linked. SFCGAL support disabled." >&5
39065$as_echo "$as_me: WARNING: SFCGAL was found on your system, but the library could not be linked. SFCGAL support disabled." >&2;}
39066        else
39067          as_fn_error $? "SFCGAL library could not be linked" "$LINENO" 5
39068        fi
39069
39070        SFCGAL_CFLAGS=""
39071      fi
39072
39073      CFLAGS="${ax_save_CFLAGS}"
39074      LIBS="${ax_save_LIBS}"
39075
39076    fi
39077
39078  else
39079
39080    if test x"$with_sfcgal" != x"no" -a x"$with_sfcgal" != x ; then
39081      as_fn_error $? "SFCGAL support explicitly enabled, but sfcgal-config could not be found" "$LINENO" 5
39082    fi
39083
39084  fi
39085
39086if test "${HAVE_SFCGAL}" = "yes" ; then
39087  { $as_echo "$as_me:${as_lineno-$LINENO}: Using C API from SFCGAL $SFCGAL_VERSION" >&5
39088$as_echo "$as_me: Using C API from SFCGAL $SFCGAL_VERSION" >&6;}
39089
39090    if echo "x" | sed -E "s/x/y/" >/dev/null 2>/dev/null; then
39091        STRIPPED_LIBRARY_NAME="$(echo "${SFCGAL_LIBS}" | sed -E 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
39092    elif echo "x" | sed -r "s/x/y/" >/dev/null 2>/dev/null; then
39093                STRIPPED_LIBRARY_NAME="$(echo "${SFCGAL_LIBS}" | sed -r 's:-L/(usr/)?(lib(64)?|lib/x86_64-linux-gnu)/*[[:space:]]+::')"
39094    else
39095        STRIPPED_LIBRARY_NAME="$(echo "${SFCGAL_LIBS}")"
39096    fi
39097
39098  SFCGAL_LIBS="$STRIPPED_LIBRARY_NAME"
39099  LIBS="${SFCGAL_LIBS} ${LIBS}"
39100fi
39101
39102
39103
39104# Check whether --with-qhull was given.
39105if test "${with_qhull+set}" = set; then :
39106  withval=$with_qhull;
39107fi
39108
39109
39110QHULL_SETTING=no
39111
39112if test "$with_qhull" = "no" ; then
39113
39114  { $as_echo "$as_me:${as_lineno-$LINENO}: QHull support disabled." >&5
39115$as_echo "$as_me: QHull support disabled." >&6;}
39116
39117elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then
39118
39119  # Only qhull 2012 is reliable on certain datasets. Older Ubuntu have
39120  # qhull/qhull.h
39121  for ac_header in qhull/libqhull.h
39122do :
39123  ac_fn_c_check_header_mongrel "$LINENO" "qhull/libqhull.h" "ac_cv_header_qhull_libqhull_h" "$ac_includes_default"
39124if test "x$ac_cv_header_qhull_libqhull_h" = xyes; then :
39125  cat >>confdefs.h <<_ACEOF
39126#define HAVE_QHULL_LIBQHULL_H 1
39127_ACEOF
39128
39129fi
39130
39131done
39132
39133  if test "$ac_cv_header_qhull_libqhull_h" = "yes"; then
39134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for qh_new_qhull in -lqhull" >&5
39135$as_echo_n "checking for qh_new_qhull in -lqhull... " >&6; }
39136if ${ac_cv_lib_qhull_qh_new_qhull+:} false; then :
39137  $as_echo_n "(cached) " >&6
39138else
39139  ac_check_lib_save_LIBS=$LIBS
39140LIBS="-lqhull  $LIBS"
39141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39142/* end confdefs.h.  */
39143
39144/* Override any GCC internal prototype to avoid an error.
39145   Use char because int might match the return type of a GCC
39146   builtin and then its argument prototype would still apply.  */
39147#ifdef __cplusplus
39148extern "C"
39149#endif
39150char qh_new_qhull ();
39151int
39152main ()
39153{
39154return qh_new_qhull ();
39155  ;
39156  return 0;
39157}
39158_ACEOF
39159if ac_fn_c_try_link "$LINENO"; then :
39160  ac_cv_lib_qhull_qh_new_qhull=yes
39161else
39162  ac_cv_lib_qhull_qh_new_qhull=no
39163fi
39164rm -f core conftest.err conftest.$ac_objext \
39165    conftest$ac_exeext conftest.$ac_ext
39166LIBS=$ac_check_lib_save_LIBS
39167fi
39168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_qhull_qh_new_qhull" >&5
39169$as_echo "$ac_cv_lib_qhull_qh_new_qhull" >&6; }
39170if test "x$ac_cv_lib_qhull_qh_new_qhull" = xyes; then :
39171  QHULL_SETTING=yes
39172else
39173  QHULL_SETTING=no
39174fi
39175
39176    if test "$QHULL_SETTING" = "yes"; then
39177        QHULL_SETTING=external
39178        QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=0
39179        LIBS="-lqhull $LIBS"
39180    fi
39181  fi
39182  for ac_header in libqhull/libqhull.h
39183do :
39184  ac_fn_c_check_header_mongrel "$LINENO" "libqhull/libqhull.h" "ac_cv_header_libqhull_libqhull_h" "$ac_includes_default"
39185if test "x$ac_cv_header_libqhull_libqhull_h" = xyes; then :
39186  cat >>confdefs.h <<_ACEOF
39187#define HAVE_LIBQHULL_LIBQHULL_H 1
39188_ACEOF
39189
39190fi
39191
39192done
39193
39194  if test "$ac_cv_header_libqhull_libqhull_h" = "yes"; then
39195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for qh_new_qhull in -lqhull" >&5
39196$as_echo_n "checking for qh_new_qhull in -lqhull... " >&6; }
39197if ${ac_cv_lib_qhull_qh_new_qhull+:} false; then :
39198  $as_echo_n "(cached) " >&6
39199else
39200  ac_check_lib_save_LIBS=$LIBS
39201LIBS="-lqhull  $LIBS"
39202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39203/* end confdefs.h.  */
39204
39205/* Override any GCC internal prototype to avoid an error.
39206   Use char because int might match the return type of a GCC
39207   builtin and then its argument prototype would still apply.  */
39208#ifdef __cplusplus
39209extern "C"
39210#endif
39211char qh_new_qhull ();
39212int
39213main ()
39214{
39215return qh_new_qhull ();
39216  ;
39217  return 0;
39218}
39219_ACEOF
39220if ac_fn_c_try_link "$LINENO"; then :
39221  ac_cv_lib_qhull_qh_new_qhull=yes
39222else
39223  ac_cv_lib_qhull_qh_new_qhull=no
39224fi
39225rm -f core conftest.err conftest.$ac_objext \
39226    conftest$ac_exeext conftest.$ac_ext
39227LIBS=$ac_check_lib_save_LIBS
39228fi
39229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_qhull_qh_new_qhull" >&5
39230$as_echo "$ac_cv_lib_qhull_qh_new_qhull" >&6; }
39231if test "x$ac_cv_lib_qhull_qh_new_qhull" = xyes; then :
39232  QHULL_SETTING=yes
39233else
39234  QHULL_SETTING=no
39235fi
39236
39237    if test "$QHULL_SETTING" = "yes"; then
39238        QHULL_SETTING=external
39239        QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1
39240        LIBS="-lqhull $LIBS"
39241    fi
39242  fi
39243
39244  if test "$QHULL_SETTING" = "no" ; then
39245    if test "$with_qhull" = "yes"; then
39246        as_fn_error $? "--with-qhull requested, but library not found!" "$LINENO" 5
39247    else
39248        QHULL_SETTING=internal
39249        QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1
39250    fi
39251  fi
39252else
39253  QHULL_SETTING=internal
39254  QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1
39255fi
39256
39257QHULL_SETTING=$QHULL_SETTING
39258
39259QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=$QHULL_INCLUDE_SUBDIR_IS_LIBQHULL
39260
39261
39262
39263OPENCL_SETTING=no
39264OPENCL_FLAGS=
39265OPENCL_LIB=
39266
39267
39268# Check whether --with-opencl was given.
39269if test "${with_opencl+set}" = set; then :
39270  withval=$with_opencl;
39271fi
39272
39273
39274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenCL support" >&5
39275$as_echo_n "checking for OpenCL support... " >&6; }
39276
39277if test "$with_opencl" = "yes" ; then
39278
39279
39280# Check whether --with-opencl-include was given.
39281if test "${with_opencl_include+set}" = set; then :
39282  withval=$with_opencl_include;
39283fi
39284
39285
39286  OPENCL_SETTING=yes
39287
39288  if test "x$with_opencl_include" = "x" ; then
39289    OPENCL_FLAGS=-DHAVE_OPENCL
39290    if test -z "`uname | grep Darwin`" ; then
39291        for ac_header in CL/opencl.h
39292do :
39293  ac_fn_c_check_header_mongrel "$LINENO" "CL/opencl.h" "ac_cv_header_CL_opencl_h" "$ac_includes_default"
39294if test "x$ac_cv_header_CL_opencl_h" = xyes; then :
39295  cat >>confdefs.h <<_ACEOF
39296#define HAVE_CL_OPENCL_H 1
39297_ACEOF
39298
39299fi
39300
39301done
39302
39303        if test "$ac_cv_header_CL_opencl_h" = "no" ; then
39304            as_fn_error $? "cannot find CL/opencl.h" "$LINENO" 5
39305        fi
39306    fi
39307  else
39308    OPENCL_FLAGS="-I$with_opencl_include -DHAVE_OPENCL"
39309  fi
39310
39311
39312# Check whether --with-opencl-lib was given.
39313if test "${with_opencl_lib+set}" = set; then :
39314  withval=$with_opencl_lib;
39315fi
39316
39317
39318  if test "x$with_opencl_lib" = "x" ; then
39319    if test ! -z "`uname | grep Darwin`" ; then
39320      OPENCL_LIB="-framework OpenCL"
39321    else
39322      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clGetPlatformIDs in -lOpenCL" >&5
39323$as_echo_n "checking for clGetPlatformIDs in -lOpenCL... " >&6; }
39324if ${ac_cv_lib_OpenCL_clGetPlatformIDs+:} false; then :
39325  $as_echo_n "(cached) " >&6
39326else
39327  ac_check_lib_save_LIBS=$LIBS
39328LIBS="-lOpenCL  $LIBS"
39329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39330/* end confdefs.h.  */
39331
39332/* Override any GCC internal prototype to avoid an error.
39333   Use char because int might match the return type of a GCC
39334   builtin and then its argument prototype would still apply.  */
39335#ifdef __cplusplus
39336extern "C"
39337#endif
39338char clGetPlatformIDs ();
39339int
39340main ()
39341{
39342return clGetPlatformIDs ();
39343  ;
39344  return 0;
39345}
39346_ACEOF
39347if ac_fn_c_try_link "$LINENO"; then :
39348  ac_cv_lib_OpenCL_clGetPlatformIDs=yes
39349else
39350  ac_cv_lib_OpenCL_clGetPlatformIDs=no
39351fi
39352rm -f core conftest.err conftest.$ac_objext \
39353    conftest$ac_exeext conftest.$ac_ext
39354LIBS=$ac_check_lib_save_LIBS
39355fi
39356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_clGetPlatformIDs" >&5
39357$as_echo "$ac_cv_lib_OpenCL_clGetPlatformIDs" >&6; }
39358if test "x$ac_cv_lib_OpenCL_clGetPlatformIDs" = xyes; then :
39359  OPENCL_LIB=-lOpenCL
39360else
39361  OPENCL_LIB=missing
39362fi
39363
39364      if test "$OPENCL_LIB" = "missing"; then
39365        as_fn_error $? "--with-opencl requested, but libraries not found!" "$LINENO" 5
39366      fi
39367    fi
39368  else
39369    OPENCL_LIB="$with_opencl_lib"
39370  fi
39371
39372fi
39373
39374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENCL_SETTING" >&5
39375$as_echo "$OPENCL_SETTING" >&6; }
39376
39377OPENCL_FLAGS=$OPENCL_FLAGS
39378
39379OPENCL_LIB=$OPENCL_LIB
39380
39381
39382
39383
39384
39385# Check whether --with-freexl was given.
39386if test "${with_freexl+set}" = set; then :
39387  withval=$with_freexl;
39388fi
39389
39390
39391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeXL support" >&5
39392$as_echo_n "checking for FreeXL support... " >&6; }
39393
39394HAVE_FREEXL=no
39395FREEXL_INCLUDE=
39396
39397if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then
39398  for ac_header in freexl.h
39399do :
39400  ac_fn_c_check_header_mongrel "$LINENO" "freexl.h" "ac_cv_header_freexl_h" "$ac_includes_default"
39401if test "x$ac_cv_header_freexl_h" = xyes; then :
39402  cat >>confdefs.h <<_ACEOF
39403#define HAVE_FREEXL_H 1
39404_ACEOF
39405
39406fi
39407
39408done
39409
39410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39411$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39412if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39413  $as_echo_n "(cached) " >&6
39414else
39415  ac_check_lib_save_LIBS=$LIBS
39416LIBS="-lfreexl  $LIBS"
39417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39418/* end confdefs.h.  */
39419
39420/* Override any GCC internal prototype to avoid an error.
39421   Use char because int might match the return type of a GCC
39422   builtin and then its argument prototype would still apply.  */
39423#ifdef __cplusplus
39424extern "C"
39425#endif
39426char freexl_open ();
39427int
39428main ()
39429{
39430return freexl_open ();
39431  ;
39432  return 0;
39433}
39434_ACEOF
39435if ac_fn_c_try_link "$LINENO"; then :
39436  ac_cv_lib_freexl_freexl_open=yes
39437else
39438  ac_cv_lib_freexl_freexl_open=no
39439fi
39440rm -f core conftest.err conftest.$ac_objext \
39441    conftest$ac_exeext conftest.$ac_ext
39442LIBS=$ac_check_lib_save_LIBS
39443fi
39444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39445$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39446if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39447  FREEXL_LIBS="-lfreexl"
39448else
39449  FREEXL_LIBS=missing
39450fi
39451
39452
39453  if test "$FREEXL_LIBS" = "missing"; then
39454    unset ac_cv_lib_freexl_freexl_open
39455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39456$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39457if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39458  $as_echo_n "(cached) " >&6
39459else
39460  ac_check_lib_save_LIBS=$LIBS
39461LIBS="-lfreexl -lm $LIBS"
39462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39463/* end confdefs.h.  */
39464
39465/* Override any GCC internal prototype to avoid an error.
39466   Use char because int might match the return type of a GCC
39467   builtin and then its argument prototype would still apply.  */
39468#ifdef __cplusplus
39469extern "C"
39470#endif
39471char freexl_open ();
39472int
39473main ()
39474{
39475return freexl_open ();
39476  ;
39477  return 0;
39478}
39479_ACEOF
39480if ac_fn_c_try_link "$LINENO"; then :
39481  ac_cv_lib_freexl_freexl_open=yes
39482else
39483  ac_cv_lib_freexl_freexl_open=no
39484fi
39485rm -f core conftest.err conftest.$ac_objext \
39486    conftest$ac_exeext conftest.$ac_ext
39487LIBS=$ac_check_lib_save_LIBS
39488fi
39489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39490$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39491if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39492  FREEXL_LIBS="-lfreexl -lm"
39493else
39494  FREEXL_LIBS=missing
39495fi
39496
39497  fi
39498
39499  if test "$FREEXL_LIBS" = "missing"; then
39500    unset ac_cv_lib_freexl_freexl_open
39501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39502$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39503if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39504  $as_echo_n "(cached) " >&6
39505else
39506  ac_check_lib_save_LIBS=$LIBS
39507LIBS="-lfreexl -liconv $LIBS"
39508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39509/* end confdefs.h.  */
39510
39511/* Override any GCC internal prototype to avoid an error.
39512   Use char because int might match the return type of a GCC
39513   builtin and then its argument prototype would still apply.  */
39514#ifdef __cplusplus
39515extern "C"
39516#endif
39517char freexl_open ();
39518int
39519main ()
39520{
39521return freexl_open ();
39522  ;
39523  return 0;
39524}
39525_ACEOF
39526if ac_fn_c_try_link "$LINENO"; then :
39527  ac_cv_lib_freexl_freexl_open=yes
39528else
39529  ac_cv_lib_freexl_freexl_open=no
39530fi
39531rm -f core conftest.err conftest.$ac_objext \
39532    conftest$ac_exeext conftest.$ac_ext
39533LIBS=$ac_check_lib_save_LIBS
39534fi
39535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39536$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39537if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39538  FREEXL_LIBS="-lfreexl -liconv"
39539else
39540  FREEXL_LIBS=missing
39541fi
39542
39543  fi
39544
39545  if test "$FREEXL_LIBS" = "missing"; then
39546    unset ac_cv_lib_freexl_freexl_open
39547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39548$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39549if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39550  $as_echo_n "(cached) " >&6
39551else
39552  ac_check_lib_save_LIBS=$LIBS
39553LIBS="-lfreexl -liconv -lm $LIBS"
39554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39555/* end confdefs.h.  */
39556
39557/* Override any GCC internal prototype to avoid an error.
39558   Use char because int might match the return type of a GCC
39559   builtin and then its argument prototype would still apply.  */
39560#ifdef __cplusplus
39561extern "C"
39562#endif
39563char freexl_open ();
39564int
39565main ()
39566{
39567return freexl_open ();
39568  ;
39569  return 0;
39570}
39571_ACEOF
39572if ac_fn_c_try_link "$LINENO"; then :
39573  ac_cv_lib_freexl_freexl_open=yes
39574else
39575  ac_cv_lib_freexl_freexl_open=no
39576fi
39577rm -f core conftest.err conftest.$ac_objext \
39578    conftest$ac_exeext conftest.$ac_ext
39579LIBS=$ac_check_lib_save_LIBS
39580fi
39581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39582$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39583if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39584  FREEXL_LIBS="-lfreexl -liconv -lm"
39585else
39586  FREEXL_LIBS=missing
39587fi
39588
39589  fi
39590
39591  if test "$FREEXL_LIBS" = "missing"; then
39592    unset ac_cv_lib_freexl_freexl_open
39593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39594$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39595if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39596  $as_echo_n "(cached) " >&6
39597else
39598  ac_check_lib_save_LIBS=$LIBS
39599LIBS="-lfreexl -liconv -lcharset $LIBS"
39600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39601/* end confdefs.h.  */
39602
39603/* Override any GCC internal prototype to avoid an error.
39604   Use char because int might match the return type of a GCC
39605   builtin and then its argument prototype would still apply.  */
39606#ifdef __cplusplus
39607extern "C"
39608#endif
39609char freexl_open ();
39610int
39611main ()
39612{
39613return freexl_open ();
39614  ;
39615  return 0;
39616}
39617_ACEOF
39618if ac_fn_c_try_link "$LINENO"; then :
39619  ac_cv_lib_freexl_freexl_open=yes
39620else
39621  ac_cv_lib_freexl_freexl_open=no
39622fi
39623rm -f core conftest.err conftest.$ac_objext \
39624    conftest$ac_exeext conftest.$ac_ext
39625LIBS=$ac_check_lib_save_LIBS
39626fi
39627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39628$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39629if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39630  FREEXL_LIBS="-lfreexl -liconv -lcharset"
39631else
39632  FREEXL_LIBS=missing
39633fi
39634
39635  fi
39636
39637  if test "$FREEXL_LIBS" != "missing" -a "$ac_cv_header_freexl_h" = "yes" ; then
39638
39639    # Check that freexl is recent enough
39640    rm -f testrlist.*
39641    echo '#include <freexl.h>' > testfreexl.c
39642    echo 'int main(int argc, char** argv) { FreeXL_CellValue s; freexl_get_cell_value (0,0,0,&s); return 0; } ' >> testfreexl.c
39643    if test -z "`${CC} ${CFLAGS} testfreexl.c -c 2>&1`" ; then
39644        HAVE_FREEXL=yes
39645        LIBS="$FREEXL_LIBS $LIBS"
39646    else
39647        HAVE_FREEXL=no
39648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: freexl too old. Needs freexl >= 1.0" >&5
39649$as_echo "freexl too old. Needs freexl >= 1.0" >&6; }
39650    fi
39651    rm -f testfreexl.*
39652
39653  else
39654    HAVE_FREEXL=no
39655    echo "libfreexl not found - FreeXL support disabled"
39656  fi
39657
39658elif test "$with_freexl" != "no"; then
39659
39660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39661$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39662if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39663  $as_echo_n "(cached) " >&6
39664else
39665  ac_check_lib_save_LIBS=$LIBS
39666LIBS="-lfreexl -L$with_freexl/lib $LIBS"
39667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39668/* end confdefs.h.  */
39669
39670/* Override any GCC internal prototype to avoid an error.
39671   Use char because int might match the return type of a GCC
39672   builtin and then its argument prototype would still apply.  */
39673#ifdef __cplusplus
39674extern "C"
39675#endif
39676char freexl_open ();
39677int
39678main ()
39679{
39680return freexl_open ();
39681  ;
39682  return 0;
39683}
39684_ACEOF
39685if ac_fn_c_try_link "$LINENO"; then :
39686  ac_cv_lib_freexl_freexl_open=yes
39687else
39688  ac_cv_lib_freexl_freexl_open=no
39689fi
39690rm -f core conftest.err conftest.$ac_objext \
39691    conftest$ac_exeext conftest.$ac_ext
39692LIBS=$ac_check_lib_save_LIBS
39693fi
39694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39695$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39696if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39697  FREEXL_LIBS="-L$with_freexl/lib -lfreexl"
39698else
39699  FREEXL_LIBS=missing
39700fi
39701
39702
39703  if test "$FREEXL_LIBS" = "missing"; then
39704    unset ac_cv_lib_freexl_freexl_open
39705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39706$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39707if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39708  $as_echo_n "(cached) " >&6
39709else
39710  ac_check_lib_save_LIBS=$LIBS
39711LIBS="-lfreexl -L$with_freexl/lib -lm $LIBS"
39712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39713/* end confdefs.h.  */
39714
39715/* Override any GCC internal prototype to avoid an error.
39716   Use char because int might match the return type of a GCC
39717   builtin and then its argument prototype would still apply.  */
39718#ifdef __cplusplus
39719extern "C"
39720#endif
39721char freexl_open ();
39722int
39723main ()
39724{
39725return freexl_open ();
39726  ;
39727  return 0;
39728}
39729_ACEOF
39730if ac_fn_c_try_link "$LINENO"; then :
39731  ac_cv_lib_freexl_freexl_open=yes
39732else
39733  ac_cv_lib_freexl_freexl_open=no
39734fi
39735rm -f core conftest.err conftest.$ac_objext \
39736    conftest$ac_exeext conftest.$ac_ext
39737LIBS=$ac_check_lib_save_LIBS
39738fi
39739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39740$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39741if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39742  FREEXL_LIBS="-L$with_freexl/lib -lfreexl -lm"
39743else
39744  FREEXL_LIBS=missing
39745fi
39746
39747  fi
39748
39749  if test "$FREEXL_LIBS" = "missing"; then
39750    unset ac_cv_lib_freexl_freexl_open
39751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39752$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39753if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39754  $as_echo_n "(cached) " >&6
39755else
39756  ac_check_lib_save_LIBS=$LIBS
39757LIBS="-lfreexl -L$with_freexl/lib -liconv $LIBS"
39758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39759/* end confdefs.h.  */
39760
39761/* Override any GCC internal prototype to avoid an error.
39762   Use char because int might match the return type of a GCC
39763   builtin and then its argument prototype would still apply.  */
39764#ifdef __cplusplus
39765extern "C"
39766#endif
39767char freexl_open ();
39768int
39769main ()
39770{
39771return freexl_open ();
39772  ;
39773  return 0;
39774}
39775_ACEOF
39776if ac_fn_c_try_link "$LINENO"; then :
39777  ac_cv_lib_freexl_freexl_open=yes
39778else
39779  ac_cv_lib_freexl_freexl_open=no
39780fi
39781rm -f core conftest.err conftest.$ac_objext \
39782    conftest$ac_exeext conftest.$ac_ext
39783LIBS=$ac_check_lib_save_LIBS
39784fi
39785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39786$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39787if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39788  FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv"
39789else
39790  FREEXL_LIBS=missing
39791fi
39792
39793  fi
39794
39795  if test "$FREEXL_LIBS" = "missing"; then
39796    unset ac_cv_lib_freexl_freexl_open
39797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39798$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39799if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39800  $as_echo_n "(cached) " >&6
39801else
39802  ac_check_lib_save_LIBS=$LIBS
39803LIBS="-lfreexl -L$with_freexl/lib -liconv -lm $LIBS"
39804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39805/* end confdefs.h.  */
39806
39807/* Override any GCC internal prototype to avoid an error.
39808   Use char because int might match the return type of a GCC
39809   builtin and then its argument prototype would still apply.  */
39810#ifdef __cplusplus
39811extern "C"
39812#endif
39813char freexl_open ();
39814int
39815main ()
39816{
39817return freexl_open ();
39818  ;
39819  return 0;
39820}
39821_ACEOF
39822if ac_fn_c_try_link "$LINENO"; then :
39823  ac_cv_lib_freexl_freexl_open=yes
39824else
39825  ac_cv_lib_freexl_freexl_open=no
39826fi
39827rm -f core conftest.err conftest.$ac_objext \
39828    conftest$ac_exeext conftest.$ac_ext
39829LIBS=$ac_check_lib_save_LIBS
39830fi
39831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39832$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39833if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39834  FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv -lm"
39835else
39836  FREEXL_LIBS=missing
39837fi
39838
39839  fi
39840
39841  if test "$FREEXL_LIBS" = "missing"; then
39842    unset ac_cv_lib_freexl_freexl_open
39843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freexl_open in -lfreexl" >&5
39844$as_echo_n "checking for freexl_open in -lfreexl... " >&6; }
39845if ${ac_cv_lib_freexl_freexl_open+:} false; then :
39846  $as_echo_n "(cached) " >&6
39847else
39848  ac_check_lib_save_LIBS=$LIBS
39849LIBS="-lfreexl -L$with_freexl/lib -liconv -lcharset $LIBS"
39850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39851/* end confdefs.h.  */
39852
39853/* Override any GCC internal prototype to avoid an error.
39854   Use char because int might match the return type of a GCC
39855   builtin and then its argument prototype would still apply.  */
39856#ifdef __cplusplus
39857extern "C"
39858#endif
39859char freexl_open ();
39860int
39861main ()
39862{
39863return freexl_open ();
39864  ;
39865  return 0;
39866}
39867_ACEOF
39868if ac_fn_c_try_link "$LINENO"; then :
39869  ac_cv_lib_freexl_freexl_open=yes
39870else
39871  ac_cv_lib_freexl_freexl_open=no
39872fi
39873rm -f core conftest.err conftest.$ac_objext \
39874    conftest$ac_exeext conftest.$ac_ext
39875LIBS=$ac_check_lib_save_LIBS
39876fi
39877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freexl_freexl_open" >&5
39878$as_echo "$ac_cv_lib_freexl_freexl_open" >&6; }
39879if test "x$ac_cv_lib_freexl_freexl_open" = xyes; then :
39880  FREEXL_LIBS="-L$with_freexl/lib -lfreexl -liconv -lcharset"
39881else
39882  FREEXL_LIBS=missing
39883fi
39884
39885  fi
39886
39887  if test "$FREEXL_LIBS" != "missing" -a -f "$with_freexl/include/freexl.h" ; then
39888
39889    # Check that freexl is recent enough
39890    rm -f testrlist.*
39891    echo '#include <freexl.h>' > testfreexl.c
39892    echo 'int main(int argc, char** argv) { FreeXL_CellValue s; freexl_get_cell_value (0,0,0,&s); return 0; } ' >> testfreexl.c
39893    if test -z "`${CC} ${CFLAGS} -I$with_freexl/include testfreexl.c -c 2>&1`" ; then
39894        HAVE_FREEXL=yes
39895        LIBS="$FREEXL_LIBS $LIBS"
39896        FREEXL_INCLUDE="-I$with_freexl/include"
39897    else
39898        HAVE_FREEXL=no
39899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: freexl too old. Needs freexl >= 1.0" >&5
39900$as_echo "freexl too old. Needs freexl >= 1.0" >&6; }
39901    fi
39902    rm -f testfreexl.*
39903
39904  else
39905    HAVE_FREEXL=no
39906    echo "libfreexl not found - FreeXL support disabled"
39907  fi
39908
39909fi
39910
39911HAVE_FREEXL=$HAVE_FREEXL
39912
39913FREEXL_INCLUDE=$FREEXL_INCLUDE
39914
39915
39916
39917
39918
39919# Check whether --with-libjson-c was given.
39920if test "${with_libjson_c+set}" = set; then :
39921  withval=$with_libjson_c;
39922fi
39923
39924
39925if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjson_c" = "yes" ; then
39926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_object_set_serializer in -ljson-c" >&5
39927$as_echo_n "checking for json_object_set_serializer in -ljson-c... " >&6; }
39928if ${ac_cv_lib_json_c_json_object_set_serializer+:} false; then :
39929  $as_echo_n "(cached) " >&6
39930else
39931  ac_check_lib_save_LIBS=$LIBS
39932LIBS="-ljson-c  $LIBS"
39933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39934/* end confdefs.h.  */
39935
39936/* Override any GCC internal prototype to avoid an error.
39937   Use char because int might match the return type of a GCC
39938   builtin and then its argument prototype would still apply.  */
39939#ifdef __cplusplus
39940extern "C"
39941#endif
39942char json_object_set_serializer ();
39943int
39944main ()
39945{
39946return json_object_set_serializer ();
39947  ;
39948  return 0;
39949}
39950_ACEOF
39951if ac_fn_c_try_link "$LINENO"; then :
39952  ac_cv_lib_json_c_json_object_set_serializer=yes
39953else
39954  ac_cv_lib_json_c_json_object_set_serializer=no
39955fi
39956rm -f core conftest.err conftest.$ac_objext \
39957    conftest$ac_exeext conftest.$ac_ext
39958LIBS=$ac_check_lib_save_LIBS
39959fi
39960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_json_c_json_object_set_serializer" >&5
39961$as_echo "$ac_cv_lib_json_c_json_object_set_serializer" >&6; }
39962if test "x$ac_cv_lib_json_c_json_object_set_serializer" = xyes; then :
39963  LIBJSONC_SETTING=external
39964else
39965  LIBJSONC_SETTING=internal
39966fi
39967
39968elif test "$with_libjson_c" = "internal" ; then
39969  LIBJSONC_SETTING=internal
39970elif test "$with_libjson_c" != "no"; then
39971  LIBS="-L$with_libjson_c/lib $LIBS"
39972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_object_set_serializer in -ljson-c" >&5
39973$as_echo_n "checking for json_object_set_serializer in -ljson-c... " >&6; }
39974if ${ac_cv_lib_json_c_json_object_set_serializer+:} false; then :
39975  $as_echo_n "(cached) " >&6
39976else
39977  ac_check_lib_save_LIBS=$LIBS
39978LIBS="-ljson-c -L$with_libjson_c/lib $LIBS"
39979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39980/* end confdefs.h.  */
39981
39982/* Override any GCC internal prototype to avoid an error.
39983   Use char because int might match the return type of a GCC
39984   builtin and then its argument prototype would still apply.  */
39985#ifdef __cplusplus
39986extern "C"
39987#endif
39988char json_object_set_serializer ();
39989int
39990main ()
39991{
39992return json_object_set_serializer ();
39993  ;
39994  return 0;
39995}
39996_ACEOF
39997if ac_fn_c_try_link "$LINENO"; then :
39998  ac_cv_lib_json_c_json_object_set_serializer=yes
39999else
40000  ac_cv_lib_json_c_json_object_set_serializer=no
40001fi
40002rm -f core conftest.err conftest.$ac_objext \
40003    conftest$ac_exeext conftest.$ac_ext
40004LIBS=$ac_check_lib_save_LIBS
40005fi
40006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_json_c_json_object_set_serializer" >&5
40007$as_echo "$ac_cv_lib_json_c_json_object_set_serializer" >&6; }
40008if test "x$ac_cv_lib_json_c_json_object_set_serializer" = xyes; then :
40009  LIBJSONC_SETTING=external
40010else
40011  LIBJSONC_SETTING=internal
40012fi
40013
40014else
40015  as_fn_error $? "libjson-c (internal or external) is required" "$LINENO" 5
40016fi
40017
40018if test "$LIBJSONC_SETTING" = "external" ; then
40019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using pre-installed libjson-c" >&5
40020$as_echo "using pre-installed libjson-c" >&6; }
40021  LIBS="-ljson-c $LIBS"
40022  if test "$with_libjson_c" != "" -a "$with_libjson_c" != "yes" -a "$with_libjson_c" != "external" ; then
40023    JSON_INCLUDE="-I$with_libjson_c/include/json-c"
40024  elif test -f "/usr/include/json-c/json.h"; then
40025    JSON_INCLUDE="-I/usr/include/json-c"
40026  elif test -f "/usr/local/include/json-c/json.h"; then
40027    JSON_INCLUDE="-I/usr/local/include/json-c"
40028  else
40029    as_fn_error $? "could not find json-c/json.h" "$LINENO" 5
40030  fi
40031else
40032    JSON_INCLUDE="-I\$(GDAL_ROOT)/ogr/ogrsf_frmts/geojson/libjson"
40033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal libjson-c code" >&5
40034$as_echo "using internal libjson-c code" >&6; }
40035fi
40036
40037LIBJSONC_SETTING=$LIBJSONC_SETTING
40038
40039JSON_INCLUDE=$JSON_INCLUDE
40040
40041
40042
40043
40044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable PAM" >&5
40045$as_echo_n "checking whether to enable PAM... " >&6; }
40046
40047
40048# Check whether --with-pam was given.
40049if test "${with_pam+set}" = set; then :
40050  withval=$with_pam;
40051fi
40052
40053
40054export PAM_SETTING=
40055
40056if test "x$with_pam" = "xno" ; then
40057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40058$as_echo "no" >&6; }
40059else
40060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40061$as_echo "yes" >&6; }
40062  PAM_SETTING=-DPAM_ENABLED
40063fi
40064
40065PAM_SETTING=$PAM_SETTING
40066
40067
40068
40069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build PDF driver as a plugin" >&5
40070$as_echo_n "checking whether to build PDF driver as a plugin... " >&6; }
40071
40072# Check whether --enable-pdf_plugin was given.
40073if test "${enable_pdf_plugin+set}" = set; then :
40074  enableval=$enable_pdf_plugin;
40075fi
40076
40077
40078PDF_PLUGIN=no
40079if test "x$enable_pdf_plugin" = "xyes" ; then
40080
40081  if test "$with_libtool" = "yes"; then
40082    as_fn_error $? "--enable-pdf-plugin not supported together --with-libtool" "$LINENO" 5
40083  fi
40084
40085  PDF_PLUGIN=yes
40086
40087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40088$as_echo "yes" >&6; }
40089else
40090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40091$as_echo "no" >&6; }
40092fi
40093
40094PDF_PLUGIN=$PDF_PLUGIN
40095
40096if test "$PDF_PLUGIN" != "yes" ; then
40097  if test "x$INTERNAL_FORMAT_pdf_ENABLED" = "xyes"; then
40098    if test "$LIBZ_SETTING" != "no" ; then
40099      GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED pdf"
40100    fi
40101  fi
40102fi
40103
40104
40105
40106
40107# Check whether --with-poppler was given.
40108if test "${with_poppler+set}" = set; then :
40109  withval=$with_poppler;
40110fi
40111
40112
40113HAVE_POPPLER=no
40114POPPLER_MAJOR_VERSION=
40115POPPLER_MINOR_VERSION=
40116
40117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler" >&5
40118$as_echo_n "checking for poppler... " >&6; }
40119
40120if test "$with_poppler" != "no" -a "$with_poppler" != ""; then
40121
40122
40123
40124if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
40125	if test -n "$ac_tool_prefix"; then
40126  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
40127set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
40128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40129$as_echo_n "checking for $ac_word... " >&6; }
40130if ${ac_cv_path_PKG_CONFIG+:} false; then :
40131  $as_echo_n "(cached) " >&6
40132else
40133  case $PKG_CONFIG in
40134  [\\/]* | ?:[\\/]*)
40135  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
40136  ;;
40137  *)
40138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40139for as_dir in $PATH
40140do
40141  IFS=$as_save_IFS
40142  test -z "$as_dir" && as_dir=.
40143    for ac_exec_ext in '' $ac_executable_extensions; do
40144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40145    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
40146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40147    break 2
40148  fi
40149done
40150  done
40151IFS=$as_save_IFS
40152
40153  ;;
40154esac
40155fi
40156PKG_CONFIG=$ac_cv_path_PKG_CONFIG
40157if test -n "$PKG_CONFIG"; then
40158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
40159$as_echo "$PKG_CONFIG" >&6; }
40160else
40161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40162$as_echo "no" >&6; }
40163fi
40164
40165
40166fi
40167if test -z "$ac_cv_path_PKG_CONFIG"; then
40168  ac_pt_PKG_CONFIG=$PKG_CONFIG
40169  # Extract the first word of "pkg-config", so it can be a program name with args.
40170set dummy pkg-config; ac_word=$2
40171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40172$as_echo_n "checking for $ac_word... " >&6; }
40173if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
40174  $as_echo_n "(cached) " >&6
40175else
40176  case $ac_pt_PKG_CONFIG in
40177  [\\/]* | ?:[\\/]*)
40178  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
40179  ;;
40180  *)
40181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40182for as_dir in $PATH
40183do
40184  IFS=$as_save_IFS
40185  test -z "$as_dir" && as_dir=.
40186    for ac_exec_ext in '' $ac_executable_extensions; do
40187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40188    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
40189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40190    break 2
40191  fi
40192done
40193  done
40194IFS=$as_save_IFS
40195
40196  ;;
40197esac
40198fi
40199ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
40200if test -n "$ac_pt_PKG_CONFIG"; then
40201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
40202$as_echo "$ac_pt_PKG_CONFIG" >&6; }
40203else
40204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40205$as_echo "no" >&6; }
40206fi
40207
40208  if test "x$ac_pt_PKG_CONFIG" = x; then
40209    PKG_CONFIG=""
40210  else
40211    case $cross_compiling:$ac_tool_warned in
40212yes:)
40213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40215ac_tool_warned=yes ;;
40216esac
40217    PKG_CONFIG=$ac_pt_PKG_CONFIG
40218  fi
40219else
40220  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
40221fi
40222
40223fi
40224if test -n "$PKG_CONFIG"; then
40225	_pkg_min_version=0.21
40226	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
40227$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
40228	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
40229		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40230$as_echo "yes" >&6; }
40231	else
40232		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40233$as_echo "no" >&6; }
40234		PKG_CONFIG=""
40235	fi
40236
40237fi
40238
40239pkg_failed=no
40240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER" >&5
40241$as_echo_n "checking for POPPLER... " >&6; }
40242
40243if test -n "$PKG_CONFIG"; then
40244    if test -n "$POPPLER_CFLAGS"; then
40245        pkg_cv_POPPLER_CFLAGS="$POPPLER_CFLAGS"
40246    else
40247        if test -n "$PKG_CONFIG" && \
40248    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.23.0\""; } >&5
40249  ($PKG_CONFIG --exists --print-errors "poppler >= 0.23.0") 2>&5
40250  ac_status=$?
40251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40252  test $ac_status = 0; }; then
40253  pkg_cv_POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.23.0" 2>/dev/null`
40254else
40255  pkg_failed=yes
40256fi
40257    fi
40258else
40259	pkg_failed=untried
40260fi
40261if test -n "$PKG_CONFIG"; then
40262    if test -n "$POPPLER_LIBS"; then
40263        pkg_cv_POPPLER_LIBS="$POPPLER_LIBS"
40264    else
40265        if test -n "$PKG_CONFIG" && \
40266    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.23.0\""; } >&5
40267  ($PKG_CONFIG --exists --print-errors "poppler >= 0.23.0") 2>&5
40268  ac_status=$?
40269  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40270  test $ac_status = 0; }; then
40271  pkg_cv_POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.23.0" 2>/dev/null`
40272else
40273  pkg_failed=yes
40274fi
40275    fi
40276else
40277	pkg_failed=untried
40278fi
40279
40280
40281
40282if test $pkg_failed = yes; then
40283
40284if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
40285        _pkg_short_errors_supported=yes
40286else
40287        _pkg_short_errors_supported=no
40288fi
40289        if test $_pkg_short_errors_supported = yes; then
40290	        POPPLER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "poppler >= 0.23.0"`
40291        else
40292	        POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.23.0"`
40293        fi
40294	# Put the nasty error message in config.log where it belongs
40295	echo "$POPPLER_PKG_ERRORS" >&5
40296
40297	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40298$as_echo "no" >&6; }
40299                POPPLER_VERSION=
40300elif test $pkg_failed = untried; then
40301	POPPLER_VERSION=
40302else
40303	POPPLER_CFLAGS=$pkg_cv_POPPLER_CFLAGS
40304	POPPLER_LIBS=$pkg_cv_POPPLER_LIBS
40305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40306$as_echo "yes" >&6; }
40307	POPPLER_VERSION=`$PKG_CONFIG --modversion poppler`
40308fi
40309    if test "$POPPLER_VERSION" != ""; then
40310        HAVE_POPPLER=yes
40311        POPPLER_MAJOR_VERSION=`echo $POPPLER_VERSION | cut -d'.' -f1`
40312        POPPLER_MINOR_VERSION=`echo $POPPLER_VERSION | cut -d'.' -f2 | sed -e 's/^0//'`
40313        POPPLER_CFLAGS=`echo $POPPLER_CFLAGS $POPPLER_CFLAGS | sed "s/include\/poppler/include/"`
40314    fi
40315else
40316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40317$as_echo "disabled" >&6; }
40318fi
40319
40320if test "$HAVE_POPPLER" = "yes" -a "$PDF_PLUGIN" = "no"; then
40321    LIBS="${POPPLER_LIBS} ${LIBS}"
40322fi
40323
40324HAVE_POPPLER=$HAVE_POPPLER
40325
40326POPPLER_MAJOR_VERSION=$POPPLER_MAJOR_VERSION
40327
40328POPPLER_MINOR_VERSION=$POPPLER_MINOR_VERSION
40329
40330POPPLER_CFLAGS=$POPPLER_CFLAGS
40331
40332POPPLER_PLUGIN_LIB=$POPPLER_LIBS
40333
40334
40335
40336
40337# Check whether --with-podofo was given.
40338if test "${with_podofo+set}" = set; then :
40339  withval=$with_podofo;
40340fi
40341
40342
40343HAVE_PODOFO=no
40344
40345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for podofo" >&5
40346$as_echo_n "checking for podofo... " >&6; }
40347
40348if test "$with_podofo" != "no" -a "$with_podofo" != ""; then
40349
40350
40351# Check whether --with-podofo-lib was given.
40352if test "${with_podofo_lib+set}" = set; then :
40353  withval=$with_podofo_lib;
40354fi
40355
40356
40357    if test "$with_podofo" = "yes" ; then
40358        TEST_PODOFO_INC="-I/usr/include -I/usr/include/podofo"
40359        PODOFO_LIB="-lpodofo"
40360    else
40361        TEST_PODOFO_INC="-I$with_podofo/include -I$with_podofo/include/podofo"
40362        PODOFO_LIB="-L$with_podofo/lib -lpodofo"
40363    fi
40364
40365    if test "x$with_podofo_lib" = "x" ; then
40366        rm -f testpodofo.*
40367        echo '#include <podofo.h>' > testpodofo.cpp
40368        echo 'int main(int argc, char** argv) { PoDoFo::PdfError::EnableDebug( 0 ); return 0; } ' >> testpodofo.cpp
40369        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testpodofo.cpp -o testpodofo ${TEST_PODOFO_INC} ${PODOFO_LIB} 2>/dev/null
40370        RETVAL=$?
40371        if test $RETVAL -eq 0; then
40372            HAVE_PODOFO=yes
40373            if test "$PDF_PLUGIN" = "no"; then
40374                LIBS="${PODOFO_LIB} ${LIBS}"
40375            fi
40376            PODOFO_INC=$TEST_PODOFO_INC
40377            PODOFO_PLUGIN_LIB="${PODOFO_LIB}"
40378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40379$as_echo "yes" >&6; }
40380        fi
40381        rm -f testpodofo.*
40382        rm -f testpodofo
40383    fi
40384
40385    if test "$HAVE_PODOFO" = "no"; then
40386        if test "x$with_podofo_lib" != "x" ; then
40387            PODOFO_LIB="$with_podofo_lib"
40388        else
40389            # This may be a static libpodofo.a, so add dependent libraries.
40390            PODOFO_LIB="$PODOFO_LIB -lfreetype -lfontconfig -lpthread"
40391        fi
40392
40393
40394# Check whether --with-podofo-extra-lib-for-test was given.
40395if test "${with_podofo_extra_lib_for_test+set}" = set; then :
40396  withval=$with_podofo_extra_lib_for_test;
40397fi
40398
40399
40400        if test "x$with_podofo_extra_lib_for_test" = "x" ; then
40401            TEST_PODOFO_LIB="$PODOFO_LIB"
40402        else
40403            TEST_PODOFO_LIB="$PODOFO_LIB $with_podofo_extra_lib_for_test"
40404        fi
40405
40406        rm -f testpodofo.*
40407        echo '#include <podofo.h>' > testpodofo.cpp
40408        echo 'int main(int argc, char** argv) { PoDoFo::PdfError::EnableDebug( 0 ); return 0; } ' >> testpodofo.cpp
40409        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testpodofo.cpp -o testpodofo ${TEST_PODOFO_INC} ${TEST_PODOFO_LIB} 2>/dev/null
40410        RETVAL=$?
40411        if test $RETVAL -eq 0; then
40412            HAVE_PODOFO=yes
40413            if test "$PDF_PLUGIN" = "no"; then
40414                LIBS="${PODOFO_LIB} ${LIBS}"
40415            fi
40416            PODOFO_INC=$TEST_PODOFO_INC
40417            PODOFO_PLUGIN_LIB="${PODOFO_LIB}"
40418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40419$as_echo "yes" >&6; }
40420        else
40421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40422$as_echo "no" >&6; }
40423        fi
40424        rm -f testpodofo.*
40425        rm -f testpodofo
40426    fi
40427else
40428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40429$as_echo "disabled" >&6; }
40430fi
40431
40432HAVE_PODOFO=$HAVE_PODOFO
40433
40434PODOFO_INC=$PODOFO_INC
40435
40436PODOFO_PLUGIN_LIB=$PODOFO_PLUGIN_LIB
40437
40438
40439
40440
40441# Check whether --with-pdfium was given.
40442if test "${with_pdfium+set}" = set; then :
40443  withval=$with_pdfium;
40444fi
40445
40446
40447HAVE_PDFIUM=no
40448
40449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pdfium" >&5
40450$as_echo_n "checking for pdfium... " >&6; }
40451
40452if test "$with_pdfium" != "no" -a "$with_pdfium" != ""; then
40453
40454    if test "$with_pdfium" = "yes" ; then
40455        PDFIUM_INC="-I/usr/include/pdfium"
40456        PDFIUM_LIB="-lpdfium"
40457    else
40458        PDFIUM_INC="-I$with_pdfium/include/pdfium"
40459        PDFIUM_LIB="-L$with_pdfium/lib -lpdfium"
40460    fi
40461
40462    PDFIUM_LIB="$PDFIUM_LIB -ljpeg -lpng -lz -llcms2 -lpthread -lm -lstdc++"
40463
40464    if test ! -z "`uname | grep Darwin`" ; then
40465        PDFIUM_LIB="-stdlib=libstdc++ $PDFIUM_LIB"
40466    fi
40467
40468    rm -f testpdfium.*
40469    echo '#include "public/fpdfview.h"' > testpdfium.cpp
40470    echo '#include "core/fpdfapi/page/cpdf_page.h"' >> testpdfium.cpp
40471    echo '#include "constants/transparency.h"' >> testpdfium.cpp # specific to pdfium_build_gdal_3_2
40472    echo 'int main(int argc, char** argv) { FPDF_InitLibrary(); FPDF_DestroyLibrary(); return 0; } ' >> testpdfium.cpp
40473    TEST_CXX_FLAGS=""
40474    if test ! -z "`uname | grep Darwin`" ; then
40475        TEST_CXX_FLAGS="$TEST_CXX_FLAGS -stdlib=libstdc++"
40476    fi
40477    if ${CXX} ${CXXFLAGS} ${CPPFLAGS} $TEST_CXX_FLAGS -std=c++14 testpdfium.cpp -o testpdfium ${PDFIUM_INC} ${PDFIUM_LIB} >/dev/null 2>/dev/null; then
40478        HAVE_PDFIUM=yes
40479        CXXFLAGS="$TEST_CXX_FLAGS $CXXFLAGS"
40480        if test "$PDF_PLUGIN" = "no"; then
40481            LIBS="${PDFIUM_LIB} ${LIBS}"
40482        fi
40483        PDFIUM_PLUGIN_LIB="${PDFIUM_LIB}"
40484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40485$as_echo "yes" >&6; }
40486    fi
40487    rm -f testpdfium.*
40488    rm -f testpdfium
40489
40490    if test "$HAVE_PDFIUM" = "no" -a "$with_pdfium" != ""; then
40491        as_fn_error $? "pdfium requested but not found. Must come from https://github.com/rouault/pdfium_build_gdal_3_2" "$LINENO" 5
40492    fi
40493else
40494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40495$as_echo "disabled" >&6; }
40496fi
40497
40498HAVE_PDFIUM=$HAVE_PDFIUM
40499
40500PDFIUM_INC=$PDFIUM_INC
40501
40502PDFIUM_PLUGIN_LIB=$PDFIUM_PLUGIN_LIB
40503
40504
40505
40506
40507
40508# Check whether --with-gdal-ver was given.
40509if test "${with_gdal_ver+set}" = set; then :
40510  withval=$with_gdal_ver;
40511fi
40512
40513GDAL_VERSION_MAJOR=`grep "#*define.GDAL_VERSION_MAJOR.*" gcore/gdal_version.h.in | awk '{print $4}'`
40514GDAL_VERSION_MINOR=`grep "#*define.GDAL_VERSION_MINOR.*" gcore/gdal_version.h.in | awk '{print $4}'`
40515GDAL_VERSION_REV=`grep "#*define.GDAL_VERSION_REV.*" gcore/gdal_version.h.in | awk '{print $4}'`
40516
40517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: checking GDAL version information from gdal_version.h.in: $GDAL_VERSION_MAJOR.$GDAL_VERSION_MINOR.$GDAL_VERSION_REV" >&5
40518$as_echo "checking GDAL version information from gdal_version.h.in: $GDAL_VERSION_MAJOR.$GDAL_VERSION_MINOR.$GDAL_VERSION_REV" >&6; }
40519
40520GDAL_VERSION_MAJOR="$GDAL_VERSION_MAJOR"
40521
40522GDAL_VERSION_MINOR="$GDAL_VERSION_MINOR"
40523
40524GDAL_VERSION_REV="$GDAL_VERSION_REV"
40525
40526
40527if test "x$with_gdal_ver" != "x"; then
40528
40529  GDAL_VER=$with_gdal_ver
40530  { $as_echo "$as_me:${as_lineno-$LINENO}: result:   overridden GDAL version: $GDAL_VER" >&5
40531$as_echo "  overridden GDAL version: $GDAL_VER" >&6; }
40532else
40533
40534  GDAL_VER=$GDAL_VERSION_MAJOR.$GDAL_VERSION_MINOR.$GDAL_VERSION_REV
40535
40536fi
40537
40538GDAL_VER=$GDAL_VER
40539
40540echo $GDAL_VER > VERSION
40541
40542
40543if test ! -z "`uname | grep Darwin`" ; then
40544
40545  CXXFLAGS="$ARCHFLAGS $CXXFLAGS"
40546  CFLAGS="$ARCHFLAGS $CFLAGS"
40547  LIBS="$ARCHFLAGS $LIBS"
40548
40549  MACOSX_FRAMEWORK=no
40550
40551# Check whether --with-macosx-framework was given.
40552if test "${with_macosx_framework+set}" = set; then :
40553  withval=$with_macosx_framework;
40554fi
40555
40556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Framework build" >&5
40557$as_echo_n "checking for Mac OS X Framework build... " >&6; }
40558  if test "$with_macosx_framework" = yes ; then
40559    MACOSX_FRAMEWORK=yes
40560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
40561$as_echo "enabled" >&6; }
40562
40563cat >>confdefs.h <<_ACEOF
40564#define MACOSX_FRAMEWORK 1
40565_ACEOF
40566
40567    prefix="/Library/Frameworks/GDAL.framework/Versions/${GDAL_VERSION_MAJOR}.${GDAL_VERSION_MINOR}"
40568    exec_prefix='${prefix}'
40569    includedir='${prefix}/Headers'
40570    datadir='${prefix}/Resources/gdal'
40571    libdir='${exec_prefix}'
40572    bindir='${exec_prefix}/Programs'
40573    docdir='${prefix}/Resources/doc'
40574    mandir='${prefix}/Resources/man'
40575  else
40576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40577$as_echo "disabled" >&6; }
40578  fi
40579  MACOSX_FRAMEWORK=$MACOSX_FRAMEWORK
40580
40581fi
40582
40583EXTRA_INCLUDES=$EXTRA_INCLUDES
40584
40585
40586case "${host_os}" in
40587    cygwin* | mingw* | pw32*)
40588      EXE_EXT=.exe
40589      SO_EXT=dll
40590      ;;
40591    *)
40592      EXE_EXT=
40593      ;;
40594esac
40595
40596
40597
40598
40599BINTRUE=/bin/true
40600
40601if test -f /bin/true.exe ; then
40602  BINTRUE=/bin/true.exe
40603fi
40604if test -f /usr/bin/true ; then
40605  BINTRUE=/usr/bin/true
40606fi
40607
40608export BINTRUE
40609
40610BINTRUE=$BINTRUE
40611
40612
40613
40614if test "$prefix" = "NONE" ; then
40615  GDAL_PREFIX=/usr/local
40616else
40617  GDAL_PREFIX=${prefix}
40618fi
40619
40620export GDAL_PREFIX
40621
40622cat >>confdefs.h <<_ACEOF
40623#define GDAL_PREFIX "$GDAL_PREFIX"
40624_ACEOF
40625
40626
40627
40628BINDINGS=
40629
40630
40631# Check whether --with-perl was given.
40632if test "${with_perl+set}" = set; then :
40633  withval=$with_perl;
40634fi
40635
40636
40637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl bindings" >&5
40638$as_echo_n "checking for perl bindings... " >&6; }
40639if test "$with_perl" = "yes" ; then
40640  BINDINGS="perl $BINDINGS"
40641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
40642$as_echo "enabled" >&6; }
40643else
40644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40645$as_echo "disabled" >&6; }
40646fi
40647
40648
40649
40650# Check whether --with-python was given.
40651if test "${with_python+set}" = set; then :
40652  withval=$with_python;
40653fi
40654
40655
40656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python bindings" >&5
40657$as_echo_n "checking for python bindings... " >&6; }
40658if test "$with_python" = "yes" ; then
40659        for ac_prog in python python3 python2
40660do
40661  # Extract the first word of "$ac_prog", so it can be a program name with args.
40662set dummy $ac_prog; ac_word=$2
40663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40664$as_echo_n "checking for $ac_word... " >&6; }
40665if ${ac_cv_prog_PYTHON+:} false; then :
40666  $as_echo_n "(cached) " >&6
40667else
40668  if test -n "$PYTHON"; then
40669  ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
40670else
40671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40672for as_dir in $PATH
40673do
40674  IFS=$as_save_IFS
40675  test -z "$as_dir" && as_dir=.
40676    for ac_exec_ext in '' $ac_executable_extensions; do
40677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40678    ac_cv_prog_PYTHON="$ac_prog"
40679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40680    break 2
40681  fi
40682done
40683  done
40684IFS=$as_save_IFS
40685
40686fi
40687fi
40688PYTHON=$ac_cv_prog_PYTHON
40689if test -n "$PYTHON"; then
40690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
40691$as_echo "$PYTHON" >&6; }
40692else
40693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40694$as_echo "no" >&6; }
40695fi
40696
40697
40698  test -n "$PYTHON" && break
40699done
40700
40701  if test "x$PYTHON" = "x"; then
40702    as_fn_error $? "--with-python requested, but Python not found!" "$LINENO" 5
40703  fi
40704elif test "x$with_python" != "x" -a "$with_python" != "no" ; then
40705  PYTHON="$with_python"
40706  if test "`$PYTHON -c 'print(1)'`" != "1"; then
40707    as_fn_error $? "--with-python requested, but Python not found!" "$LINENO" 5
40708  fi
40709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
40710$as_echo "enabled" >&6; }
40711else
40712  PYTHON=""
40713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40714$as_echo "disabled" >&6; }
40715fi
40716
40717if test "x$PYTHON" != "x"; then
40718  BINDINGS="python $BINDINGS"
40719
40720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python setuptools" >&5
40721$as_echo_n "checking for python setuptools... " >&6; }
40722  SETUPTEST='try:
40723  import setuptools
40724  print(1)
40725except ImportError:
40726  pass'
40727  PY_HAVE_SETUPTOOLS=`$PYTHON -c "$SETUPTEST"`
40728  if test "$PY_HAVE_SETUPTOOLS" = "1"; then
40729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
40730$as_echo "found" >&6; }
40731  else
40732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40733$as_echo "not found" >&6; }
40734  fi
40735fi
40736
40737
40738
40739
40740
40741
40742# Check whether --with-java was given.
40743if test "${with_java+set}" = set; then :
40744  withval=$with_java;
40745fi
40746
40747
40748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include Java support" >&5
40749$as_echo_n "checking whether we should include Java support... " >&6; }
40750
40751JAVA_HOME=""
40752JAVA_INC=""
40753mac_java_fw=""
40754
40755if test "x$with_java" = "xyes"; then
40756
40757    JAVA_6_TEST_DIR=
40758    JAVA_7_TEST_DIR=
40759    JAVA_8_TEST_DIR=
40760    JAVA_MAC_TEST_DIR=
40761    case "$host_cpu" in
40762        i*86*)
40763            JAVA_6_TEST_DIR=/usr/lib/jvm/java-6-openjdk-i386
40764            JAVA_7_TEST_DIR=/usr/lib/jvm/java-7-openjdk-i386
40765            JAVA_8_TEST_DIR=/usr/lib/jvm/java-8-openjdk-i386
40766            ;;
40767        x86_64*)
40768            JAVA_6_TEST_DIR=/usr/lib/jvm/java-6-openjdk-amd64
40769            JAVA_7_TEST_DIR=/usr/lib/jvm/java-7-openjdk-amd64
40770            JAVA_8_TEST_DIR=/usr/lib/jvm/java-8-openjdk-amd64
40771            ;;
40772        *)
40773            ;;
40774    esac
40775    case "${host_os}" in
40776      darwin*)
40777        JAVA_MAC_TEST_DIR=$(/usr/libexec/java_home)
40778        ;;
40779    esac
40780
40781    if test "x$JAVA_8_TEST_DIR" != "x" -a -d "$JAVA_8_TEST_DIR/include"; then
40782        with_java="$JAVA_8_TEST_DIR"
40783
40784    elif test "x$JAVA_7_TEST_DIR" != "x" -a -d "$JAVA_7_TEST_DIR/include"; then
40785        with_java="$JAVA_7_TEST_DIR"
40786
40787    elif test "x$JAVA_6_TEST_DIR" != "x" -a -d "$JAVA_6_TEST_DIR/include"; then
40788        with_java="$JAVA_6_TEST_DIR"
40789
40790    elif test -d /usr/lib/jvm/java-6-openjdk; then
40791        with_java="/usr/lib/jvm/java-6-openjdk"
40792
40793    elif test -d /usr/lib/jvm/java-openjdk; then
40794        with_java="/usr/lib/jvm/java-openjdk"
40795
40796
40797    elif test -d /usr/java; then
40798        with_java="/usr/java"
40799
40800    elif test "x$JAVA_MAC_TEST_DIR" != "x"; then
40801        if test -d "$JAVA_MAC_TEST_DIR/bundle"; then
40802            # Mac default 1.6.0_x framework
40803            # test for ./bundle first, since older installs also have ./include
40804            with_java="$JAVA_MAC_TEST_DIR"
40805            mac_java_fw="JavaVM"
40806        elif test -d "$JAVA_MAC_TEST_DIR/include"; then
40807            # Oracle Java install
40808            with_java="$JAVA_MAC_TEST_DIR"
40809        fi
40810    else
40811        as_fn_error $? "\"cannot find JDK root directory.\"" "$LINENO" 5
40812    fi
40813
40814    if test \! -d "$with_java/include" && test \! -d "$with_java/bundle"; then
40815        as_fn_error $? "\"$with_java is not a valid JDK.\"" "$LINENO" 5
40816    fi
40817fi
40818
40819if test "x$JAVA_INC" != "x"; then
40820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40821$as_echo "yes" >&6; }
40822elif test "x$with_java" != "x" -a "x$with_java" != "xno"; then
40823
40824    if test -d "$with_java/bundle" && test -d "/System/Library/Frameworks/JavaVM.framework/Headers"; then
40825        # Mac default 1.6.0_x framework
40826        # test for ./bundle first, since older installs also have ./include
40827        JAVA_HOME="$with_java"
40828        JAVA_INC="-I/System/Library/Frameworks/JavaVM.framework/Headers"
40829        mac_java_fw="JavaVM"
40830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40831$as_echo "yes" >&6; }
40832    elif test -d "$with_java/include"; then
40833        if test -d "$with_java/include/linux"; then
40834            JAVA_HOME="$with_java"
40835            JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
40836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40837$as_echo "yes" >&6; }
40838        elif test -d "$with_java/include/solaris"; then
40839            JAVA_HOME="$with_java"
40840            JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/solaris"
40841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40842$as_echo "yes" >&6; }
40843        elif test -d "$with_java/include/freebsd"; then
40844            JAVA_HOME="$with_java"
40845            JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/freebsd"
40846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40847$as_echo "yes" >&6; }
40848        elif test -d "$with_java/include/darwin"; then
40849            # Oracle Java install, use instead of Mac default 1.6.0_x
40850            JAVA_HOME="$with_java"
40851            JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
40852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40853$as_echo "yes" >&6; }
40854        else
40855            as_fn_error $? "\"Cannot find $with_java/include/linux or solaris or freebsd or darwin directory.\"" "$LINENO" 5
40856        fi
40857    else
40858        as_fn_error $? "\"Cannot find $with_java/include or <mac_java_framework>/Headers directory.\"" "$LINENO" 5
40859    fi
40860
40861else
40862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40863$as_echo "no" >&6; }
40864fi
40865
40866JAVA_HOME=$JAVA_HOME
40867
40868JAVA_INC=$JAVA_INC
40869
40870
40871
40872
40873# Check whether --with-hdfs was given.
40874if test "${with_hdfs+set}" = set; then :
40875  withval=$with_hdfs;
40876fi
40877
40878
40879HDFS_ENABLED=no
40880
40881if test -z "$with_hdfs" -o "$with_hdfs" = "no" ; then
40882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: HDFS support not requested." >&5
40883$as_echo "HDFS support not requested." >&6; }
40884else
40885     if test "$JAVA_HOME"; then
40886          JNI_LIB="-L$(find $JAVA_HOME | grep libjvm | head -1 | sed "s/[^/]*$//") -ljvm"
40887     else
40888          as_fn_error $? "HDFS support requires java support (--with-java). $JAVA_HOME" "$LINENO" 5
40889     fi
40890     if echo $JNI_LIB | grep $JAVA_HOME; then
40891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDFS in $with_hdfs" >&5
40892$as_echo_n "checking for HDFS in $with_hdfs... " >&6; }
40893          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hdfsConnect in -lhdfs" >&5
40894$as_echo_n "checking for hdfsConnect in -lhdfs... " >&6; }
40895if ${ac_cv_lib_hdfs_hdfsConnect+:} false; then :
40896  $as_echo_n "(cached) " >&6
40897else
40898  ac_check_lib_save_LIBS=$LIBS
40899LIBS="-lhdfs $JNI_LIB -L$with_hdfs/lib/native $LIBS"
40900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40901/* end confdefs.h.  */
40902
40903/* Override any GCC internal prototype to avoid an error.
40904   Use char because int might match the return type of a GCC
40905   builtin and then its argument prototype would still apply.  */
40906#ifdef __cplusplus
40907extern "C"
40908#endif
40909char hdfsConnect ();
40910int
40911main ()
40912{
40913return hdfsConnect ();
40914  ;
40915  return 0;
40916}
40917_ACEOF
40918if ac_fn_c_try_link "$LINENO"; then :
40919  ac_cv_lib_hdfs_hdfsConnect=yes
40920else
40921  ac_cv_lib_hdfs_hdfsConnect=no
40922fi
40923rm -f core conftest.err conftest.$ac_objext \
40924    conftest$ac_exeext conftest.$ac_ext
40925LIBS=$ac_check_lib_save_LIBS
40926fi
40927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdfs_hdfsConnect" >&5
40928$as_echo "$ac_cv_lib_hdfs_hdfsConnect" >&6; }
40929if test "x$ac_cv_lib_hdfs_hdfsConnect" = xyes; then :
40930  HAVE_HDFS_LIB=yes
40931else
40932  HAVE_HDFS_LIB=no
40933fi
40934
40935          as_ac_File=`$as_echo "ac_cv_file_$with_hdfs/include/hdfs.h" | $as_tr_sh`
40936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $with_hdfs/include/hdfs.h" >&5
40937$as_echo_n "checking for $with_hdfs/include/hdfs.h... " >&6; }
40938if eval \${$as_ac_File+:} false; then :
40939  $as_echo_n "(cached) " >&6
40940else
40941  test "$cross_compiling" = yes &&
40942  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
40943if test -r "$with_hdfs/include/hdfs.h"; then
40944  eval "$as_ac_File=yes"
40945else
40946  eval "$as_ac_File=no"
40947fi
40948fi
40949eval ac_res=\$$as_ac_File
40950	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
40951$as_echo "$ac_res" >&6; }
40952if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
40953  HAVE_HDFS_HEADER=yes
40954else
40955  HAVE_HDFS_HEADER=no
40956fi
40957
40958          if test "$HAVE_HDFS_LIB" = "yes" -a "$HAVE_HDFS_HEADER" = "yes"; then
40959               { $as_echo "$as_me:${as_lineno-$LINENO}: result: HDFS support enabled." >&5
40960$as_echo "HDFS support enabled." >&6; }
40961               HDFS_ENABLED=yes
40962               HDFS_LIB="-L$with_hdfs/lib/native -lhdfs"
40963               HDFS_INC="-I$with_hdfs/include"
40964          else
40965               as_fn_error $? "HDFS support not enabled." "$LINENO" 5
40966          fi
40967     else
40968          as_fn_error $? "Unable to find libjvm." "$LINENO" 5
40969     fi
40970fi
40971
40972HDFS_ENABLED=$HDFS_ENABLED
40973
40974HDFS_LIB=$HDFS_LIB
40975
40976HDFS_INC=$HDFS_INC
40977
40978JNI_LIB=$JNI_LIB
40979
40980
40981
40982
40983# Check whether --with-tiledb was given.
40984if test "${with_tiledb+set}" = set; then :
40985  withval=$with_tiledb;
40986fi
40987
40988
40989TILEDB_SETTING=no
40990
40991if test "$with_tiledb" = "yes" -o "$with_tiledb" = "" ; then
40992
40993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tiledb_coords in -ltiledb" >&5
40994$as_echo_n "checking for tiledb_coords in -ltiledb... " >&6; }
40995if ${ac_cv_lib_tiledb_tiledb_coords+:} false; then :
40996  $as_echo_n "(cached) " >&6
40997else
40998  ac_check_lib_save_LIBS=$LIBS
40999LIBS="-ltiledb  $LIBS"
41000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41001/* end confdefs.h.  */
41002
41003/* Override any GCC internal prototype to avoid an error.
41004   Use char because int might match the return type of a GCC
41005   builtin and then its argument prototype would still apply.  */
41006#ifdef __cplusplus
41007extern "C"
41008#endif
41009char tiledb_coords ();
41010int
41011main ()
41012{
41013return tiledb_coords ();
41014  ;
41015  return 0;
41016}
41017_ACEOF
41018if ac_fn_c_try_link "$LINENO"; then :
41019  ac_cv_lib_tiledb_tiledb_coords=yes
41020else
41021  ac_cv_lib_tiledb_tiledb_coords=no
41022fi
41023rm -f core conftest.err conftest.$ac_objext \
41024    conftest$ac_exeext conftest.$ac_ext
41025LIBS=$ac_check_lib_save_LIBS
41026fi
41027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiledb_tiledb_coords" >&5
41028$as_echo "$ac_cv_lib_tiledb_tiledb_coords" >&6; }
41029if test "x$ac_cv_lib_tiledb_tiledb_coords" = xyes; then :
41030  TILEDB_SETTING=yes
41031else
41032  TILEDB_SETTING=no
41033fi
41034
41035
41036  if test "$TILEDB_SETTING" = "yes" ; then
41037    LIBS="-ltiledb $LIBS"
41038  else
41039    echo "libtiledb not found - TileDB support disabled"
41040  fi
41041
41042elif test "$with_tiledb" != "no" -a "$with_tiledb" != ""; then
41043
41044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tiledb_coords in -ltiledb" >&5
41045$as_echo_n "checking for tiledb_coords in -ltiledb... " >&6; }
41046if ${ac_cv_lib_tiledb_tiledb_coords+:} false; then :
41047  $as_echo_n "(cached) " >&6
41048else
41049  ac_check_lib_save_LIBS=$LIBS
41050LIBS="-ltiledb -L$with_tiledb/lib -ltiledb $LIBS"
41051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41052/* end confdefs.h.  */
41053
41054/* Override any GCC internal prototype to avoid an error.
41055   Use char because int might match the return type of a GCC
41056   builtin and then its argument prototype would still apply.  */
41057#ifdef __cplusplus
41058extern "C"
41059#endif
41060char tiledb_coords ();
41061int
41062main ()
41063{
41064return tiledb_coords ();
41065  ;
41066  return 0;
41067}
41068_ACEOF
41069if ac_fn_c_try_link "$LINENO"; then :
41070  ac_cv_lib_tiledb_tiledb_coords=yes
41071else
41072  ac_cv_lib_tiledb_tiledb_coords=no
41073fi
41074rm -f core conftest.err conftest.$ac_objext \
41075    conftest$ac_exeext conftest.$ac_ext
41076LIBS=$ac_check_lib_save_LIBS
41077fi
41078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiledb_tiledb_coords" >&5
41079$as_echo "$ac_cv_lib_tiledb_tiledb_coords" >&6; }
41080if test "x$ac_cv_lib_tiledb_tiledb_coords" = xyes; then :
41081  TILEDB_SETTING=yes
41082else
41083  TILEDB_SETTING=no
41084fi
41085
41086
41087  if test "$TILEDB_SETTING" = "yes" ; then
41088    LIBS="-L$with_tiledb/lib -ltiledb $LIBS"
41089    EXTRA_INCLUDES="-I$with_tiledb/include $EXTRA_INCLUDES"
41090  else
41091    echo "libtiledb not found - TileDB support disabled"
41092  fi
41093
41094fi
41095
41096TILEDB_SETTING=$TILEDB_SETTING
41097
41098
41099if test "$TILEDB_SETTING" != "no" ; then
41100  OPT_GDAL_FORMATS="tiledb $OPT_GDAL_FORMATS"
41101fi
41102
41103
41104
41105# Check whether --with-mdb was given.
41106if test "${with_mdb+set}" = set; then :
41107  withval=$with_mdb;
41108fi
41109
41110
41111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include MDB support" >&5
41112$as_echo_n "checking whether we should include MDB support... " >&6; }
41113
41114MDB_ENABLED=no
41115JVM_LIB=""
41116
41117if test "$with_mdb" = "yes" ; then
41118    if test "x$JAVA_INC" = "x"; then
41119        as_fn_error $? "\"--with-java must be specified.\"" "$LINENO" 5
41120    fi
41121
41122
41123# Check whether --with-jvm-lib was given.
41124if test "${with_jvm_lib+set}" = set; then :
41125  withval=$with_jvm_lib;
41126fi
41127
41128
41129
41130# Check whether --with-jvm-lib-add-rpath was given.
41131if test "${with_jvm_lib_add_rpath+set}" = set; then :
41132  withval=$with_jvm_lib_add_rpath;
41133fi
41134
41135
41136    if test "x$with_jvm_lib" = "xdlopen"; then
41137
41138cat >>confdefs.h <<_ACEOF
41139#define JVM_LIB_DLOPEN 1
41140_ACEOF
41141
41142        JVM_LIB="-ldl"
41143    elif test "x$with_jvm_lib" != "x"; then
41144        if test -d "$with_jvm_lib"; then
41145            saved_LDFLAGS="$LDFLAGS"
41146            LDFLAGS="$LDFLAGS -L$with_jvm_lib"
41147            if test "x$mac_java_fw" != "x"; then
41148                as_ac_Lib=`$as_echo "ac_cv_lib_$mac_java_fw''_JNI_CreateJavaVM" | $as_tr_sh`
41149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_CreateJavaVM in -framework $mac_java_fw" >&5
41150$as_echo_n "checking for JNI_CreateJavaVM in -framework $mac_java_fw... " >&6; }
41151if eval \${$as_ac_Lib+:} false; then :
41152  $as_echo_n "(cached) " >&6
41153else
41154  ac_check_fw_func_save_LIBS=$LIBS
41155LIBS="-framework $mac_java_fw  $LIBS"
41156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41157/* end confdefs.h.  */
41158
41159/* Override any GCC internal prototype to avoid an error.
41160   Use char because int might match the return type of a GCC
41161   builtin and then its argument prototype would still apply.  */
41162#ifdef __cplusplus
41163extern "C"
41164#endif
41165char JNI_CreateJavaVM ();
41166int
41167main ()
41168{
41169return JNI_CreateJavaVM ();
41170  ;
41171  return 0;
41172}
41173_ACEOF
41174if ac_fn_c_try_link "$LINENO"; then :
41175  eval "$as_ac_Lib=yes"
41176else
41177  eval "$as_ac_Lib=no"
41178fi
41179rm -f core conftest.err conftest.$ac_objext \
41180    conftest$ac_exeext conftest.$ac_ext
41181LIBS=$ac_check_fw_func_save_LIBS
41182fi
41183eval ac_res=\$$as_ac_Lib
41184	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
41185$as_echo "$ac_res" >&6; }
41186if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
41187  HAS_LIB_JVM=yes
41188else
41189  HAS_LIB_JVM=no
41190fi
41191
41192            else
41193                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_CreateJavaVM in -ljvm" >&5
41194$as_echo_n "checking for JNI_CreateJavaVM in -ljvm... " >&6; }
41195if ${ac_cv_lib_jvm_JNI_CreateJavaVM+:} false; then :
41196  $as_echo_n "(cached) " >&6
41197else
41198  ac_check_lib_save_LIBS=$LIBS
41199LIBS="-ljvm  $LIBS"
41200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41201/* end confdefs.h.  */
41202
41203/* Override any GCC internal prototype to avoid an error.
41204   Use char because int might match the return type of a GCC
41205   builtin and then its argument prototype would still apply.  */
41206#ifdef __cplusplus
41207extern "C"
41208#endif
41209char JNI_CreateJavaVM ();
41210int
41211main ()
41212{
41213return JNI_CreateJavaVM ();
41214  ;
41215  return 0;
41216}
41217_ACEOF
41218if ac_fn_c_try_link "$LINENO"; then :
41219  ac_cv_lib_jvm_JNI_CreateJavaVM=yes
41220else
41221  ac_cv_lib_jvm_JNI_CreateJavaVM=no
41222fi
41223rm -f core conftest.err conftest.$ac_objext \
41224    conftest$ac_exeext conftest.$ac_ext
41225LIBS=$ac_check_lib_save_LIBS
41226fi
41227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_CreateJavaVM" >&5
41228$as_echo "$ac_cv_lib_jvm_JNI_CreateJavaVM" >&6; }
41229if test "x$ac_cv_lib_jvm_JNI_CreateJavaVM" = xyes; then :
41230  HAS_LIB_JVM=yes
41231else
41232  HAS_LIB_JVM=no
41233fi
41234
41235            fi
41236            LDFLAGS="$saved_LDFLAGS"
41237            if test "$HAS_LIB_JVM" = "yes"; then
41238                JVM_LIB="-L$with_jvm_lib -ljvm"
41239                if test "x$mac_java_fw" != "x"; then
41240                    JVM_LIB="-framework $mac_java_fw"
41241                fi
41242                if test "x$with_jvm_lib_add_rpath" = "xyes"; then
41243                    case "${host_os}" in
41244                      darwin*)
41245                          if test "x$mac_java_fw" = "x"; then
41246                              JVM_LIB="-Wl,-rpath,$with_jvm_lib -L$with_jvm_lib -lazy-ljvm"
41247                          fi
41248                          ;;
41249                      *)
41250                          JVM_LIB="-Wl,-rpath=$with_jvm_lib $JVM_LIB"
41251                          ;;
41252                    esac
41253                fi
41254            else
41255                as_fn_error $? "\"--with-jvm-lib must point to a directory with a libjvm.\"" "$LINENO" 5
41256            fi
41257        else
41258            as_fn_error $? "\"--with-jvm-lib must point to a directory.\"" "$LINENO" 5
41259        fi
41260    elif test "x$JAVA_HOME" != "x"; then
41261        TEST_DIR="$JAVA_HOME/jre/lib/amd64/server"
41262        if test -d "$JAVA_HOME/jre/lib/server"; then
41263            # Oracle Java install on Mac
41264            TEST_DIR="$JAVA_HOME/jre/lib/server"
41265        fi
41266        if test "x$mac_java_fw" != "x"; then
41267            # Mac default 1.6.0_x framework, TEST_DIR not used
41268            TEST_DIR="$with_java"
41269        fi
41270        if test "x$JVM_LIB" = "x" -a -d "$TEST_DIR"; then
41271            unset ac_cv_lib_jvm_JNI_CreateJavaVM
41272            saved_LDFLAGS="$LDFLAGS"
41273            LDFLAGS="$LDFLAGS -L$TEST_DIR"
41274            if test "x$mac_java_fw" != "x"; then
41275                as_ac_Lib=`$as_echo "ac_cv_lib_$mac_java_fw''_JNI_CreateJavaVM" | $as_tr_sh`
41276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_CreateJavaVM in -framework $mac_java_fw" >&5
41277$as_echo_n "checking for JNI_CreateJavaVM in -framework $mac_java_fw... " >&6; }
41278if eval \${$as_ac_Lib+:} false; then :
41279  $as_echo_n "(cached) " >&6
41280else
41281  ac_check_fw_func_save_LIBS=$LIBS
41282LIBS="-framework $mac_java_fw  $LIBS"
41283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41284/* end confdefs.h.  */
41285
41286/* Override any GCC internal prototype to avoid an error.
41287   Use char because int might match the return type of a GCC
41288   builtin and then its argument prototype would still apply.  */
41289#ifdef __cplusplus
41290extern "C"
41291#endif
41292char JNI_CreateJavaVM ();
41293int
41294main ()
41295{
41296return JNI_CreateJavaVM ();
41297  ;
41298  return 0;
41299}
41300_ACEOF
41301if ac_fn_c_try_link "$LINENO"; then :
41302  eval "$as_ac_Lib=yes"
41303else
41304  eval "$as_ac_Lib=no"
41305fi
41306rm -f core conftest.err conftest.$ac_objext \
41307    conftest$ac_exeext conftest.$ac_ext
41308LIBS=$ac_check_fw_func_save_LIBS
41309fi
41310eval ac_res=\$$as_ac_Lib
41311	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
41312$as_echo "$ac_res" >&6; }
41313if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
41314  HAS_LIB_JVM=yes
41315else
41316  HAS_LIB_JVM=no
41317fi
41318
41319            else
41320                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_CreateJavaVM in -ljvm" >&5
41321$as_echo_n "checking for JNI_CreateJavaVM in -ljvm... " >&6; }
41322if ${ac_cv_lib_jvm_JNI_CreateJavaVM+:} false; then :
41323  $as_echo_n "(cached) " >&6
41324else
41325  ac_check_lib_save_LIBS=$LIBS
41326LIBS="-ljvm  $LIBS"
41327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41328/* end confdefs.h.  */
41329
41330/* Override any GCC internal prototype to avoid an error.
41331   Use char because int might match the return type of a GCC
41332   builtin and then its argument prototype would still apply.  */
41333#ifdef __cplusplus
41334extern "C"
41335#endif
41336char JNI_CreateJavaVM ();
41337int
41338main ()
41339{
41340return JNI_CreateJavaVM ();
41341  ;
41342  return 0;
41343}
41344_ACEOF
41345if ac_fn_c_try_link "$LINENO"; then :
41346  ac_cv_lib_jvm_JNI_CreateJavaVM=yes
41347else
41348  ac_cv_lib_jvm_JNI_CreateJavaVM=no
41349fi
41350rm -f core conftest.err conftest.$ac_objext \
41351    conftest$ac_exeext conftest.$ac_ext
41352LIBS=$ac_check_lib_save_LIBS
41353fi
41354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_CreateJavaVM" >&5
41355$as_echo "$ac_cv_lib_jvm_JNI_CreateJavaVM" >&6; }
41356if test "x$ac_cv_lib_jvm_JNI_CreateJavaVM" = xyes; then :
41357  HAS_LIB_JVM=yes
41358else
41359  HAS_LIB_JVM=no
41360fi
41361
41362            fi
41363            LDFLAGS="$saved_LDFLAGS"
41364            if test "$HAS_LIB_JVM" = "yes"; then
41365                JVM_LIB="-L$TEST_DIR -ljvm"
41366                if test "x$mac_java_fw" != "x"; then
41367                    JVM_LIB="-framework $mac_java_fw"
41368                fi
41369                if test "x$with_jvm_lib_add_rpath" = "xyes"; then
41370                    case "${host_os}" in
41371                      darwin*)
41372                          if test "x$mac_java_fw" = "x"; then
41373                              JVM_LIB="-Wl,-rpath,$TEST_DIR -L$TEST_DIR -lazy-ljvm"
41374                          fi
41375                          ;;
41376                      *)
41377                          JVM_LIB="-Wl,-rpath=$TEST_DIR $JVM_LIB"
41378                          ;;
41379                    esac
41380                fi
41381            fi
41382        fi
41383
41384        TEST_DIR="$JAVA_HOME/jre/lib/i386/server"
41385        if test "x$JVM_LIB" = "x" -a -d "$TEST_DIR"; then
41386            unset ac_cv_lib_jvm_JNI_CreateJavaVM
41387            saved_LDFLAGS="$LDFLAGS"
41388            LDFLAGS="$LDFLAGS -L$TEST_DIR"
41389            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_CreateJavaVM in -ljvm" >&5
41390$as_echo_n "checking for JNI_CreateJavaVM in -ljvm... " >&6; }
41391if ${ac_cv_lib_jvm_JNI_CreateJavaVM+:} false; then :
41392  $as_echo_n "(cached) " >&6
41393else
41394  ac_check_lib_save_LIBS=$LIBS
41395LIBS="-ljvm  $LIBS"
41396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41397/* end confdefs.h.  */
41398
41399/* Override any GCC internal prototype to avoid an error.
41400   Use char because int might match the return type of a GCC
41401   builtin and then its argument prototype would still apply.  */
41402#ifdef __cplusplus
41403extern "C"
41404#endif
41405char JNI_CreateJavaVM ();
41406int
41407main ()
41408{
41409return JNI_CreateJavaVM ();
41410  ;
41411  return 0;
41412}
41413_ACEOF
41414if ac_fn_c_try_link "$LINENO"; then :
41415  ac_cv_lib_jvm_JNI_CreateJavaVM=yes
41416else
41417  ac_cv_lib_jvm_JNI_CreateJavaVM=no
41418fi
41419rm -f core conftest.err conftest.$ac_objext \
41420    conftest$ac_exeext conftest.$ac_ext
41421LIBS=$ac_check_lib_save_LIBS
41422fi
41423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_CreateJavaVM" >&5
41424$as_echo "$ac_cv_lib_jvm_JNI_CreateJavaVM" >&6; }
41425if test "x$ac_cv_lib_jvm_JNI_CreateJavaVM" = xyes; then :
41426  HAS_LIB_JVM=yes
41427else
41428  HAS_LIB_JVM=no
41429fi
41430
41431            LDFLAGS="$saved_LDFLAGS"
41432            if test "$HAS_LIB_JVM" = "yes"; then
41433                JVM_LIB="-L$TEST_DIR -ljvm"
41434                if test "x$with_jvm_lib_add_rpath" = "xyes"; then
41435                    JVM_LIB="-Wl,-rpath=$TEST_DIR $JVM_LIB"
41436                fi
41437            fi
41438        fi
41439
41440        if test "x$JVM_LIB" = "x"; then
41441            as_fn_error $? "\"--with-jvm-lib must be specified.\"" "$LINENO" 5
41442        fi
41443    else
41444        as_fn_error $? "\"--with-jvm-lib must be specified.\"" "$LINENO" 5
41445    fi
41446
41447    MDB_ENABLED=yes
41448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41449$as_echo "yes" >&6; }
41450
41451else
41452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41453$as_echo "no" >&6; }
41454fi
41455
41456MDB_ENABLED=$MDB_ENABLED
41457
41458JVM_LIB=$JVM_LIB
41459
41460
41461
41462
41463RASDAMAN_ENABLED=no
41464
41465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include rasdaman support..." >&5
41466$as_echo "$as_me: checking whether we should include rasdaman support..." >&6;}
41467
41468# Check whether --with-rasdaman was given.
41469if test "${with_rasdaman+set}" = set; then :
41470  withval=$with_rasdaman;
41471fi
41472
41473
41474if test "$with_rasdaman" = "yes" ; then
41475
41476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lraslib" >&5
41477$as_echo_n "checking for main in -lraslib... " >&6; }
41478if ${ac_cv_lib_raslib_main+:} false; then :
41479  $as_echo_n "(cached) " >&6
41480else
41481  ac_check_lib_save_LIBS=$LIBS
41482LIBS="-lraslib  $LIBS"
41483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41484/* end confdefs.h.  */
41485
41486
41487int
41488main ()
41489{
41490return main ();
41491  ;
41492  return 0;
41493}
41494_ACEOF
41495if ac_fn_c_try_link "$LINENO"; then :
41496  ac_cv_lib_raslib_main=yes
41497else
41498  ac_cv_lib_raslib_main=no
41499fi
41500rm -f core conftest.err conftest.$ac_objext \
41501    conftest$ac_exeext conftest.$ac_ext
41502LIBS=$ac_check_lib_save_LIBS
41503fi
41504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_raslib_main" >&5
41505$as_echo "$ac_cv_lib_raslib_main" >&6; }
41506if test "x$ac_cv_lib_raslib_main" = xyes; then :
41507  RASDAMAN_ENABLED=yes
41508fi
41509
41510
41511  if test -n "$RASDAMAN_ENABLED" ; then
41512      RASDAMAN_LIB="-lrasodmg -lclientcomm -lcompression -lnetwork -lraslib"
41513      OPT_GDAL_FORMATS="rasdaman $OPT_GDAL_FORMATS"
41514      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using rasdaman from system libs." >&5
41515$as_echo "        using rasdaman from system libs." >&6; }
41516  else
41517      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:         rasdaman not found in system libs... use --with-rasdaman=DIR." >&5
41518$as_echo "$as_me: WARNING:         rasdaman not found in system libs... use --with-rasdaman=DIR." >&2;}
41519  fi
41520
41521elif test -n "$with_rasdaman" -a "$with_rasdaman" != "no" ; then
41522
41523  RASDAMAN_DIR=$with_rasdaman
41524
41525  if test -f $RASDAMAN_DIR/include/rasdaman.hh -a -d$RASDAMAN_DIR/lib ; then
41526      RASDAMAN_INC=-I$RASDAMAN_DIR/include
41527      RASDAMAN_LIB="-L$RASDAMAN_DIR/lib -lrasodmg -lclientcomm -lcompression -lnetwork -lraslib"
41528  else
41529      as_fn_error $? "\"Could not find rasdaman.hh or libraslib.a in $RASDAMAN_DIR.\"" "$LINENO" 5
41530  fi
41531
41532  RASDAMAN_ENABLED=yes
41533  OPT_GDAL_FORMATS="rasdaman $OPT_GDAL_FORMATS"
41534  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using rasdaman from $RASDAMAN_DIR." >&5
41535$as_echo "        using rasdaman from $RASDAMAN_DIR." >&6; }
41536
41537else
41538
41539  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         rasdaman support not requested." >&5
41540$as_echo "        rasdaman support not requested." >&6; }
41541fi
41542
41543RASDAMAN_ENABLED=$RASDAMAN_ENABLED
41544
41545RASDAMAN_INC=$RASDAMAN_INC
41546
41547RASDAMAN_LIB=$RASDAMAN_LIB
41548
41549
41550
41551
41552# Check whether --with-rdb was given.
41553if test "${with_rdb+set}" = set; then :
41554  withval=$with_rdb;
41555fi
41556
41557
41558RDB_SETTING=no
41559
41560if test "$with_rdb" = "yes" -o "$with_rdb" = "" ; then
41561
41562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rdb_library_name in -lrdb" >&5
41563$as_echo_n "checking for rdb_library_name in -lrdb... " >&6; }
41564if ${ac_cv_lib_rdb_rdb_library_name+:} false; then :
41565  $as_echo_n "(cached) " >&6
41566else
41567  ac_check_lib_save_LIBS=$LIBS
41568LIBS="-lrdb  $LIBS"
41569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41570/* end confdefs.h.  */
41571
41572/* Override any GCC internal prototype to avoid an error.
41573   Use char because int might match the return type of a GCC
41574   builtin and then its argument prototype would still apply.  */
41575#ifdef __cplusplus
41576extern "C"
41577#endif
41578char rdb_library_name ();
41579int
41580main ()
41581{
41582return rdb_library_name ();
41583  ;
41584  return 0;
41585}
41586_ACEOF
41587if ac_fn_c_try_link "$LINENO"; then :
41588  ac_cv_lib_rdb_rdb_library_name=yes
41589else
41590  ac_cv_lib_rdb_rdb_library_name=no
41591fi
41592rm -f core conftest.err conftest.$ac_objext \
41593    conftest$ac_exeext conftest.$ac_ext
41594LIBS=$ac_check_lib_save_LIBS
41595fi
41596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rdb_rdb_library_name" >&5
41597$as_echo "$ac_cv_lib_rdb_rdb_library_name" >&6; }
41598if test "x$ac_cv_lib_rdb_rdb_library_name" = xyes; then :
41599  RDB_SETTING=yes
41600else
41601  RDB_SETTING=no
41602fi
41603
41604
41605  if test "$RDB_SETTING" = "yes" ; then
41606    LIBS="-lrdb $LIBS"
41607  else
41608    echo "librdb not found - RDB support disabled"
41609  fi
41610
41611elif test "$with_rdb" != "no" -a "$with_rdb" != ""; then
41612
41613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rdb_library_name in -lrdb" >&5
41614$as_echo_n "checking for rdb_library_name in -lrdb... " >&6; }
41615if ${ac_cv_lib_rdb_rdb_library_name+:} false; then :
41616  $as_echo_n "(cached) " >&6
41617else
41618  ac_check_lib_save_LIBS=$LIBS
41619LIBS="-lrdb -L$with_rdb/library -lrdb $LIBS"
41620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41621/* end confdefs.h.  */
41622
41623/* Override any GCC internal prototype to avoid an error.
41624   Use char because int might match the return type of a GCC
41625   builtin and then its argument prototype would still apply.  */
41626#ifdef __cplusplus
41627extern "C"
41628#endif
41629char rdb_library_name ();
41630int
41631main ()
41632{
41633return rdb_library_name ();
41634  ;
41635  return 0;
41636}
41637_ACEOF
41638if ac_fn_c_try_link "$LINENO"; then :
41639  ac_cv_lib_rdb_rdb_library_name=yes
41640else
41641  ac_cv_lib_rdb_rdb_library_name=no
41642fi
41643rm -f core conftest.err conftest.$ac_objext \
41644    conftest$ac_exeext conftest.$ac_ext
41645LIBS=$ac_check_lib_save_LIBS
41646fi
41647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rdb_rdb_library_name" >&5
41648$as_echo "$ac_cv_lib_rdb_rdb_library_name" >&6; }
41649if test "x$ac_cv_lib_rdb_rdb_library_name" = xyes; then :
41650  RDB_SETTING=yes
41651else
41652  RDB_SETTING=no
41653fi
41654
41655
41656  if test "$RDB_SETTING" = "yes" ; then
41657    LIBS="-L$with_rdb/library -lrdb $LIBS"
41658    EXTRA_INCLUDES="-I$with_rdb/interface/cpp/ -I$with_rdb/interface/c/ $EXTRA_INCLUDES"
41659  else
41660    echo "librdb not found - RDB support disabled"
41661  fi
41662
41663fi
41664
41665RDB_SETTING=$RDB_SETTING
41666
41667
41668if test "$RDB_SETTING" != "no" ; then
41669  OPT_GDAL_FORMATS="rdb $OPT_GDAL_FORMATS"
41670fi
41671
41672
41673
41674
41675# Check whether --with-armadillo was given.
41676if test "${with_armadillo+set}" = set; then :
41677  withval=$with_armadillo;
41678fi
41679
41680
41681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include Armadillo support" >&5
41682$as_echo_n "checking whether we should include Armadillo support... " >&6; }
41683
41684HAVE_ARMADILLO=no
41685
41686if test "$with_armadillo" = "yes" ; then
41687    rm -f testarmadillo.*
41688    rm -f testarmadillo
41689    echo '#include <armadillo>' > testarmadillo.cpp
41690    echo 'int main(int argc, char** argv) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); return 0; } ' >> testarmadillo.cpp
41691    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo 2>&1`" ; then
41692        HAVE_ARMADILLO=yes
41693        LIBS="-larmadillo ${LIBS}"
41694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41695$as_echo "yes" >&6; }
41696    else
41697                if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo -llapack 2>&1`" ; then
41698            HAVE_ARMADILLO=yes
41699            LIBS="-larmadillo -llapack ${LIBS}"
41700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41701$as_echo "yes" >&6; }
41702        else
41703            # clang 3.4 needs linking against libstdc++ (ubuntu 14.04)
41704            if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo -lstdc++ 2>&1`" ; then
41705                HAVE_ARMADILLO=yes
41706                LIBS="-larmadillo -lstdc++ ${LIBS}"
41707                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41708$as_echo "yes" >&6; }
41709            else
41710                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41711$as_echo "no" >&6; }
41712            fi
41713        fi
41714    fi
41715    rm -f testarmadillo.*
41716    rm -f testarmadillo
41717
41718elif test -n "$with_armadillo" -a "$with_armadillo" != "no" ; then
41719
41720    rm -f testarmadillo.*
41721    rm -f testarmadillo
41722    echo '#include <armadillo>' > testarmadillo.cpp
41723    echo 'int main(int argc, char** argv) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); return 0; } ' >> testarmadillo.cpp
41724    if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -I$with_armadillo/include testarmadillo.cpp -o testarmadillo -L$with_armadillo/lib -larmadillo 2>&1`" ; then
41725        HAVE_ARMADILLO=yes
41726        LIBS="-L$with_armadillo/lib -larmadillo ${LIBS}"
41727        EXTRA_INCLUDES="-I$with_armadillo/include $EXTRA_INCLUDES"
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41729$as_echo "yes" >&6; }
41730    else
41731                if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} -I$with_armadillo/include testarmadillo.cpp -o testarmadillo -L$with_armadillo/lib -larmadillo -llapack 2>&1`" ; then
41732            HAVE_ARMADILLO=yes
41733            LIBS="-L$with_armadillo/lib -larmadillo -llapack ${LIBS}"
41734            EXTRA_INCLUDES="-I$with_armadillo/include $EXTRA_INCLUDES"
41735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41736$as_echo "yes" >&6; }
41737        else
41738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41739$as_echo "no" >&6; }
41740        fi
41741    fi
41742    rm -f testarmadillo.*
41743    rm -f testarmadillo
41744
41745else
41746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41747$as_echo "no" >&6; }
41748fi
41749
41750HAVE_ARMADILLO=$HAVE_ARMADILLO
41751
41752
41753
41754
41755# Check whether --with-cryptopp was given.
41756if test "${with_cryptopp+set}" = set; then :
41757  withval=$with_cryptopp;
41758fi
41759
41760
41761HAVE_CRYPTOPP=no
41762USE_ONLY_CRYPTODLL_ALG=yes
41763
41764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cryptopp" >&5
41765$as_echo_n "checking for cryptopp... " >&6; }
41766
41767if test "$with_cryptopp" = "no" ; then
41768
41769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41770$as_echo "disabled" >&6; }
41771
41772elif test "$with_cryptopp" = "yes" -o "$with_cryptopp" = "" ; then
41773
41774    rm -f testcryptopp.*
41775    echo '#include <cryptopp/aes.h>' > testcryptopp.cpp
41776    # Catch issue with clang++ (https://groups.google.com/forum/#!topic/cryptopp-users/DfWHy3bT0KI)
41777    echo '#include <cryptopp/osrng.h>' >> testcryptopp.cpp
41778    echo 'int main(int argc, char** argv) { CryptoPP::AES::Encryption oEnc; return 0; } ' >> testcryptopp.cpp
41779    ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -o testcryptopp -lcryptopp 2>/dev/null
41780    RETVAL=$?
41781    if test $RETVAL -eq 0; then
41782        HAVE_CRYPTOPP=yes
41783        LIBS="-lcryptopp ${LIBS}"
41784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41785$as_echo "yes" >&6; }
41786    else
41787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41788$as_echo "no" >&6; }
41789        if test "$with_cryptopp" = "yes"; then
41790            as_fn_error $? "--with-cryptopp was requested, but not available" "$LINENO" 5
41791        fi
41792    fi
41793    rm -f testcryptopp.*
41794    rm -f testcryptopp
41795
41796    if test "$HAVE_CRYPTOPP" = "yes"; then
41797
41798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cryptopp has all cipher methods builtin" >&5
41799$as_echo_n "checking if cryptopp has all cipher methods builtin... " >&6; }
41800        rm -f testcryptopp.*
41801        echo '#include <cryptopp/blowfish.h>' > testcryptopp.cpp
41802        echo 'int main(int argc, char** argv) { CryptoPP::Blowfish::Encryption oEnc; return 0; } ' >> testcryptopp.cpp
41803        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -o testcryptopp -lcryptopp 2>/dev/null
41804        RETVAL=$?
41805        if test $RETVAL -eq 0; then
41806            USE_ONLY_CRYPTODLL_ALG=no
41807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41808$as_echo "yes" >&6; }
41809        else
41810            USE_ONLY_CRYPTODLL_ALG=yes
41811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41812$as_echo "no" >&6; }
41813        fi
41814        rm -f testcryptopp.*
41815        rm -f testcryptopp
41816    fi
41817
41818else
41819
41820    rm -f testcryptopp.*
41821    echo '#include <cryptopp/aes.h>' > testcryptopp.cpp
41822    # Catch issue with clang++ (https://groups.google.com/forum/#!topic/cryptopp-users/DfWHy3bT0KI)
41823    echo '#include <cryptopp/osrng.h>' >> testcryptopp.cpp
41824    echo 'int main(int argc, char** argv) { CryptoPP::AES::Encryption oEnc; return 0; } ' >> testcryptopp.cpp
41825    ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -I$with_cryptopp/include -o testcryptopp -L$with_cryptopp/lib -lcryptopp 2>/dev/null
41826    RETVAL=$?
41827    if test $RETVAL -eq 0; then
41828        HAVE_CRYPTOPP=yes
41829        LIBS="-L$with_cryptopp/lib -lcryptopp ${LIBS}"
41830        EXTRA_INCLUDES="-I$with_cryptopp/include $EXTRA_INCLUDES"
41831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41832$as_echo "yes" >&6; }
41833    else
41834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41835$as_echo "no" >&6; }
41836    fi
41837    rm -f testcryptopp.*
41838    rm -f testcryptopp
41839
41840    if test "$HAVE_CRYPTOPP" = "yes"; then
41841
41842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cryptopp has all cipher methods builtin" >&5
41843$as_echo_n "checking if cryptopp has all cipher methods builtin... " >&6; }
41844        rm -f testcryptopp.*
41845        echo '#include <cryptopp/blowfish.h>' > testcryptopp.cpp
41846        echo 'int main(int argc, char** argv) { CryptoPP::Blowfish::Encryption oEnc; return 0; } ' >> testcryptopp.cpp
41847        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testcryptopp.cpp -I$with_cryptopp/include -o testcryptopp -L$with_cryptopp/lib -lcryptopp 2>/dev/null
41848        RETVAL=$?
41849        if test $RETVAL -eq 0; then
41850            USE_ONLY_CRYPTODLL_ALG=no
41851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41852$as_echo "yes" >&6; }
41853        else
41854            USE_ONLY_CRYPTODLL_ALG=yes
41855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41856$as_echo "no" >&6; }
41857        fi
41858        rm -f testcryptopp.*
41859        rm -f testcryptopp
41860    fi
41861
41862fi
41863
41864HAVE_CRYPTOPP=$HAVE_CRYPTOPP
41865
41866USE_ONLY_CRYPTODLL_ALG=$USE_ONLY_CRYPTODLL_ALG
41867
41868
41869
41870
41871# Check whether --with-crypto was given.
41872if test "${with_crypto+set}" = set; then :
41873  withval=$with_crypto;
41874fi
41875
41876
41877HAVE_OPENSSL_CRYPTO=no
41878
41879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto" >&5
41880$as_echo_n "checking for crypto... " >&6; }
41881
41882if test "$with_crypto" = "no" ; then
41883
41884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41885$as_echo "disabled" >&6; }
41886
41887elif test "$with_crypto" = "yes" -o \( "$with_crypto" = "" -a "$HAVE_CRYPTOPP" = "no" \) ; then
41888
41889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
41890$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
41891if ${ac_cv_lib_crypto_EVP_sha256+:} false; then :
41892  $as_echo_n "(cached) " >&6
41893else
41894  ac_check_lib_save_LIBS=$LIBS
41895LIBS="-lcrypto  $LIBS"
41896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41897/* end confdefs.h.  */
41898
41899/* Override any GCC internal prototype to avoid an error.
41900   Use char because int might match the return type of a GCC
41901   builtin and then its argument prototype would still apply.  */
41902#ifdef __cplusplus
41903extern "C"
41904#endif
41905char EVP_sha256 ();
41906int
41907main ()
41908{
41909return EVP_sha256 ();
41910  ;
41911  return 0;
41912}
41913_ACEOF
41914if ac_fn_c_try_link "$LINENO"; then :
41915  ac_cv_lib_crypto_EVP_sha256=yes
41916else
41917  ac_cv_lib_crypto_EVP_sha256=no
41918fi
41919rm -f core conftest.err conftest.$ac_objext \
41920    conftest$ac_exeext conftest.$ac_ext
41921LIBS=$ac_check_lib_save_LIBS
41922fi
41923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_sha256" >&5
41924$as_echo "$ac_cv_lib_crypto_EVP_sha256" >&6; }
41925if test "x$ac_cv_lib_crypto_EVP_sha256" = xyes; then :
41926  HAVE_OPENSSL_CRYPTO=yes
41927fi
41928
41929    if test "$HAVE_OPENSSL_CRYPTO" = "yes"; then
41930        for ac_header in openssl/bio.h
41931do :
41932  ac_fn_c_check_header_mongrel "$LINENO" "openssl/bio.h" "ac_cv_header_openssl_bio_h" "$ac_includes_default"
41933if test "x$ac_cv_header_openssl_bio_h" = xyes; then :
41934  cat >>confdefs.h <<_ACEOF
41935#define HAVE_OPENSSL_BIO_H 1
41936_ACEOF
41937
41938fi
41939
41940done
41941
41942        if test "$ac_cv_header_openssl_bio_h" = "no"; then
41943            HAVE_OPENSSL_CRYPTO=no
41944        else
41945            LIBS="-lcrypto $LIBS"
41946        fi
41947    fi
41948fi
41949
41950HAVE_OPENSSL_CRYPTO=$HAVE_OPENSSL_CRYPTO
41951
41952
41953
41954
41955# Check whether --with-lerc was given.
41956if test "${with_lerc+set}" = set; then :
41957  withval=$with_lerc;
41958fi
41959
41960
41961HAVE_LERC=no
41962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LERC" >&5
41963$as_echo_n "checking for LERC... " >&6; }
41964if test "$with_lerc" = "internal"; then
41965    if test "$ac_cv_c_bigendian" = "yes"; then
41966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled on big-endian" >&5
41967$as_echo "disabled on big-endian" >&6; }
41968    else
41969        HAVE_LERC=internal
41970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled, internal" >&5
41971$as_echo "enabled, internal" >&6; }
41972    fi
41973elif test "$with_lerc" = "no"; then
41974    HAVE_LERC=no
41975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled by user" >&5
41976$as_echo "disabled by user" >&6; }
41977elif test "$with_lerc" = "yes" -o "x$with_lerc" = "x" ; then
41978  lerc_lib_name="LercLib"
41979  as_ac_Lib=`$as_echo "ac_cv_lib_"$lerc_lib_name"''_lerc_decode" | $as_tr_sh`
41980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lerc_decode in -l\"$lerc_lib_name\"" >&5
41981$as_echo_n "checking for lerc_decode in -l\"$lerc_lib_name\"... " >&6; }
41982if eval \${$as_ac_Lib+:} false; then :
41983  $as_echo_n "(cached) " >&6
41984else
41985  ac_check_lib_save_LIBS=$LIBS
41986LIBS="-l"$lerc_lib_name"  $LIBS"
41987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41988/* end confdefs.h.  */
41989
41990/* Override any GCC internal prototype to avoid an error.
41991   Use char because int might match the return type of a GCC
41992   builtin and then its argument prototype would still apply.  */
41993#ifdef __cplusplus
41994extern "C"
41995#endif
41996char lerc_decode ();
41997int
41998main ()
41999{
42000return lerc_decode ();
42001  ;
42002  return 0;
42003}
42004_ACEOF
42005if ac_fn_c_try_link "$LINENO"; then :
42006  eval "$as_ac_Lib=yes"
42007else
42008  eval "$as_ac_Lib=no"
42009fi
42010rm -f core conftest.err conftest.$ac_objext \
42011    conftest$ac_exeext conftest.$ac_ext
42012LIBS=$ac_check_lib_save_LIBS
42013fi
42014eval ac_res=\$$as_ac_Lib
42015	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
42016$as_echo "$ac_res" >&6; }
42017if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
42018  lerc_lib=yes
42019else
42020  lerc_lib=no
42021fi
42022
42023  if test "$lerc_lib" = "no" ; then
42024    lerc_lib_name="Lerc"
42025    as_ac_Lib=`$as_echo "ac_cv_lib_"$lerc_lib_name"''_lerc_decode" | $as_tr_sh`
42026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lerc_decode in -l\"$lerc_lib_name\"" >&5
42027$as_echo_n "checking for lerc_decode in -l\"$lerc_lib_name\"... " >&6; }
42028if eval \${$as_ac_Lib+:} false; then :
42029  $as_echo_n "(cached) " >&6
42030else
42031  ac_check_lib_save_LIBS=$LIBS
42032LIBS="-l"$lerc_lib_name"  $LIBS"
42033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42034/* end confdefs.h.  */
42035
42036/* Override any GCC internal prototype to avoid an error.
42037   Use char because int might match the return type of a GCC
42038   builtin and then its argument prototype would still apply.  */
42039#ifdef __cplusplus
42040extern "C"
42041#endif
42042char lerc_decode ();
42043int
42044main ()
42045{
42046return lerc_decode ();
42047  ;
42048  return 0;
42049}
42050_ACEOF
42051if ac_fn_c_try_link "$LINENO"; then :
42052  eval "$as_ac_Lib=yes"
42053else
42054  eval "$as_ac_Lib=no"
42055fi
42056rm -f core conftest.err conftest.$ac_objext \
42057    conftest$ac_exeext conftest.$ac_ext
42058LIBS=$ac_check_lib_save_LIBS
42059fi
42060eval ac_res=\$$as_ac_Lib
42061	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
42062$as_echo "$ac_res" >&6; }
42063if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
42064  lerc_lib=yes
42065else
42066  lerc_lib=no
42067fi
42068
42069  fi
42070  if test "$lerc_lib" = "no" -a "$with_lerc" = "yes"; then
42071    as_fn_error $? "lerc library not found" "$LINENO" 5
42072  fi
42073
42074  ac_fn_c_check_header_mongrel "$LINENO" "Lerc_c_api.h" "ac_cv_header_Lerc_c_api_h" "$ac_includes_default"
42075if test "x$ac_cv_header_Lerc_c_api_h" = xyes; then :
42076  lerc_c_api_h=yes
42077else
42078  lerc_c_api_h=no
42079fi
42080
42081
42082  if test "$lerc_c_api_h" = "no" -a "$with_lerc" = "yes"; then
42083    as_fn_error $? "Liblerc headers not found" "$LINENO" 5
42084  fi
42085
42086  if test "$lerc_lib" = "yes" -a "$lerc_c_api_h" = "yes"; then
42087    HAVE_LERC=external
42088    LIBS="$LIBS -l$lerc_lib_name"
42089  else
42090    if test "$ac_cv_c_bigendian" = "yes"; then
42091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled on big-endian" >&5
42092$as_echo "disabled on big-endian" >&6; }
42093    else
42094        HAVE_LERC=internal
42095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled, internal" >&5
42096$as_echo "enabled, internal" >&6; }
42097    fi
42098  fi
42099else
42100
42101  ORIG_LIBS="$LIBS"
42102  LIBS="-L$with_lerc/lib $LIBS"
42103  lerc_lib_name="LercLib"
42104  as_ac_Lib=`$as_echo "ac_cv_lib_"$lerc_lib_name"''_lerc_decode" | $as_tr_sh`
42105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lerc_decode in -l\"$lerc_lib_name\"" >&5
42106$as_echo_n "checking for lerc_decode in -l\"$lerc_lib_name\"... " >&6; }
42107if eval \${$as_ac_Lib+:} false; then :
42108  $as_echo_n "(cached) " >&6
42109else
42110  ac_check_lib_save_LIBS=$LIBS
42111LIBS="-l"$lerc_lib_name"  $LIBS"
42112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42113/* end confdefs.h.  */
42114
42115/* Override any GCC internal prototype to avoid an error.
42116   Use char because int might match the return type of a GCC
42117   builtin and then its argument prototype would still apply.  */
42118#ifdef __cplusplus
42119extern "C"
42120#endif
42121char lerc_decode ();
42122int
42123main ()
42124{
42125return lerc_decode ();
42126  ;
42127  return 0;
42128}
42129_ACEOF
42130if ac_fn_c_try_link "$LINENO"; then :
42131  eval "$as_ac_Lib=yes"
42132else
42133  eval "$as_ac_Lib=no"
42134fi
42135rm -f core conftest.err conftest.$ac_objext \
42136    conftest$ac_exeext conftest.$ac_ext
42137LIBS=$ac_check_lib_save_LIBS
42138fi
42139eval ac_res=\$$as_ac_Lib
42140	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
42141$as_echo "$ac_res" >&6; }
42142if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
42143  lerc_lib=yes
42144else
42145  lerc_lib=no
42146fi
42147
42148  if test "$lerc_lib" = "no" ; then
42149    lerc_lib_name="Lerc"
42150    as_ac_Lib=`$as_echo "ac_cv_lib_"$lerc_lib_name"''_lerc_decode" | $as_tr_sh`
42151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lerc_decode in -l\"$lerc_lib_name\"" >&5
42152$as_echo_n "checking for lerc_decode in -l\"$lerc_lib_name\"... " >&6; }
42153if eval \${$as_ac_Lib+:} false; then :
42154  $as_echo_n "(cached) " >&6
42155else
42156  ac_check_lib_save_LIBS=$LIBS
42157LIBS="-l"$lerc_lib_name"  $LIBS"
42158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42159/* end confdefs.h.  */
42160
42161/* Override any GCC internal prototype to avoid an error.
42162   Use char because int might match the return type of a GCC
42163   builtin and then its argument prototype would still apply.  */
42164#ifdef __cplusplus
42165extern "C"
42166#endif
42167char lerc_decode ();
42168int
42169main ()
42170{
42171return lerc_decode ();
42172  ;
42173  return 0;
42174}
42175_ACEOF
42176if ac_fn_c_try_link "$LINENO"; then :
42177  eval "$as_ac_Lib=yes"
42178else
42179  eval "$as_ac_Lib=no"
42180fi
42181rm -f core conftest.err conftest.$ac_objext \
42182    conftest$ac_exeext conftest.$ac_ext
42183LIBS=$ac_check_lib_save_LIBS
42184fi
42185eval ac_res=\$$as_ac_Lib
42186	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
42187$as_echo "$ac_res" >&6; }
42188if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
42189  lerc_lib=yes
42190else
42191  lerc_lib=no
42192fi
42193
42194  fi
42195  if test "$lerc_lib" = "no"; then
42196    as_fn_error $? "lerc library not found" "$LINENO" 5
42197  fi
42198
42199  LIBS="-L$with_lerc/lib -l$lerc_lib_name $ORIG_LIBS"
42200
42201  if ! test -f "$with_lerc/include/Lerc_c_api.h"; then
42202    as_fn_error $? "Liblerc headers not found" "$LINENO" 5
42203  fi
42204
42205  HAVE_LERC=external
42206  LERC_INCLUDE="-I$with_lerc/include"
42207fi
42208
42209HAVE_LERC=$HAVE_LERC
42210
42211LERC_INCLUDE=$LERC_INCLUDE
42212
42213
42214
42215
42216# Check whether --with-null was given.
42217if test "${with_null+set}" = set; then :
42218  withval=$with_null;
42219fi
42220
42221
42222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NULL" >&5
42223$as_echo_n "checking for NULL... " >&6; }
42224if test "$with_null" = "yes" ; then
42225    OPT_GDAL_FORMATS="null $OPT_GDAL_FORMATS"
42226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
42227$as_echo "enabled" >&6; }
42228else
42229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42230$as_echo "disabled" >&6; }
42231fi
42232
42233
42234
42235# Check whether --with-exr was given.
42236if test "${with_exr+set}" = set; then :
42237  withval=$with_exr;
42238fi
42239
42240
42241HAVE_EXR=no
42242EXR_CFLAGS=""
42243
42244if test "$with_exr" = "no" ; then
42245
42246  { $as_echo "$as_me:${as_lineno-$LINENO}: EXR support disabled." >&5
42247$as_echo "$as_me: EXR support disabled." >&6;}
42248
42249else
42250
42251
42252
42253if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
42254	if test -n "$ac_tool_prefix"; then
42255  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
42256set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
42257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42258$as_echo_n "checking for $ac_word... " >&6; }
42259if ${ac_cv_path_PKG_CONFIG+:} false; then :
42260  $as_echo_n "(cached) " >&6
42261else
42262  case $PKG_CONFIG in
42263  [\\/]* | ?:[\\/]*)
42264  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
42265  ;;
42266  *)
42267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42268for as_dir in $PATH
42269do
42270  IFS=$as_save_IFS
42271  test -z "$as_dir" && as_dir=.
42272    for ac_exec_ext in '' $ac_executable_extensions; do
42273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42274    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
42275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42276    break 2
42277  fi
42278done
42279  done
42280IFS=$as_save_IFS
42281
42282  ;;
42283esac
42284fi
42285PKG_CONFIG=$ac_cv_path_PKG_CONFIG
42286if test -n "$PKG_CONFIG"; then
42287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
42288$as_echo "$PKG_CONFIG" >&6; }
42289else
42290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42291$as_echo "no" >&6; }
42292fi
42293
42294
42295fi
42296if test -z "$ac_cv_path_PKG_CONFIG"; then
42297  ac_pt_PKG_CONFIG=$PKG_CONFIG
42298  # Extract the first word of "pkg-config", so it can be a program name with args.
42299set dummy pkg-config; ac_word=$2
42300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42301$as_echo_n "checking for $ac_word... " >&6; }
42302if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
42303  $as_echo_n "(cached) " >&6
42304else
42305  case $ac_pt_PKG_CONFIG in
42306  [\\/]* | ?:[\\/]*)
42307  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
42308  ;;
42309  *)
42310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42311for as_dir in $PATH
42312do
42313  IFS=$as_save_IFS
42314  test -z "$as_dir" && as_dir=.
42315    for ac_exec_ext in '' $ac_executable_extensions; do
42316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42317    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
42318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42319    break 2
42320  fi
42321done
42322  done
42323IFS=$as_save_IFS
42324
42325  ;;
42326esac
42327fi
42328ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
42329if test -n "$ac_pt_PKG_CONFIG"; then
42330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
42331$as_echo "$ac_pt_PKG_CONFIG" >&6; }
42332else
42333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42334$as_echo "no" >&6; }
42335fi
42336
42337  if test "x$ac_pt_PKG_CONFIG" = x; then
42338    PKG_CONFIG=""
42339  else
42340    case $cross_compiling:$ac_tool_warned in
42341yes:)
42342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42344ac_tool_warned=yes ;;
42345esac
42346    PKG_CONFIG=$ac_pt_PKG_CONFIG
42347  fi
42348else
42349  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
42350fi
42351
42352fi
42353if test -n "$PKG_CONFIG"; then
42354	_pkg_min_version=0.21
42355	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
42356$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
42357	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
42358		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42359$as_echo "yes" >&6; }
42360	else
42361		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42362$as_echo "no" >&6; }
42363		PKG_CONFIG=""
42364	fi
42365
42366fi
42367
42368pkg_failed=no
42369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXR" >&5
42370$as_echo_n "checking for EXR... " >&6; }
42371
42372if test -n "$PKG_CONFIG"; then
42373    if test -n "$EXR_CFLAGS"; then
42374        pkg_cv_EXR_CFLAGS="$EXR_CFLAGS"
42375    else
42376        if test -n "$PKG_CONFIG" && \
42377    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"OpenEXR >= 2.2\""; } >&5
42378  ($PKG_CONFIG --exists --print-errors "OpenEXR >= 2.2") 2>&5
42379  ac_status=$?
42380  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42381  test $ac_status = 0; }; then
42382  pkg_cv_EXR_CFLAGS=`$PKG_CONFIG --cflags "OpenEXR >= 2.2" 2>/dev/null`
42383else
42384  pkg_failed=yes
42385fi
42386    fi
42387else
42388	pkg_failed=untried
42389fi
42390if test -n "$PKG_CONFIG"; then
42391    if test -n "$EXR_LIBS"; then
42392        pkg_cv_EXR_LIBS="$EXR_LIBS"
42393    else
42394        if test -n "$PKG_CONFIG" && \
42395    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"OpenEXR >= 2.2\""; } >&5
42396  ($PKG_CONFIG --exists --print-errors "OpenEXR >= 2.2") 2>&5
42397  ac_status=$?
42398  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42399  test $ac_status = 0; }; then
42400  pkg_cv_EXR_LIBS=`$PKG_CONFIG --libs "OpenEXR >= 2.2" 2>/dev/null`
42401else
42402  pkg_failed=yes
42403fi
42404    fi
42405else
42406	pkg_failed=untried
42407fi
42408
42409
42410
42411if test $pkg_failed = yes; then
42412
42413if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42414        _pkg_short_errors_supported=yes
42415else
42416        _pkg_short_errors_supported=no
42417fi
42418        if test $_pkg_short_errors_supported = yes; then
42419	        EXR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "OpenEXR >= 2.2"`
42420        else
42421	        EXR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "OpenEXR >= 2.2"`
42422        fi
42423	# Put the nasty error message in config.log where it belongs
42424	echo "$EXR_PKG_ERRORS" >&5
42425
42426	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42427$as_echo "no" >&6; }
42428                HAVE_EXR=no
42429elif test $pkg_failed = untried; then
42430	HAVE_EXR=no
42431else
42432	EXR_CFLAGS=$pkg_cv_EXR_CFLAGS
42433	EXR_LIBS=$pkg_cv_EXR_LIBS
42434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42435$as_echo "yes" >&6; }
42436	HAVE_EXR=yes
42437fi
42438
42439  if test -n "$EXR_CFLAGS"; then
42440
42441    # Test that the package found is for the right architecture
42442    saved_LIBS="$LIBS"
42443    LIBS="$EXR_LIBS"
42444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ImfTiledInputReadTile in -lIlmImf" >&5
42445$as_echo_n "checking for ImfTiledInputReadTile in -lIlmImf... " >&6; }
42446if ${ac_cv_lib_IlmImf_ImfTiledInputReadTile+:} false; then :
42447  $as_echo_n "(cached) " >&6
42448else
42449  ac_check_lib_save_LIBS=$LIBS
42450LIBS="-lIlmImf  $LIBS"
42451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42452/* end confdefs.h.  */
42453
42454/* Override any GCC internal prototype to avoid an error.
42455   Use char because int might match the return type of a GCC
42456   builtin and then its argument prototype would still apply.  */
42457#ifdef __cplusplus
42458extern "C"
42459#endif
42460char ImfTiledInputReadTile ();
42461int
42462main ()
42463{
42464return ImfTiledInputReadTile ();
42465  ;
42466  return 0;
42467}
42468_ACEOF
42469if ac_fn_c_try_link "$LINENO"; then :
42470  ac_cv_lib_IlmImf_ImfTiledInputReadTile=yes
42471else
42472  ac_cv_lib_IlmImf_ImfTiledInputReadTile=no
42473fi
42474rm -f core conftest.err conftest.$ac_objext \
42475    conftest$ac_exeext conftest.$ac_ext
42476LIBS=$ac_check_lib_save_LIBS
42477fi
42478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_IlmImf_ImfTiledInputReadTile" >&5
42479$as_echo "$ac_cv_lib_IlmImf_ImfTiledInputReadTile" >&6; }
42480if test "x$ac_cv_lib_IlmImf_ImfTiledInputReadTile" = xyes; then :
42481  HAVE_EXR=yes
42482else
42483  HAVE_EXR=no
42484fi
42485
42486    LIBS="$saved_LIBS"
42487
42488    if test "$HAVE_EXR" = "yes"; then
42489        OPT_GDAL_FORMATS="exr $OPT_GDAL_FORMATS"
42490        LIBS="$EXR_LIBS $LIBS"
42491    else
42492        EXR_CFLAGS=""
42493    fi
42494  fi
42495fi
42496
42497EXR_CFLAGS=$EXR_CFLAGS
42498
42499
42500
42501
42502# Check whether --with-heif was given.
42503if test "${with_heif+set}" = set; then :
42504  withval=$with_heif;
42505fi
42506
42507
42508HAVE_HEIF=no
42509HEIF_CFLAGS=""
42510
42511if test "$with_heif" = "no" ; then
42512
42513  { $as_echo "$as_me:${as_lineno-$LINENO}: HEIF support disabled." >&5
42514$as_echo "$as_me: HEIF support disabled." >&6;}
42515
42516else
42517
42518
42519
42520if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
42521	if test -n "$ac_tool_prefix"; then
42522  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
42523set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
42524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42525$as_echo_n "checking for $ac_word... " >&6; }
42526if ${ac_cv_path_PKG_CONFIG+:} false; then :
42527  $as_echo_n "(cached) " >&6
42528else
42529  case $PKG_CONFIG in
42530  [\\/]* | ?:[\\/]*)
42531  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
42532  ;;
42533  *)
42534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42535for as_dir in $PATH
42536do
42537  IFS=$as_save_IFS
42538  test -z "$as_dir" && as_dir=.
42539    for ac_exec_ext in '' $ac_executable_extensions; do
42540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42541    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
42542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42543    break 2
42544  fi
42545done
42546  done
42547IFS=$as_save_IFS
42548
42549  ;;
42550esac
42551fi
42552PKG_CONFIG=$ac_cv_path_PKG_CONFIG
42553if test -n "$PKG_CONFIG"; then
42554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
42555$as_echo "$PKG_CONFIG" >&6; }
42556else
42557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42558$as_echo "no" >&6; }
42559fi
42560
42561
42562fi
42563if test -z "$ac_cv_path_PKG_CONFIG"; then
42564  ac_pt_PKG_CONFIG=$PKG_CONFIG
42565  # Extract the first word of "pkg-config", so it can be a program name with args.
42566set dummy pkg-config; ac_word=$2
42567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42568$as_echo_n "checking for $ac_word... " >&6; }
42569if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
42570  $as_echo_n "(cached) " >&6
42571else
42572  case $ac_pt_PKG_CONFIG in
42573  [\\/]* | ?:[\\/]*)
42574  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
42575  ;;
42576  *)
42577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42578for as_dir in $PATH
42579do
42580  IFS=$as_save_IFS
42581  test -z "$as_dir" && as_dir=.
42582    for ac_exec_ext in '' $ac_executable_extensions; do
42583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42584    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
42585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42586    break 2
42587  fi
42588done
42589  done
42590IFS=$as_save_IFS
42591
42592  ;;
42593esac
42594fi
42595ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
42596if test -n "$ac_pt_PKG_CONFIG"; then
42597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
42598$as_echo "$ac_pt_PKG_CONFIG" >&6; }
42599else
42600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42601$as_echo "no" >&6; }
42602fi
42603
42604  if test "x$ac_pt_PKG_CONFIG" = x; then
42605    PKG_CONFIG=""
42606  else
42607    case $cross_compiling:$ac_tool_warned in
42608yes:)
42609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42611ac_tool_warned=yes ;;
42612esac
42613    PKG_CONFIG=$ac_pt_PKG_CONFIG
42614  fi
42615else
42616  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
42617fi
42618
42619fi
42620if test -n "$PKG_CONFIG"; then
42621	_pkg_min_version=0.21
42622	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
42623$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
42624	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
42625		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42626$as_echo "yes" >&6; }
42627	else
42628		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42629$as_echo "no" >&6; }
42630		PKG_CONFIG=""
42631	fi
42632
42633fi
42634
42635pkg_failed=no
42636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEIF" >&5
42637$as_echo_n "checking for HEIF... " >&6; }
42638
42639if test -n "$PKG_CONFIG"; then
42640    if test -n "$HEIF_CFLAGS"; then
42641        pkg_cv_HEIF_CFLAGS="$HEIF_CFLAGS"
42642    else
42643        if test -n "$PKG_CONFIG" && \
42644    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif >= 1.1\""; } >&5
42645  ($PKG_CONFIG --exists --print-errors "libheif >= 1.1") 2>&5
42646  ac_status=$?
42647  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42648  test $ac_status = 0; }; then
42649  pkg_cv_HEIF_CFLAGS=`$PKG_CONFIG --cflags "libheif >= 1.1" 2>/dev/null`
42650else
42651  pkg_failed=yes
42652fi
42653    fi
42654else
42655	pkg_failed=untried
42656fi
42657if test -n "$PKG_CONFIG"; then
42658    if test -n "$HEIF_LIBS"; then
42659        pkg_cv_HEIF_LIBS="$HEIF_LIBS"
42660    else
42661        if test -n "$PKG_CONFIG" && \
42662    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif >= 1.1\""; } >&5
42663  ($PKG_CONFIG --exists --print-errors "libheif >= 1.1") 2>&5
42664  ac_status=$?
42665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42666  test $ac_status = 0; }; then
42667  pkg_cv_HEIF_LIBS=`$PKG_CONFIG --libs "libheif >= 1.1" 2>/dev/null`
42668else
42669  pkg_failed=yes
42670fi
42671    fi
42672else
42673	pkg_failed=untried
42674fi
42675
42676
42677
42678if test $pkg_failed = yes; then
42679
42680if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42681        _pkg_short_errors_supported=yes
42682else
42683        _pkg_short_errors_supported=no
42684fi
42685        if test $_pkg_short_errors_supported = yes; then
42686	        HEIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libheif >= 1.1"`
42687        else
42688	        HEIF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libheif >= 1.1"`
42689        fi
42690	# Put the nasty error message in config.log where it belongs
42691	echo "$HEIF_PKG_ERRORS" >&5
42692
42693	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42694$as_echo "no" >&6; }
42695                HAVE_HEIF=no
42696elif test $pkg_failed = untried; then
42697	HAVE_HEIF=no
42698else
42699	HEIF_CFLAGS=$pkg_cv_HEIF_CFLAGS
42700	HEIF_LIBS=$pkg_cv_HEIF_LIBS
42701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42702$as_echo "yes" >&6; }
42703	:
42704fi
42705
42706  if test -n "$HEIF_LIBS"; then
42707
42708    # Test that the package found is for the right architecture
42709    saved_LIBS="$LIBS"
42710    LIBS="$HEIF_LIBS"
42711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for heif_context_get_list_of_top_level_image_IDs in -lheif" >&5
42712$as_echo_n "checking for heif_context_get_list_of_top_level_image_IDs in -lheif... " >&6; }
42713if ${ac_cv_lib_heif_heif_context_get_list_of_top_level_image_IDs+:} false; then :
42714  $as_echo_n "(cached) " >&6
42715else
42716  ac_check_lib_save_LIBS=$LIBS
42717LIBS="-lheif  $LIBS"
42718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42719/* end confdefs.h.  */
42720
42721/* Override any GCC internal prototype to avoid an error.
42722   Use char because int might match the return type of a GCC
42723   builtin and then its argument prototype would still apply.  */
42724#ifdef __cplusplus
42725extern "C"
42726#endif
42727char heif_context_get_list_of_top_level_image_IDs ();
42728int
42729main ()
42730{
42731return heif_context_get_list_of_top_level_image_IDs ();
42732  ;
42733  return 0;
42734}
42735_ACEOF
42736if ac_fn_c_try_link "$LINENO"; then :
42737  ac_cv_lib_heif_heif_context_get_list_of_top_level_image_IDs=yes
42738else
42739  ac_cv_lib_heif_heif_context_get_list_of_top_level_image_IDs=no
42740fi
42741rm -f core conftest.err conftest.$ac_objext \
42742    conftest$ac_exeext conftest.$ac_ext
42743LIBS=$ac_check_lib_save_LIBS
42744fi
42745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_heif_heif_context_get_list_of_top_level_image_IDs" >&5
42746$as_echo "$ac_cv_lib_heif_heif_context_get_list_of_top_level_image_IDs" >&6; }
42747if test "x$ac_cv_lib_heif_heif_context_get_list_of_top_level_image_IDs" = xyes; then :
42748  HAVE_HEIF=yes
42749else
42750  HAVE_HEIF=no
42751fi
42752
42753    LIBS="$saved_LIBS"
42754
42755    if test "$HAVE_HEIF" = "yes"; then
42756        OPT_GDAL_FORMATS="heif $OPT_GDAL_FORMATS"
42757        LIBS="$HEIF_LIBS $LIBS"
42758    else
42759        HEIF_CFLAGS=""
42760    fi
42761  fi
42762fi
42763
42764HEIF_CFLAGS=$HEIF_CFLAGS
42765
42766
42767
42768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sprintf can be overloaded for GDAL compilation" >&5
42769$as_echo_n "checking if sprintf can be overloaded for GDAL compilation... " >&6; }
42770echo '#define _XOPEN_SOURCE' > testdeprecated.cpp
42771echo '#include <vector>' >> testdeprecated.cpp
42772echo '#include <stdio.h>' >> testdeprecated.cpp
42773echo 'extern "C"' >> testdeprecated.cpp
42774echo '{' >> testdeprecated.cpp
42775echo 'int sprintf(char *str, const char* fmt, ...);' >> testdeprecated.cpp
42776echo '}' >> testdeprecated.cpp
42777${CXX} ${CXXFLAGS} ${CPPFLAGS} testdeprecated.cpp -c 2>/dev/null
42778RETVAL=$?
42779if test $RETVAL -eq 0; then
42780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42781$as_echo "yes" >&6; }
42782else
42783    CPPFLAGS="$CPPFLAGS -DDONT_DEPRECATE_SPRINTF"
42784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42785$as_echo "no" >&6; }
42786fi
42787rm -f testdeprecated.*
42788rm -f testdeprecated
42789
42790case "${host_os}" in
42791    mingw32*)
42792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if mingw supports wmain" >&5
42793$as_echo_n "checking if mingw supports wmain... " >&6; }
42794        rm -f testwmain*
42795        echo '#include <wchar.h>' > testwmain.cpp
42796        echo '#include <stdlib.h>' >> testwmain.cpp
42797        echo 'extern "C" int wmain( int argc, wchar_t ** argv_w );' >> testwmain.cpp
42798        echo 'extern "C" int wmain( int , wchar_t **  ) { return 0; } ' >> testwmain.cpp
42799        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} testwmain.cpp -o testwmain.exe -municode 2>/dev/null
42800        RETVAL=$?
42801        rm -f testwmain*
42802        if test $RETVAL -eq 0; then
42803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42804$as_echo "yes" >&6; }
42805            CXXFLAGS="$CXXFLAGS -DSUPPORTS_WMAIN"
42806            LDFLAGS="$LDFLAGS -municode"
42807        else
42808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42809$as_echo "no" >&6; }
42810        fi
42811        ;;
42812    *)
42813        ;;
42814esac
42815
42816ac_config_files="$ac_config_files GDALmake.opt"
42817
42818
42819
42820test "x$prefix" = xNONE && prefix=$ac_default_prefix
42821# Let make expand exec_prefix.
42822test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
42823
42824DEFS=-DHAVE_CONFIG_H
42825
42826ac_libobjs=
42827ac_ltlibobjs=
42828U=
42829for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
42830  # 1. Remove the extension, and $U if already installed.
42831  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
42832  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
42833  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
42834  #    will be set to the directory where LIBOBJS objects are built.
42835  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
42836  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
42837done
42838LIBOBJS=$ac_libobjs
42839
42840LTLIBOBJS=$ac_ltlibobjs
42841
42842
42843
42844
42845: "${CONFIG_STATUS=./config.status}"
42846ac_write_fail=0
42847ac_clean_files_save=$ac_clean_files
42848ac_clean_files="$ac_clean_files $CONFIG_STATUS"
42849{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
42850$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
42851as_write_fail=0
42852cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
42853#! $SHELL
42854# Generated by $as_me.
42855# Run this file to recreate the current configuration.
42856# Compiler output produced by configure, useful for debugging
42857# configure, is in config.log if it exists.
42858
42859debug=false
42860ac_cs_recheck=false
42861ac_cs_silent=false
42862
42863SHELL=\${CONFIG_SHELL-$SHELL}
42864export SHELL
42865_ASEOF
42866cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
42867## -------------------- ##
42868## M4sh Initialization. ##
42869## -------------------- ##
42870
42871# Be more Bourne compatible
42872DUALCASE=1; export DUALCASE # for MKS sh
42873if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
42874  emulate sh
42875  NULLCMD=:
42876  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
42877  # is contrary to our usage.  Disable this feature.
42878  alias -g '${1+"$@"}'='"$@"'
42879  setopt NO_GLOB_SUBST
42880else
42881  case `(set -o) 2>/dev/null` in #(
42882  *posix*) :
42883    set -o posix ;; #(
42884  *) :
42885     ;;
42886esac
42887fi
42888
42889
42890as_nl='
42891'
42892export as_nl
42893# Printing a long string crashes Solaris 7 /usr/bin/printf.
42894as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42895as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42896as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42897# Prefer a ksh shell builtin over an external printf program on Solaris,
42898# but without wasting forks for bash or zsh.
42899if test -z "$BASH_VERSION$ZSH_VERSION" \
42900    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
42901  as_echo='print -r --'
42902  as_echo_n='print -rn --'
42903elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
42904  as_echo='printf %s\n'
42905  as_echo_n='printf %s'
42906else
42907  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
42908    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
42909    as_echo_n='/usr/ucb/echo -n'
42910  else
42911    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
42912    as_echo_n_body='eval
42913      arg=$1;
42914      case $arg in #(
42915      *"$as_nl"*)
42916	expr "X$arg" : "X\\(.*\\)$as_nl";
42917	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
42918      esac;
42919      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
42920    '
42921    export as_echo_n_body
42922    as_echo_n='sh -c $as_echo_n_body as_echo'
42923  fi
42924  export as_echo_body
42925  as_echo='sh -c $as_echo_body as_echo'
42926fi
42927
42928# The user is always right.
42929if test "${PATH_SEPARATOR+set}" != set; then
42930  PATH_SEPARATOR=:
42931  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
42932    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
42933      PATH_SEPARATOR=';'
42934  }
42935fi
42936
42937
42938# IFS
42939# We need space, tab and new line, in precisely that order.  Quoting is
42940# there to prevent editors from complaining about space-tab.
42941# (If _AS_PATH_WALK were called with IFS unset, it would disable word
42942# splitting by setting IFS to empty value.)
42943IFS=" ""	$as_nl"
42944
42945# Find who we are.  Look in the path if we contain no directory separator.
42946as_myself=
42947case $0 in #((
42948  *[\\/]* ) as_myself=$0 ;;
42949  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42950for as_dir in $PATH
42951do
42952  IFS=$as_save_IFS
42953  test -z "$as_dir" && as_dir=.
42954    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
42955  done
42956IFS=$as_save_IFS
42957
42958     ;;
42959esac
42960# We did not find ourselves, most probably we were run as `sh COMMAND'
42961# in which case we are not to be found in the path.
42962if test "x$as_myself" = x; then
42963  as_myself=$0
42964fi
42965if test ! -f "$as_myself"; then
42966  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
42967  exit 1
42968fi
42969
42970# Unset variables that we do not need and which cause bugs (e.g. in
42971# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
42972# suppresses any "Segmentation fault" message there.  '((' could
42973# trigger a bug in pdksh 5.2.14.
42974for as_var in BASH_ENV ENV MAIL MAILPATH
42975do eval test x\${$as_var+set} = xset \
42976  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
42977done
42978PS1='$ '
42979PS2='> '
42980PS4='+ '
42981
42982# NLS nuisances.
42983LC_ALL=C
42984export LC_ALL
42985LANGUAGE=C
42986export LANGUAGE
42987
42988# CDPATH.
42989(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
42990
42991
42992# as_fn_error STATUS ERROR [LINENO LOG_FD]
42993# ----------------------------------------
42994# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
42995# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
42996# script with STATUS, using 1 if that was 0.
42997as_fn_error ()
42998{
42999  as_status=$1; test $as_status -eq 0 && as_status=1
43000  if test "$4"; then
43001    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
43002    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
43003  fi
43004  $as_echo "$as_me: error: $2" >&2
43005  as_fn_exit $as_status
43006} # as_fn_error
43007
43008
43009# as_fn_set_status STATUS
43010# -----------------------
43011# Set $? to STATUS, without forking.
43012as_fn_set_status ()
43013{
43014  return $1
43015} # as_fn_set_status
43016
43017# as_fn_exit STATUS
43018# -----------------
43019# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
43020as_fn_exit ()
43021{
43022  set +e
43023  as_fn_set_status $1
43024  exit $1
43025} # as_fn_exit
43026
43027# as_fn_unset VAR
43028# ---------------
43029# Portably unset VAR.
43030as_fn_unset ()
43031{
43032  { eval $1=; unset $1;}
43033}
43034as_unset=as_fn_unset
43035# as_fn_append VAR VALUE
43036# ----------------------
43037# Append the text in VALUE to the end of the definition contained in VAR. Take
43038# advantage of any shell optimizations that allow amortized linear growth over
43039# repeated appends, instead of the typical quadratic growth present in naive
43040# implementations.
43041if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
43042  eval 'as_fn_append ()
43043  {
43044    eval $1+=\$2
43045  }'
43046else
43047  as_fn_append ()
43048  {
43049    eval $1=\$$1\$2
43050  }
43051fi # as_fn_append
43052
43053# as_fn_arith ARG...
43054# ------------------
43055# Perform arithmetic evaluation on the ARGs, and store the result in the
43056# global $as_val. Take advantage of shells that can avoid forks. The arguments
43057# must be portable across $(()) and expr.
43058if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
43059  eval 'as_fn_arith ()
43060  {
43061    as_val=$(( $* ))
43062  }'
43063else
43064  as_fn_arith ()
43065  {
43066    as_val=`expr "$@" || test $? -eq 1`
43067  }
43068fi # as_fn_arith
43069
43070
43071if expr a : '\(a\)' >/dev/null 2>&1 &&
43072   test "X`expr 00001 : '.*\(...\)'`" = X001; then
43073  as_expr=expr
43074else
43075  as_expr=false
43076fi
43077
43078if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
43079  as_basename=basename
43080else
43081  as_basename=false
43082fi
43083
43084if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
43085  as_dirname=dirname
43086else
43087  as_dirname=false
43088fi
43089
43090as_me=`$as_basename -- "$0" ||
43091$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
43092	 X"$0" : 'X\(//\)$' \| \
43093	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
43094$as_echo X/"$0" |
43095    sed '/^.*\/\([^/][^/]*\)\/*$/{
43096	    s//\1/
43097	    q
43098	  }
43099	  /^X\/\(\/\/\)$/{
43100	    s//\1/
43101	    q
43102	  }
43103	  /^X\/\(\/\).*/{
43104	    s//\1/
43105	    q
43106	  }
43107	  s/.*/./; q'`
43108
43109# Avoid depending upon Character Ranges.
43110as_cr_letters='abcdefghijklmnopqrstuvwxyz'
43111as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
43112as_cr_Letters=$as_cr_letters$as_cr_LETTERS
43113as_cr_digits='0123456789'
43114as_cr_alnum=$as_cr_Letters$as_cr_digits
43115
43116ECHO_C= ECHO_N= ECHO_T=
43117case `echo -n x` in #(((((
43118-n*)
43119  case `echo 'xy\c'` in
43120  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
43121  xy)  ECHO_C='\c';;
43122  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
43123       ECHO_T='	';;
43124  esac;;
43125*)
43126  ECHO_N='-n';;
43127esac
43128
43129rm -f conf$$ conf$$.exe conf$$.file
43130if test -d conf$$.dir; then
43131  rm -f conf$$.dir/conf$$.file
43132else
43133  rm -f conf$$.dir
43134  mkdir conf$$.dir 2>/dev/null
43135fi
43136if (echo >conf$$.file) 2>/dev/null; then
43137  if ln -s conf$$.file conf$$ 2>/dev/null; then
43138    as_ln_s='ln -s'
43139    # ... but there are two gotchas:
43140    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
43141    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
43142    # In both cases, we have to default to `cp -pR'.
43143    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
43144      as_ln_s='cp -pR'
43145  elif ln conf$$.file conf$$ 2>/dev/null; then
43146    as_ln_s=ln
43147  else
43148    as_ln_s='cp -pR'
43149  fi
43150else
43151  as_ln_s='cp -pR'
43152fi
43153rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
43154rmdir conf$$.dir 2>/dev/null
43155
43156
43157# as_fn_mkdir_p
43158# -------------
43159# Create "$as_dir" as a directory, including parents if necessary.
43160as_fn_mkdir_p ()
43161{
43162
43163  case $as_dir in #(
43164  -*) as_dir=./$as_dir;;
43165  esac
43166  test -d "$as_dir" || eval $as_mkdir_p || {
43167    as_dirs=
43168    while :; do
43169      case $as_dir in #(
43170      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
43171      *) as_qdir=$as_dir;;
43172      esac
43173      as_dirs="'$as_qdir' $as_dirs"
43174      as_dir=`$as_dirname -- "$as_dir" ||
43175$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
43176	 X"$as_dir" : 'X\(//\)[^/]' \| \
43177	 X"$as_dir" : 'X\(//\)$' \| \
43178	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
43179$as_echo X"$as_dir" |
43180    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
43181	    s//\1/
43182	    q
43183	  }
43184	  /^X\(\/\/\)[^/].*/{
43185	    s//\1/
43186	    q
43187	  }
43188	  /^X\(\/\/\)$/{
43189	    s//\1/
43190	    q
43191	  }
43192	  /^X\(\/\).*/{
43193	    s//\1/
43194	    q
43195	  }
43196	  s/.*/./; q'`
43197      test -d "$as_dir" && break
43198    done
43199    test -z "$as_dirs" || eval "mkdir $as_dirs"
43200  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
43201
43202
43203} # as_fn_mkdir_p
43204if mkdir -p . 2>/dev/null; then
43205  as_mkdir_p='mkdir -p "$as_dir"'
43206else
43207  test -d ./-p && rmdir ./-p
43208  as_mkdir_p=false
43209fi
43210
43211
43212# as_fn_executable_p FILE
43213# -----------------------
43214# Test if FILE is an executable regular file.
43215as_fn_executable_p ()
43216{
43217  test -f "$1" && test -x "$1"
43218} # as_fn_executable_p
43219as_test_x='test -x'
43220as_executable_p=as_fn_executable_p
43221
43222# Sed expression to map a string onto a valid CPP name.
43223as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
43224
43225# Sed expression to map a string onto a valid variable name.
43226as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
43227
43228
43229exec 6>&1
43230## ----------------------------------- ##
43231## Main body of $CONFIG_STATUS script. ##
43232## ----------------------------------- ##
43233_ASEOF
43234test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
43235
43236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43237# Save the log message, to keep $0 and so on meaningful, and to
43238# report actual input values of CONFIG_FILES etc. instead of their
43239# values after options handling.
43240ac_log="
43241This file was extended by $as_me, which was
43242generated by GNU Autoconf 2.69.  Invocation command line was
43243
43244  CONFIG_FILES    = $CONFIG_FILES
43245  CONFIG_HEADERS  = $CONFIG_HEADERS
43246  CONFIG_LINKS    = $CONFIG_LINKS
43247  CONFIG_COMMANDS = $CONFIG_COMMANDS
43248  $ $0 $@
43249
43250on `(hostname || uname -n) 2>/dev/null | sed 1q`
43251"
43252
43253_ACEOF
43254
43255case $ac_config_files in *"
43256"*) set x $ac_config_files; shift; ac_config_files=$*;;
43257esac
43258
43259case $ac_config_headers in *"
43260"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
43261esac
43262
43263
43264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43265# Files that config.status was made for.
43266config_files="$ac_config_files"
43267config_headers="$ac_config_headers"
43268config_commands="$ac_config_commands"
43269
43270_ACEOF
43271
43272cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43273ac_cs_usage="\
43274\`$as_me' instantiates files and other configuration actions
43275from templates according to the current configuration.  Unless the files
43276and actions are specified as TAGs, all are instantiated by default.
43277
43278Usage: $0 [OPTION]... [TAG]...
43279
43280  -h, --help       print this help, then exit
43281  -V, --version    print version number and configuration settings, then exit
43282      --config     print configuration, then exit
43283  -q, --quiet, --silent
43284                   do not print progress messages
43285  -d, --debug      don't remove temporary files
43286      --recheck    update $as_me by reconfiguring in the same conditions
43287      --file=FILE[:TEMPLATE]
43288                   instantiate the configuration file FILE
43289      --header=FILE[:TEMPLATE]
43290                   instantiate the configuration header FILE
43291
43292Configuration files:
43293$config_files
43294
43295Configuration headers:
43296$config_headers
43297
43298Configuration commands:
43299$config_commands
43300
43301Report bugs to the package provider."
43302
43303_ACEOF
43304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43305ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
43306ac_cs_version="\\
43307config.status
43308configured by $0, generated by GNU Autoconf 2.69,
43309  with options \\"\$ac_cs_config\\"
43310
43311Copyright (C) 2012 Free Software Foundation, Inc.
43312This config.status script is free software; the Free Software Foundation
43313gives unlimited permission to copy, distribute and modify it."
43314
43315ac_pwd='$ac_pwd'
43316srcdir='$srcdir'
43317AWK='$AWK'
43318test -n "\$AWK" || AWK=awk
43319_ACEOF
43320
43321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43322# The default lists apply if the user does not specify any file.
43323ac_need_defaults=:
43324while test $# != 0
43325do
43326  case $1 in
43327  --*=?*)
43328    ac_option=`expr "X$1" : 'X\([^=]*\)='`
43329    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
43330    ac_shift=:
43331    ;;
43332  --*=)
43333    ac_option=`expr "X$1" : 'X\([^=]*\)='`
43334    ac_optarg=
43335    ac_shift=:
43336    ;;
43337  *)
43338    ac_option=$1
43339    ac_optarg=$2
43340    ac_shift=shift
43341    ;;
43342  esac
43343
43344  case $ac_option in
43345  # Handling of the options.
43346  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
43347    ac_cs_recheck=: ;;
43348  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
43349    $as_echo "$ac_cs_version"; exit ;;
43350  --config | --confi | --conf | --con | --co | --c )
43351    $as_echo "$ac_cs_config"; exit ;;
43352  --debug | --debu | --deb | --de | --d | -d )
43353    debug=: ;;
43354  --file | --fil | --fi | --f )
43355    $ac_shift
43356    case $ac_optarg in
43357    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
43358    '') as_fn_error $? "missing file argument" ;;
43359    esac
43360    as_fn_append CONFIG_FILES " '$ac_optarg'"
43361    ac_need_defaults=false;;
43362  --header | --heade | --head | --hea )
43363    $ac_shift
43364    case $ac_optarg in
43365    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
43366    esac
43367    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
43368    ac_need_defaults=false;;
43369  --he | --h)
43370    # Conflict between --help and --header
43371    as_fn_error $? "ambiguous option: \`$1'
43372Try \`$0 --help' for more information.";;
43373  --help | --hel | -h )
43374    $as_echo "$ac_cs_usage"; exit ;;
43375  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
43376  | -silent | --silent | --silen | --sile | --sil | --si | --s)
43377    ac_cs_silent=: ;;
43378
43379  # This is an error.
43380  -*) as_fn_error $? "unrecognized option: \`$1'
43381Try \`$0 --help' for more information." ;;
43382
43383  *) as_fn_append ac_config_targets " $1"
43384     ac_need_defaults=false ;;
43385
43386  esac
43387  shift
43388done
43389
43390ac_configure_extra_args=
43391
43392if $ac_cs_silent; then
43393  exec 6>/dev/null
43394  ac_configure_extra_args="$ac_configure_extra_args --silent"
43395fi
43396
43397_ACEOF
43398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43399if \$ac_cs_recheck; then
43400  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
43401  shift
43402  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
43403  CONFIG_SHELL='$SHELL'
43404  export CONFIG_SHELL
43405  exec "\$@"
43406fi
43407
43408_ACEOF
43409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43410exec 5>>config.log
43411{
43412  echo
43413  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
43414## Running $as_me. ##
43415_ASBOX
43416  $as_echo "$ac_log"
43417} >&5
43418
43419_ACEOF
43420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43421#
43422# INIT-COMMANDS
43423#
43424
43425
43426# The HP-UX ksh and POSIX shell print the target directory to stdout
43427# if CDPATH is set.
43428(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
43429
43430sed_quote_subst='$sed_quote_subst'
43431double_quote_subst='$double_quote_subst'
43432delay_variable_subst='$delay_variable_subst'
43433AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
43434DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
43435OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
43436macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
43437macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
43438enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
43439enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
43440pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
43441enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
43442shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
43443SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
43444ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
43445PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
43446host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
43447host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
43448host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
43449build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
43450build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
43451build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
43452SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
43453Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
43454GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
43455EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
43456FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
43457LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
43458NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
43459LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
43460max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
43461ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
43462exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
43463lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
43464lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
43465lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
43466lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
43467lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
43468reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
43469reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
43470deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
43471file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
43472file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
43473want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
43474sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
43475AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
43476AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
43477archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
43478STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
43479RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
43480old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
43481old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
43482old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
43483lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
43484CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
43485CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
43486compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
43487GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
43488lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
43489lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
43490lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
43491lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
43492lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
43493lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
43494nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
43495lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
43496lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
43497objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
43498MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
43499lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
43500lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
43501lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
43502lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
43503lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
43504need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
43505MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
43506DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
43507NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
43508LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
43509OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
43510OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
43511libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
43512shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
43513extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
43514archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
43515enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
43516export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
43517whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
43518compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
43519old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
43520old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
43521archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
43522archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
43523module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
43524module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
43525with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
43526allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
43527no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
43528hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
43529hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
43530hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
43531hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
43532hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
43533hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
43534hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
43535inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
43536link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
43537always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
43538export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
43539exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
43540include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
43541prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
43542postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
43543file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
43544variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
43545need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
43546need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
43547version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
43548runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
43549shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
43550shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
43551libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
43552library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
43553soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
43554install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
43555postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
43556postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
43557finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
43558finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
43559hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
43560sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
43561configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
43562configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
43563hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
43564enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
43565enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
43566enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
43567old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
43568striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
43569compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
43570predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
43571postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
43572predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
43573postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
43574compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
43575LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
43576reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
43577reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43578old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43579compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
43580GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
43581lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
43582lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
43583lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
43584lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
43585lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
43586archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
43587enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
43588export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
43589whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
43590compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
43591old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43592old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43593archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43594archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43595module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43596module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43597with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
43598allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
43599no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
43600hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
43601hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
43602hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
43603hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
43604hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
43605hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
43606hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
43607inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
43608link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
43609always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
43610export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43611exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
43612include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
43613prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43614postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
43615file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
43616hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
43617compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
43618predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
43619postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
43620predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
43621postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
43622compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
43623
43624LTCC='$LTCC'
43625LTCFLAGS='$LTCFLAGS'
43626compiler='$compiler_DEFAULT'
43627
43628# A function that is used when there is no print builtin or printf.
43629func_fallback_echo ()
43630{
43631  eval 'cat <<_LTECHO_EOF
43632\$1
43633_LTECHO_EOF'
43634}
43635
43636# Quote evaled strings.
43637for var in AS \
43638DLLTOOL \
43639OBJDUMP \
43640SHELL \
43641ECHO \
43642PATH_SEPARATOR \
43643SED \
43644GREP \
43645EGREP \
43646FGREP \
43647LD \
43648NM \
43649LN_S \
43650lt_SP2NL \
43651lt_NL2SP \
43652reload_flag \
43653deplibs_check_method \
43654file_magic_cmd \
43655file_magic_glob \
43656want_nocaseglob \
43657sharedlib_from_linklib_cmd \
43658AR \
43659AR_FLAGS \
43660archiver_list_spec \
43661STRIP \
43662RANLIB \
43663CC \
43664CFLAGS \
43665compiler \
43666lt_cv_sys_global_symbol_pipe \
43667lt_cv_sys_global_symbol_to_cdecl \
43668lt_cv_sys_global_symbol_to_import \
43669lt_cv_sys_global_symbol_to_c_name_address \
43670lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
43671lt_cv_nm_interface \
43672nm_file_list_spec \
43673lt_cv_truncate_bin \
43674lt_prog_compiler_no_builtin_flag \
43675lt_prog_compiler_pic \
43676lt_prog_compiler_wl \
43677lt_prog_compiler_static \
43678lt_cv_prog_compiler_c_o \
43679need_locks \
43680MANIFEST_TOOL \
43681DSYMUTIL \
43682NMEDIT \
43683LIPO \
43684OTOOL \
43685OTOOL64 \
43686shrext_cmds \
43687export_dynamic_flag_spec \
43688whole_archive_flag_spec \
43689compiler_needs_object \
43690with_gnu_ld \
43691allow_undefined_flag \
43692no_undefined_flag \
43693hardcode_libdir_flag_spec \
43694hardcode_libdir_separator \
43695exclude_expsyms \
43696include_expsyms \
43697file_list_spec \
43698variables_saved_for_relink \
43699libname_spec \
43700library_names_spec \
43701soname_spec \
43702install_override_mode \
43703finish_eval \
43704old_striplib \
43705striplib \
43706compiler_lib_search_dirs \
43707predep_objects \
43708postdep_objects \
43709predeps \
43710postdeps \
43711compiler_lib_search_path \
43712LD_CXX \
43713reload_flag_CXX \
43714compiler_CXX \
43715lt_prog_compiler_no_builtin_flag_CXX \
43716lt_prog_compiler_pic_CXX \
43717lt_prog_compiler_wl_CXX \
43718lt_prog_compiler_static_CXX \
43719lt_cv_prog_compiler_c_o_CXX \
43720export_dynamic_flag_spec_CXX \
43721whole_archive_flag_spec_CXX \
43722compiler_needs_object_CXX \
43723with_gnu_ld_CXX \
43724allow_undefined_flag_CXX \
43725no_undefined_flag_CXX \
43726hardcode_libdir_flag_spec_CXX \
43727hardcode_libdir_separator_CXX \
43728exclude_expsyms_CXX \
43729include_expsyms_CXX \
43730file_list_spec_CXX \
43731compiler_lib_search_dirs_CXX \
43732predep_objects_CXX \
43733postdep_objects_CXX \
43734predeps_CXX \
43735postdeps_CXX \
43736compiler_lib_search_path_CXX; do
43737    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
43738    *[\\\\\\\`\\"\\\$]*)
43739      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
43740      ;;
43741    *)
43742      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
43743      ;;
43744    esac
43745done
43746
43747# Double-quote double-evaled strings.
43748for var in reload_cmds \
43749old_postinstall_cmds \
43750old_postuninstall_cmds \
43751old_archive_cmds \
43752extract_expsyms_cmds \
43753old_archive_from_new_cmds \
43754old_archive_from_expsyms_cmds \
43755archive_cmds \
43756archive_expsym_cmds \
43757module_cmds \
43758module_expsym_cmds \
43759export_symbols_cmds \
43760prelink_cmds \
43761postlink_cmds \
43762postinstall_cmds \
43763postuninstall_cmds \
43764finish_cmds \
43765sys_lib_search_path_spec \
43766configure_time_dlsearch_path \
43767configure_time_lt_sys_library_path \
43768reload_cmds_CXX \
43769old_archive_cmds_CXX \
43770old_archive_from_new_cmds_CXX \
43771old_archive_from_expsyms_cmds_CXX \
43772archive_cmds_CXX \
43773archive_expsym_cmds_CXX \
43774module_cmds_CXX \
43775module_expsym_cmds_CXX \
43776export_symbols_cmds_CXX \
43777prelink_cmds_CXX \
43778postlink_cmds_CXX; do
43779    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
43780    *[\\\\\\\`\\"\\\$]*)
43781      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
43782      ;;
43783    *)
43784      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
43785      ;;
43786    esac
43787done
43788
43789ac_aux_dir='$ac_aux_dir'
43790
43791# See if we are running on zsh, and set the options that allow our
43792# commands through without removal of \ escapes INIT.
43793if test -n "\${ZSH_VERSION+set}"; then
43794   setopt NO_GLOB_SUBST
43795fi
43796
43797
43798    PACKAGE='$PACKAGE'
43799    VERSION='$VERSION'
43800    RM='$RM'
43801    ofile='$ofile'
43802
43803
43804
43805
43806
43807
43808_ACEOF
43809
43810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43811
43812# Handling of arguments.
43813for ac_config_target in $ac_config_targets
43814do
43815  case $ac_config_target in
43816    "port/cpl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS port/cpl_config.h:port/cpl_config.h.in" ;;
43817    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
43818    "GDALmake.opt") CONFIG_FILES="$CONFIG_FILES GDALmake.opt" ;;
43819
43820  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
43821  esac
43822done
43823
43824
43825# If the user did not use the arguments to specify the items to instantiate,
43826# then the envvar interface is used.  Set only those that are not.
43827# We use the long form for the default assignment because of an extremely
43828# bizarre bug on SunOS 4.1.3.
43829if $ac_need_defaults; then
43830  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
43831  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
43832  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
43833fi
43834
43835# Have a temporary directory for convenience.  Make it in the build tree
43836# simply because there is no reason against having it here, and in addition,
43837# creating and moving files from /tmp can sometimes cause problems.
43838# Hook for its removal unless debugging.
43839# Note that there is a small window in which the directory will not be cleaned:
43840# after its creation but before its name has been assigned to `$tmp'.
43841$debug ||
43842{
43843  tmp= ac_tmp=
43844  trap 'exit_status=$?
43845  : "${ac_tmp:=$tmp}"
43846  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
43847' 0
43848  trap 'as_fn_exit 1' 1 2 13 15
43849}
43850# Create a (secure) tmp directory for tmp files.
43851
43852{
43853  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
43854  test -d "$tmp"
43855}  ||
43856{
43857  tmp=./conf$$-$RANDOM
43858  (umask 077 && mkdir "$tmp")
43859} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
43860ac_tmp=$tmp
43861
43862# Set up the scripts for CONFIG_FILES section.
43863# No need to generate them if there are no CONFIG_FILES.
43864# This happens for instance with `./config.status config.h'.
43865if test -n "$CONFIG_FILES"; then
43866
43867
43868ac_cr=`echo X | tr X '\015'`
43869# On cygwin, bash can eat \r inside `` if the user requested igncr.
43870# But we know of no other shell where ac_cr would be empty at this
43871# point, so we can use a bashism as a fallback.
43872if test "x$ac_cr" = x; then
43873  eval ac_cr=\$\'\\r\'
43874fi
43875ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
43876if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
43877  ac_cs_awk_cr='\\r'
43878else
43879  ac_cs_awk_cr=$ac_cr
43880fi
43881
43882echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
43883_ACEOF
43884
43885
43886{
43887  echo "cat >conf$$subs.awk <<_ACEOF" &&
43888  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
43889  echo "_ACEOF"
43890} >conf$$subs.sh ||
43891  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
43892ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
43893ac_delim='%!_!# '
43894for ac_last_try in false false false false false :; do
43895  . ./conf$$subs.sh ||
43896    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
43897
43898  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
43899  if test $ac_delim_n = $ac_delim_num; then
43900    break
43901  elif $ac_last_try; then
43902    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
43903  else
43904    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
43905  fi
43906done
43907rm -f conf$$subs.sh
43908
43909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43910cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
43911_ACEOF
43912sed -n '
43913h
43914s/^/S["/; s/!.*/"]=/
43915p
43916g
43917s/^[^!]*!//
43918:repl
43919t repl
43920s/'"$ac_delim"'$//
43921t delim
43922:nl
43923h
43924s/\(.\{148\}\)..*/\1/
43925t more1
43926s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
43927p
43928n
43929b repl
43930:more1
43931s/["\\]/\\&/g; s/^/"/; s/$/"\\/
43932p
43933g
43934s/.\{148\}//
43935t nl
43936:delim
43937h
43938s/\(.\{148\}\)..*/\1/
43939t more2
43940s/["\\]/\\&/g; s/^/"/; s/$/"/
43941p
43942b
43943:more2
43944s/["\\]/\\&/g; s/^/"/; s/$/"\\/
43945p
43946g
43947s/.\{148\}//
43948t delim
43949' <conf$$subs.awk | sed '
43950/^[^""]/{
43951  N
43952  s/\n//
43953}
43954' >>$CONFIG_STATUS || ac_write_fail=1
43955rm -f conf$$subs.awk
43956cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43957_ACAWK
43958cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
43959  for (key in S) S_is_set[key] = 1
43960  FS = ""
43961
43962}
43963{
43964  line = $ 0
43965  nfields = split(line, field, "@")
43966  substed = 0
43967  len = length(field[1])
43968  for (i = 2; i < nfields; i++) {
43969    key = field[i]
43970    keylen = length(key)
43971    if (S_is_set[key]) {
43972      value = S[key]
43973      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
43974      len += length(value) + length(field[++i])
43975      substed = 1
43976    } else
43977      len += 1 + keylen
43978  }
43979
43980  print line
43981}
43982
43983_ACAWK
43984_ACEOF
43985cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43986if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
43987  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
43988else
43989  cat
43990fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
43991  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
43992_ACEOF
43993
43994# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
43995# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
43996# trailing colons and then remove the whole line if VPATH becomes empty
43997# (actually we leave an empty line to preserve line numbers).
43998if test "x$srcdir" = x.; then
43999  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
44000h
44001s///
44002s/^/:/
44003s/[	 ]*$/:/
44004s/:\$(srcdir):/:/g
44005s/:\${srcdir}:/:/g
44006s/:@srcdir@:/:/g
44007s/^:*//
44008s/:*$//
44009x
44010s/\(=[	 ]*\).*/\1/
44011G
44012s/\n//
44013s/^[^=]*=[	 ]*$//
44014}'
44015fi
44016
44017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44018fi # test -n "$CONFIG_FILES"
44019
44020# Set up the scripts for CONFIG_HEADERS section.
44021# No need to generate them if there are no CONFIG_HEADERS.
44022# This happens for instance with `./config.status Makefile'.
44023if test -n "$CONFIG_HEADERS"; then
44024cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
44025BEGIN {
44026_ACEOF
44027
44028# Transform confdefs.h into an awk script `defines.awk', embedded as
44029# here-document in config.status, that substitutes the proper values into
44030# config.h.in to produce config.h.
44031
44032# Create a delimiter string that does not exist in confdefs.h, to ease
44033# handling of long lines.
44034ac_delim='%!_!# '
44035for ac_last_try in false false :; do
44036  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
44037  if test -z "$ac_tt"; then
44038    break
44039  elif $ac_last_try; then
44040    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
44041  else
44042    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
44043  fi
44044done
44045
44046# For the awk script, D is an array of macro values keyed by name,
44047# likewise P contains macro parameters if any.  Preserve backslash
44048# newline sequences.
44049
44050ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
44051sed -n '
44052s/.\{148\}/&'"$ac_delim"'/g
44053t rset
44054:rset
44055s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
44056t def
44057d
44058:def
44059s/\\$//
44060t bsnl
44061s/["\\]/\\&/g
44062s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
44063D["\1"]=" \3"/p
44064s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
44065d
44066:bsnl
44067s/["\\]/\\&/g
44068s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
44069D["\1"]=" \3\\\\\\n"\\/p
44070t cont
44071s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
44072t cont
44073d
44074:cont
44075n
44076s/.\{148\}/&'"$ac_delim"'/g
44077t clear
44078:clear
44079s/\\$//
44080t bsnlc
44081s/["\\]/\\&/g; s/^/"/; s/$/"/p
44082d
44083:bsnlc
44084s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
44085b cont
44086' <confdefs.h | sed '
44087s/'"$ac_delim"'/"\\\
44088"/g' >>$CONFIG_STATUS || ac_write_fail=1
44089
44090cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44091  for (key in D) D_is_set[key] = 1
44092  FS = ""
44093}
44094/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
44095  line = \$ 0
44096  split(line, arg, " ")
44097  if (arg[1] == "#") {
44098    defundef = arg[2]
44099    mac1 = arg[3]
44100  } else {
44101    defundef = substr(arg[1], 2)
44102    mac1 = arg[2]
44103  }
44104  split(mac1, mac2, "(") #)
44105  macro = mac2[1]
44106  prefix = substr(line, 1, index(line, defundef) - 1)
44107  if (D_is_set[macro]) {
44108    # Preserve the white space surrounding the "#".
44109    print prefix "define", macro P[macro] D[macro]
44110    next
44111  } else {
44112    # Replace #undef with comments.  This is necessary, for example,
44113    # in the case of _POSIX_SOURCE, which is predefined and required
44114    # on some systems where configure will not decide to define it.
44115    if (defundef == "undef") {
44116      print "/*", prefix defundef, macro, "*/"
44117      next
44118    }
44119  }
44120}
44121{ print }
44122_ACAWK
44123_ACEOF
44124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44125  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
44126fi # test -n "$CONFIG_HEADERS"
44127
44128
44129eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
44130shift
44131for ac_tag
44132do
44133  case $ac_tag in
44134  :[FHLC]) ac_mode=$ac_tag; continue;;
44135  esac
44136  case $ac_mode$ac_tag in
44137  :[FHL]*:*);;
44138  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
44139  :[FH]-) ac_tag=-:-;;
44140  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
44141  esac
44142  ac_save_IFS=$IFS
44143  IFS=:
44144  set x $ac_tag
44145  IFS=$ac_save_IFS
44146  shift
44147  ac_file=$1
44148  shift
44149
44150  case $ac_mode in
44151  :L) ac_source=$1;;
44152  :[FH])
44153    ac_file_inputs=
44154    for ac_f
44155    do
44156      case $ac_f in
44157      -) ac_f="$ac_tmp/stdin";;
44158      *) # Look for the file first in the build tree, then in the source tree
44159	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
44160	 # because $ac_f cannot contain `:'.
44161	 test -f "$ac_f" ||
44162	   case $ac_f in
44163	   [\\/$]*) false;;
44164	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
44165	   esac ||
44166	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
44167      esac
44168      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
44169      as_fn_append ac_file_inputs " '$ac_f'"
44170    done
44171
44172    # Let's still pretend it is `configure' which instantiates (i.e., don't
44173    # use $as_me), people would be surprised to read:
44174    #    /* config.h.  Generated by config.status.  */
44175    configure_input='Generated from '`
44176	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
44177	`' by configure.'
44178    if test x"$ac_file" != x-; then
44179      configure_input="$ac_file.  $configure_input"
44180      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
44181$as_echo "$as_me: creating $ac_file" >&6;}
44182    fi
44183    # Neutralize special characters interpreted by sed in replacement strings.
44184    case $configure_input in #(
44185    *\&* | *\|* | *\\* )
44186       ac_sed_conf_input=`$as_echo "$configure_input" |
44187       sed 's/[\\\\&|]/\\\\&/g'`;; #(
44188    *) ac_sed_conf_input=$configure_input;;
44189    esac
44190
44191    case $ac_tag in
44192    *:-:* | *:-) cat >"$ac_tmp/stdin" \
44193      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
44194    esac
44195    ;;
44196  esac
44197
44198  ac_dir=`$as_dirname -- "$ac_file" ||
44199$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44200	 X"$ac_file" : 'X\(//\)[^/]' \| \
44201	 X"$ac_file" : 'X\(//\)$' \| \
44202	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
44203$as_echo X"$ac_file" |
44204    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
44205	    s//\1/
44206	    q
44207	  }
44208	  /^X\(\/\/\)[^/].*/{
44209	    s//\1/
44210	    q
44211	  }
44212	  /^X\(\/\/\)$/{
44213	    s//\1/
44214	    q
44215	  }
44216	  /^X\(\/\).*/{
44217	    s//\1/
44218	    q
44219	  }
44220	  s/.*/./; q'`
44221  as_dir="$ac_dir"; as_fn_mkdir_p
44222  ac_builddir=.
44223
44224case "$ac_dir" in
44225.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
44226*)
44227  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
44228  # A ".." for each directory in $ac_dir_suffix.
44229  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
44230  case $ac_top_builddir_sub in
44231  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
44232  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
44233  esac ;;
44234esac
44235ac_abs_top_builddir=$ac_pwd
44236ac_abs_builddir=$ac_pwd$ac_dir_suffix
44237# for backward compatibility:
44238ac_top_builddir=$ac_top_build_prefix
44239
44240case $srcdir in
44241  .)  # We are building in place.
44242    ac_srcdir=.
44243    ac_top_srcdir=$ac_top_builddir_sub
44244    ac_abs_top_srcdir=$ac_pwd ;;
44245  [\\/]* | ?:[\\/]* )  # Absolute name.
44246    ac_srcdir=$srcdir$ac_dir_suffix;
44247    ac_top_srcdir=$srcdir
44248    ac_abs_top_srcdir=$srcdir ;;
44249  *) # Relative name.
44250    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
44251    ac_top_srcdir=$ac_top_build_prefix$srcdir
44252    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
44253esac
44254ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
44255
44256
44257  case $ac_mode in
44258  :F)
44259  #
44260  # CONFIG_FILE
44261  #
44262
44263_ACEOF
44264
44265cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44266# If the template does not know about datarootdir, expand it.
44267# FIXME: This hack should be removed a few years after 2.60.
44268ac_datarootdir_hack=; ac_datarootdir_seen=
44269ac_sed_dataroot='
44270/datarootdir/ {
44271  p
44272  q
44273}
44274/@datadir@/p
44275/@docdir@/p
44276/@infodir@/p
44277/@localedir@/p
44278/@mandir@/p'
44279case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
44280*datarootdir*) ac_datarootdir_seen=yes;;
44281*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
44282  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
44283$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
44284_ACEOF
44285cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44286  ac_datarootdir_hack='
44287  s&@datadir@&$datadir&g
44288  s&@docdir@&$docdir&g
44289  s&@infodir@&$infodir&g
44290  s&@localedir@&$localedir&g
44291  s&@mandir@&$mandir&g
44292  s&\\\${datarootdir}&$datarootdir&g' ;;
44293esac
44294_ACEOF
44295
44296# Neutralize VPATH when `$srcdir' = `.'.
44297# Shell code in configure.ac might set extrasub.
44298# FIXME: do we really want to maintain this feature?
44299cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44300ac_sed_extra="$ac_vpsub
44301$extrasub
44302_ACEOF
44303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44304:t
44305/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
44306s|@configure_input@|$ac_sed_conf_input|;t t
44307s&@top_builddir@&$ac_top_builddir_sub&;t t
44308s&@top_build_prefix@&$ac_top_build_prefix&;t t
44309s&@srcdir@&$ac_srcdir&;t t
44310s&@abs_srcdir@&$ac_abs_srcdir&;t t
44311s&@top_srcdir@&$ac_top_srcdir&;t t
44312s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
44313s&@builddir@&$ac_builddir&;t t
44314s&@abs_builddir@&$ac_abs_builddir&;t t
44315s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
44316$ac_datarootdir_hack
44317"
44318eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
44319  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
44320
44321test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
44322  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
44323  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
44324      "$ac_tmp/out"`; test -z "$ac_out"; } &&
44325  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
44326which seems to be undefined.  Please make sure it is defined" >&5
44327$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
44328which seems to be undefined.  Please make sure it is defined" >&2;}
44329
44330  rm -f "$ac_tmp/stdin"
44331  case $ac_file in
44332  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
44333  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
44334  esac \
44335  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
44336 ;;
44337  :H)
44338  #
44339  # CONFIG_HEADER
44340  #
44341  if test x"$ac_file" != x-; then
44342    {
44343      $as_echo "/* $configure_input  */" \
44344      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
44345    } >"$ac_tmp/config.h" \
44346      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
44347    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
44348      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
44349$as_echo "$as_me: $ac_file is unchanged" >&6;}
44350    else
44351      rm -f "$ac_file"
44352      mv "$ac_tmp/config.h" "$ac_file" \
44353	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
44354    fi
44355  else
44356    $as_echo "/* $configure_input  */" \
44357      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
44358      || as_fn_error $? "could not create -" "$LINENO" 5
44359  fi
44360 ;;
44361
44362  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
44363$as_echo "$as_me: executing $ac_file commands" >&6;}
44364 ;;
44365  esac
44366
44367
44368  case $ac_file$ac_mode in
44369    "libtool":C)
44370
44371    # See if we are running on zsh, and set the options that allow our
44372    # commands through without removal of \ escapes.
44373    if test -n "${ZSH_VERSION+set}"; then
44374      setopt NO_GLOB_SUBST
44375    fi
44376
44377    cfgfile=${ofile}T
44378    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
44379    $RM "$cfgfile"
44380
44381    cat <<_LT_EOF >> "$cfgfile"
44382#! $SHELL
44383# Generated automatically by $as_me ($PACKAGE) $VERSION
44384# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
44385# NOTE: Changes made to this file will be lost: look at ltmain.sh.
44386
44387# Provide generalized library-building support services.
44388# Written by Gordon Matzigkeit, 1996
44389
44390# Copyright (C) 2014 Free Software Foundation, Inc.
44391# This is free software; see the source for copying conditions.  There is NO
44392# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
44393
44394# GNU Libtool is free software; you can redistribute it and/or modify
44395# it under the terms of the GNU General Public License as published by
44396# the Free Software Foundation; either version 2 of of the License, or
44397# (at your option) any later version.
44398#
44399# As a special exception to the GNU General Public License, if you
44400# distribute this file as part of a program or library that is built
44401# using GNU Libtool, you may include this file under the  same
44402# distribution terms that you use for the rest of that program.
44403#
44404# GNU Libtool is distributed in the hope that it will be useful, but
44405# WITHOUT ANY WARRANTY; without even the implied warranty of
44406# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44407# GNU General Public License for more details.
44408#
44409# You should have received a copy of the GNU General Public License
44410# along with this program.  If not, see <http://www.gnu.org/licenses/>.
44411
44412
44413# The names of the tagged configurations supported by this script.
44414available_tags='CXX '
44415
44416# Configured defaults for sys_lib_dlsearch_path munging.
44417: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
44418
44419# ### BEGIN LIBTOOL CONFIG
44420
44421# Assembler program.
44422AS=$lt_AS
44423
44424# DLL creation program.
44425DLLTOOL=$lt_DLLTOOL
44426
44427# Object dumper program.
44428OBJDUMP=$lt_OBJDUMP
44429
44430# Which release of libtool.m4 was used?
44431macro_version=$macro_version
44432macro_revision=$macro_revision
44433
44434# Whether or not to build shared libraries.
44435build_libtool_libs=$enable_shared
44436
44437# Whether or not to build static libraries.
44438build_old_libs=$enable_static
44439
44440# What type of objects to build.
44441pic_mode=$pic_mode
44442
44443# Whether or not to optimize for fast installation.
44444fast_install=$enable_fast_install
44445
44446# Shared archive member basename,for filename based shared library versioning on AIX.
44447shared_archive_member_spec=$shared_archive_member_spec
44448
44449# Shell to use when invoking shell scripts.
44450SHELL=$lt_SHELL
44451
44452# An echo program that protects backslashes.
44453ECHO=$lt_ECHO
44454
44455# The PATH separator for the build system.
44456PATH_SEPARATOR=$lt_PATH_SEPARATOR
44457
44458# The host system.
44459host_alias=$host_alias
44460host=$host
44461host_os=$host_os
44462
44463# The build system.
44464build_alias=$build_alias
44465build=$build
44466build_os=$build_os
44467
44468# A sed program that does not truncate output.
44469SED=$lt_SED
44470
44471# Sed that helps us avoid accidentally triggering echo(1) options like -n.
44472Xsed="\$SED -e 1s/^X//"
44473
44474# A grep program that handles long lines.
44475GREP=$lt_GREP
44476
44477# An ERE matcher.
44478EGREP=$lt_EGREP
44479
44480# A literal string matcher.
44481FGREP=$lt_FGREP
44482
44483# A BSD- or MS-compatible name lister.
44484NM=$lt_NM
44485
44486# Whether we need soft or hard links.
44487LN_S=$lt_LN_S
44488
44489# What is the maximum length of a command?
44490max_cmd_len=$max_cmd_len
44491
44492# Object file suffix (normally "o").
44493objext=$ac_objext
44494
44495# Executable file suffix (normally "").
44496exeext=$exeext
44497
44498# whether the shell understands "unset".
44499lt_unset=$lt_unset
44500
44501# turn spaces into newlines.
44502SP2NL=$lt_lt_SP2NL
44503
44504# turn newlines into spaces.
44505NL2SP=$lt_lt_NL2SP
44506
44507# convert \$build file names to \$host format.
44508to_host_file_cmd=$lt_cv_to_host_file_cmd
44509
44510# convert \$build files to toolchain format.
44511to_tool_file_cmd=$lt_cv_to_tool_file_cmd
44512
44513# Method to check whether dependent libraries are shared objects.
44514deplibs_check_method=$lt_deplibs_check_method
44515
44516# Command to use when deplibs_check_method = "file_magic".
44517file_magic_cmd=$lt_file_magic_cmd
44518
44519# How to find potential files when deplibs_check_method = "file_magic".
44520file_magic_glob=$lt_file_magic_glob
44521
44522# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
44523want_nocaseglob=$lt_want_nocaseglob
44524
44525# Command to associate shared and link libraries.
44526sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
44527
44528# The archiver.
44529AR=$lt_AR
44530
44531# Flags to create an archive.
44532AR_FLAGS=$lt_AR_FLAGS
44533
44534# How to feed a file listing to the archiver.
44535archiver_list_spec=$lt_archiver_list_spec
44536
44537# A symbol stripping program.
44538STRIP=$lt_STRIP
44539
44540# Commands used to install an old-style archive.
44541RANLIB=$lt_RANLIB
44542old_postinstall_cmds=$lt_old_postinstall_cmds
44543old_postuninstall_cmds=$lt_old_postuninstall_cmds
44544
44545# Whether to use a lock for old archive extraction.
44546lock_old_archive_extraction=$lock_old_archive_extraction
44547
44548# A C compiler.
44549LTCC=$lt_CC
44550
44551# LTCC compiler flags.
44552LTCFLAGS=$lt_CFLAGS
44553
44554# Take the output of nm and produce a listing of raw symbols and C names.
44555global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
44556
44557# Transform the output of nm in a proper C declaration.
44558global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
44559
44560# Transform the output of nm into a list of symbols to manually relocate.
44561global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
44562
44563# Transform the output of nm in a C name address pair.
44564global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
44565
44566# Transform the output of nm in a C name address pair when lib prefix is needed.
44567global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
44568
44569# The name lister interface.
44570nm_interface=$lt_lt_cv_nm_interface
44571
44572# Specify filename containing input files for \$NM.
44573nm_file_list_spec=$lt_nm_file_list_spec
44574
44575# The root where to search for dependent libraries,and where our libraries should be installed.
44576lt_sysroot=$lt_sysroot
44577
44578# Command to truncate a binary pipe.
44579lt_truncate_bin=$lt_lt_cv_truncate_bin
44580
44581# The name of the directory that contains temporary libtool files.
44582objdir=$objdir
44583
44584# Used to examine libraries when file_magic_cmd begins with "file".
44585MAGIC_CMD=$MAGIC_CMD
44586
44587# Must we lock files when doing compilation?
44588need_locks=$lt_need_locks
44589
44590# Manifest tool.
44591MANIFEST_TOOL=$lt_MANIFEST_TOOL
44592
44593# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
44594DSYMUTIL=$lt_DSYMUTIL
44595
44596# Tool to change global to local symbols on Mac OS X.
44597NMEDIT=$lt_NMEDIT
44598
44599# Tool to manipulate fat objects and archives on Mac OS X.
44600LIPO=$lt_LIPO
44601
44602# ldd/readelf like tool for Mach-O binaries on Mac OS X.
44603OTOOL=$lt_OTOOL
44604
44605# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
44606OTOOL64=$lt_OTOOL64
44607
44608# Old archive suffix (normally "a").
44609libext=$libext
44610
44611# Shared library suffix (normally ".so").
44612shrext_cmds=$lt_shrext_cmds
44613
44614# The commands to extract the exported symbol list from a shared archive.
44615extract_expsyms_cmds=$lt_extract_expsyms_cmds
44616
44617# Variables whose values should be saved in libtool wrapper scripts and
44618# restored at link time.
44619variables_saved_for_relink=$lt_variables_saved_for_relink
44620
44621# Do we need the "lib" prefix for modules?
44622need_lib_prefix=$need_lib_prefix
44623
44624# Do we need a version for libraries?
44625need_version=$need_version
44626
44627# Library versioning type.
44628version_type=$version_type
44629
44630# Shared library runtime path variable.
44631runpath_var=$runpath_var
44632
44633# Shared library path variable.
44634shlibpath_var=$shlibpath_var
44635
44636# Is shlibpath searched before the hard-coded library search path?
44637shlibpath_overrides_runpath=$shlibpath_overrides_runpath
44638
44639# Format of library name prefix.
44640libname_spec=$lt_libname_spec
44641
44642# List of archive names.  First name is the real one, the rest are links.
44643# The last name is the one that the linker finds with -lNAME
44644library_names_spec=$lt_library_names_spec
44645
44646# The coded name of the library, if different from the real name.
44647soname_spec=$lt_soname_spec
44648
44649# Permission mode override for installation of shared libraries.
44650install_override_mode=$lt_install_override_mode
44651
44652# Command to use after installation of a shared archive.
44653postinstall_cmds=$lt_postinstall_cmds
44654
44655# Command to use after uninstallation of a shared archive.
44656postuninstall_cmds=$lt_postuninstall_cmds
44657
44658# Commands used to finish a libtool library installation in a directory.
44659finish_cmds=$lt_finish_cmds
44660
44661# As "finish_cmds", except a single script fragment to be evaled but
44662# not shown.
44663finish_eval=$lt_finish_eval
44664
44665# Whether we should hardcode library paths into libraries.
44666hardcode_into_libs=$hardcode_into_libs
44667
44668# Compile-time system search path for libraries.
44669sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
44670
44671# Detected run-time system search path for libraries.
44672sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
44673
44674# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
44675configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
44676
44677# Whether dlopen is supported.
44678dlopen_support=$enable_dlopen
44679
44680# Whether dlopen of programs is supported.
44681dlopen_self=$enable_dlopen_self
44682
44683# Whether dlopen of statically linked programs is supported.
44684dlopen_self_static=$enable_dlopen_self_static
44685
44686# Commands to strip libraries.
44687old_striplib=$lt_old_striplib
44688striplib=$lt_striplib
44689
44690
44691# The linker used to build libraries.
44692LD=$lt_LD
44693
44694# How to create reloadable object files.
44695reload_flag=$lt_reload_flag
44696reload_cmds=$lt_reload_cmds
44697
44698# Commands used to build an old-style archive.
44699old_archive_cmds=$lt_old_archive_cmds
44700
44701# A language specific compiler.
44702CC=$lt_compiler
44703
44704# Is the compiler the GNU compiler?
44705with_gcc=$GCC
44706
44707# Compiler flag to turn off builtin functions.
44708no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
44709
44710# Additional compiler flags for building library objects.
44711pic_flag=$lt_lt_prog_compiler_pic
44712
44713# How to pass a linker flag through the compiler.
44714wl=$lt_lt_prog_compiler_wl
44715
44716# Compiler flag to prevent dynamic linking.
44717link_static_flag=$lt_lt_prog_compiler_static
44718
44719# Does compiler simultaneously support -c and -o options?
44720compiler_c_o=$lt_lt_cv_prog_compiler_c_o
44721
44722# Whether or not to add -lc for building shared libraries.
44723build_libtool_need_lc=$archive_cmds_need_lc
44724
44725# Whether or not to disallow shared libs when runtime libs are static.
44726allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
44727
44728# Compiler flag to allow reflexive dlopens.
44729export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
44730
44731# Compiler flag to generate shared objects directly from archives.
44732whole_archive_flag_spec=$lt_whole_archive_flag_spec
44733
44734# Whether the compiler copes with passing no objects directly.
44735compiler_needs_object=$lt_compiler_needs_object
44736
44737# Create an old-style archive from a shared archive.
44738old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
44739
44740# Create a temporary old-style archive to link instead of a shared archive.
44741old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
44742
44743# Commands used to build a shared archive.
44744archive_cmds=$lt_archive_cmds
44745archive_expsym_cmds=$lt_archive_expsym_cmds
44746
44747# Commands used to build a loadable module if different from building
44748# a shared archive.
44749module_cmds=$lt_module_cmds
44750module_expsym_cmds=$lt_module_expsym_cmds
44751
44752# Whether we are building with GNU ld or not.
44753with_gnu_ld=$lt_with_gnu_ld
44754
44755# Flag that allows shared libraries with undefined symbols to be built.
44756allow_undefined_flag=$lt_allow_undefined_flag
44757
44758# Flag that enforces no undefined symbols.
44759no_undefined_flag=$lt_no_undefined_flag
44760
44761# Flag to hardcode \$libdir into a binary during linking.
44762# This must work even if \$libdir does not exist
44763hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
44764
44765# Whether we need a single "-rpath" flag with a separated argument.
44766hardcode_libdir_separator=$lt_hardcode_libdir_separator
44767
44768# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
44769# DIR into the resulting binary.
44770hardcode_direct=$hardcode_direct
44771
44772# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
44773# DIR into the resulting binary and the resulting library dependency is
44774# "absolute",i.e impossible to change by setting \$shlibpath_var if the
44775# library is relocated.
44776hardcode_direct_absolute=$hardcode_direct_absolute
44777
44778# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
44779# into the resulting binary.
44780hardcode_minus_L=$hardcode_minus_L
44781
44782# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
44783# into the resulting binary.
44784hardcode_shlibpath_var=$hardcode_shlibpath_var
44785
44786# Set to "yes" if building a shared library automatically hardcodes DIR
44787# into the library and all subsequent libraries and executables linked
44788# against it.
44789hardcode_automatic=$hardcode_automatic
44790
44791# Set to yes if linker adds runtime paths of dependent libraries
44792# to runtime path list.
44793inherit_rpath=$inherit_rpath
44794
44795# Whether libtool must link a program against all its dependency libraries.
44796link_all_deplibs=$link_all_deplibs
44797
44798# Set to "yes" if exported symbols are required.
44799always_export_symbols=$always_export_symbols
44800
44801# The commands to list exported symbols.
44802export_symbols_cmds=$lt_export_symbols_cmds
44803
44804# Symbols that should not be listed in the preloaded symbols.
44805exclude_expsyms=$lt_exclude_expsyms
44806
44807# Symbols that must always be exported.
44808include_expsyms=$lt_include_expsyms
44809
44810# Commands necessary for linking programs (against libraries) with templates.
44811prelink_cmds=$lt_prelink_cmds
44812
44813# Commands necessary for finishing linking programs.
44814postlink_cmds=$lt_postlink_cmds
44815
44816# Specify filename containing input files.
44817file_list_spec=$lt_file_list_spec
44818
44819# How to hardcode a shared library path into an executable.
44820hardcode_action=$hardcode_action
44821
44822# The directories searched by this compiler when creating a shared library.
44823compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
44824
44825# Dependencies to place before and after the objects being linked to
44826# create a shared library.
44827predep_objects=$lt_predep_objects
44828postdep_objects=$lt_postdep_objects
44829predeps=$lt_predeps
44830postdeps=$lt_postdeps
44831
44832# The library search path used internally by the compiler when linking
44833# a shared library.
44834compiler_lib_search_path=$lt_compiler_lib_search_path
44835
44836# ### END LIBTOOL CONFIG
44837
44838_LT_EOF
44839
44840    cat <<'_LT_EOF' >> "$cfgfile"
44841
44842# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
44843
44844# func_munge_path_list VARIABLE PATH
44845# -----------------------------------
44846# VARIABLE is name of variable containing _space_ separated list of
44847# directories to be munged by the contents of PATH, which is string
44848# having a format:
44849# "DIR[:DIR]:"
44850#       string "DIR[ DIR]" will be prepended to VARIABLE
44851# ":DIR[:DIR]"
44852#       string "DIR[ DIR]" will be appended to VARIABLE
44853# "DIRP[:DIRP]::[DIRA:]DIRA"
44854#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
44855#       "DIRA[ DIRA]" will be appended to VARIABLE
44856# "DIR[:DIR]"
44857#       VARIABLE will be replaced by "DIR[ DIR]"
44858func_munge_path_list ()
44859{
44860    case x$2 in
44861    x)
44862        ;;
44863    *:)
44864        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
44865        ;;
44866    x:*)
44867        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
44868        ;;
44869    *::*)
44870        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
44871        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
44872        ;;
44873    *)
44874        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
44875        ;;
44876    esac
44877}
44878
44879
44880# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
44881func_cc_basename ()
44882{
44883    for cc_temp in $*""; do
44884      case $cc_temp in
44885        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
44886        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
44887        \-*) ;;
44888        *) break;;
44889      esac
44890    done
44891    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
44892}
44893
44894
44895# ### END FUNCTIONS SHARED WITH CONFIGURE
44896
44897_LT_EOF
44898
44899  case $host_os in
44900  aix3*)
44901    cat <<\_LT_EOF >> "$cfgfile"
44902# AIX sometimes has problems with the GCC collect2 program.  For some
44903# reason, if we set the COLLECT_NAMES environment variable, the problems
44904# vanish in a puff of smoke.
44905if test set != "${COLLECT_NAMES+set}"; then
44906  COLLECT_NAMES=
44907  export COLLECT_NAMES
44908fi
44909_LT_EOF
44910    ;;
44911  esac
44912
44913
44914ltmain=$ac_aux_dir/ltmain.sh
44915
44916
44917  # We use sed instead of cat because bash on DJGPP gets confused if
44918  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
44919  # text mode, it properly converts lines to CR/LF.  This bash problem
44920  # is reportedly fixed, but why not run on old versions too?
44921  sed '$q' "$ltmain" >> "$cfgfile" \
44922     || (rm -f "$cfgfile"; exit 1)
44923
44924   mv -f "$cfgfile" "$ofile" ||
44925    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
44926  chmod +x "$ofile"
44927
44928
44929    cat <<_LT_EOF >> "$ofile"
44930
44931# ### BEGIN LIBTOOL TAG CONFIG: CXX
44932
44933# The linker used to build libraries.
44934LD=$lt_LD_CXX
44935
44936# How to create reloadable object files.
44937reload_flag=$lt_reload_flag_CXX
44938reload_cmds=$lt_reload_cmds_CXX
44939
44940# Commands used to build an old-style archive.
44941old_archive_cmds=$lt_old_archive_cmds_CXX
44942
44943# A language specific compiler.
44944CC=$lt_compiler_CXX
44945
44946# Is the compiler the GNU compiler?
44947with_gcc=$GCC_CXX
44948
44949# Compiler flag to turn off builtin functions.
44950no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
44951
44952# Additional compiler flags for building library objects.
44953pic_flag=$lt_lt_prog_compiler_pic_CXX
44954
44955# How to pass a linker flag through the compiler.
44956wl=$lt_lt_prog_compiler_wl_CXX
44957
44958# Compiler flag to prevent dynamic linking.
44959link_static_flag=$lt_lt_prog_compiler_static_CXX
44960
44961# Does compiler simultaneously support -c and -o options?
44962compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
44963
44964# Whether or not to add -lc for building shared libraries.
44965build_libtool_need_lc=$archive_cmds_need_lc_CXX
44966
44967# Whether or not to disallow shared libs when runtime libs are static.
44968allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
44969
44970# Compiler flag to allow reflexive dlopens.
44971export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
44972
44973# Compiler flag to generate shared objects directly from archives.
44974whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
44975
44976# Whether the compiler copes with passing no objects directly.
44977compiler_needs_object=$lt_compiler_needs_object_CXX
44978
44979# Create an old-style archive from a shared archive.
44980old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
44981
44982# Create a temporary old-style archive to link instead of a shared archive.
44983old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
44984
44985# Commands used to build a shared archive.
44986archive_cmds=$lt_archive_cmds_CXX
44987archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
44988
44989# Commands used to build a loadable module if different from building
44990# a shared archive.
44991module_cmds=$lt_module_cmds_CXX
44992module_expsym_cmds=$lt_module_expsym_cmds_CXX
44993
44994# Whether we are building with GNU ld or not.
44995with_gnu_ld=$lt_with_gnu_ld_CXX
44996
44997# Flag that allows shared libraries with undefined symbols to be built.
44998allow_undefined_flag=$lt_allow_undefined_flag_CXX
44999
45000# Flag that enforces no undefined symbols.
45001no_undefined_flag=$lt_no_undefined_flag_CXX
45002
45003# Flag to hardcode \$libdir into a binary during linking.
45004# This must work even if \$libdir does not exist
45005hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
45006
45007# Whether we need a single "-rpath" flag with a separated argument.
45008hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
45009
45010# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
45011# DIR into the resulting binary.
45012hardcode_direct=$hardcode_direct_CXX
45013
45014# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
45015# DIR into the resulting binary and the resulting library dependency is
45016# "absolute",i.e impossible to change by setting \$shlibpath_var if the
45017# library is relocated.
45018hardcode_direct_absolute=$hardcode_direct_absolute_CXX
45019
45020# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
45021# into the resulting binary.
45022hardcode_minus_L=$hardcode_minus_L_CXX
45023
45024# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
45025# into the resulting binary.
45026hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
45027
45028# Set to "yes" if building a shared library automatically hardcodes DIR
45029# into the library and all subsequent libraries and executables linked
45030# against it.
45031hardcode_automatic=$hardcode_automatic_CXX
45032
45033# Set to yes if linker adds runtime paths of dependent libraries
45034# to runtime path list.
45035inherit_rpath=$inherit_rpath_CXX
45036
45037# Whether libtool must link a program against all its dependency libraries.
45038link_all_deplibs=$link_all_deplibs_CXX
45039
45040# Set to "yes" if exported symbols are required.
45041always_export_symbols=$always_export_symbols_CXX
45042
45043# The commands to list exported symbols.
45044export_symbols_cmds=$lt_export_symbols_cmds_CXX
45045
45046# Symbols that should not be listed in the preloaded symbols.
45047exclude_expsyms=$lt_exclude_expsyms_CXX
45048
45049# Symbols that must always be exported.
45050include_expsyms=$lt_include_expsyms_CXX
45051
45052# Commands necessary for linking programs (against libraries) with templates.
45053prelink_cmds=$lt_prelink_cmds_CXX
45054
45055# Commands necessary for finishing linking programs.
45056postlink_cmds=$lt_postlink_cmds_CXX
45057
45058# Specify filename containing input files.
45059file_list_spec=$lt_file_list_spec_CXX
45060
45061# How to hardcode a shared library path into an executable.
45062hardcode_action=$hardcode_action_CXX
45063
45064# The directories searched by this compiler when creating a shared library.
45065compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
45066
45067# Dependencies to place before and after the objects being linked to
45068# create a shared library.
45069predep_objects=$lt_predep_objects_CXX
45070postdep_objects=$lt_postdep_objects_CXX
45071predeps=$lt_predeps_CXX
45072postdeps=$lt_postdeps_CXX
45073
45074# The library search path used internally by the compiler when linking
45075# a shared library.
45076compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
45077
45078# ### END LIBTOOL TAG CONFIG: CXX
45079_LT_EOF
45080
45081 ;;
45082
45083  esac
45084done # for ac_tag
45085
45086
45087as_fn_exit 0
45088_ACEOF
45089ac_clean_files=$ac_clean_files_save
45090
45091test $ac_write_fail = 0 ||
45092  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
45093
45094
45095# configure is writing to config.log, and then calls config.status.
45096# config.status does its own redirection, appending to config.log.
45097# Unfortunately, on DOS this fails, as config.log is still kept open
45098# by configure, so config.status won't be able to write to it; its
45099# output is simply discarded.  So we exec the FD to /dev/null,
45100# effectively closing config.log, so it can be properly (re)opened and
45101# appended to by config.status.  When coming back to configure, we
45102# need to make the FD available again.
45103if test "$no_create" != yes; then
45104  ac_cs_success=:
45105  ac_config_status_args=
45106  test "$silent" = yes &&
45107    ac_config_status_args="$ac_config_status_args --quiet"
45108  exec 5>/dev/null
45109  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
45110  exec 5>>config.log
45111  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
45112  # would make configure fail if this is the last instruction.
45113  $ac_cs_success || as_fn_exit 1
45114fi
45115if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
45116  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
45117$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
45118fi
45119
45120
45121
45122
45123echo ""
45124
45125
45126echo "GDAL is now configured for ${host}"
45127
45128
45129echo ""
45130
45131
45132echo "  Installation directory:    ${prefix}"
45133
45134
45135echo "  C compiler:                ${CC} ${CFLAGS}"
45136
45137
45138echo "  C++ compiler:              ${CXX} ${CXXFLAGS}"
45139
45140
45141echo "  C++14 support:             ${CXX14_SUPPORT}"
45142
45143
45144echo ""
45145
45146
45147echo "  LIBTOOL support:           ${with_libtool}"
45148
45149
45150echo ""
45151
45152
45153echo "  Armadillo support:         ${HAVE_ARMADILLO}"
45154
45155
45156echo "  CFITSIO support:           ${FITS_SETTING}"
45157
45158
45159echo "  crypto/openssl support:    ${HAVE_OPENSSL_CRYPTO}"
45160
45161
45162echo "  cryptopp support:          ${HAVE_CRYPTOPP}"
45163
45164
45165echo "  cURL support (wms/wcs/...):${CURL_SETTING}"
45166
45167
45168echo "  DDS support:               ${DDS_SETTING}"
45169
45170
45171echo "  DODS support:              ${HAVE_DODS}"
45172
45173
45174echo "  ECW support:               ${ECW_SETTING}"
45175
45176
45177echo "  Expat support:             ${HAVE_EXPAT}"
45178
45179
45180echo "  EXR support:               ${HAVE_EXR}"
45181
45182
45183echo "  FGDB support:              ${FGDB_ENABLED}"
45184
45185
45186echo "  FreeXL support:            ${HAVE_FREEXL}"
45187
45188
45189echo "  GEORASTER support:         ${HAVE_GEORASTER}"
45190
45191
45192echo "  GEOS support:              ${HAVE_GEOS}"
45193
45194
45195echo "  Google libkml support:     ${HAVE_LIBKML}"
45196
45197
45198echo "  GRASS support:             ${GRASS_SETTING}"
45199
45200
45201echo "  GTA support:               ${GTA_SETTING}"
45202
45203
45204echo "  HDF4 support:              ${HAVE_HDF4}"
45205
45206
45207echo "  HDF5 support:              ${HAVE_HDF5}"
45208
45209
45210echo "  HDFS support:              ${HDFS_ENABLED}"
45211
45212
45213echo "  HEIF support:              ${HAVE_HEIF}"
45214
45215
45216echo "  INFORMIX DataBlade support:${HAVE_IDB}"
45217
45218
45219echo "  Ingres support:            ${HAVE_INGRES}"
45220
45221
45222echo "  JP2Lura support:           ${HAVE_JP2LURA}"
45223
45224
45225echo "  JPEG 12 bit:               ${JPEG12_ENABLED}"
45226
45227
45228echo "  JPEG-in-TIFF 12 bit:       ${TIFF_JPEG12_ENABLED}"
45229
45230if test "x$HAVE_JASPER_UUID" != "x" ; then
45231
45232echo "  JPEG JasPer support:       ${HAVE_JASPER} (GeoJP2=${HAVE_JASPER_UUID})"
45233
45234else
45235
45236echo "  JPEG JasPer support:       ${HAVE_JASPER}"
45237
45238fi
45239
45240echo "  JPEG-Lossless/CharLS:      ${HAVE_CHARLS}"
45241
45242
45243echo "  Kakadu support:            ${HAVE_KAKADU}"
45244
45245
45246echo "  Kea support:               ${HAVE_KEA}"
45247
45248
45249echo "  LERC support:              ${HAVE_LERC}"
45250
45251
45252echo "  libdeflate support:        ${LIBDEFLATE_SETTING}"
45253
45254
45255echo "  LIBGEOTIFF support:        ${GEOTIFF_SETTING}"
45256
45257
45258echo "  LIBGIF support:            ${GIF_SETTING}"
45259
45260
45261echo "  LIBJPEG support:           ${JPEG_SETTING}"
45262
45263
45264echo "  LIBLZMA support:           ${LIBLZMA_SETTING}"
45265
45266
45267echo "  LIBPNG support:            ${PNG_SETTING}"
45268
45269
45270echo "  LIBTIFF support:           ${TIFF_SETTING} (BigTIFF=${HAVE_BIGTIFF})"
45271
45272
45273echo "  libxml2 support:           ${HAVE_LIBXML2}"
45274
45275
45276echo "  LIBZ support:              ${LIBZ_SETTING}"
45277
45278
45279echo "  MDB support:               ${MDB_ENABLED}"
45280
45281
45282echo "  MongoCXX v3 support:       ${MONGOCXXV3_ENABLED}"
45283
45284
45285echo "  MongoDB support:           ${MONGODB_ENABLED}"
45286
45287
45288echo "  MrSID/MG4 Lidar support:   ${HAVE_MRSID_LIDAR}"
45289
45290
45291echo "  MrSID support:             ${HAVE_MRSID}"
45292
45293
45294echo "  MSG support:               ${HAVE_MSG}"
45295
45296
45297echo "  MySQL support:             ${HAVE_MYSQL}"
45298
45299if test "$NETCDF_SETTING" = "yes" ; then
45300
45301echo "  NetCDF has netcdf_mem.h:   ${NETCDF_MEM}"
45302
45303fi
45304
45305echo "  NetCDF support:            ${NETCDF_SETTING}"
45306
45307
45308echo "  OCI support:               ${HAVE_OCI}"
45309
45310
45311echo "  ODBC support:              ${ODBC_SETTING}"
45312
45313
45314echo "  OGDI support:              ${HAVE_OGDI}"
45315
45316
45317echo "  OpenCL support:            ${OPENCL_SETTING}"
45318
45319
45320echo "  OpenJPEG support:          ${HAVE_OPENJPEG}"
45321
45322
45323echo "  PCIDSK support:            ${PCIDSK_SETTING}"
45324
45325
45326echo "  PCRaster support:          ${PCRASTER_SETTING}"
45327
45328
45329echo "  PCRE support:              ${HAVE_PCRE}"
45330
45331
45332echo "  PDFium support:            ${HAVE_PDFIUM}"
45333
45334
45335echo "  Podofo support:            ${HAVE_PODOFO}"
45336
45337
45338echo "  Poppler support:           ${HAVE_POPPLER}"
45339
45340
45341echo "  PostgreSQL support:        ${HAVE_PG}"
45342
45343
45344echo "  QHull support:             ${QHULL_SETTING}"
45345
45346
45347echo "  Rasdaman support:          ${RASDAMAN_ENABLED}"
45348
45349
45350echo "  RasterLite2 support:       ${HAVE_RASTERLITE2}"
45351
45352
45353echo "  RDB support:               ${RDB_SETTING}"
45354
45355
45356echo "  SFCGAL support:            ${HAVE_SFCGAL}"
45357
45358
45359echo "  SOSI support:              ${SOSI_ENABLED}"
45360
45361
45362echo "  SpatiaLite support:        ${HAVE_SPATIALITE}"
45363
45364if test "x$SPATIALITE_SONAME" != "x"; then
45365
45366echo "  SpatiaLite shared obj name:${SPATIALITE_SONAME}"
45367
45368fi
45369
45370echo "  SQLite support:            ${HAVE_SQLITE}"
45371
45372
45373echo "  Teigha (DWG and DGNv8):    ${HAVE_TEIGHA}"
45374
45375
45376echo "  TileDB support:            ${TILEDB_SETTING}"
45377
45378
45379echo "  userfaultfd support:       ${ENABLE_UFFD}"
45380
45381
45382echo "  WebP support:              ${WEBP_SETTING}"
45383
45384
45385echo "  Xerces-C support:          ${HAVE_XERCES}"
45386
45387
45388echo "  ZSTD support:              ${ZSTD_SETTING}"
45389
45390
45391
45392echo ""
45393
45394if test ! -z "`uname | grep Darwin`" ; then
45395
45396echo "  Mac OS X Framework :       ${MACOSX_FRAMEWORK}"
45397
45398fi
45399
45400echo ""
45401
45402if test -z "$BINDINGS"; then
45403    WHAT_BINDINGS="no"
45404else
45405    WHAT_BINDINGS="$BINDINGS"
45406fi
45407
45408echo "  misc. gdal formats:       ${GDALFORMATS_ENABLED}"
45409
45410
45411echo "  misc. ogr formats:        ${OGRFORMATS_ENABLED}"
45412
45413
45414echo ""
45415
45416
45417echo "  disabled gdal formats:    ${GDALFORMATS_DISABLED}"
45418
45419
45420echo "  disabled ogr formats:     ${OGRFORMATS_DISABLED}"
45421
45422
45423echo ""
45424
45425
45426echo "  SWIG Bindings:             ${WHAT_BINDINGS}"
45427
45428
45429echo ""
45430
45431
45432echo "  PROJ >= 6:                 yes"
45433
45434
45435echo "  enable GNM building:       ${GNM_ENABLED}"
45436
45437
45438echo "  enable pthread support:    ${PTHREAD_ENABLED}"
45439
45440
45441echo "  enable POSIX iconv support:${am_cv_func_iconv}"
45442
45443
45444echo "  hide internal symbols:     ${HAVE_HIDE_INTERNAL_SYMBOLS}"
45445
45446
45447echo ""
45448
45449
45450if test "$HAVE_PODOFO" = "yes" -a "$HAVE_POPPLER" = "yes"  -a "$HAVE_PDFIUM" = "yes"; then
45451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-podofo, --with-poppler and --with-pdfium available. This is unusual setup, but will work. Pdfium will be used by default..." >&5
45452$as_echo "$as_me: WARNING: --with-podofo, --with-poppler and --with-pdfium available. This is unusual setup, but will work. Pdfium will be used by default..." >&2;}
45453elif test "$HAVE_PODOFO" = "yes" -a "$HAVE_POPPLER" = "yes" ; then
45454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-podofo and --with-poppler are both available. This is unusual setup, but will work. Poppler will be used by default..." >&5
45455$as_echo "$as_me: WARNING: --with-podofo and --with-poppler are both available. This is unusual setup, but will work. Poppler will be used by default..." >&2;}
45456elif test "$HAVE_POPPLER" = "yes" -a "$HAVE_PDFIUM" = "yes" ; then
45457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-poppler and --with-pdfium are both available. This is unusual setup, but will work. Pdfium will be used by default..." >&5
45458$as_echo "$as_me: WARNING: --with-poppler and --with-pdfium are both available. This is unusual setup, but will work. Pdfium will be used by default..." >&2;}
45459elif test "$HAVE_PODOFO" = "yes" -a "$HAVE_PDFIUM" = "yes" ; then
45460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-podofo and --with-pdfium are both available. This is unusual setup, but will work. Pdfium will be used by default..." >&5
45461$as_echo "$as_me: WARNING: --with-podofo and --with-pdfium are both available. This is unusual setup, but will work. Pdfium will be used by default..." >&2;}
45462fi
45463
45464if test "$HAVE_LIBXML2" = "yes" -a "$FGDB_ENABLED" = "yes"; then
45465    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-libxml2 and --with-fgdb are both available. There might be some incompatibility between system libxml2 and the embedded copy within libFileGDBAPI" >&5
45466$as_echo "$as_me: WARNING: --with-libxml2 and --with-fgdb are both available. There might be some incompatibility between system libxml2 and the embedded copy within libFileGDBAPI" >&2;}
45467fi
45468
45469if test "$HAVE_CRYPTOPP" = "yes" -a "$HAVE_OPENSSL_CRYPTO" = "yes"; then
45470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-crypto and --with-cryptopp available. This is unusual setup, but will work." >&5
45471$as_echo "$as_me: WARNING: --with-crypto and --with-cryptopp available. This is unusual setup, but will work." >&2;}
45472fi
45473
45474if test "$HAVE_TEIGHA" = "yes" -a "$ECW_54" = "yes"; then
45475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both Teigha SDK and ECW SDK >= 5.4 found. This was found to cause crashes in ECW driver." >&5
45476$as_echo "$as_me: WARNING: Both Teigha SDK and ECW SDK >= 5.4 found. This was found to cause crashes in ECW driver." >&2;}
45477fi
45478