1#! /bin/sh
2# From configure.ac Revision.
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.69 for Scilab 6.
5#
6# Report bugs to <http://bugzilla.scilab.org/>.
7#
8#
9# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21  emulate sh
22  NULLCMD=:
23  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24  # is contrary to our usage.  Disable this feature.
25  alias -g '${1+"$@"}'='"$@"'
26  setopt NO_GLOB_SUBST
27else
28  case `(set -o) 2>/dev/null` in #(
29  *posix*) :
30    set -o posix ;; #(
31  *) :
32     ;;
33esac
34fi
35
36
37as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='print -r --'
49  as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51  as_echo='printf %s\n'
52  as_echo_n='printf %s'
53else
54  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56    as_echo_n='/usr/ucb/echo -n'
57  else
58    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59    as_echo_n_body='eval
60      arg=$1;
61      case $arg in #(
62      *"$as_nl"*)
63	expr "X$arg" : "X\\(.*\\)$as_nl";
64	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65      esac;
66      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67    '
68    export as_echo_n_body
69    as_echo_n='sh -c $as_echo_n_body as_echo'
70  fi
71  export as_echo_body
72  as_echo='sh -c $as_echo_body as_echo'
73fi
74
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
77  PATH_SEPARATOR=:
78  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80      PATH_SEPARATOR=';'
81  }
82fi
83
84
85# IFS
86# We need space, tab and new line, in precisely that order.  Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
90IFS=" ""	$as_nl"
91
92# Find who we are.  Look in the path if we contain no directory separator.
93as_myself=
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138# Use a proper internal environment variable to ensure we don't fall
139  # into an infinite loop, continuously re-executing ourselves.
140  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141    _as_can_reexec=no; export _as_can_reexec;
142    # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150  *v*x* | *x*v* ) as_opts=-vx ;;
151  *v* ) as_opts=-v ;;
152  *x* ) as_opts=-x ;;
153  * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160  fi
161  # We don't want this to propagate to other subprocesses.
162          { _as_can_reexec=; unset _as_can_reexec;}
163if test "x$CONFIG_SHELL" = x; then
164  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165  emulate sh
166  NULLCMD=:
167  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168  # is contrary to our usage.  Disable this feature.
169  alias -g '\${1+\"\$@\"}'='\"\$@\"'
170  setopt NO_GLOB_SUBST
171else
172  case \`(set -o) 2>/dev/null\` in #(
173  *posix*) :
174    set -o posix ;; #(
175  *) :
176     ;;
177esac
178fi
179"
180  as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194  exitcode=1; echo positional parameters were not saved.
195fi
196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
198  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1
203
204  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
205    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
206    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
208    PATH=/empty FPATH=/empty; export PATH FPATH
209    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
210      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
211  if (eval "$as_required") 2>/dev/null; then :
212  as_have_required=yes
213else
214  as_have_required=no
215fi
216  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
217
218else
219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
220as_found=false
221for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
222do
223  IFS=$as_save_IFS
224  test -z "$as_dir" && as_dir=.
225  as_found=:
226  case $as_dir in #(
227	 /*)
228	   for as_base in sh bash ksh sh5; do
229	     # Try only shells that exist, to save several forks.
230	     as_shell=$as_dir/$as_base
231	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
232		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
233  CONFIG_SHELL=$as_shell as_have_required=yes
234		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
235  break 2
236fi
237fi
238	   done;;
239       esac
240  as_found=false
241done
242$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
243	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
244  CONFIG_SHELL=$SHELL as_have_required=yes
245fi; }
246IFS=$as_save_IFS
247
248
249      if test "x$CONFIG_SHELL" != x; then :
250  export CONFIG_SHELL
251             # We cannot yet assume a decent shell, so we have to provide a
252# neutralization value for shells without unset; and this also
253# works around shells that cannot unset nonexistent variables.
254# Preserve -v and -x to the replacement shell.
255BASH_ENV=/dev/null
256ENV=/dev/null
257(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
258case $- in # ((((
259  *v*x* | *x*v* ) as_opts=-vx ;;
260  *v* ) as_opts=-v ;;
261  *x* ) as_opts=-x ;;
262  * ) as_opts= ;;
263esac
264exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
265# Admittedly, this is quite paranoid, since all the known shells bail
266# out after a failed `exec'.
267$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
268exit 255
269fi
270
271    if test x$as_have_required = xno; then :
272  $as_echo "$0: This script requires a shell more modern than all"
273  $as_echo "$0: the shells that I found on your system."
274  if test x${ZSH_VERSION+set} = xset ; then
275    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
276    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
277  else
278    $as_echo "$0: Please tell bug-autoconf@gnu.org and
279$0: http://bugzilla.scilab.org/ about your system,
280$0: including any error possibly output before this
281$0: message. Then install a modern shell, or manually run
282$0: the script under such a shell if you do have one."
283  fi
284  exit 1
285fi
286fi
287fi
288SHELL=${CONFIG_SHELL-/bin/sh}
289export SHELL
290# Unset more variables known to interfere with behavior of common tools.
291CLICOLOR_FORCE= GREP_OPTIONS=
292unset CLICOLOR_FORCE GREP_OPTIONS
293
294## --------------------- ##
295## M4sh Shell Functions. ##
296## --------------------- ##
297# as_fn_unset VAR
298# ---------------
299# Portably unset VAR.
300as_fn_unset ()
301{
302  { eval $1=; unset $1;}
303}
304as_unset=as_fn_unset
305
306# as_fn_set_status STATUS
307# -----------------------
308# Set $? to STATUS, without forking.
309as_fn_set_status ()
310{
311  return $1
312} # as_fn_set_status
313
314# as_fn_exit STATUS
315# -----------------
316# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317as_fn_exit ()
318{
319  set +e
320  as_fn_set_status $1
321  exit $1
322} # as_fn_exit
323
324# as_fn_mkdir_p
325# -------------
326# Create "$as_dir" as a directory, including parents if necessary.
327as_fn_mkdir_p ()
328{
329
330  case $as_dir in #(
331  -*) as_dir=./$as_dir;;
332  esac
333  test -d "$as_dir" || eval $as_mkdir_p || {
334    as_dirs=
335    while :; do
336      case $as_dir in #(
337      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338      *) as_qdir=$as_dir;;
339      esac
340      as_dirs="'$as_qdir' $as_dirs"
341      as_dir=`$as_dirname -- "$as_dir" ||
342$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343	 X"$as_dir" : 'X\(//\)[^/]' \| \
344	 X"$as_dir" : 'X\(//\)$' \| \
345	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346$as_echo X"$as_dir" |
347    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348	    s//\1/
349	    q
350	  }
351	  /^X\(\/\/\)[^/].*/{
352	    s//\1/
353	    q
354	  }
355	  /^X\(\/\/\)$/{
356	    s//\1/
357	    q
358	  }
359	  /^X\(\/\).*/{
360	    s//\1/
361	    q
362	  }
363	  s/.*/./; q'`
364      test -d "$as_dir" && break
365    done
366    test -z "$as_dirs" || eval "mkdir $as_dirs"
367  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368
369
370} # as_fn_mkdir_p
371
372# as_fn_executable_p FILE
373# -----------------------
374# Test if FILE is an executable regular file.
375as_fn_executable_p ()
376{
377  test -f "$1" && test -x "$1"
378} # as_fn_executable_p
379# as_fn_append VAR VALUE
380# ----------------------
381# Append the text in VALUE to the end of the definition contained in VAR. Take
382# advantage of any shell optimizations that allow amortized linear growth over
383# repeated appends, instead of the typical quadratic growth present in naive
384# implementations.
385if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
386  eval 'as_fn_append ()
387  {
388    eval $1+=\$2
389  }'
390else
391  as_fn_append ()
392  {
393    eval $1=\$$1\$2
394  }
395fi # as_fn_append
396
397# as_fn_arith ARG...
398# ------------------
399# Perform arithmetic evaluation on the ARGs, and store the result in the
400# global $as_val. Take advantage of shells that can avoid forks. The arguments
401# must be portable across $(()) and expr.
402if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
403  eval 'as_fn_arith ()
404  {
405    as_val=$(( $* ))
406  }'
407else
408  as_fn_arith ()
409  {
410    as_val=`expr "$@" || test $? -eq 1`
411  }
412fi # as_fn_arith
413
414
415# as_fn_error STATUS ERROR [LINENO LOG_FD]
416# ----------------------------------------
417# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
418# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
419# script with STATUS, using 1 if that was 0.
420as_fn_error ()
421{
422  as_status=$1; test $as_status -eq 0 && as_status=1
423  if test "$4"; then
424    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
425    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
426  fi
427  $as_echo "$as_me: error: $2" >&2
428  as_fn_exit $as_status
429} # as_fn_error
430
431if expr a : '\(a\)' >/dev/null 2>&1 &&
432   test "X`expr 00001 : '.*\(...\)'`" = X001; then
433  as_expr=expr
434else
435  as_expr=false
436fi
437
438if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
439  as_basename=basename
440else
441  as_basename=false
442fi
443
444if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
445  as_dirname=dirname
446else
447  as_dirname=false
448fi
449
450as_me=`$as_basename -- "$0" ||
451$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
452	 X"$0" : 'X\(//\)$' \| \
453	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
454$as_echo X/"$0" |
455    sed '/^.*\/\([^/][^/]*\)\/*$/{
456	    s//\1/
457	    q
458	  }
459	  /^X\/\(\/\/\)$/{
460	    s//\1/
461	    q
462	  }
463	  /^X\/\(\/\).*/{
464	    s//\1/
465	    q
466	  }
467	  s/.*/./; q'`
468
469# Avoid depending upon Character Ranges.
470as_cr_letters='abcdefghijklmnopqrstuvwxyz'
471as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
472as_cr_Letters=$as_cr_letters$as_cr_LETTERS
473as_cr_digits='0123456789'
474as_cr_alnum=$as_cr_Letters$as_cr_digits
475
476
477  as_lineno_1=$LINENO as_lineno_1a=$LINENO
478  as_lineno_2=$LINENO as_lineno_2a=$LINENO
479  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
480  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
481  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
482  sed -n '
483    p
484    /[$]LINENO/=
485  ' <$as_myself |
486    sed '
487      s/[$]LINENO.*/&-/
488      t lineno
489      b
490      :lineno
491      N
492      :loop
493      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
494      t loop
495      s/-\n.*//
496    ' >$as_me.lineno &&
497  chmod +x "$as_me.lineno" ||
498    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
499
500  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
501  # already done that, so ensure we don't try to do so again and fall
502  # in an infinite loop.  This has already happened in practice.
503  _as_can_reexec=no; export _as_can_reexec
504  # Don't try to exec as it changes $[0], causing all sort of problems
505  # (the dirname of $[0] is not the place where we might find the
506  # original and so on.  Autoconf is especially sensitive to this).
507  . "./$as_me.lineno"
508  # Exit status is that of the last command.
509  exit
510}
511
512ECHO_C= ECHO_N= ECHO_T=
513case `echo -n x` in #(((((
514-n*)
515  case `echo 'xy\c'` in
516  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
517  xy)  ECHO_C='\c';;
518  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
519       ECHO_T='	';;
520  esac;;
521*)
522  ECHO_N='-n';;
523esac
524
525rm -f conf$$ conf$$.exe conf$$.file
526if test -d conf$$.dir; then
527  rm -f conf$$.dir/conf$$.file
528else
529  rm -f conf$$.dir
530  mkdir conf$$.dir 2>/dev/null
531fi
532if (echo >conf$$.file) 2>/dev/null; then
533  if ln -s conf$$.file conf$$ 2>/dev/null; then
534    as_ln_s='ln -s'
535    # ... but there are two gotchas:
536    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
537    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
538    # In both cases, we have to default to `cp -pR'.
539    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
540      as_ln_s='cp -pR'
541  elif ln conf$$.file conf$$ 2>/dev/null; then
542    as_ln_s=ln
543  else
544    as_ln_s='cp -pR'
545  fi
546else
547  as_ln_s='cp -pR'
548fi
549rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
550rmdir conf$$.dir 2>/dev/null
551
552if mkdir -p . 2>/dev/null; then
553  as_mkdir_p='mkdir -p "$as_dir"'
554else
555  test -d ./-p && rmdir ./-p
556  as_mkdir_p=false
557fi
558
559as_test_x='test -x'
560as_executable_p=as_fn_executable_p
561
562# Sed expression to map a string onto a valid CPP name.
563as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
564
565# Sed expression to map a string onto a valid variable name.
566as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
567
568SHELL=${CONFIG_SHELL-/bin/sh}
569
570
571test -n "$DJDIR" || exec 7<&0 </dev/null
572exec 6>&1
573
574# Name of the host.
575# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
576# so uname gets run too.
577ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
578
579#
580# Initializations.
581#
582ac_default_prefix=/usr/local
583ac_clean_files=
584ac_config_libobj_dir=.
585LIBOBJS=
586cross_compiling=no
587subdirs=
588MFLAGS=
589MAKEFLAGS=
590
591# Identity of this package.
592PACKAGE_NAME='Scilab'
593PACKAGE_TARNAME='scilab'
594PACKAGE_VERSION='6'
595PACKAGE_STRING='Scilab 6'
596PACKAGE_BUGREPORT='http://bugzilla.scilab.org/'
597PACKAGE_URL=''
598
599# Factoring default headers for most tests.
600ac_includes_default="\
601#include <stdio.h>
602#ifdef HAVE_SYS_TYPES_H
603# include <sys/types.h>
604#endif
605#ifdef HAVE_SYS_STAT_H
606# include <sys/stat.h>
607#endif
608#ifdef STDC_HEADERS
609# include <stdlib.h>
610# include <stddef.h>
611#else
612# ifdef HAVE_STDLIB_H
613#  include <stdlib.h>
614# endif
615#endif
616#ifdef HAVE_STRING_H
617# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
618#  include <memory.h>
619# endif
620# include <string.h>
621#endif
622#ifdef HAVE_STRINGS_H
623# include <strings.h>
624#endif
625#ifdef HAVE_INTTYPES_H
626# include <inttypes.h>
627#endif
628#ifdef HAVE_STDINT_H
629# include <stdint.h>
630#endif
631#ifdef HAVE_UNISTD_H
632# include <unistd.h>
633#endif"
634
635gt_needs=
636ac_subst_vars='am__EXEEXT_FALSE
637am__EXEEXT_TRUE
638LTLIBOBJS
639SCI_LDFLAGS
640SCI_FFLAGS
641SCI_CXXFLAGS
642SCI_CFLAGS
643USE_ADDRESS_SANITIZER_FALSE
644USE_ADDRESS_SANITIZER_TRUE
645USE_STATIC_SYSTEM_LIB_FALSE
646USE_STATIC_SYSTEM_LIB_TRUE
647CCACHE
648SPLINT
649ENABLE_STATIC_FALSE
650ENABLE_STATIC_TRUE
651LT_SYS_LIBRARY_PATH
652OTOOL64
653OTOOL
654LIPO
655NMEDIT
656DSYMUTIL
657MANIFEST_TOOL
658RANLIB
659DLLTOOL
660OBJDUMP
661ac_ct_DUMPBIN
662DUMPBIN
663LD
664FGREP
665LIBTOOL
666GRAPHICS_ENABLE
667DEMOTOOLS_ENABLE
668FORCE_LINK_FALSE
669FORCE_LINK_TRUE
670COMPILATION_TESTS_FALSE
671COMPILATION_TESTS_TRUE
672JAVASCI_ENABLE
673VALGRIND_LIBS
674VALGRIND_CFLAGS
675DOXYGEN_FALSE
676DOXYGEN_TRUE
677DOXYGEN_BIN
678INSTALL_HELP_XML_FALSE
679INSTALL_HELP_XML_TRUE
680BUILD_HELP_FALSE
681BUILD_HELP_TRUE
682HELP_ENABLE
683SAXON
684DOCBOOK_ROOT
685MATIO_FALSE
686MATIO_TRUE
687MATIO_ENABLE
688MATIO_LIBS
689MATIO_CFLAGS
690TCLTK_FALSE
691TCLTK_TRUE
692WITH_TKSCI
693TK_INC_PATH
694TCL_INC_PATH
695TCLTK_LIBS
696X_EXTRA_LIBS
697X_LIBS
698X_PRE_LIBS
699X_CFLAGS
700XMKMF
701CURL_VERSION
702CURL_LIBS
703CURL_CFLAGS
704CURL_CONFIG
705PCRE_VERSION
706PCRE_LIBS
707PCRE_CFLAGS
708PCRE_CONFIG
709UMFPACK_FALSE
710UMFPACK_TRUE
711UMFPACK_ENABLE
712UMFPACK_CFLAGS
713UMFPACK_LIB
714ARPACK_NG_FALSE
715ARPACK_NG_TRUE
716ARPACK_LIBS
717LAPACK_LIBS
718BLAS_LIBS
719BLAS_CFLAGS
720FLIBS
721GENERATE_LOCALIZATION_FILES_FALSE
722GENERATE_LOCALIZATION_FILES_TRUE
723MSGCAT
724ALL_LINGUAS_DOC
725ALL_LINGUAS
726XML_VERSION
727XML_LIBS
728XML_FLAGS
729XML_CONFIG
730OPENMP_FALSE
731OPENMP_TRUE
732OPENMP_LIBS
733OPENMP_CXXFLAGS
734OPENMP_CFLAGS
735OPENMP_ENABLE
736MPI_FALSE
737MPI_TRUE
738MPI_ENABLE
739OPENMPI_LIBS
740OPENMPI_CXXFLAGS
741OPENMPI_CFLAGS
742OPENMPI_CXX
743OPENMPI_CC
744EIGEN_CPPFLAGS
745CXXCPP
746FFTW_FALSE
747FFTW_TRUE
748FFTW_ENABLE
749FFTW3_LIB
750POSUB
751LTLIBINTL
752LIBINTL
753INTLLIBS
754LTLIBICONV
755LIBICONV
756INTL_MACOSX_LIBS
757XGETTEXT_EXTRA_OPTIONS
758MSGMERGE
759XGETTEXT_015
760XGETTEXT
761GMSGFMT_015
762MSGFMT_015
763GMSGFMT
764MSGFMT
765GETTEXT_MACRO_VERSION
766USE_NLS
767SED
768POW_LIB
769LIBM
770GUI_ENABLE
771GIWS_FALSE
772GIWS_TRUE
773SWIG_FALSE
774SWIG_TRUE
775JAVASCI_FALSE
776JAVASCI_TRUE
777GUI_FALSE
778GUI_TRUE
779NEED_JAVA_FALSE
780NEED_JAVA_TRUE
781JAVA_ENABLE
782GIWS_BIN
783PYTHON
784SWIG_SCILAB
785SWIG_JAVA
786SWIG_RUNTIME_LIBS_DIR
787SWIG_BIN
788JAVAC_DEBUG
789JAVA_HOME
790JAVA_JNI_LIBS
791JAVA_JNI_INCLUDE
792ECJ
793ASM3
794COBERTURA
795HAMCREST
796JUNIT4
797ANTLR
798COMMONS_BEANUTILS
799CHECKSTYLE
800JLATEXMATH_FOP
801JLATEXMATH
802COMMONS_LOGGING
803XML_APIS_EXT
804AVALON_FRAMEWORK
805XMLGRAPHICS_COMMONS
806COMMONS_IO
807BATIK
808FREEHEP_UTIL
809FREEHEP_IO
810FREEHEP_GRAPHICSIO_EMF
811FREEHEP_GRAPHICSIO
812FREEHEP_GRAPHICS2D
813FOP
814JEUCLID_CORE
815JROSETTA_ENGINE
816JROSETTA_API
817LUCENE_PARSER
818LUCENE_ANALYZER
819LUCENE
820JHALL
821GLUEGEN2_RT
822JOGL2
823SKINLF
824LOOKS
825FLEXDOCK
826SCIRENDERER_CP
827SCIRENDERER
828JGRAPHX
829ANT
830JDB
831JAVADOC
832JAR
833JAVA_G
834JAVA
835JAVAC
836XCOS_FALSE
837XCOS_TRUE
838OCAML_FALSE
839OCAML_TRUE
840XCOS_ENABLE
841WITH_OCAML
842OCAMLOPTFLAGS
843OCAMLCFLAGS
844OCAMLLEX
845OCAMLYACC
846OCAMLDEP
847OCAMLOPT
848OCAMLC
849RT_LIB
850EXTERNAL_SCIRENDERER_FALSE
851EXTERNAL_SCIRENDERER_TRUE
852HDF5_CFLAGS
853HDF5_LIBS
854BUILD_PARSER_FALSE
855BUILD_PARSER_TRUE
856yacc_present
857YFLAGS
858YACC
859LEXLIB
860LEX_OUTPUT_ROOT
861LEX
862NM
863HAVE_CXX17
864IS_64_BITS_CPU_FALSE
865IS_64_BITS_CPU_TRUE
866ENABLE_DEBUG_FALSE
867ENABLE_DEBUG_TRUE
868CODE_COVERAGE_FALSE
869CODE_COVERAGE_TRUE
870GENHTML
871LCOV
872IS_MIPS_SGI_IRIX_FALSE
873IS_MIPS_SGI_IRIX_TRUE
874IS_SOLARIS_FALSE
875IS_SOLARIS_TRUE
876IS_SPARC_FALSE
877IS_SPARC_TRUE
878IS_HPUX_FALSE
879IS_HPUX_TRUE
880IS_MACOSX_FALSE
881IS_MACOSX_TRUE
882LOGGING_LEVEL
883cxx_present
884am__fastdepCXX_FALSE
885am__fastdepCXX_TRUE
886CXXDEPMODE
887ac_ct_CXX
888CXXFLAGS
889CXX
890ac_ct_F77
891FFLAGS
892F77
893PKG_CONFIG
894AM_BACKSLASH
895AM_DEFAULT_VERBOSITY
896AM_DEFAULT_V
897AM_V
898am__fastdepCC_FALSE
899am__fastdepCC_TRUE
900CCDEPMODE
901am__nodep
902AMDEPBACKSLASH
903AMDEP_FALSE
904AMDEP_TRUE
905am__include
906DEPDIR
907am__untar
908am__tar
909AMTAR
910am__leading_dot
911SET_MAKE
912AWK
913mkdir_p
914MKDIR_P
915INSTALL_STRIP_PROGRAM
916STRIP
917install_sh
918MAKEINFO
919AUTOHEADER
920AUTOMAKE
921AUTOCONF
922ACLOCAL
923VERSION
924PACKAGE
925CYGPATH_W
926am__isrc
927MAINT
928MAINTAINER_MODE_FALSE
929MAINTAINER_MODE_TRUE
930LIBOBJS
931RELOCATABLE_VIA_LD_FALSE
932RELOCATABLE_VIA_LD_TRUE
933SET_RELOCATABLE
934EGREP
935GREP
936CPP
937RELOCATABLE
938host_os
939host_vendor
940host_cpu
941host
942build_os
943build_vendor
944build_cpu
945build
946INSTALL_DATA
947INSTALL_SCRIPT
948INSTALL_PROGRAM
949OBJEXT
950EXEEXT
951ac_ct_CC
952CPPFLAGS
953LDFLAGS
954CFLAGS
955CC
956ac_ct_AR
957AR
958LN_S
959SCILAB_BINARY_VERSION
960SCILAB_LIBRARY_VERSION
961SCILAB_VERSION_MAINTENANCE
962SCILAB_VERSION_MINOR
963SCILAB_VERSION_MAJOR
964target_alias
965host_alias
966build_alias
967LIBS
968ECHO_T
969ECHO_N
970ECHO_C
971DEFS
972mandir
973localedir
974libdir
975psdir
976pdfdir
977dvidir
978htmldir
979infodir
980docdir
981oldincludedir
982includedir
983runstatedir
984localstatedir
985sharedstatedir
986sysconfdir
987datadir
988datarootdir
989libexecdir
990sbindir
991bindir
992program_transform_name
993prefix
994exec_prefix
995PACKAGE_URL
996PACKAGE_BUGREPORT
997PACKAGE_STRING
998PACKAGE_VERSION
999PACKAGE_TARNAME
1000PACKAGE_NAME
1001PATH_SEPARATOR
1002SHELL
1003am__quote'
1004ac_subst_files=''
1005ac_user_opts='
1006enable_option_checking
1007enable_largefile
1008with_gnu_ld
1009enable_relocatable
1010enable_rpath
1011enable_maintainer_mode
1012enable_dependency_tracking
1013enable_silent_rules
1014enable_debug
1015enable_debug_C
1016enable_debug_CXX
1017enable_debug_java
1018enable_debug_fortran
1019enable_debug_linker
1020enable_code_coverage
1021enable_stop_on_warning
1022with_gcc
1023with_gfortran
1024with_intelcompilers
1025with_tk
1026with_javasci
1027enable_compilation_tests
1028with_gui
1029enable_build_swig
1030enable_build_giws
1031enable_build_parser
1032with_fink_prefix
1033with_min_macosx_version
1034with_hdf5_include
1035with_hdf5_library
1036with_external_scirenderer
1037with_xcos
1038with_modelica
1039with_jdk
1040with_ant
1041with_emf
1042enable_nls
1043with_libiconv_prefix
1044with_libintl_prefix
1045with_fftw
1046with_fftw_include
1047with_fftw_library
1048with_eigen_include
1049with_mpi
1050with_openmp
1051with_libxml2
1052enable_build_localization
1053with_blas_library
1054with_lapack_library
1055with_arpack_ng
1056with_arpack_library
1057with_umfpack
1058with_umfpack_library
1059with_umfpack_include
1060with_pcre
1061with_curl
1062with_tcl_library
1063with_tcl_include
1064with_tk_library
1065with_tk_include
1066with_x
1067with_matio
1068with_matio_include
1069with_matio_library
1070enable_build_help
1071with_docbook
1072with_install_help_xml
1073enable_build_doxygen
1074enable_force_full_link
1075enable_shared
1076enable_static
1077with_pic
1078enable_fast_install
1079with_aix_soname
1080with_sysroot
1081enable_libtool_lock
1082enable_ccache
1083enable_static_system_lib
1084enable_address_sanitizer
1085'
1086      ac_precious_vars='build_alias
1087host_alias
1088target_alias
1089CC
1090CFLAGS
1091LDFLAGS
1092LIBS
1093CPPFLAGS
1094CPP
1095PKG_CONFIG
1096F77
1097FFLAGS
1098CXX
1099CXXFLAGS
1100CCC
1101YACC
1102YFLAGS
1103CXXCPP
1104BLAS_CFLAGS
1105BLAS_LIBS
1106PCRE_CFLAGS
1107PCRE_LIBS
1108CURL_CFLAGS
1109CURL_LIBS
1110XMKMF
1111MATIO_CFLAGS
1112MATIO_LIBS
1113VALGRIND_CFLAGS
1114VALGRIND_LIBS
1115LT_SYS_LIBRARY_PATH'
1116
1117
1118# Initialize some variables set by options.
1119ac_init_help=
1120ac_init_version=false
1121ac_unrecognized_opts=
1122ac_unrecognized_sep=
1123# The variables have the same names as the options, with
1124# dashes changed to underlines.
1125cache_file=/dev/null
1126exec_prefix=NONE
1127no_create=
1128no_recursion=
1129prefix=NONE
1130program_prefix=NONE
1131program_suffix=NONE
1132program_transform_name=s,x,x,
1133silent=
1134site=
1135srcdir=
1136verbose=
1137x_includes=NONE
1138x_libraries=NONE
1139
1140# Installation directory options.
1141# These are left unexpanded so users can "make install exec_prefix=/foo"
1142# and all the variables that are supposed to be based on exec_prefix
1143# by default will actually change.
1144# Use braces instead of parens because sh, perl, etc. also accept them.
1145# (The list follows the same order as the GNU Coding Standards.)
1146bindir='${exec_prefix}/bin'
1147sbindir='${exec_prefix}/sbin'
1148libexecdir='${exec_prefix}/libexec'
1149datarootdir='${prefix}/share'
1150datadir='${datarootdir}'
1151sysconfdir='${prefix}/etc'
1152sharedstatedir='${prefix}/com'
1153localstatedir='${prefix}/var'
1154runstatedir='${localstatedir}/run'
1155includedir='${prefix}/include'
1156oldincludedir='/usr/include'
1157docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1158infodir='${datarootdir}/info'
1159htmldir='${docdir}'
1160dvidir='${docdir}'
1161pdfdir='${docdir}'
1162psdir='${docdir}'
1163libdir='${exec_prefix}/lib'
1164localedir='${datarootdir}/locale'
1165mandir='${datarootdir}/man'
1166
1167ac_prev=
1168ac_dashdash=
1169for ac_option
1170do
1171  # If the previous option needs an argument, assign it.
1172  if test -n "$ac_prev"; then
1173    eval $ac_prev=\$ac_option
1174    ac_prev=
1175    continue
1176  fi
1177
1178  case $ac_option in
1179  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1180  *=)   ac_optarg= ;;
1181  *)    ac_optarg=yes ;;
1182  esac
1183
1184  # Accept the important Cygnus configure options, so we can diagnose typos.
1185
1186  case $ac_dashdash$ac_option in
1187  --)
1188    ac_dashdash=yes ;;
1189
1190  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1191    ac_prev=bindir ;;
1192  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1193    bindir=$ac_optarg ;;
1194
1195  -build | --build | --buil | --bui | --bu)
1196    ac_prev=build_alias ;;
1197  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1198    build_alias=$ac_optarg ;;
1199
1200  -cache-file | --cache-file | --cache-fil | --cache-fi \
1201  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1202    ac_prev=cache_file ;;
1203  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1204  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1205    cache_file=$ac_optarg ;;
1206
1207  --config-cache | -C)
1208    cache_file=config.cache ;;
1209
1210  -datadir | --datadir | --datadi | --datad)
1211    ac_prev=datadir ;;
1212  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1213    datadir=$ac_optarg ;;
1214
1215  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1216  | --dataroo | --dataro | --datar)
1217    ac_prev=datarootdir ;;
1218  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1219  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1220    datarootdir=$ac_optarg ;;
1221
1222  -disable-* | --disable-*)
1223    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1224    # Reject names that are not valid shell variable names.
1225    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226      as_fn_error $? "invalid feature name: $ac_useropt"
1227    ac_useropt_orig=$ac_useropt
1228    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229    case $ac_user_opts in
1230      *"
1231"enable_$ac_useropt"
1232"*) ;;
1233      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1234	 ac_unrecognized_sep=', ';;
1235    esac
1236    eval enable_$ac_useropt=no ;;
1237
1238  -docdir | --docdir | --docdi | --doc | --do)
1239    ac_prev=docdir ;;
1240  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1241    docdir=$ac_optarg ;;
1242
1243  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1244    ac_prev=dvidir ;;
1245  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1246    dvidir=$ac_optarg ;;
1247
1248  -enable-* | --enable-*)
1249    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1250    # Reject names that are not valid shell variable names.
1251    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252      as_fn_error $? "invalid feature name: $ac_useropt"
1253    ac_useropt_orig=$ac_useropt
1254    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255    case $ac_user_opts in
1256      *"
1257"enable_$ac_useropt"
1258"*) ;;
1259      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1260	 ac_unrecognized_sep=', ';;
1261    esac
1262    eval enable_$ac_useropt=\$ac_optarg ;;
1263
1264  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1265  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1266  | --exec | --exe | --ex)
1267    ac_prev=exec_prefix ;;
1268  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1269  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1270  | --exec=* | --exe=* | --ex=*)
1271    exec_prefix=$ac_optarg ;;
1272
1273  -gas | --gas | --ga | --g)
1274    # Obsolete; use --with-gas.
1275    with_gas=yes ;;
1276
1277  -help | --help | --hel | --he | -h)
1278    ac_init_help=long ;;
1279  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1280    ac_init_help=recursive ;;
1281  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1282    ac_init_help=short ;;
1283
1284  -host | --host | --hos | --ho)
1285    ac_prev=host_alias ;;
1286  -host=* | --host=* | --hos=* | --ho=*)
1287    host_alias=$ac_optarg ;;
1288
1289  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1290    ac_prev=htmldir ;;
1291  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1292  | --ht=*)
1293    htmldir=$ac_optarg ;;
1294
1295  -includedir | --includedir | --includedi | --included | --include \
1296  | --includ | --inclu | --incl | --inc)
1297    ac_prev=includedir ;;
1298  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1299  | --includ=* | --inclu=* | --incl=* | --inc=*)
1300    includedir=$ac_optarg ;;
1301
1302  -infodir | --infodir | --infodi | --infod | --info | --inf)
1303    ac_prev=infodir ;;
1304  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1305    infodir=$ac_optarg ;;
1306
1307  -libdir | --libdir | --libdi | --libd)
1308    ac_prev=libdir ;;
1309  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1310    libdir=$ac_optarg ;;
1311
1312  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1313  | --libexe | --libex | --libe)
1314    ac_prev=libexecdir ;;
1315  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1316  | --libexe=* | --libex=* | --libe=*)
1317    libexecdir=$ac_optarg ;;
1318
1319  -localedir | --localedir | --localedi | --localed | --locale)
1320    ac_prev=localedir ;;
1321  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1322    localedir=$ac_optarg ;;
1323
1324  -localstatedir | --localstatedir | --localstatedi | --localstated \
1325  | --localstate | --localstat | --localsta | --localst | --locals)
1326    ac_prev=localstatedir ;;
1327  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1328  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1329    localstatedir=$ac_optarg ;;
1330
1331  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1332    ac_prev=mandir ;;
1333  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1334    mandir=$ac_optarg ;;
1335
1336  -nfp | --nfp | --nf)
1337    # Obsolete; use --without-fp.
1338    with_fp=no ;;
1339
1340  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1341  | --no-cr | --no-c | -n)
1342    no_create=yes ;;
1343
1344  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1345  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1346    no_recursion=yes ;;
1347
1348  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1349  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1350  | --oldin | --oldi | --old | --ol | --o)
1351    ac_prev=oldincludedir ;;
1352  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1353  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1354  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1355    oldincludedir=$ac_optarg ;;
1356
1357  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1358    ac_prev=prefix ;;
1359  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1360    prefix=$ac_optarg ;;
1361
1362  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1363  | --program-pre | --program-pr | --program-p)
1364    ac_prev=program_prefix ;;
1365  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1366  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1367    program_prefix=$ac_optarg ;;
1368
1369  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1370  | --program-suf | --program-su | --program-s)
1371    ac_prev=program_suffix ;;
1372  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1373  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1374    program_suffix=$ac_optarg ;;
1375
1376  -program-transform-name | --program-transform-name \
1377  | --program-transform-nam | --program-transform-na \
1378  | --program-transform-n | --program-transform- \
1379  | --program-transform | --program-transfor \
1380  | --program-transfo | --program-transf \
1381  | --program-trans | --program-tran \
1382  | --progr-tra | --program-tr | --program-t)
1383    ac_prev=program_transform_name ;;
1384  -program-transform-name=* | --program-transform-name=* \
1385  | --program-transform-nam=* | --program-transform-na=* \
1386  | --program-transform-n=* | --program-transform-=* \
1387  | --program-transform=* | --program-transfor=* \
1388  | --program-transfo=* | --program-transf=* \
1389  | --program-trans=* | --program-tran=* \
1390  | --progr-tra=* | --program-tr=* | --program-t=*)
1391    program_transform_name=$ac_optarg ;;
1392
1393  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1394    ac_prev=pdfdir ;;
1395  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1396    pdfdir=$ac_optarg ;;
1397
1398  -psdir | --psdir | --psdi | --psd | --ps)
1399    ac_prev=psdir ;;
1400  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1401    psdir=$ac_optarg ;;
1402
1403  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1404  | -silent | --silent | --silen | --sile | --sil)
1405    silent=yes ;;
1406
1407  -runstatedir | --runstatedir | --runstatedi | --runstated \
1408  | --runstate | --runstat | --runsta | --runst | --runs \
1409  | --run | --ru | --r)
1410    ac_prev=runstatedir ;;
1411  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1412  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1413  | --run=* | --ru=* | --r=*)
1414    runstatedir=$ac_optarg ;;
1415
1416  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1417    ac_prev=sbindir ;;
1418  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1419  | --sbi=* | --sb=*)
1420    sbindir=$ac_optarg ;;
1421
1422  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1423  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1424  | --sharedst | --shareds | --shared | --share | --shar \
1425  | --sha | --sh)
1426    ac_prev=sharedstatedir ;;
1427  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1428  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1429  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1430  | --sha=* | --sh=*)
1431    sharedstatedir=$ac_optarg ;;
1432
1433  -site | --site | --sit)
1434    ac_prev=site ;;
1435  -site=* | --site=* | --sit=*)
1436    site=$ac_optarg ;;
1437
1438  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1439    ac_prev=srcdir ;;
1440  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1441    srcdir=$ac_optarg ;;
1442
1443  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1444  | --syscon | --sysco | --sysc | --sys | --sy)
1445    ac_prev=sysconfdir ;;
1446  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1447  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1448    sysconfdir=$ac_optarg ;;
1449
1450  -target | --target | --targe | --targ | --tar | --ta | --t)
1451    ac_prev=target_alias ;;
1452  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1453    target_alias=$ac_optarg ;;
1454
1455  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1456    verbose=yes ;;
1457
1458  -version | --version | --versio | --versi | --vers | -V)
1459    ac_init_version=: ;;
1460
1461  -with-* | --with-*)
1462    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1463    # Reject names that are not valid shell variable names.
1464    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1465      as_fn_error $? "invalid package name: $ac_useropt"
1466    ac_useropt_orig=$ac_useropt
1467    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1468    case $ac_user_opts in
1469      *"
1470"with_$ac_useropt"
1471"*) ;;
1472      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1473	 ac_unrecognized_sep=', ';;
1474    esac
1475    eval with_$ac_useropt=\$ac_optarg ;;
1476
1477  -without-* | --without-*)
1478    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1479    # Reject names that are not valid shell variable names.
1480    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1481      as_fn_error $? "invalid package name: $ac_useropt"
1482    ac_useropt_orig=$ac_useropt
1483    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1484    case $ac_user_opts in
1485      *"
1486"with_$ac_useropt"
1487"*) ;;
1488      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1489	 ac_unrecognized_sep=', ';;
1490    esac
1491    eval with_$ac_useropt=no ;;
1492
1493  --x)
1494    # Obsolete; use --with-x.
1495    with_x=yes ;;
1496
1497  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1498  | --x-incl | --x-inc | --x-in | --x-i)
1499    ac_prev=x_includes ;;
1500  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1501  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1502    x_includes=$ac_optarg ;;
1503
1504  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1505  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1506    ac_prev=x_libraries ;;
1507  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1508  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1509    x_libraries=$ac_optarg ;;
1510
1511  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1512Try \`$0 --help' for more information"
1513    ;;
1514
1515  *=*)
1516    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1517    # Reject names that are not valid shell variable names.
1518    case $ac_envvar in #(
1519      '' | [0-9]* | *[!_$as_cr_alnum]* )
1520      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1521    esac
1522    eval $ac_envvar=\$ac_optarg
1523    export $ac_envvar ;;
1524
1525  *)
1526    # FIXME: should be removed in autoconf 3.0.
1527    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1528    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1529      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1530    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1531    ;;
1532
1533  esac
1534done
1535
1536if test -n "$ac_prev"; then
1537  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1538  as_fn_error $? "missing argument to $ac_option"
1539fi
1540
1541if test -n "$ac_unrecognized_opts"; then
1542  case $enable_option_checking in
1543    no) ;;
1544    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1545    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1546  esac
1547fi
1548
1549# Check all directory arguments for consistency.
1550for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1551		datadir sysconfdir sharedstatedir localstatedir includedir \
1552		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1553		libdir localedir mandir runstatedir
1554do
1555  eval ac_val=\$$ac_var
1556  # Remove trailing slashes.
1557  case $ac_val in
1558    */ )
1559      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1560      eval $ac_var=\$ac_val;;
1561  esac
1562  # Be sure to have absolute directory names.
1563  case $ac_val in
1564    [\\/$]* | ?:[\\/]* )  continue;;
1565    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1566  esac
1567  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1568done
1569
1570# There might be people who depend on the old broken behavior: `$host'
1571# used to hold the argument of --host etc.
1572# FIXME: To remove some day.
1573build=$build_alias
1574host=$host_alias
1575target=$target_alias
1576
1577# FIXME: To remove some day.
1578if test "x$host_alias" != x; then
1579  if test "x$build_alias" = x; then
1580    cross_compiling=maybe
1581  elif test "x$build_alias" != "x$host_alias"; then
1582    cross_compiling=yes
1583  fi
1584fi
1585
1586ac_tool_prefix=
1587test -n "$host_alias" && ac_tool_prefix=$host_alias-
1588
1589test "$silent" = yes && exec 6>/dev/null
1590
1591
1592ac_pwd=`pwd` && test -n "$ac_pwd" &&
1593ac_ls_di=`ls -di .` &&
1594ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1595  as_fn_error $? "working directory cannot be determined"
1596test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1597  as_fn_error $? "pwd does not report name of working directory"
1598
1599
1600# Find the source files, if location was not specified.
1601if test -z "$srcdir"; then
1602  ac_srcdir_defaulted=yes
1603  # Try the directory containing this script, then the parent directory.
1604  ac_confdir=`$as_dirname -- "$as_myself" ||
1605$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1606	 X"$as_myself" : 'X\(//\)[^/]' \| \
1607	 X"$as_myself" : 'X\(//\)$' \| \
1608	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1609$as_echo X"$as_myself" |
1610    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1611	    s//\1/
1612	    q
1613	  }
1614	  /^X\(\/\/\)[^/].*/{
1615	    s//\1/
1616	    q
1617	  }
1618	  /^X\(\/\/\)$/{
1619	    s//\1/
1620	    q
1621	  }
1622	  /^X\(\/\).*/{
1623	    s//\1/
1624	    q
1625	  }
1626	  s/.*/./; q'`
1627  srcdir=$ac_confdir
1628  if test ! -r "$srcdir/$ac_unique_file"; then
1629    srcdir=..
1630  fi
1631else
1632  ac_srcdir_defaulted=no
1633fi
1634if test ! -r "$srcdir/$ac_unique_file"; then
1635  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1636  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1637fi
1638ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1639ac_abs_confdir=`(
1640	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1641	pwd)`
1642# When building in place, set srcdir=.
1643if test "$ac_abs_confdir" = "$ac_pwd"; then
1644  srcdir=.
1645fi
1646# Remove unnecessary trailing slashes from srcdir.
1647# Double slashes in file names in object file debugging info
1648# mess up M-x gdb in Emacs.
1649case $srcdir in
1650*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1651esac
1652for ac_var in $ac_precious_vars; do
1653  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1654  eval ac_env_${ac_var}_value=\$${ac_var}
1655  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1656  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1657done
1658
1659#
1660# Report the --help message.
1661#
1662if test "$ac_init_help" = "long"; then
1663  # Omit some internal or obsolete options to make the list less imposing.
1664  # This message is too long to be a string in the A/UX 3.1 sh.
1665  cat <<_ACEOF
1666\`configure' configures Scilab 6 to adapt to many kinds of systems.
1667
1668Usage: $0 [OPTION]... [VAR=VALUE]...
1669
1670To assign environment variables (e.g., CC, CFLAGS...), specify them as
1671VAR=VALUE.  See below for descriptions of some of the useful variables.
1672
1673Defaults for the options are specified in brackets.
1674
1675Configuration:
1676  -h, --help              display this help and exit
1677      --help=short        display options specific to this package
1678      --help=recursive    display the short help of all the included packages
1679  -V, --version           display version information and exit
1680  -q, --quiet, --silent   do not print \`checking ...' messages
1681      --cache-file=FILE   cache test results in FILE [disabled]
1682  -C, --config-cache      alias for \`--cache-file=config.cache'
1683  -n, --no-create         do not create output files
1684      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1685
1686Installation directories:
1687  --prefix=PREFIX         install architecture-independent files in PREFIX
1688                          [$ac_default_prefix]
1689  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1690                          [PREFIX]
1691
1692By default, \`make install' will install all the files in
1693\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1694an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1695for instance \`--prefix=\$HOME'.
1696
1697For better control, use the options below.
1698
1699Fine tuning of the installation directories:
1700  --bindir=DIR            user executables [EPREFIX/bin]
1701  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1702  --libexecdir=DIR        program executables [EPREFIX/libexec]
1703  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1704  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1705  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1706  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1707  --libdir=DIR            object code libraries [EPREFIX/lib]
1708  --includedir=DIR        C header files [PREFIX/include]
1709  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1710  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1711  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1712  --infodir=DIR           info documentation [DATAROOTDIR/info]
1713  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1714  --mandir=DIR            man documentation [DATAROOTDIR/man]
1715  --docdir=DIR            documentation root [DATAROOTDIR/doc/scilab]
1716  --htmldir=DIR           html documentation [DOCDIR]
1717  --dvidir=DIR            dvi documentation [DOCDIR]
1718  --pdfdir=DIR            pdf documentation [DOCDIR]
1719  --psdir=DIR             ps documentation [DOCDIR]
1720_ACEOF
1721
1722  cat <<\_ACEOF
1723
1724Program names:
1725  --program-prefix=PREFIX            prepend PREFIX to installed program names
1726  --program-suffix=SUFFIX            append SUFFIX to installed program names
1727  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1728
1729X features:
1730  --x-includes=DIR    X include files are in DIR
1731  --x-libraries=DIR   X library files are in DIR
1732
1733System types:
1734  --build=BUILD     configure for building on BUILD [guessed]
1735  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1736_ACEOF
1737fi
1738
1739if test -n "$ac_init_help"; then
1740  case $ac_init_help in
1741     short | recursive ) echo "Configuration of Scilab 6:";;
1742   esac
1743  cat <<\_ACEOF
1744
1745Optional Features:
1746  --disable-option-checking  ignore unrecognized --enable/--with options
1747  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1748  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1749  --disable-largefile     omit support for large files
1750  --enable-relocatable    install a package that can be moved in the filesystem
1751  --disable-rpath         do not hardcode runtime library paths
1752  --enable-maintainer-mode
1753                          enable make rules and dependencies not useful (and
1754                          sometimes confusing) to the casual installer
1755  --enable-dependency-tracking
1756                          do not reject slow dependency extractors
1757  --disable-dependency-tracking
1758                          speeds up one-time build
1759  --enable-silent-rules   less verbose build output (undo: "make V=1")
1760  --disable-silent-rules  verbose build output (undo: "make V=0")
1761  --enable-debug          Do not optimize and print warning messages
1762                          (C/C++/Fortran/Java code)
1763  --enable-debug-C        Do not optimize and print warning messages (C code)
1764  --enable-debug-CXX      Do not optimize and print warning messages (C++
1765                          code)
1766  --enable-debug-java     Print warning messages and line numbers (Java code)
1767  --enable-debug-fortran  Do not optimize and print warning messages (Fortran
1768                          code)
1769  --enable-debug-linker   Print warning messages from the linker (ld)
1770  --enable-code-coverage  Enable code coverage
1771  --enable-stop-on-warning
1772                          Stop the compilation on the first warning found in
1773                          the C/C++ code
1774  --enable-compilation-tests
1775                          Enable unitary tests and checks at compilation time
1776  --enable-build-swig=path
1777                          Regenerate Java => C and Scilab => C wrappers
1778                          produced by Swig
1779  --enable-build-giws     Regenerate C/C++ => Java wrappers produced by Giws
1780  --enable-build-parser   Regenerate code for the parser (Lex & YACC)
1781  --disable-nls           do not use Native Language Support
1782  --disable-build-localization
1783                          Disable the localization build
1784
1785  --disable-build-help    Disable the help build
1786
1787  --enable-build-doxygen  Generate doxygen C/C++ documentation
1788  --enable-force-full-link
1789                          Forces the explicit link between libscilab and some
1790                          "on-the-fly" loaded libraries. NOT USE IN
1791                          PRODUCTION.
1792  --enable-shared[=PKGS]  build shared libraries [default=yes]
1793  --enable-static[=PKGS]  build static libraries [default=no]
1794  --enable-fast-install[=PKGS]
1795                          optimize for fast installation [default=yes]
1796  --disable-libtool-lock  avoid locking (might break parallel builds)
1797  --disable-ccache        Disable the use of ccache
1798
1799  --enable-static-system-lib
1800                          Enable the usage of the static stdc++ and libgcc
1801                          libs
1802  --enable-address-sanitizer
1803                          Enable AddressSanitizer instrumentation
1804
1805Optional Packages:
1806  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1807  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1808  --with-gnu-ld           assume the C compiler uses GNU ld default=no
1809  --with-gcc              Use gcc C compiler
1810  --with-gfortran         Use gfortran, GNU Fortran 95 compiler
1811  --with-intelcompilers   Use Intel C (icc) and Fortran (ifort) proprietary
1812                          compilers (GNU/Linux only)
1813  --without-tk            Disable the interface to Tcl/Tk
1814  --without-javasci       Disable the Java/Scilab interface (javasci)
1815  --without-gui           Disable the Scilab Graphical User Interface (GUI).
1816                          Intended for embedded/clustering/grid Scilab
1817  --with-fink-prefix      Provide a fink prefix. Default: /sw/
1818  --with-min-macosx-version
1819                          Force compilers to generate binaries compatible with
1820                          MacOSX minimal version.
1821  --with-hdf5-include=DIR Set the path to the HDF5 headers
1822  --with-hdf5-library=DIR Set the path to the HDF5 libraries
1823  --with-external-scirenderer
1824                          Disable the usage of the internal copy of
1825                          scirenderer. Intended for packaging of Scilab
1826  --without-xcos          Disable Xcos
1827  --without-modelica      Disable the OCaml module (modelica)
1828  --with-jdk=DIR          use JDK from DIR
1829  --with-ant=DIR          Use ant from DIR
1830  --without-emf           disable support for EMF (Windows Metafile) export
1831  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1832  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1833  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
1834  --without-libintl-prefix     don't search for libintl in includedir and libdir
1835  --without-fftw          Disable the interface to the FFTW 3 library
1836  --with-fftw-include=DIR Set the path to the FFTW headers
1837  --with-fftw-library=DIR Set the path to the FFTW libraries
1838  --with-eigen-include=DIR
1839                          Set the path to the EIGEN headers
1840  --with-mpi              compile with MPI library
1841  --without-openmp        Disable the usage of OpenMP (parallelization of some
1842                          algoritms)
1843  --with-libxml2=PREFIX   Set the path to your libxml2 installation
1844  --with-blas-library=DIR set the path to the BLAS (refblas, Atlas, MKL...)
1845                          library
1846  --with-lapack-library=DIR
1847                          set the path to the LAPACK library
1848  --without-arpack-ng     Disable the interface to ARPACK-NG
1849  --with-arpack-library=DIR
1850                          set the path to the ARPACK library
1851  --without-umfpack       Disable the interface to the UMFPACK library
1852  --with-umfpack-library=DIR
1853                          Set the path to the UMFPACK libraries
1854  --with-umfpack-include=DIR
1855                          Set the path to the UMFPACK headers
1856  --with-pcre=DIR         Set the path to your PCRE (Perl 5 Compatible Regular
1857                          Expression Library) installation
1858  --with-curl=DIR         Set the path to your CURL installation
1859  --with-tcl-library=DIR  Set the path to the TCL library
1860  --with-tcl-include=DIR  Set the path to the TCL headers
1861  --with-tk-library=DIR   Set the path to the TK library
1862  --with-tk-include=DIR   Set the path to the TK headers
1863  --with-x                use the X Window System
1864  --without-matio         Disable the interface to Matio (MAT File I/O
1865                          library)
1866  --with-matio-include=DIR
1867                          Set the path to the MATIO headers
1868  --with-matio-library=DIR
1869                          Set the path to the MATIO libraries
1870  --with-docbook=DIR      Set the path to the docbook package
1871  --with-install-help-xml make install will install XML files
1872
1873  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1874                          both]
1875  --with-aix-soname=aix|svr4|both
1876                          shared library versioning (aka "SONAME") variant to
1877                          provide on AIX, [default=aix].
1878  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1879  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1880                          compiler's sysroot if not specified).
1881
1882Some influential environment variables:
1883  CC          C compiler command
1884  CFLAGS      C compiler flags
1885  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1886              nonstandard directory <lib dir>
1887  LIBS        libraries to pass to the linker, e.g. -l<library>
1888  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1889              you have headers in a nonstandard directory <include dir>
1890  CPP         C preprocessor
1891  PKG_CONFIG  path to pkg-config utility
1892  F77         Fortran 77 compiler command
1893  FFLAGS      Fortran 77 compiler flags
1894  CXX         C++ compiler command
1895  CXXFLAGS    C++ compiler flags
1896  YACC        The `Yet Another Compiler Compiler' implementation to use.
1897              Defaults to the first program found out of: `bison -y', `byacc',
1898              `yacc'.
1899  YFLAGS      The list of arguments that will be passed by default to $YACC.
1900              This script will default YFLAGS to the empty string to avoid a
1901              default value of `-d' given by some make applications.
1902  CXXCPP      C++ preprocessor
1903  BLAS_CFLAGS C compiler flags for BLAS, overriding pkg-config
1904  BLAS_LIBS   linker flags for BLAS, overriding pkg-config
1905  PCRE_CFLAGS C compiler flags for PCRE, overriding pkg-config
1906  PCRE_LIBS   linker flags for PCRE, overriding pkg-config
1907  CURL_CFLAGS C compiler flags for CURL, overriding pkg-config
1908  CURL_LIBS   linker flags for CURL, overriding pkg-config
1909  XMKMF       Path to xmkmf, Makefile generator for X Window System
1910  MATIO_CFLAGS
1911              C compiler flags for MATIO, overriding pkg-config
1912  MATIO_LIBS  linker flags for MATIO, overriding pkg-config
1913  VALGRIND_CFLAGS
1914              C compiler flags for VALGRIND, overriding pkg-config
1915  VALGRIND_LIBS
1916              linker flags for VALGRIND, overriding pkg-config
1917  LT_SYS_LIBRARY_PATH
1918              User-defined run-time library search path.
1919
1920Use these variables to override the choices made by `configure' or to help
1921it to find libraries and programs with nonstandard names/locations.
1922
1923Report bugs to <http://bugzilla.scilab.org/>.
1924_ACEOF
1925ac_status=$?
1926fi
1927
1928if test "$ac_init_help" = "recursive"; then
1929  # If there are subdirs, report their specific --help.
1930  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1931    test -d "$ac_dir" ||
1932      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1933      continue
1934    ac_builddir=.
1935
1936case "$ac_dir" in
1937.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1938*)
1939  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1940  # A ".." for each directory in $ac_dir_suffix.
1941  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1942  case $ac_top_builddir_sub in
1943  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1944  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1945  esac ;;
1946esac
1947ac_abs_top_builddir=$ac_pwd
1948ac_abs_builddir=$ac_pwd$ac_dir_suffix
1949# for backward compatibility:
1950ac_top_builddir=$ac_top_build_prefix
1951
1952case $srcdir in
1953  .)  # We are building in place.
1954    ac_srcdir=.
1955    ac_top_srcdir=$ac_top_builddir_sub
1956    ac_abs_top_srcdir=$ac_pwd ;;
1957  [\\/]* | ?:[\\/]* )  # Absolute name.
1958    ac_srcdir=$srcdir$ac_dir_suffix;
1959    ac_top_srcdir=$srcdir
1960    ac_abs_top_srcdir=$srcdir ;;
1961  *) # Relative name.
1962    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1963    ac_top_srcdir=$ac_top_build_prefix$srcdir
1964    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1965esac
1966ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1967
1968    cd "$ac_dir" || { ac_status=$?; continue; }
1969    # Check for guested configure.
1970    if test -f "$ac_srcdir/configure.gnu"; then
1971      echo &&
1972      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1973    elif test -f "$ac_srcdir/configure"; then
1974      echo &&
1975      $SHELL "$ac_srcdir/configure" --help=recursive
1976    else
1977      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1978    fi || ac_status=$?
1979    cd "$ac_pwd" || { ac_status=$?; break; }
1980  done
1981fi
1982
1983test -n "$ac_init_help" && exit $ac_status
1984if $ac_init_version; then
1985  cat <<\_ACEOF
1986Scilab configure 6
1987generated by GNU Autoconf 2.69
1988
1989Copyright (C) 2012 Free Software Foundation, Inc.
1990This configure script is free software; the Free Software Foundation
1991gives unlimited permission to copy, distribute and modify it.
1992_ACEOF
1993  exit
1994fi
1995
1996## ------------------------ ##
1997## Autoconf initialization. ##
1998## ------------------------ ##
1999
2000# ac_fn_c_try_compile LINENO
2001# --------------------------
2002# Try to compile conftest.$ac_ext, and return whether this succeeded.
2003ac_fn_c_try_compile ()
2004{
2005  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006  rm -f conftest.$ac_objext
2007  if { { ac_try="$ac_compile"
2008case "(($ac_try" in
2009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2010  *) ac_try_echo=$ac_try;;
2011esac
2012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2013$as_echo "$ac_try_echo"; } >&5
2014  (eval "$ac_compile") 2>conftest.err
2015  ac_status=$?
2016  if test -s conftest.err; then
2017    grep -v '^ *+' conftest.err >conftest.er1
2018    cat conftest.er1 >&5
2019    mv -f conftest.er1 conftest.err
2020  fi
2021  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2022  test $ac_status = 0; } && {
2023	 test -z "$ac_c_werror_flag" ||
2024	 test ! -s conftest.err
2025       } && test -s conftest.$ac_objext; then :
2026  ac_retval=0
2027else
2028  $as_echo "$as_me: failed program was:" >&5
2029sed 's/^/| /' conftest.$ac_ext >&5
2030
2031	ac_retval=1
2032fi
2033  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2034  as_fn_set_status $ac_retval
2035
2036} # ac_fn_c_try_compile
2037
2038# ac_fn_c_try_cpp LINENO
2039# ----------------------
2040# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2041ac_fn_c_try_cpp ()
2042{
2043  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044  if { { ac_try="$ac_cpp conftest.$ac_ext"
2045case "(($ac_try" in
2046  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2047  *) ac_try_echo=$ac_try;;
2048esac
2049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2050$as_echo "$ac_try_echo"; } >&5
2051  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2052  ac_status=$?
2053  if test -s conftest.err; then
2054    grep -v '^ *+' conftest.err >conftest.er1
2055    cat conftest.er1 >&5
2056    mv -f conftest.er1 conftest.err
2057  fi
2058  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2059  test $ac_status = 0; } > conftest.i && {
2060	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2061	 test ! -s conftest.err
2062       }; then :
2063  ac_retval=0
2064else
2065  $as_echo "$as_me: failed program was:" >&5
2066sed 's/^/| /' conftest.$ac_ext >&5
2067
2068    ac_retval=1
2069fi
2070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071  as_fn_set_status $ac_retval
2072
2073} # ac_fn_c_try_cpp
2074
2075# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2076# -------------------------------------------------------
2077# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2078# the include files in INCLUDES and setting the cache variable VAR
2079# accordingly.
2080ac_fn_c_check_header_mongrel ()
2081{
2082  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2083  if eval \${$3+:} false; then :
2084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2085$as_echo_n "checking for $2... " >&6; }
2086if eval \${$3+:} false; then :
2087  $as_echo_n "(cached) " >&6
2088fi
2089eval ac_res=\$$3
2090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091$as_echo "$ac_res" >&6; }
2092else
2093  # Is the header compilable?
2094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2095$as_echo_n "checking $2 usability... " >&6; }
2096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h.  */
2098$4
2099#include <$2>
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102  ac_header_compiler=yes
2103else
2104  ac_header_compiler=no
2105fi
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2108$as_echo "$ac_header_compiler" >&6; }
2109
2110# Is the header present?
2111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2112$as_echo_n "checking $2 presence... " >&6; }
2113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114/* end confdefs.h.  */
2115#include <$2>
2116_ACEOF
2117if ac_fn_c_try_cpp "$LINENO"; then :
2118  ac_header_preproc=yes
2119else
2120  ac_header_preproc=no
2121fi
2122rm -f conftest.err conftest.i conftest.$ac_ext
2123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2124$as_echo "$ac_header_preproc" >&6; }
2125
2126# So?  What about this header?
2127case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2128  yes:no: )
2129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2130$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2132$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2133    ;;
2134  no:yes:* )
2135    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2136$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2137    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2138$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2139    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2140$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2141    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2142$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2144$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2145( $as_echo "## ------------------------------------------ ##
2146## Report this to http://bugzilla.scilab.org/ ##
2147## ------------------------------------------ ##"
2148     ) | sed "s/^/$as_me: WARNING:     /" >&2
2149    ;;
2150esac
2151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2152$as_echo_n "checking for $2... " >&6; }
2153if eval \${$3+:} false; then :
2154  $as_echo_n "(cached) " >&6
2155else
2156  eval "$3=\$ac_header_compiler"
2157fi
2158eval ac_res=\$$3
2159	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2160$as_echo "$ac_res" >&6; }
2161fi
2162  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2163
2164} # ac_fn_c_check_header_mongrel
2165
2166# ac_fn_c_try_run LINENO
2167# ----------------------
2168# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2169# that executables *can* be run.
2170ac_fn_c_try_run ()
2171{
2172  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173  if { { ac_try="$ac_link"
2174case "(($ac_try" in
2175  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2176  *) ac_try_echo=$ac_try;;
2177esac
2178eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2179$as_echo "$ac_try_echo"; } >&5
2180  (eval "$ac_link") 2>&5
2181  ac_status=$?
2182  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2183  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2184  { { case "(($ac_try" in
2185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186  *) ac_try_echo=$ac_try;;
2187esac
2188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189$as_echo "$ac_try_echo"; } >&5
2190  (eval "$ac_try") 2>&5
2191  ac_status=$?
2192  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2193  test $ac_status = 0; }; }; then :
2194  ac_retval=0
2195else
2196  $as_echo "$as_me: program exited with status $ac_status" >&5
2197       $as_echo "$as_me: failed program was:" >&5
2198sed 's/^/| /' conftest.$ac_ext >&5
2199
2200       ac_retval=$ac_status
2201fi
2202  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2203  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2204  as_fn_set_status $ac_retval
2205
2206} # ac_fn_c_try_run
2207
2208# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2209# -------------------------------------------------------
2210# Tests whether HEADER exists and can be compiled using the include files in
2211# INCLUDES, setting the cache variable VAR accordingly.
2212ac_fn_c_check_header_compile ()
2213{
2214  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2216$as_echo_n "checking for $2... " >&6; }
2217if eval \${$3+:} false; then :
2218  $as_echo_n "(cached) " >&6
2219else
2220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221/* end confdefs.h.  */
2222$4
2223#include <$2>
2224_ACEOF
2225if ac_fn_c_try_compile "$LINENO"; then :
2226  eval "$3=yes"
2227else
2228  eval "$3=no"
2229fi
2230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
2235  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2236
2237} # ac_fn_c_check_header_compile
2238
2239# ac_fn_c_try_link LINENO
2240# -----------------------
2241# Try to link conftest.$ac_ext, and return whether this succeeded.
2242ac_fn_c_try_link ()
2243{
2244  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245  rm -f conftest.$ac_objext conftest$ac_exeext
2246  if { { ac_try="$ac_link"
2247case "(($ac_try" in
2248  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2249  *) ac_try_echo=$ac_try;;
2250esac
2251eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2252$as_echo "$ac_try_echo"; } >&5
2253  (eval "$ac_link") 2>conftest.err
2254  ac_status=$?
2255  if test -s conftest.err; then
2256    grep -v '^ *+' conftest.err >conftest.er1
2257    cat conftest.er1 >&5
2258    mv -f conftest.er1 conftest.err
2259  fi
2260  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2261  test $ac_status = 0; } && {
2262	 test -z "$ac_c_werror_flag" ||
2263	 test ! -s conftest.err
2264       } && test -s conftest$ac_exeext && {
2265	 test "$cross_compiling" = yes ||
2266	 test -x conftest$ac_exeext
2267       }; then :
2268  ac_retval=0
2269else
2270  $as_echo "$as_me: failed program was:" >&5
2271sed 's/^/| /' conftest.$ac_ext >&5
2272
2273	ac_retval=1
2274fi
2275  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2276  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2277  # interfere with the next link command; also delete a directory that is
2278  # left behind by Apple's compiler.  We do this before executing the actions.
2279  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2280  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281  as_fn_set_status $ac_retval
2282
2283} # ac_fn_c_try_link
2284
2285# ac_fn_c_check_func LINENO FUNC VAR
2286# ----------------------------------
2287# Tests whether FUNC exists, setting the cache variable VAR accordingly
2288ac_fn_c_check_func ()
2289{
2290  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2292$as_echo_n "checking for $2... " >&6; }
2293if eval \${$3+:} false; then :
2294  $as_echo_n "(cached) " >&6
2295else
2296  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h.  */
2298/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2299   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2300#define $2 innocuous_$2
2301
2302/* System header to define __stub macros and hopefully few prototypes,
2303    which can conflict with char $2 (); below.
2304    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2305    <limits.h> exists even on freestanding compilers.  */
2306
2307#ifdef __STDC__
2308# include <limits.h>
2309#else
2310# include <assert.h>
2311#endif
2312
2313#undef $2
2314
2315/* Override any GCC internal prototype to avoid an error.
2316   Use char because int might match the return type of a GCC
2317   builtin and then its argument prototype would still apply.  */
2318#ifdef __cplusplus
2319extern "C"
2320#endif
2321char $2 ();
2322/* The GNU C library defines this for functions which it implements
2323    to always fail with ENOSYS.  Some functions are actually named
2324    something starting with __ and the normal name is an alias.  */
2325#if defined __stub_$2 || defined __stub___$2
2326choke me
2327#endif
2328
2329int
2330main ()
2331{
2332return $2 ();
2333  ;
2334  return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_link "$LINENO"; then :
2338  eval "$3=yes"
2339else
2340  eval "$3=no"
2341fi
2342rm -f core conftest.err conftest.$ac_objext \
2343    conftest$ac_exeext conftest.$ac_ext
2344fi
2345eval ac_res=\$$3
2346	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
2348  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349
2350} # ac_fn_c_check_func
2351
2352# ac_fn_f77_try_compile LINENO
2353# ----------------------------
2354# Try to compile conftest.$ac_ext, and return whether this succeeded.
2355ac_fn_f77_try_compile ()
2356{
2357  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2358  rm -f conftest.$ac_objext
2359  if { { ac_try="$ac_compile"
2360case "(($ac_try" in
2361  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2362  *) ac_try_echo=$ac_try;;
2363esac
2364eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2365$as_echo "$ac_try_echo"; } >&5
2366  (eval "$ac_compile") 2>conftest.err
2367  ac_status=$?
2368  if test -s conftest.err; then
2369    grep -v '^ *+' conftest.err >conftest.er1
2370    cat conftest.er1 >&5
2371    mv -f conftest.er1 conftest.err
2372  fi
2373  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2374  test $ac_status = 0; } && {
2375	 test -z "$ac_f77_werror_flag" ||
2376	 test ! -s conftest.err
2377       } && test -s conftest.$ac_objext; then :
2378  ac_retval=0
2379else
2380  $as_echo "$as_me: failed program was:" >&5
2381sed 's/^/| /' conftest.$ac_ext >&5
2382
2383	ac_retval=1
2384fi
2385  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2386  as_fn_set_status $ac_retval
2387
2388} # ac_fn_f77_try_compile
2389
2390# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2391# --------------------------------------------
2392# Tries to find the compile-time value of EXPR in a program that includes
2393# INCLUDES, setting VAR accordingly. Returns whether the value could be
2394# computed
2395ac_fn_c_compute_int ()
2396{
2397  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398  if test "$cross_compiling" = yes; then
2399    # Depending upon the size, compute the lo and hi bounds.
2400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2401/* end confdefs.h.  */
2402$4
2403int
2404main ()
2405{
2406static int test_array [1 - 2 * !(($2) >= 0)];
2407test_array [0] = 0;
2408return test_array [0];
2409
2410  ;
2411  return 0;
2412}
2413_ACEOF
2414if ac_fn_c_try_compile "$LINENO"; then :
2415  ac_lo=0 ac_mid=0
2416  while :; do
2417    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h.  */
2419$4
2420int
2421main ()
2422{
2423static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2424test_array [0] = 0;
2425return test_array [0];
2426
2427  ;
2428  return 0;
2429}
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
2432  ac_hi=$ac_mid; break
2433else
2434  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2435			if test $ac_lo -le $ac_mid; then
2436			  ac_lo= ac_hi=
2437			  break
2438			fi
2439			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442  done
2443else
2444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445/* end confdefs.h.  */
2446$4
2447int
2448main ()
2449{
2450static int test_array [1 - 2 * !(($2) < 0)];
2451test_array [0] = 0;
2452return test_array [0];
2453
2454  ;
2455  return 0;
2456}
2457_ACEOF
2458if ac_fn_c_try_compile "$LINENO"; then :
2459  ac_hi=-1 ac_mid=-1
2460  while :; do
2461    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462/* end confdefs.h.  */
2463$4
2464int
2465main ()
2466{
2467static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2468test_array [0] = 0;
2469return test_array [0];
2470
2471  ;
2472  return 0;
2473}
2474_ACEOF
2475if ac_fn_c_try_compile "$LINENO"; then :
2476  ac_lo=$ac_mid; break
2477else
2478  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2479			if test $ac_mid -le $ac_hi; then
2480			  ac_lo= ac_hi=
2481			  break
2482			fi
2483			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2484fi
2485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2486  done
2487else
2488  ac_lo= ac_hi=
2489fi
2490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2491fi
2492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2493# Binary search between lo and hi bounds.
2494while test "x$ac_lo" != "x$ac_hi"; do
2495  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2497/* end confdefs.h.  */
2498$4
2499int
2500main ()
2501{
2502static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2503test_array [0] = 0;
2504return test_array [0];
2505
2506  ;
2507  return 0;
2508}
2509_ACEOF
2510if ac_fn_c_try_compile "$LINENO"; then :
2511  ac_hi=$ac_mid
2512else
2513  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2514fi
2515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2516done
2517case $ac_lo in #((
2518?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2519'') ac_retval=1 ;;
2520esac
2521  else
2522    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2523/* end confdefs.h.  */
2524$4
2525static long int longval () { return $2; }
2526static unsigned long int ulongval () { return $2; }
2527#include <stdio.h>
2528#include <stdlib.h>
2529int
2530main ()
2531{
2532
2533  FILE *f = fopen ("conftest.val", "w");
2534  if (! f)
2535    return 1;
2536  if (($2) < 0)
2537    {
2538      long int i = longval ();
2539      if (i != ($2))
2540	return 1;
2541      fprintf (f, "%ld", i);
2542    }
2543  else
2544    {
2545      unsigned long int i = ulongval ();
2546      if (i != ($2))
2547	return 1;
2548      fprintf (f, "%lu", i);
2549    }
2550  /* Do not output a trailing newline, as this causes \r\n confusion
2551     on some platforms.  */
2552  return ferror (f) || fclose (f) != 0;
2553
2554  ;
2555  return 0;
2556}
2557_ACEOF
2558if ac_fn_c_try_run "$LINENO"; then :
2559  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2560else
2561  ac_retval=1
2562fi
2563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2564  conftest.$ac_objext conftest.beam conftest.$ac_ext
2565rm -f conftest.val
2566
2567  fi
2568  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569  as_fn_set_status $ac_retval
2570
2571} # ac_fn_c_compute_int
2572
2573# ac_fn_cxx_try_compile LINENO
2574# ----------------------------
2575# Try to compile conftest.$ac_ext, and return whether this succeeded.
2576ac_fn_cxx_try_compile ()
2577{
2578  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579  rm -f conftest.$ac_objext
2580  if { { ac_try="$ac_compile"
2581case "(($ac_try" in
2582  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2583  *) ac_try_echo=$ac_try;;
2584esac
2585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2586$as_echo "$ac_try_echo"; } >&5
2587  (eval "$ac_compile") 2>conftest.err
2588  ac_status=$?
2589  if test -s conftest.err; then
2590    grep -v '^ *+' conftest.err >conftest.er1
2591    cat conftest.er1 >&5
2592    mv -f conftest.er1 conftest.err
2593  fi
2594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2595  test $ac_status = 0; } && {
2596	 test -z "$ac_cxx_werror_flag" ||
2597	 test ! -s conftest.err
2598       } && test -s conftest.$ac_objext; then :
2599  ac_retval=0
2600else
2601  $as_echo "$as_me: failed program was:" >&5
2602sed 's/^/| /' conftest.$ac_ext >&5
2603
2604	ac_retval=1
2605fi
2606  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607  as_fn_set_status $ac_retval
2608
2609} # ac_fn_cxx_try_compile
2610
2611# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2612# ----------------------------------------------------
2613# Tries to find if the field MEMBER exists in type AGGR, after including
2614# INCLUDES, setting cache variable VAR accordingly.
2615ac_fn_c_check_member ()
2616{
2617  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2619$as_echo_n "checking for $2.$3... " >&6; }
2620if eval \${$4+:} false; then :
2621  $as_echo_n "(cached) " >&6
2622else
2623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h.  */
2625$5
2626int
2627main ()
2628{
2629static $2 ac_aggr;
2630if (ac_aggr.$3)
2631return 0;
2632  ;
2633  return 0;
2634}
2635_ACEOF
2636if ac_fn_c_try_compile "$LINENO"; then :
2637  eval "$4=yes"
2638else
2639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641$5
2642int
2643main ()
2644{
2645static $2 ac_aggr;
2646if (sizeof ac_aggr.$3)
2647return 0;
2648  ;
2649  return 0;
2650}
2651_ACEOF
2652if ac_fn_c_try_compile "$LINENO"; then :
2653  eval "$4=yes"
2654else
2655  eval "$4=no"
2656fi
2657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2658fi
2659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2660fi
2661eval ac_res=\$$4
2662	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2663$as_echo "$ac_res" >&6; }
2664  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2665
2666} # ac_fn_c_check_member
2667
2668# ac_fn_cxx_try_cpp LINENO
2669# ------------------------
2670# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2671ac_fn_cxx_try_cpp ()
2672{
2673  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674  if { { ac_try="$ac_cpp conftest.$ac_ext"
2675case "(($ac_try" in
2676  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677  *) ac_try_echo=$ac_try;;
2678esac
2679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2680$as_echo "$ac_try_echo"; } >&5
2681  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2682  ac_status=$?
2683  if test -s conftest.err; then
2684    grep -v '^ *+' conftest.err >conftest.er1
2685    cat conftest.er1 >&5
2686    mv -f conftest.er1 conftest.err
2687  fi
2688  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2689  test $ac_status = 0; } > conftest.i && {
2690	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2691	 test ! -s conftest.err
2692       }; then :
2693  ac_retval=0
2694else
2695  $as_echo "$as_me: failed program was:" >&5
2696sed 's/^/| /' conftest.$ac_ext >&5
2697
2698    ac_retval=1
2699fi
2700  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2701  as_fn_set_status $ac_retval
2702
2703} # ac_fn_cxx_try_cpp
2704
2705# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2706# ---------------------------------------------------------
2707# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2708# the include files in INCLUDES and setting the cache variable VAR
2709# accordingly.
2710ac_fn_cxx_check_header_mongrel ()
2711{
2712  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2713  if eval \${$3+:} false; then :
2714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2715$as_echo_n "checking for $2... " >&6; }
2716if eval \${$3+:} false; then :
2717  $as_echo_n "(cached) " >&6
2718fi
2719eval ac_res=\$$3
2720	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2721$as_echo "$ac_res" >&6; }
2722else
2723  # Is the header compilable?
2724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2725$as_echo_n "checking $2 usability... " >&6; }
2726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h.  */
2728$4
2729#include <$2>
2730_ACEOF
2731if ac_fn_cxx_try_compile "$LINENO"; then :
2732  ac_header_compiler=yes
2733else
2734  ac_header_compiler=no
2735fi
2736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2738$as_echo "$ac_header_compiler" >&6; }
2739
2740# Is the header present?
2741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2742$as_echo_n "checking $2 presence... " >&6; }
2743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h.  */
2745#include <$2>
2746_ACEOF
2747if ac_fn_cxx_try_cpp "$LINENO"; then :
2748  ac_header_preproc=yes
2749else
2750  ac_header_preproc=no
2751fi
2752rm -f conftest.err conftest.i conftest.$ac_ext
2753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2754$as_echo "$ac_header_preproc" >&6; }
2755
2756# So?  What about this header?
2757case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2758  yes:no: )
2759    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2760$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2761    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2762$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2763    ;;
2764  no:yes:* )
2765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2766$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2767    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2768$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2769    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2770$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2771    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2772$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2773    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2774$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2775( $as_echo "## ------------------------------------------ ##
2776## Report this to http://bugzilla.scilab.org/ ##
2777## ------------------------------------------ ##"
2778     ) | sed "s/^/$as_me: WARNING:     /" >&2
2779    ;;
2780esac
2781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2782$as_echo_n "checking for $2... " >&6; }
2783if eval \${$3+:} false; then :
2784  $as_echo_n "(cached) " >&6
2785else
2786  eval "$3=\$ac_header_compiler"
2787fi
2788eval ac_res=\$$3
2789	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2790$as_echo "$ac_res" >&6; }
2791fi
2792  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2793
2794} # ac_fn_cxx_check_header_mongrel
2795
2796# ac_fn_cxx_try_run LINENO
2797# ------------------------
2798# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2799# that executables *can* be run.
2800ac_fn_cxx_try_run ()
2801{
2802  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2803  if { { ac_try="$ac_link"
2804case "(($ac_try" in
2805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2806  *) ac_try_echo=$ac_try;;
2807esac
2808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2809$as_echo "$ac_try_echo"; } >&5
2810  (eval "$ac_link") 2>&5
2811  ac_status=$?
2812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2813  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2814  { { case "(($ac_try" in
2815  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2816  *) ac_try_echo=$ac_try;;
2817esac
2818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2819$as_echo "$ac_try_echo"; } >&5
2820  (eval "$ac_try") 2>&5
2821  ac_status=$?
2822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2823  test $ac_status = 0; }; }; then :
2824  ac_retval=0
2825else
2826  $as_echo "$as_me: program exited with status $ac_status" >&5
2827       $as_echo "$as_me: failed program was:" >&5
2828sed 's/^/| /' conftest.$ac_ext >&5
2829
2830       ac_retval=$ac_status
2831fi
2832  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2833  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2834  as_fn_set_status $ac_retval
2835
2836} # ac_fn_cxx_try_run
2837
2838# ac_fn_cxx_try_link LINENO
2839# -------------------------
2840# Try to link conftest.$ac_ext, and return whether this succeeded.
2841ac_fn_cxx_try_link ()
2842{
2843  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2844  rm -f conftest.$ac_objext conftest$ac_exeext
2845  if { { ac_try="$ac_link"
2846case "(($ac_try" in
2847  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2848  *) ac_try_echo=$ac_try;;
2849esac
2850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2851$as_echo "$ac_try_echo"; } >&5
2852  (eval "$ac_link") 2>conftest.err
2853  ac_status=$?
2854  if test -s conftest.err; then
2855    grep -v '^ *+' conftest.err >conftest.er1
2856    cat conftest.er1 >&5
2857    mv -f conftest.er1 conftest.err
2858  fi
2859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2860  test $ac_status = 0; } && {
2861	 test -z "$ac_cxx_werror_flag" ||
2862	 test ! -s conftest.err
2863       } && test -s conftest$ac_exeext && {
2864	 test "$cross_compiling" = yes ||
2865	 test -x conftest$ac_exeext
2866       }; then :
2867  ac_retval=0
2868else
2869  $as_echo "$as_me: failed program was:" >&5
2870sed 's/^/| /' conftest.$ac_ext >&5
2871
2872	ac_retval=1
2873fi
2874  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2875  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2876  # interfere with the next link command; also delete a directory that is
2877  # left behind by Apple's compiler.  We do this before executing the actions.
2878  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2879  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2880  as_fn_set_status $ac_retval
2881
2882} # ac_fn_cxx_try_link
2883
2884# ac_fn_f77_try_link LINENO
2885# -------------------------
2886# Try to link conftest.$ac_ext, and return whether this succeeded.
2887ac_fn_f77_try_link ()
2888{
2889  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2890  rm -f conftest.$ac_objext conftest$ac_exeext
2891  if { { ac_try="$ac_link"
2892case "(($ac_try" in
2893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2894  *) ac_try_echo=$ac_try;;
2895esac
2896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2897$as_echo "$ac_try_echo"; } >&5
2898  (eval "$ac_link") 2>conftest.err
2899  ac_status=$?
2900  if test -s conftest.err; then
2901    grep -v '^ *+' conftest.err >conftest.er1
2902    cat conftest.er1 >&5
2903    mv -f conftest.er1 conftest.err
2904  fi
2905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2906  test $ac_status = 0; } && {
2907	 test -z "$ac_f77_werror_flag" ||
2908	 test ! -s conftest.err
2909       } && test -s conftest$ac_exeext && {
2910	 test "$cross_compiling" = yes ||
2911	 test -x conftest$ac_exeext
2912       }; then :
2913  ac_retval=0
2914else
2915  $as_echo "$as_me: failed program was:" >&5
2916sed 's/^/| /' conftest.$ac_ext >&5
2917
2918	ac_retval=1
2919fi
2920  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2921  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2922  # interfere with the next link command; also delete a directory that is
2923  # left behind by Apple's compiler.  We do this before executing the actions.
2924  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926  as_fn_set_status $ac_retval
2927
2928} # ac_fn_f77_try_link
2929cat >config.log <<_ACEOF
2930This file contains any messages produced by compilers while
2931running configure, to aid debugging if configure makes a mistake.
2932
2933It was created by Scilab $as_me 6, which was
2934generated by GNU Autoconf 2.69.  Invocation command line was
2935
2936  $ $0 $@
2937
2938_ACEOF
2939exec 5>>config.log
2940{
2941cat <<_ASUNAME
2942## --------- ##
2943## Platform. ##
2944## --------- ##
2945
2946hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2947uname -m = `(uname -m) 2>/dev/null || echo unknown`
2948uname -r = `(uname -r) 2>/dev/null || echo unknown`
2949uname -s = `(uname -s) 2>/dev/null || echo unknown`
2950uname -v = `(uname -v) 2>/dev/null || echo unknown`
2951
2952/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2953/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2954
2955/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2956/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2957/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2958/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2959/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2960/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2961/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2962
2963_ASUNAME
2964
2965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2966for as_dir in $PATH
2967do
2968  IFS=$as_save_IFS
2969  test -z "$as_dir" && as_dir=.
2970    $as_echo "PATH: $as_dir"
2971  done
2972IFS=$as_save_IFS
2973
2974} >&5
2975
2976cat >&5 <<_ACEOF
2977
2978
2979## ----------- ##
2980## Core tests. ##
2981## ----------- ##
2982
2983_ACEOF
2984
2985
2986# Keep a trace of the command line.
2987# Strip out --no-create and --no-recursion so they do not pile up.
2988# Strip out --silent because we don't want to record it for future runs.
2989# Also quote any args containing shell meta-characters.
2990# Make two passes to allow for proper duplicate-argument suppression.
2991ac_configure_args=
2992ac_configure_args0=
2993ac_configure_args1=
2994ac_must_keep_next=false
2995for ac_pass in 1 2
2996do
2997  for ac_arg
2998  do
2999    case $ac_arg in
3000    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3001    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3002    | -silent | --silent | --silen | --sile | --sil)
3003      continue ;;
3004    *\'*)
3005      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3006    esac
3007    case $ac_pass in
3008    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3009    2)
3010      as_fn_append ac_configure_args1 " '$ac_arg'"
3011      if test $ac_must_keep_next = true; then
3012	ac_must_keep_next=false # Got value, back to normal.
3013      else
3014	case $ac_arg in
3015	  *=* | --config-cache | -C | -disable-* | --disable-* \
3016	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3017	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3018	  | -with-* | --with-* | -without-* | --without-* | --x)
3019	    case "$ac_configure_args0 " in
3020	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3021	    esac
3022	    ;;
3023	  -* ) ac_must_keep_next=true ;;
3024	esac
3025      fi
3026      as_fn_append ac_configure_args " '$ac_arg'"
3027      ;;
3028    esac
3029  done
3030done
3031{ ac_configure_args0=; unset ac_configure_args0;}
3032{ ac_configure_args1=; unset ac_configure_args1;}
3033
3034# When interrupted or exit'd, cleanup temporary files, and complete
3035# config.log.  We remove comments because anyway the quotes in there
3036# would cause problems or look ugly.
3037# WARNING: Use '\'' to represent an apostrophe within the trap.
3038# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3039trap 'exit_status=$?
3040  # Save into config.log some information that might help in debugging.
3041  {
3042    echo
3043
3044    $as_echo "## ---------------- ##
3045## Cache variables. ##
3046## ---------------- ##"
3047    echo
3048    # The following way of writing the cache mishandles newlines in values,
3049(
3050  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3051    eval ac_val=\$$ac_var
3052    case $ac_val in #(
3053    *${as_nl}*)
3054      case $ac_var in #(
3055      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3056$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3057      esac
3058      case $ac_var in #(
3059      _ | IFS | as_nl) ;; #(
3060      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3061      *) { eval $ac_var=; unset $ac_var;} ;;
3062      esac ;;
3063    esac
3064  done
3065  (set) 2>&1 |
3066    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3067    *${as_nl}ac_space=\ *)
3068      sed -n \
3069	"s/'\''/'\''\\\\'\'''\''/g;
3070	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3071      ;; #(
3072    *)
3073      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3074      ;;
3075    esac |
3076    sort
3077)
3078    echo
3079
3080    $as_echo "## ----------------- ##
3081## Output variables. ##
3082## ----------------- ##"
3083    echo
3084    for ac_var in $ac_subst_vars
3085    do
3086      eval ac_val=\$$ac_var
3087      case $ac_val in
3088      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3089      esac
3090      $as_echo "$ac_var='\''$ac_val'\''"
3091    done | sort
3092    echo
3093
3094    if test -n "$ac_subst_files"; then
3095      $as_echo "## ------------------- ##
3096## File substitutions. ##
3097## ------------------- ##"
3098      echo
3099      for ac_var in $ac_subst_files
3100      do
3101	eval ac_val=\$$ac_var
3102	case $ac_val in
3103	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3104	esac
3105	$as_echo "$ac_var='\''$ac_val'\''"
3106      done | sort
3107      echo
3108    fi
3109
3110    if test -s confdefs.h; then
3111      $as_echo "## ----------- ##
3112## confdefs.h. ##
3113## ----------- ##"
3114      echo
3115      cat confdefs.h
3116      echo
3117    fi
3118    test "$ac_signal" != 0 &&
3119      $as_echo "$as_me: caught signal $ac_signal"
3120    $as_echo "$as_me: exit $exit_status"
3121  } >&5
3122  rm -f core *.core core.conftest.* &&
3123    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3124    exit $exit_status
3125' 0
3126for ac_signal in 1 2 13 15; do
3127  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3128done
3129ac_signal=0
3130
3131# confdefs.h avoids OS command line length limits that DEFS can exceed.
3132rm -f -r conftest* confdefs.h
3133
3134$as_echo "/* confdefs.h */" > confdefs.h
3135
3136# Predefined preprocessor variables.
3137
3138cat >>confdefs.h <<_ACEOF
3139#define PACKAGE_NAME "$PACKAGE_NAME"
3140_ACEOF
3141
3142cat >>confdefs.h <<_ACEOF
3143#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3144_ACEOF
3145
3146cat >>confdefs.h <<_ACEOF
3147#define PACKAGE_VERSION "$PACKAGE_VERSION"
3148_ACEOF
3149
3150cat >>confdefs.h <<_ACEOF
3151#define PACKAGE_STRING "$PACKAGE_STRING"
3152_ACEOF
3153
3154cat >>confdefs.h <<_ACEOF
3155#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3156_ACEOF
3157
3158cat >>confdefs.h <<_ACEOF
3159#define PACKAGE_URL "$PACKAGE_URL"
3160_ACEOF
3161
3162
3163# Let the site file select an alternate cache file if it wants to.
3164# Prefer an explicitly selected file to automatically selected ones.
3165ac_site_file1=NONE
3166ac_site_file2=NONE
3167if test -n "$CONFIG_SITE"; then
3168  # We do not want a PATH search for config.site.
3169  case $CONFIG_SITE in #((
3170    -*)  ac_site_file1=./$CONFIG_SITE;;
3171    */*) ac_site_file1=$CONFIG_SITE;;
3172    *)   ac_site_file1=./$CONFIG_SITE;;
3173  esac
3174elif test "x$prefix" != xNONE; then
3175  ac_site_file1=$prefix/share/config.site
3176  ac_site_file2=$prefix/etc/config.site
3177else
3178  ac_site_file1=$ac_default_prefix/share/config.site
3179  ac_site_file2=$ac_default_prefix/etc/config.site
3180fi
3181for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3182do
3183  test "x$ac_site_file" = xNONE && continue
3184  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3185    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3186$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3187    sed 's/^/| /' "$ac_site_file" >&5
3188    . "$ac_site_file" \
3189      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3191as_fn_error $? "failed to load site script $ac_site_file
3192See \`config.log' for more details" "$LINENO" 5; }
3193  fi
3194done
3195
3196if test -r "$cache_file"; then
3197  # Some versions of bash will fail to source /dev/null (special files
3198  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3199  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3200    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3201$as_echo "$as_me: loading cache $cache_file" >&6;}
3202    case $cache_file in
3203      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3204      *)                      . "./$cache_file";;
3205    esac
3206  fi
3207else
3208  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3209$as_echo "$as_me: creating cache $cache_file" >&6;}
3210  >$cache_file
3211fi
3212
3213gt_needs="$gt_needs "
3214# Check that the precious variables saved in the cache have kept the same
3215# value.
3216ac_cache_corrupted=false
3217for ac_var in $ac_precious_vars; do
3218  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3219  eval ac_new_set=\$ac_env_${ac_var}_set
3220  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3221  eval ac_new_val=\$ac_env_${ac_var}_value
3222  case $ac_old_set,$ac_new_set in
3223    set,)
3224      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3225$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3226      ac_cache_corrupted=: ;;
3227    ,set)
3228      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3229$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3230      ac_cache_corrupted=: ;;
3231    ,);;
3232    *)
3233      if test "x$ac_old_val" != "x$ac_new_val"; then
3234	# differences in whitespace do not lead to failure.
3235	ac_old_val_w=`echo x $ac_old_val`
3236	ac_new_val_w=`echo x $ac_new_val`
3237	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3238	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3239$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3240	  ac_cache_corrupted=:
3241	else
3242	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3243$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3244	  eval $ac_var=\$ac_old_val
3245	fi
3246	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3247$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3248	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3249$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3250      fi;;
3251  esac
3252  # Pass precious variables to config.status.
3253  if test "$ac_new_set" = set; then
3254    case $ac_new_val in
3255    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3256    *) ac_arg=$ac_var=$ac_new_val ;;
3257    esac
3258    case " $ac_configure_args " in
3259      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3260      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3261    esac
3262  fi
3263done
3264if $ac_cache_corrupted; then
3265  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3267  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3268$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3269  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3270fi
3271## -------------------- ##
3272## Main body of script. ##
3273## -------------------- ##
3274
3275ac_ext=c
3276ac_cpp='$CPP $CPPFLAGS'
3277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3279ac_compiler_gnu=$ac_cv_c_compiler_gnu
3280
3281
3282
3283
3284
3285SCI_BUILDDIR="`pwd`"
3286SCI_SRCDIR="$srcdir"
3287SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`"
3288
3289if test -d "$SCI_SRCDIR_FULL/usr"; then
3290    WITH_DEVTOOLS=true
3291    DEVTOOLS_BINDIR="$SCI_SRCDIR_FULL/usr/bin"
3292    DEVTOOLS_INCDIR="$SCI_SRCDIR_FULL/usr/include"
3293    DEVTOOLS_LIBDIR="$SCI_SRCDIR_FULL/usr/lib"
3294    export LD_LIBRARY_PATH="$DEVTOOLS_LIBDIR:$LD_LIBRARY_PATH"
3295else
3296    WITH_DEVTOOLS=false
3297    DEVTOOLS_BINDIR=
3298    DEVTOOLS_INCDIR=
3299    DEVTOOLS_LIBDIR=
3300fi
3301
3302SCILAB_VERSION_MAJOR=6
3303SCILAB_VERSION_MINOR=1
3304SCILAB_VERSION_MAINTENANCE=1
3305
3306
3307
3308
3309
3310SCILAB_LIBRARY_VERSION=$SCILAB_VERSION_MAJOR:$SCILAB_VERSION_MINOR:$SCILAB_VERSION_MAINTENANCE
3311
3312
3313SCILAB_BINARY_VERSION=$SCILAB_VERSION_MAJOR.$SCILAB_VERSION_MINOR.$SCILAB_VERSION_MAINTENANCE
3314
3315
3316#shared library versioning
3317#GENERIC_LIBRARY_VERSION=1:2:0
3318#                       | | |
3319#                +------+ | +---+
3320#                |        |     |
3321#             current:revision:age
3322#                |        |     |
3323#                |        |     +- increment if interfaces have been added
3324#                |        |        set to zero if interfaces have been removed
3325#                                  or changed
3326#                |        +- increment if source code has changed
3327#                |           set to zero if current is incremented
3328#                +- increment if interfaces have been added, removed or changed
3329
3330# Check if we have a space in the path to the source tree
3331SPACE_IN_PATH=`echo "$SCI_SRCDIR_FULL"|grep " " > /dev/null; echo $?`
3332if test "$SPACE_IN_PATH" = "0"; then
3333   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: =====================================" >&5
3334$as_echo "$as_me: WARNING: =====================================" >&2;}
3335   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Configure thinks that there is a space in the path to the source. This may cause problem with libtool and some other things..." >&5
3336$as_echo "$as_me: WARNING: Configure thinks that there is a space in the path to the source. This may cause problem with libtool and some other things..." >&2;}
3337   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: =====================================" >&5
3338$as_echo "$as_me: WARNING: =====================================" >&2;}
3339   sleep 180
3340fi
3341
3342ac_aux_dir=
3343for ac_dir in config "$srcdir"/config; do
3344  if test -f "$ac_dir/install-sh"; then
3345    ac_aux_dir=$ac_dir
3346    ac_install_sh="$ac_aux_dir/install-sh -c"
3347    break
3348  elif test -f "$ac_dir/install.sh"; then
3349    ac_aux_dir=$ac_dir
3350    ac_install_sh="$ac_aux_dir/install.sh -c"
3351    break
3352  elif test -f "$ac_dir/shtool"; then
3353    ac_aux_dir=$ac_dir
3354    ac_install_sh="$ac_aux_dir/shtool install -c"
3355    break
3356  fi
3357done
3358if test -z "$ac_aux_dir"; then
3359  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
3360fi
3361
3362# These three variables are undocumented and unsupported,
3363# and are intended to be withdrawn in a future Autoconf release.
3364# They can cause serious problems if a builder's source tree is in a directory
3365# whose full name contains unusual characters.
3366ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3367ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3368ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3369
3370
3371ac_config_headers="$ac_config_headers modules/core/includes/machine.h"
3372
3373
3374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
3375$as_echo_n "checking whether ln -s works... " >&6; }
3376LN_S=$as_ln_s
3377if test "$LN_S" = "ln -s"; then
3378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3379$as_echo "yes" >&6; }
3380else
3381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
3382$as_echo "no, using $LN_S" >&6; }
3383fi
3384
3385# Expand $ac_aux_dir to an absolute path.
3386am_aux_dir=`cd "$ac_aux_dir" && pwd`
3387
3388ac_ext=c
3389ac_cpp='$CPP $CPPFLAGS'
3390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3392ac_compiler_gnu=$ac_cv_c_compiler_gnu
3393if test -n "$ac_tool_prefix"; then
3394  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3395set dummy ${ac_tool_prefix}gcc; ac_word=$2
3396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3397$as_echo_n "checking for $ac_word... " >&6; }
3398if ${ac_cv_prog_CC+:} false; then :
3399  $as_echo_n "(cached) " >&6
3400else
3401  if test -n "$CC"; then
3402  ac_cv_prog_CC="$CC" # Let the user override the test.
3403else
3404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3405for as_dir in $PATH
3406do
3407  IFS=$as_save_IFS
3408  test -z "$as_dir" && as_dir=.
3409    for ac_exec_ext in '' $ac_executable_extensions; do
3410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3411    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3413    break 2
3414  fi
3415done
3416  done
3417IFS=$as_save_IFS
3418
3419fi
3420fi
3421CC=$ac_cv_prog_CC
3422if test -n "$CC"; then
3423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3424$as_echo "$CC" >&6; }
3425else
3426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427$as_echo "no" >&6; }
3428fi
3429
3430
3431fi
3432if test -z "$ac_cv_prog_CC"; then
3433  ac_ct_CC=$CC
3434  # Extract the first word of "gcc", so it can be a program name with args.
3435set dummy gcc; ac_word=$2
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3437$as_echo_n "checking for $ac_word... " >&6; }
3438if ${ac_cv_prog_ac_ct_CC+:} false; then :
3439  $as_echo_n "(cached) " >&6
3440else
3441  if test -n "$ac_ct_CC"; then
3442  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3443else
3444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3445for as_dir in $PATH
3446do
3447  IFS=$as_save_IFS
3448  test -z "$as_dir" && as_dir=.
3449    for ac_exec_ext in '' $ac_executable_extensions; do
3450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3451    ac_cv_prog_ac_ct_CC="gcc"
3452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3453    break 2
3454  fi
3455done
3456  done
3457IFS=$as_save_IFS
3458
3459fi
3460fi
3461ac_ct_CC=$ac_cv_prog_ac_ct_CC
3462if test -n "$ac_ct_CC"; then
3463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3464$as_echo "$ac_ct_CC" >&6; }
3465else
3466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3467$as_echo "no" >&6; }
3468fi
3469
3470  if test "x$ac_ct_CC" = x; then
3471    CC=""
3472  else
3473    case $cross_compiling:$ac_tool_warned in
3474yes:)
3475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3477ac_tool_warned=yes ;;
3478esac
3479    CC=$ac_ct_CC
3480  fi
3481else
3482  CC="$ac_cv_prog_CC"
3483fi
3484
3485if test -z "$CC"; then
3486          if test -n "$ac_tool_prefix"; then
3487    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3488set dummy ${ac_tool_prefix}cc; ac_word=$2
3489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3490$as_echo_n "checking for $ac_word... " >&6; }
3491if ${ac_cv_prog_CC+:} false; then :
3492  $as_echo_n "(cached) " >&6
3493else
3494  if test -n "$CC"; then
3495  ac_cv_prog_CC="$CC" # Let the user override the test.
3496else
3497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498for as_dir in $PATH
3499do
3500  IFS=$as_save_IFS
3501  test -z "$as_dir" && as_dir=.
3502    for ac_exec_ext in '' $ac_executable_extensions; do
3503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3504    ac_cv_prog_CC="${ac_tool_prefix}cc"
3505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3506    break 2
3507  fi
3508done
3509  done
3510IFS=$as_save_IFS
3511
3512fi
3513fi
3514CC=$ac_cv_prog_CC
3515if test -n "$CC"; then
3516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3517$as_echo "$CC" >&6; }
3518else
3519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3520$as_echo "no" >&6; }
3521fi
3522
3523
3524  fi
3525fi
3526if test -z "$CC"; then
3527  # Extract the first word of "cc", so it can be a program name with args.
3528set dummy cc; ac_word=$2
3529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3530$as_echo_n "checking for $ac_word... " >&6; }
3531if ${ac_cv_prog_CC+:} false; then :
3532  $as_echo_n "(cached) " >&6
3533else
3534  if test -n "$CC"; then
3535  ac_cv_prog_CC="$CC" # Let the user override the test.
3536else
3537  ac_prog_rejected=no
3538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3539for as_dir in $PATH
3540do
3541  IFS=$as_save_IFS
3542  test -z "$as_dir" && as_dir=.
3543    for ac_exec_ext in '' $ac_executable_extensions; do
3544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3545    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3546       ac_prog_rejected=yes
3547       continue
3548     fi
3549    ac_cv_prog_CC="cc"
3550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3551    break 2
3552  fi
3553done
3554  done
3555IFS=$as_save_IFS
3556
3557if test $ac_prog_rejected = yes; then
3558  # We found a bogon in the path, so make sure we never use it.
3559  set dummy $ac_cv_prog_CC
3560  shift
3561  if test $# != 0; then
3562    # We chose a different compiler from the bogus one.
3563    # However, it has the same basename, so the bogon will be chosen
3564    # first if we set CC to just the basename; use the full file name.
3565    shift
3566    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3567  fi
3568fi
3569fi
3570fi
3571CC=$ac_cv_prog_CC
3572if test -n "$CC"; then
3573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3574$as_echo "$CC" >&6; }
3575else
3576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3577$as_echo "no" >&6; }
3578fi
3579
3580
3581fi
3582if test -z "$CC"; then
3583  if test -n "$ac_tool_prefix"; then
3584  for ac_prog in cl.exe
3585  do
3586    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3589$as_echo_n "checking for $ac_word... " >&6; }
3590if ${ac_cv_prog_CC+:} false; then :
3591  $as_echo_n "(cached) " >&6
3592else
3593  if test -n "$CC"; then
3594  ac_cv_prog_CC="$CC" # Let the user override the test.
3595else
3596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3597for as_dir in $PATH
3598do
3599  IFS=$as_save_IFS
3600  test -z "$as_dir" && as_dir=.
3601    for ac_exec_ext in '' $ac_executable_extensions; do
3602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3603    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3605    break 2
3606  fi
3607done
3608  done
3609IFS=$as_save_IFS
3610
3611fi
3612fi
3613CC=$ac_cv_prog_CC
3614if test -n "$CC"; then
3615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3616$as_echo "$CC" >&6; }
3617else
3618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3619$as_echo "no" >&6; }
3620fi
3621
3622
3623    test -n "$CC" && break
3624  done
3625fi
3626if test -z "$CC"; then
3627  ac_ct_CC=$CC
3628  for ac_prog in cl.exe
3629do
3630  # Extract the first word of "$ac_prog", so it can be a program name with args.
3631set dummy $ac_prog; ac_word=$2
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
3634if ${ac_cv_prog_ac_ct_CC+:} false; then :
3635  $as_echo_n "(cached) " >&6
3636else
3637  if test -n "$ac_ct_CC"; then
3638  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3639else
3640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643  IFS=$as_save_IFS
3644  test -z "$as_dir" && as_dir=.
3645    for ac_exec_ext in '' $ac_executable_extensions; do
3646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3647    ac_cv_prog_ac_ct_CC="$ac_prog"
3648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3649    break 2
3650  fi
3651done
3652  done
3653IFS=$as_save_IFS
3654
3655fi
3656fi
3657ac_ct_CC=$ac_cv_prog_ac_ct_CC
3658if test -n "$ac_ct_CC"; then
3659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3660$as_echo "$ac_ct_CC" >&6; }
3661else
3662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
3664fi
3665
3666
3667  test -n "$ac_ct_CC" && break
3668done
3669
3670  if test "x$ac_ct_CC" = x; then
3671    CC=""
3672  else
3673    case $cross_compiling:$ac_tool_warned in
3674yes:)
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3677ac_tool_warned=yes ;;
3678esac
3679    CC=$ac_ct_CC
3680  fi
3681fi
3682
3683fi
3684
3685
3686test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3688as_fn_error $? "no acceptable C compiler found in \$PATH
3689See \`config.log' for more details" "$LINENO" 5; }
3690
3691# Provide some information about the compiler.
3692$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3693set X $ac_compile
3694ac_compiler=$2
3695for ac_option in --version -v -V -qversion; do
3696  { { ac_try="$ac_compiler $ac_option >&5"
3697case "(($ac_try" in
3698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3699  *) ac_try_echo=$ac_try;;
3700esac
3701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3702$as_echo "$ac_try_echo"; } >&5
3703  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3704  ac_status=$?
3705  if test -s conftest.err; then
3706    sed '10a\
3707... rest of stderr output deleted ...
3708         10q' conftest.err >conftest.er1
3709    cat conftest.er1 >&5
3710  fi
3711  rm -f conftest.er1 conftest.err
3712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3713  test $ac_status = 0; }
3714done
3715
3716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3717/* end confdefs.h.  */
3718
3719int
3720main ()
3721{
3722
3723  ;
3724  return 0;
3725}
3726_ACEOF
3727ac_clean_files_save=$ac_clean_files
3728ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3729# Try to create an executable without -o first, disregard a.out.
3730# It will help us diagnose broken compilers, and finding out an intuition
3731# of exeext.
3732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3733$as_echo_n "checking whether the C compiler works... " >&6; }
3734ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3735
3736# The possible output files:
3737ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3738
3739ac_rmfiles=
3740for ac_file in $ac_files
3741do
3742  case $ac_file in
3743    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3744    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3745  esac
3746done
3747rm -f $ac_rmfiles
3748
3749if { { ac_try="$ac_link_default"
3750case "(($ac_try" in
3751  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3752  *) ac_try_echo=$ac_try;;
3753esac
3754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3755$as_echo "$ac_try_echo"; } >&5
3756  (eval "$ac_link_default") 2>&5
3757  ac_status=$?
3758  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3759  test $ac_status = 0; }; then :
3760  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3761# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3762# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3763# so that the user can short-circuit this test for compilers unknown to
3764# Autoconf.
3765for ac_file in $ac_files ''
3766do
3767  test -f "$ac_file" || continue
3768  case $ac_file in
3769    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3770	;;
3771    [ab].out )
3772	# We found the default executable, but exeext='' is most
3773	# certainly right.
3774	break;;
3775    *.* )
3776	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3777	then :; else
3778	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3779	fi
3780	# We set ac_cv_exeext here because the later test for it is not
3781	# safe: cross compilers may not add the suffix if given an `-o'
3782	# argument, so we may need to know it at that point already.
3783	# Even if this section looks crufty: it has the advantage of
3784	# actually working.
3785	break;;
3786    * )
3787	break;;
3788  esac
3789done
3790test "$ac_cv_exeext" = no && ac_cv_exeext=
3791
3792else
3793  ac_file=''
3794fi
3795if test -z "$ac_file"; then :
3796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
3798$as_echo "$as_me: failed program was:" >&5
3799sed 's/^/| /' conftest.$ac_ext >&5
3800
3801{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3803as_fn_error 77 "C compiler cannot create executables
3804See \`config.log' for more details" "$LINENO" 5; }
3805else
3806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3807$as_echo "yes" >&6; }
3808fi
3809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3810$as_echo_n "checking for C compiler default output file name... " >&6; }
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3812$as_echo "$ac_file" >&6; }
3813ac_exeext=$ac_cv_exeext
3814
3815rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3816ac_clean_files=$ac_clean_files_save
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3818$as_echo_n "checking for suffix of executables... " >&6; }
3819if { { ac_try="$ac_link"
3820case "(($ac_try" in
3821  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822  *) ac_try_echo=$ac_try;;
3823esac
3824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3825$as_echo "$ac_try_echo"; } >&5
3826  (eval "$ac_link") 2>&5
3827  ac_status=$?
3828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3829  test $ac_status = 0; }; then :
3830  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3831# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3832# work properly (i.e., refer to `conftest.exe'), while it won't with
3833# `rm'.
3834for ac_file in conftest.exe conftest conftest.*; do
3835  test -f "$ac_file" || continue
3836  case $ac_file in
3837    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3838    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3839	  break;;
3840    * ) break;;
3841  esac
3842done
3843else
3844  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3846as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3847See \`config.log' for more details" "$LINENO" 5; }
3848fi
3849rm -f conftest conftest$ac_cv_exeext
3850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3851$as_echo "$ac_cv_exeext" >&6; }
3852
3853rm -f conftest.$ac_ext
3854EXEEXT=$ac_cv_exeext
3855ac_exeext=$EXEEXT
3856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3857/* end confdefs.h.  */
3858#include <stdio.h>
3859int
3860main ()
3861{
3862FILE *f = fopen ("conftest.out", "w");
3863 return ferror (f) || fclose (f) != 0;
3864
3865  ;
3866  return 0;
3867}
3868_ACEOF
3869ac_clean_files="$ac_clean_files conftest.out"
3870# Check that the compiler produces executables we can run.  If not, either
3871# the compiler is broken, or we cross compile.
3872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3873$as_echo_n "checking whether we are cross compiling... " >&6; }
3874if test "$cross_compiling" != yes; then
3875  { { ac_try="$ac_link"
3876case "(($ac_try" in
3877  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3878  *) ac_try_echo=$ac_try;;
3879esac
3880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3881$as_echo "$ac_try_echo"; } >&5
3882  (eval "$ac_link") 2>&5
3883  ac_status=$?
3884  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3885  test $ac_status = 0; }
3886  if { ac_try='./conftest$ac_cv_exeext'
3887  { { case "(($ac_try" in
3888  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3889  *) ac_try_echo=$ac_try;;
3890esac
3891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3892$as_echo "$ac_try_echo"; } >&5
3893  (eval "$ac_try") 2>&5
3894  ac_status=$?
3895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896  test $ac_status = 0; }; }; then
3897    cross_compiling=no
3898  else
3899    if test "$cross_compiling" = maybe; then
3900	cross_compiling=yes
3901    else
3902	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3904as_fn_error $? "cannot run C compiled programs.
3905If you meant to cross compile, use \`--host'.
3906See \`config.log' for more details" "$LINENO" 5; }
3907    fi
3908  fi
3909fi
3910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3911$as_echo "$cross_compiling" >&6; }
3912
3913rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3914ac_clean_files=$ac_clean_files_save
3915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3916$as_echo_n "checking for suffix of object files... " >&6; }
3917if ${ac_cv_objext+:} false; then :
3918  $as_echo_n "(cached) " >&6
3919else
3920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3921/* end confdefs.h.  */
3922
3923int
3924main ()
3925{
3926
3927  ;
3928  return 0;
3929}
3930_ACEOF
3931rm -f conftest.o conftest.obj
3932if { { ac_try="$ac_compile"
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_compile") 2>&5
3940  ac_status=$?
3941  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942  test $ac_status = 0; }; then :
3943  for ac_file in conftest.o conftest.obj conftest.*; do
3944  test -f "$ac_file" || continue;
3945  case $ac_file in
3946    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3947    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3948       break;;
3949  esac
3950done
3951else
3952  $as_echo "$as_me: failed program was:" >&5
3953sed 's/^/| /' conftest.$ac_ext >&5
3954
3955{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3957as_fn_error $? "cannot compute suffix of object files: cannot compile
3958See \`config.log' for more details" "$LINENO" 5; }
3959fi
3960rm -f conftest.$ac_cv_objext conftest.$ac_ext
3961fi
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3963$as_echo "$ac_cv_objext" >&6; }
3964OBJEXT=$ac_cv_objext
3965ac_objext=$OBJEXT
3966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3967$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3968if ${ac_cv_c_compiler_gnu+:} false; then :
3969  $as_echo_n "(cached) " >&6
3970else
3971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3972/* end confdefs.h.  */
3973
3974int
3975main ()
3976{
3977#ifndef __GNUC__
3978       choke me
3979#endif
3980
3981  ;
3982  return 0;
3983}
3984_ACEOF
3985if ac_fn_c_try_compile "$LINENO"; then :
3986  ac_compiler_gnu=yes
3987else
3988  ac_compiler_gnu=no
3989fi
3990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3991ac_cv_c_compiler_gnu=$ac_compiler_gnu
3992
3993fi
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3995$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3996if test $ac_compiler_gnu = yes; then
3997  GCC=yes
3998else
3999  GCC=
4000fi
4001ac_test_CFLAGS=${CFLAGS+set}
4002ac_save_CFLAGS=$CFLAGS
4003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4004$as_echo_n "checking whether $CC accepts -g... " >&6; }
4005if ${ac_cv_prog_cc_g+:} false; then :
4006  $as_echo_n "(cached) " >&6
4007else
4008  ac_save_c_werror_flag=$ac_c_werror_flag
4009   ac_c_werror_flag=yes
4010   ac_cv_prog_cc_g=no
4011   CFLAGS="-g"
4012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4013/* end confdefs.h.  */
4014
4015int
4016main ()
4017{
4018
4019  ;
4020  return 0;
4021}
4022_ACEOF
4023if ac_fn_c_try_compile "$LINENO"; then :
4024  ac_cv_prog_cc_g=yes
4025else
4026  CFLAGS=""
4027      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4028/* end confdefs.h.  */
4029
4030int
4031main ()
4032{
4033
4034  ;
4035  return 0;
4036}
4037_ACEOF
4038if ac_fn_c_try_compile "$LINENO"; then :
4039
4040else
4041  ac_c_werror_flag=$ac_save_c_werror_flag
4042	 CFLAGS="-g"
4043	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044/* end confdefs.h.  */
4045
4046int
4047main ()
4048{
4049
4050  ;
4051  return 0;
4052}
4053_ACEOF
4054if ac_fn_c_try_compile "$LINENO"; then :
4055  ac_cv_prog_cc_g=yes
4056fi
4057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4058fi
4059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4060fi
4061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4062   ac_c_werror_flag=$ac_save_c_werror_flag
4063fi
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4065$as_echo "$ac_cv_prog_cc_g" >&6; }
4066if test "$ac_test_CFLAGS" = set; then
4067  CFLAGS=$ac_save_CFLAGS
4068elif test $ac_cv_prog_cc_g = yes; then
4069  if test "$GCC" = yes; then
4070    CFLAGS="-g -O2"
4071  else
4072    CFLAGS="-g"
4073  fi
4074else
4075  if test "$GCC" = yes; then
4076    CFLAGS="-O2"
4077  else
4078    CFLAGS=
4079  fi
4080fi
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4082$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4083if ${ac_cv_prog_cc_c89+:} false; then :
4084  $as_echo_n "(cached) " >&6
4085else
4086  ac_cv_prog_cc_c89=no
4087ac_save_CC=$CC
4088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4089/* end confdefs.h.  */
4090#include <stdarg.h>
4091#include <stdio.h>
4092struct stat;
4093/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4094struct buf { int x; };
4095FILE * (*rcsopen) (struct buf *, struct stat *, int);
4096static char *e (p, i)
4097     char **p;
4098     int i;
4099{
4100  return p[i];
4101}
4102static char *f (char * (*g) (char **, int), char **p, ...)
4103{
4104  char *s;
4105  va_list v;
4106  va_start (v,p);
4107  s = g (p, va_arg (v,int));
4108  va_end (v);
4109  return s;
4110}
4111
4112/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4113   function prototypes and stuff, but not '\xHH' hex character constants.
4114   These don't provoke an error unfortunately, instead are silently treated
4115   as 'x'.  The following induces an error, until -std is added to get
4116   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4117   array size at least.  It's necessary to write '\x00'==0 to get something
4118   that's true only with -std.  */
4119int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4120
4121/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4122   inside strings and character constants.  */
4123#define FOO(x) 'x'
4124int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4125
4126int test (int i, double x);
4127struct s1 {int (*f) (int a);};
4128struct s2 {int (*f) (double a);};
4129int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4130int argc;
4131char **argv;
4132int
4133main ()
4134{
4135return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4136  ;
4137  return 0;
4138}
4139_ACEOF
4140for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4141	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4142do
4143  CC="$ac_save_CC $ac_arg"
4144  if ac_fn_c_try_compile "$LINENO"; then :
4145  ac_cv_prog_cc_c89=$ac_arg
4146fi
4147rm -f core conftest.err conftest.$ac_objext
4148  test "x$ac_cv_prog_cc_c89" != "xno" && break
4149done
4150rm -f conftest.$ac_ext
4151CC=$ac_save_CC
4152
4153fi
4154# AC_CACHE_VAL
4155case "x$ac_cv_prog_cc_c89" in
4156  x)
4157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4158$as_echo "none needed" >&6; } ;;
4159  xno)
4160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4161$as_echo "unsupported" >&6; } ;;
4162  *)
4163    CC="$CC $ac_cv_prog_cc_c89"
4164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4165$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4166esac
4167if test "x$ac_cv_prog_cc_c89" != xno; then :
4168
4169fi
4170
4171ac_ext=c
4172ac_cpp='$CPP $CPPFLAGS'
4173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4175ac_compiler_gnu=$ac_cv_c_compiler_gnu
4176
4177ac_ext=c
4178ac_cpp='$CPP $CPPFLAGS'
4179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4181ac_compiler_gnu=$ac_cv_c_compiler_gnu
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4183$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4184if ${am_cv_prog_cc_c_o+:} false; then :
4185  $as_echo_n "(cached) " >&6
4186else
4187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4188/* end confdefs.h.  */
4189
4190int
4191main ()
4192{
4193
4194  ;
4195  return 0;
4196}
4197_ACEOF
4198  # Make sure it works both with $CC and with simple cc.
4199  # Following AC_PROG_CC_C_O, we do the test twice because some
4200  # compilers refuse to overwrite an existing .o file with -o,
4201  # though they will create one.
4202  am_cv_prog_cc_c_o=yes
4203  for am_i in 1 2; do
4204    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4205   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4206   ac_status=$?
4207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208   (exit $ac_status); } \
4209         && test -f conftest2.$ac_objext; then
4210      : OK
4211    else
4212      am_cv_prog_cc_c_o=no
4213      break
4214    fi
4215  done
4216  rm -f core conftest*
4217  unset am_i
4218fi
4219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4220$as_echo "$am_cv_prog_cc_c_o" >&6; }
4221if test "$am_cv_prog_cc_c_o" != yes; then
4222   # Losing compiler, so override with the script.
4223   # FIXME: It is wrong to rewrite CC.
4224   # But if we don't then we get into trouble of one sort or another.
4225   # A longer-term fix would be to have automake use am__CC in this case,
4226   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4227   CC="$am_aux_dir/compile $CC"
4228fi
4229ac_ext=c
4230ac_cpp='$CPP $CPPFLAGS'
4231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4233ac_compiler_gnu=$ac_cv_c_compiler_gnu
4234
4235
4236
4237if test -n "$ac_tool_prefix"; then
4238  for ac_prog in ar lib "link -lib"
4239  do
4240    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4241set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if ${ac_cv_prog_AR+:} false; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  if test -n "$AR"; then
4248  ac_cv_prog_AR="$AR" # Let the user override the test.
4249else
4250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251for as_dir in $PATH
4252do
4253  IFS=$as_save_IFS
4254  test -z "$as_dir" && as_dir=.
4255    for ac_exec_ext in '' $ac_executable_extensions; do
4256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4257    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
4258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4259    break 2
4260  fi
4261done
4262  done
4263IFS=$as_save_IFS
4264
4265fi
4266fi
4267AR=$ac_cv_prog_AR
4268if test -n "$AR"; then
4269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4270$as_echo "$AR" >&6; }
4271else
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273$as_echo "no" >&6; }
4274fi
4275
4276
4277    test -n "$AR" && break
4278  done
4279fi
4280if test -z "$AR"; then
4281  ac_ct_AR=$AR
4282  for ac_prog in ar lib "link -lib"
4283do
4284  # Extract the first word of "$ac_prog", so it can be a program name with args.
4285set dummy $ac_prog; ac_word=$2
4286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4287$as_echo_n "checking for $ac_word... " >&6; }
4288if ${ac_cv_prog_ac_ct_AR+:} false; then :
4289  $as_echo_n "(cached) " >&6
4290else
4291  if test -n "$ac_ct_AR"; then
4292  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4293else
4294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297  IFS=$as_save_IFS
4298  test -z "$as_dir" && as_dir=.
4299    for ac_exec_ext in '' $ac_executable_extensions; do
4300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4301    ac_cv_prog_ac_ct_AR="$ac_prog"
4302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4303    break 2
4304  fi
4305done
4306  done
4307IFS=$as_save_IFS
4308
4309fi
4310fi
4311ac_ct_AR=$ac_cv_prog_ac_ct_AR
4312if test -n "$ac_ct_AR"; then
4313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4314$as_echo "$ac_ct_AR" >&6; }
4315else
4316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4317$as_echo "no" >&6; }
4318fi
4319
4320
4321  test -n "$ac_ct_AR" && break
4322done
4323
4324  if test "x$ac_ct_AR" = x; then
4325    AR="false"
4326  else
4327    case $cross_compiling:$ac_tool_warned in
4328yes:)
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4331ac_tool_warned=yes ;;
4332esac
4333    AR=$ac_ct_AR
4334  fi
4335fi
4336
4337: ${AR=ar}
4338
4339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
4340$as_echo_n "checking the archiver ($AR) interface... " >&6; }
4341if ${am_cv_ar_interface+:} false; then :
4342  $as_echo_n "(cached) " >&6
4343else
4344  ac_ext=c
4345ac_cpp='$CPP $CPPFLAGS'
4346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4348ac_compiler_gnu=$ac_cv_c_compiler_gnu
4349
4350   am_cv_ar_interface=ar
4351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352/* end confdefs.h.  */
4353int some_variable = 0;
4354_ACEOF
4355if ac_fn_c_try_compile "$LINENO"; then :
4356  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
4357      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
4358  (eval $am_ar_try) 2>&5
4359  ac_status=$?
4360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4361  test $ac_status = 0; }
4362      if test "$ac_status" -eq 0; then
4363        am_cv_ar_interface=ar
4364      else
4365        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
4366        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
4367  (eval $am_ar_try) 2>&5
4368  ac_status=$?
4369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4370  test $ac_status = 0; }
4371        if test "$ac_status" -eq 0; then
4372          am_cv_ar_interface=lib
4373        else
4374          am_cv_ar_interface=unknown
4375        fi
4376      fi
4377      rm -f conftest.lib libconftest.a
4378
4379fi
4380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4381   ac_ext=c
4382ac_cpp='$CPP $CPPFLAGS'
4383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4385ac_compiler_gnu=$ac_cv_c_compiler_gnu
4386
4387fi
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
4389$as_echo "$am_cv_ar_interface" >&6; }
4390
4391case $am_cv_ar_interface in
4392ar)
4393  ;;
4394lib)
4395  # Microsoft lib, so override with the ar-lib wrapper script.
4396  # FIXME: It is wrong to rewrite AR.
4397  # But if we don't then we get into trouble of one sort or another.
4398  # A longer-term fix would be to have automake use am__AR in this case,
4399  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
4400  # similar.
4401  AR="$am_aux_dir/ar-lib $AR"
4402  ;;
4403unknown)
4404  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
4405  ;;
4406esac
4407
4408
4409
4410    # Check whether --enable-largefile was given.
4411if test "${enable_largefile+set}" = set; then :
4412  enableval=$enable_largefile;
4413fi
4414
4415if test "$enable_largefile" != no; then
4416
4417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4418$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4419if ${ac_cv_sys_largefile_CC+:} false; then :
4420  $as_echo_n "(cached) " >&6
4421else
4422  ac_cv_sys_largefile_CC=no
4423     if test "$GCC" != yes; then
4424       ac_save_CC=$CC
4425       while :; do
4426	 # IRIX 6.2 and later do not support large files by default,
4427	 # so use the C compiler's -n32 option if that helps.
4428	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429/* end confdefs.h.  */
4430#include <sys/types.h>
4431 /* Check that off_t can represent 2**63 - 1 correctly.
4432    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4433    since some C++ compilers masquerading as C compilers
4434    incorrectly reject 9223372036854775807.  */
4435#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4436  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4437		       && LARGE_OFF_T % 2147483647 == 1)
4438		      ? 1 : -1];
4439int
4440main ()
4441{
4442
4443  ;
4444  return 0;
4445}
4446_ACEOF
4447	 if ac_fn_c_try_compile "$LINENO"; then :
4448  break
4449fi
4450rm -f core conftest.err conftest.$ac_objext
4451	 CC="$CC -n32"
4452	 if ac_fn_c_try_compile "$LINENO"; then :
4453  ac_cv_sys_largefile_CC=' -n32'; break
4454fi
4455rm -f core conftest.err conftest.$ac_objext
4456	 break
4457       done
4458       CC=$ac_save_CC
4459       rm -f conftest.$ac_ext
4460    fi
4461fi
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4463$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4464  if test "$ac_cv_sys_largefile_CC" != no; then
4465    CC=$CC$ac_cv_sys_largefile_CC
4466  fi
4467
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4469$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4470if ${ac_cv_sys_file_offset_bits+:} false; then :
4471  $as_echo_n "(cached) " >&6
4472else
4473  while :; do
4474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475/* end confdefs.h.  */
4476#include <sys/types.h>
4477 /* Check that off_t can represent 2**63 - 1 correctly.
4478    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4479    since some C++ compilers masquerading as C compilers
4480    incorrectly reject 9223372036854775807.  */
4481#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4482  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4483		       && LARGE_OFF_T % 2147483647 == 1)
4484		      ? 1 : -1];
4485int
4486main ()
4487{
4488
4489  ;
4490  return 0;
4491}
4492_ACEOF
4493if ac_fn_c_try_compile "$LINENO"; then :
4494  ac_cv_sys_file_offset_bits=no; break
4495fi
4496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h.  */
4499#define _FILE_OFFSET_BITS 64
4500#include <sys/types.h>
4501 /* Check that off_t can represent 2**63 - 1 correctly.
4502    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4503    since some C++ compilers masquerading as C compilers
4504    incorrectly reject 9223372036854775807.  */
4505#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4506  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4507		       && LARGE_OFF_T % 2147483647 == 1)
4508		      ? 1 : -1];
4509int
4510main ()
4511{
4512
4513  ;
4514  return 0;
4515}
4516_ACEOF
4517if ac_fn_c_try_compile "$LINENO"; then :
4518  ac_cv_sys_file_offset_bits=64; break
4519fi
4520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4521  ac_cv_sys_file_offset_bits=unknown
4522  break
4523done
4524fi
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4526$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4527case $ac_cv_sys_file_offset_bits in #(
4528  no | unknown) ;;
4529  *)
4530cat >>confdefs.h <<_ACEOF
4531#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4532_ACEOF
4533;;
4534esac
4535rm -rf conftest*
4536  if test $ac_cv_sys_file_offset_bits = unknown; then
4537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4538$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4539if ${ac_cv_sys_large_files+:} false; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  while :; do
4543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h.  */
4545#include <sys/types.h>
4546 /* Check that off_t can represent 2**63 - 1 correctly.
4547    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4548    since some C++ compilers masquerading as C compilers
4549    incorrectly reject 9223372036854775807.  */
4550#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4551  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4552		       && LARGE_OFF_T % 2147483647 == 1)
4553		      ? 1 : -1];
4554int
4555main ()
4556{
4557
4558  ;
4559  return 0;
4560}
4561_ACEOF
4562if ac_fn_c_try_compile "$LINENO"; then :
4563  ac_cv_sys_large_files=no; break
4564fi
4565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4567/* end confdefs.h.  */
4568#define _LARGE_FILES 1
4569#include <sys/types.h>
4570 /* Check that off_t can represent 2**63 - 1 correctly.
4571    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4572    since some C++ compilers masquerading as C compilers
4573    incorrectly reject 9223372036854775807.  */
4574#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4575  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4576		       && LARGE_OFF_T % 2147483647 == 1)
4577		      ? 1 : -1];
4578int
4579main ()
4580{
4581
4582  ;
4583  return 0;
4584}
4585_ACEOF
4586if ac_fn_c_try_compile "$LINENO"; then :
4587  ac_cv_sys_large_files=1; break
4588fi
4589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4590  ac_cv_sys_large_files=unknown
4591  break
4592done
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4595$as_echo "$ac_cv_sys_large_files" >&6; }
4596case $ac_cv_sys_large_files in #(
4597  no | unknown) ;;
4598  *)
4599cat >>confdefs.h <<_ACEOF
4600#define _LARGE_FILES $ac_cv_sys_large_files
4601_ACEOF
4602;;
4603esac
4604rm -rf conftest*
4605  fi
4606
4607
4608fi
4609
4610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE64_SOURCE value needed for large files" >&5
4611$as_echo_n "checking for _LARGEFILE64_SOURCE value needed for large files... " >&6; }
4612if ${largefile64_cv_source+:} false; then :
4613  $as_echo_n "(cached) " >&6
4614else
4615
4616        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617/* end confdefs.h.  */
4618
4619                #include <sys/types.h>
4620                #include <sys/stat.h>
4621                #include <fcntl.h>
4622
4623int
4624main ()
4625{
4626
4627                int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644);
4628
4629  ;
4630  return 0;
4631}
4632_ACEOF
4633if ac_fn_c_try_compile "$LINENO"; then :
4634
4635                largefile64_source="no"
4636
4637else
4638
4639                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4640/* end confdefs.h.  */
4641
4642                        #define _LARGEFILE64_SOURCE
4643                        #include <sys/types.h>
4644                        #include <sys/stat.h>
4645                        #include <fcntl.h>
4646
4647int
4648main ()
4649{
4650
4651                        int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644);
4652
4653  ;
4654  return 0;
4655}
4656_ACEOF
4657if ac_fn_c_try_compile "$LINENO"; then :
4658
4659                        largefile64_source="yes"
4660
4661else
4662
4663                        largefile64_source="unknown"
4664
4665fi
4666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4667
4668fi
4669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4670
4671fi
4672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $largefile64_cv_source" >&5
4673$as_echo "$largefile64_cv_source" >&6; }
4674
4675    if test "x$largefile64_source" = "xyes"; then
4676        LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
4677        enable_largefile="yes"
4678    elif test "x$largefile64_source" = "xunknown"; then
4679
4680$as_echo "#define O_LARGEFILE 0" >>confdefs.h
4681
4682    fi
4683
4684    if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
4685        LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
4686        enable_largefile="yes"
4687    fi
4688
4689    if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
4690        LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
4691        enable_largefile="yes"
4692    fi
4693
4694
4695
4696# In order to be able to change the scilab directory
4697# See http://wiki.debian.org/RpathIssue
4698# Find a good install program.  We prefer a C program (faster),
4699# so one script is as good as another.  But avoid the broken or
4700# incompatible versions:
4701# SysV /etc/install, /usr/sbin/install
4702# SunOS /usr/etc/install
4703# IRIX /sbin/install
4704# AIX /bin/install
4705# AmigaOS /C/install, which installs bootblocks on floppy discs
4706# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4707# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4708# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4709# OS/2's system install, which has a completely different semantic
4710# ./install, which can be erroneously created by make from ./install.sh.
4711# Reject install programs that cannot install multiple files.
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4713$as_echo_n "checking for a BSD-compatible install... " >&6; }
4714if test -z "$INSTALL"; then
4715if ${ac_cv_path_install+:} false; then :
4716  $as_echo_n "(cached) " >&6
4717else
4718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719for as_dir in $PATH
4720do
4721  IFS=$as_save_IFS
4722  test -z "$as_dir" && as_dir=.
4723    # Account for people who put trailing slashes in PATH elements.
4724case $as_dir/ in #((
4725  ./ | .// | /[cC]/* | \
4726  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4727  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4728  /usr/ucb/* ) ;;
4729  *)
4730    # OSF1 and SCO ODT 3.0 have their own names for install.
4731    # Don't use installbsd from OSF since it installs stuff as root
4732    # by default.
4733    for ac_prog in ginstall scoinst install; do
4734      for ac_exec_ext in '' $ac_executable_extensions; do
4735	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4736	  if test $ac_prog = install &&
4737	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4738	    # AIX install.  It has an incompatible calling convention.
4739	    :
4740	  elif test $ac_prog = install &&
4741	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4742	    # program-specific install script used by HP pwplus--don't use.
4743	    :
4744	  else
4745	    rm -rf conftest.one conftest.two conftest.dir
4746	    echo one > conftest.one
4747	    echo two > conftest.two
4748	    mkdir conftest.dir
4749	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4750	      test -s conftest.one && test -s conftest.two &&
4751	      test -s conftest.dir/conftest.one &&
4752	      test -s conftest.dir/conftest.two
4753	    then
4754	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4755	      break 3
4756	    fi
4757	  fi
4758	fi
4759      done
4760    done
4761    ;;
4762esac
4763
4764  done
4765IFS=$as_save_IFS
4766
4767rm -rf conftest.one conftest.two conftest.dir
4768
4769fi
4770  if test "${ac_cv_path_install+set}" = set; then
4771    INSTALL=$ac_cv_path_install
4772  else
4773    # As a last resort, use the slow shell script.  Don't cache a
4774    # value for INSTALL within a source directory, because that will
4775    # break other packages using the cache if that directory is
4776    # removed, or if the value is a relative name.
4777    INSTALL=$ac_install_sh
4778  fi
4779fi
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4781$as_echo "$INSTALL" >&6; }
4782
4783# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4784# It thinks the first close brace ends the variable substitution.
4785test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4786
4787test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4788
4789test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4790
4791# Make sure we can run config.sub.
4792$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4793  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4794
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4796$as_echo_n "checking build system type... " >&6; }
4797if ${ac_cv_build+:} false; then :
4798  $as_echo_n "(cached) " >&6
4799else
4800  ac_build_alias=$build_alias
4801test "x$ac_build_alias" = x &&
4802  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4803test "x$ac_build_alias" = x &&
4804  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4805ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4806  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4807
4808fi
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4810$as_echo "$ac_cv_build" >&6; }
4811case $ac_cv_build in
4812*-*-*) ;;
4813*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4814esac
4815build=$ac_cv_build
4816ac_save_IFS=$IFS; IFS='-'
4817set x $ac_cv_build
4818shift
4819build_cpu=$1
4820build_vendor=$2
4821shift; shift
4822# Remember, the first character of IFS is used to create $*,
4823# except with old shells:
4824build_os=$*
4825IFS=$ac_save_IFS
4826case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4827
4828
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4830$as_echo_n "checking host system type... " >&6; }
4831if ${ac_cv_host+:} false; then :
4832  $as_echo_n "(cached) " >&6
4833else
4834  if test "x$host_alias" = x; then
4835  ac_cv_host=$ac_cv_build
4836else
4837  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4838    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4839fi
4840
4841fi
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4843$as_echo "$ac_cv_host" >&6; }
4844case $ac_cv_host in
4845*-*-*) ;;
4846*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4847esac
4848host=$ac_cv_host
4849ac_save_IFS=$IFS; IFS='-'
4850set x $ac_cv_host
4851shift
4852host_cpu=$1
4853host_vendor=$2
4854shift; shift
4855# Remember, the first character of IFS is used to create $*,
4856# except with old shells:
4857host_os=$*
4858IFS=$ac_save_IFS
4859case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4860
4861
4862
4863# Check whether --with-gnu-ld was given.
4864if test "${with_gnu_ld+set}" = set; then :
4865  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4866else
4867  with_gnu_ld=no
4868fi
4869
4870# Prepare PATH_SEPARATOR.
4871# The user is always right.
4872if test "${PATH_SEPARATOR+set}" != set; then
4873  echo "#! /bin/sh" >conf$$.sh
4874  echo  "exit 0"   >>conf$$.sh
4875  chmod +x conf$$.sh
4876  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4877    PATH_SEPARATOR=';'
4878  else
4879    PATH_SEPARATOR=:
4880  fi
4881  rm -f conf$$.sh
4882fi
4883ac_prog=ld
4884if test "$GCC" = yes; then
4885  # Check if gcc -print-prog-name=ld gives a path.
4886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
4887$as_echo_n "checking for ld used by GCC... " >&6; }
4888  case $host in
4889  *-*-mingw*)
4890    # gcc leaves a trailing carriage return which upsets mingw
4891    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4892  *)
4893    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4894  esac
4895  case $ac_prog in
4896    # Accept absolute paths.
4897    [\\/]* | [A-Za-z]:[\\/]*)
4898      re_direlt='/[^/][^/]*/\.\./'
4899      # Canonicalize the path of ld
4900      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4901      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4902	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4903      done
4904      test -z "$LD" && LD="$ac_prog"
4905      ;;
4906  "")
4907    # If it fails, then pretend we aren't using GCC.
4908    ac_prog=ld
4909    ;;
4910  *)
4911    # If it is relative, then search for the first ld in PATH.
4912    with_gnu_ld=unknown
4913    ;;
4914  esac
4915elif test "$with_gnu_ld" = yes; then
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4917$as_echo_n "checking for GNU ld... " >&6; }
4918else
4919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
4920$as_echo_n "checking for non-GNU ld... " >&6; }
4921fi
4922if ${acl_cv_path_LD+:} false; then :
4923  $as_echo_n "(cached) " >&6
4924else
4925  if test -z "$LD"; then
4926  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4927  for ac_dir in $PATH; do
4928    test -z "$ac_dir" && ac_dir=.
4929    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4930      acl_cv_path_LD="$ac_dir/$ac_prog"
4931      # Check to see if the program is GNU ld.  I'd rather use --version,
4932      # but apparently some GNU ld's only accept -v.
4933      # Break only if it was the GNU/non-GNU ld that we prefer.
4934      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
4935      *GNU* | *'with BFD'*)
4936	test "$with_gnu_ld" != no && break ;;
4937      *)
4938	test "$with_gnu_ld" != yes && break ;;
4939      esac
4940    fi
4941  done
4942  IFS="$ac_save_ifs"
4943else
4944  acl_cv_path_LD="$LD" # Let the user override the test with a path.
4945fi
4946fi
4947
4948LD="$acl_cv_path_LD"
4949if test -n "$LD"; then
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4951$as_echo "$LD" >&6; }
4952else
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
4958$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4959if ${acl_cv_prog_gnu_ld+:} false; then :
4960  $as_echo_n "(cached) " >&6
4961else
4962  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4963case `$LD -v 2>&1 </dev/null` in
4964*GNU* | *'with BFD'*)
4965  acl_cv_prog_gnu_ld=yes ;;
4966*)
4967  acl_cv_prog_gnu_ld=no ;;
4968esac
4969fi
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
4971$as_echo "$acl_cv_prog_gnu_ld" >&6; }
4972with_gnu_ld=$acl_cv_prog_gnu_ld
4973
4974
4975
4976                              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library path variable" >&5
4977$as_echo_n "checking for shared library path variable... " >&6; }
4978if ${acl_cv_libpath+:} false; then :
4979  $as_echo_n "(cached) " >&6
4980else
4981
4982    LD="$LD" \
4983    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.libpath" "$host" > conftest.sh
4984    . ./conftest.sh
4985    rm -f ./conftest.sh
4986    acl_cv_libpath=${acl_cv_shlibpath_var:-none}
4987
4988fi
4989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libpath" >&5
4990$as_echo "$acl_cv_libpath" >&6; }
4991  shlibpath_var="$acl_cv_shlibpath_var"
4992
4993
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to activate relocatable installation" >&5
4995$as_echo_n "checking whether to activate relocatable installation... " >&6; }
4996  # Check whether --enable-relocatable was given.
4997if test "${enable_relocatable+set}" = set; then :
4998  enableval=$enable_relocatable; if test "$enableval" != no; then
4999       RELOCATABLE=yes
5000     else
5001       RELOCATABLE=no
5002     fi
5003
5004else
5005  RELOCATABLE=no
5006fi
5007
5008
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RELOCATABLE" >&5
5010$as_echo "$RELOCATABLE" >&6; }
5011
5012
5013
5014    if test "X$prefix" = "XNONE"; then
5015    reloc_final_prefix="$ac_default_prefix"
5016  else
5017    reloc_final_prefix="$prefix"
5018  fi
5019
5020cat >>confdefs.h <<_ACEOF
5021#define INSTALLPREFIX "${reloc_final_prefix}"
5022_ACEOF
5023
5024
5025
5026ac_ext=c
5027ac_cpp='$CPP $CPPFLAGS'
5028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5030ac_compiler_gnu=$ac_cv_c_compiler_gnu
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5032$as_echo_n "checking how to run the C preprocessor... " >&6; }
5033# On Suns, sometimes $CPP names a directory.
5034if test -n "$CPP" && test -d "$CPP"; then
5035  CPP=
5036fi
5037if test -z "$CPP"; then
5038  if ${ac_cv_prog_CPP+:} false; then :
5039  $as_echo_n "(cached) " >&6
5040else
5041      # Double quotes because CPP needs to be expanded
5042    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5043    do
5044      ac_preproc_ok=false
5045for ac_c_preproc_warn_flag in '' yes
5046do
5047  # Use a header file that comes with gcc, so configuring glibc
5048  # with a fresh cross-compiler works.
5049  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5050  # <limits.h> exists even on freestanding compilers.
5051  # On the NeXT, cc -E runs the code through the compiler's parser,
5052  # not just through cpp. "Syntax error" is here to catch this case.
5053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5054/* end confdefs.h.  */
5055#ifdef __STDC__
5056# include <limits.h>
5057#else
5058# include <assert.h>
5059#endif
5060		     Syntax error
5061_ACEOF
5062if ac_fn_c_try_cpp "$LINENO"; then :
5063
5064else
5065  # Broken: fails on valid input.
5066continue
5067fi
5068rm -f conftest.err conftest.i conftest.$ac_ext
5069
5070  # OK, works on sane cases.  Now check whether nonexistent headers
5071  # can be detected and how.
5072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5073/* end confdefs.h.  */
5074#include <ac_nonexistent.h>
5075_ACEOF
5076if ac_fn_c_try_cpp "$LINENO"; then :
5077  # Broken: success on invalid input.
5078continue
5079else
5080  # Passes both tests.
5081ac_preproc_ok=:
5082break
5083fi
5084rm -f conftest.err conftest.i conftest.$ac_ext
5085
5086done
5087# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5088rm -f conftest.i conftest.err conftest.$ac_ext
5089if $ac_preproc_ok; then :
5090  break
5091fi
5092
5093    done
5094    ac_cv_prog_CPP=$CPP
5095
5096fi
5097  CPP=$ac_cv_prog_CPP
5098else
5099  ac_cv_prog_CPP=$CPP
5100fi
5101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5102$as_echo "$CPP" >&6; }
5103ac_preproc_ok=false
5104for ac_c_preproc_warn_flag in '' yes
5105do
5106  # Use a header file that comes with gcc, so configuring glibc
5107  # with a fresh cross-compiler works.
5108  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5109  # <limits.h> exists even on freestanding compilers.
5110  # On the NeXT, cc -E runs the code through the compiler's parser,
5111  # not just through cpp. "Syntax error" is here to catch this case.
5112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5113/* end confdefs.h.  */
5114#ifdef __STDC__
5115# include <limits.h>
5116#else
5117# include <assert.h>
5118#endif
5119		     Syntax error
5120_ACEOF
5121if ac_fn_c_try_cpp "$LINENO"; then :
5122
5123else
5124  # Broken: fails on valid input.
5125continue
5126fi
5127rm -f conftest.err conftest.i conftest.$ac_ext
5128
5129  # OK, works on sane cases.  Now check whether nonexistent headers
5130  # can be detected and how.
5131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5132/* end confdefs.h.  */
5133#include <ac_nonexistent.h>
5134_ACEOF
5135if ac_fn_c_try_cpp "$LINENO"; then :
5136  # Broken: success on invalid input.
5137continue
5138else
5139  # Passes both tests.
5140ac_preproc_ok=:
5141break
5142fi
5143rm -f conftest.err conftest.i conftest.$ac_ext
5144
5145done
5146# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5147rm -f conftest.i conftest.err conftest.$ac_ext
5148if $ac_preproc_ok; then :
5149
5150else
5151  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5153as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5154See \`config.log' for more details" "$LINENO" 5; }
5155fi
5156
5157ac_ext=c
5158ac_cpp='$CPP $CPPFLAGS'
5159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5161ac_compiler_gnu=$ac_cv_c_compiler_gnu
5162
5163
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5165$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5166if ${ac_cv_path_GREP+:} false; then :
5167  $as_echo_n "(cached) " >&6
5168else
5169  if test -z "$GREP"; then
5170  ac_path_GREP_found=false
5171  # Loop through the user's path and test for each of PROGNAME-LIST
5172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5174do
5175  IFS=$as_save_IFS
5176  test -z "$as_dir" && as_dir=.
5177    for ac_prog in grep ggrep; do
5178    for ac_exec_ext in '' $ac_executable_extensions; do
5179      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5180      as_fn_executable_p "$ac_path_GREP" || continue
5181# Check for GNU ac_path_GREP and select it if it is found.
5182  # Check for GNU $ac_path_GREP
5183case `"$ac_path_GREP" --version 2>&1` in
5184*GNU*)
5185  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5186*)
5187  ac_count=0
5188  $as_echo_n 0123456789 >"conftest.in"
5189  while :
5190  do
5191    cat "conftest.in" "conftest.in" >"conftest.tmp"
5192    mv "conftest.tmp" "conftest.in"
5193    cp "conftest.in" "conftest.nl"
5194    $as_echo 'GREP' >> "conftest.nl"
5195    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5196    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5197    as_fn_arith $ac_count + 1 && ac_count=$as_val
5198    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5199      # Best one so far, save it but keep looking for a better one
5200      ac_cv_path_GREP="$ac_path_GREP"
5201      ac_path_GREP_max=$ac_count
5202    fi
5203    # 10*(2^10) chars as input seems more than enough
5204    test $ac_count -gt 10 && break
5205  done
5206  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5207esac
5208
5209      $ac_path_GREP_found && break 3
5210    done
5211  done
5212  done
5213IFS=$as_save_IFS
5214  if test -z "$ac_cv_path_GREP"; then
5215    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5216  fi
5217else
5218  ac_cv_path_GREP=$GREP
5219fi
5220
5221fi
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5223$as_echo "$ac_cv_path_GREP" >&6; }
5224 GREP="$ac_cv_path_GREP"
5225
5226
5227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5228$as_echo_n "checking for egrep... " >&6; }
5229if ${ac_cv_path_EGREP+:} false; then :
5230  $as_echo_n "(cached) " >&6
5231else
5232  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5233   then ac_cv_path_EGREP="$GREP -E"
5234   else
5235     if test -z "$EGREP"; then
5236  ac_path_EGREP_found=false
5237  # Loop through the user's path and test for each of PROGNAME-LIST
5238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5240do
5241  IFS=$as_save_IFS
5242  test -z "$as_dir" && as_dir=.
5243    for ac_prog in egrep; do
5244    for ac_exec_ext in '' $ac_executable_extensions; do
5245      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5246      as_fn_executable_p "$ac_path_EGREP" || continue
5247# Check for GNU ac_path_EGREP and select it if it is found.
5248  # Check for GNU $ac_path_EGREP
5249case `"$ac_path_EGREP" --version 2>&1` in
5250*GNU*)
5251  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5252*)
5253  ac_count=0
5254  $as_echo_n 0123456789 >"conftest.in"
5255  while :
5256  do
5257    cat "conftest.in" "conftest.in" >"conftest.tmp"
5258    mv "conftest.tmp" "conftest.in"
5259    cp "conftest.in" "conftest.nl"
5260    $as_echo 'EGREP' >> "conftest.nl"
5261    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5262    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5263    as_fn_arith $ac_count + 1 && ac_count=$as_val
5264    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5265      # Best one so far, save it but keep looking for a better one
5266      ac_cv_path_EGREP="$ac_path_EGREP"
5267      ac_path_EGREP_max=$ac_count
5268    fi
5269    # 10*(2^10) chars as input seems more than enough
5270    test $ac_count -gt 10 && break
5271  done
5272  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5273esac
5274
5275      $ac_path_EGREP_found && break 3
5276    done
5277  done
5278  done
5279IFS=$as_save_IFS
5280  if test -z "$ac_cv_path_EGREP"; then
5281    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5282  fi
5283else
5284  ac_cv_path_EGREP=$EGREP
5285fi
5286
5287   fi
5288fi
5289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5290$as_echo "$ac_cv_path_EGREP" >&6; }
5291 EGREP="$ac_cv_path_EGREP"
5292
5293
5294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5295$as_echo_n "checking for ANSI C header files... " >&6; }
5296if ${ac_cv_header_stdc+:} false; then :
5297  $as_echo_n "(cached) " >&6
5298else
5299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5300/* end confdefs.h.  */
5301#include <stdlib.h>
5302#include <stdarg.h>
5303#include <string.h>
5304#include <float.h>
5305
5306int
5307main ()
5308{
5309
5310  ;
5311  return 0;
5312}
5313_ACEOF
5314if ac_fn_c_try_compile "$LINENO"; then :
5315  ac_cv_header_stdc=yes
5316else
5317  ac_cv_header_stdc=no
5318fi
5319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5320
5321if test $ac_cv_header_stdc = yes; then
5322  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5324/* end confdefs.h.  */
5325#include <string.h>
5326
5327_ACEOF
5328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5329  $EGREP "memchr" >/dev/null 2>&1; then :
5330
5331else
5332  ac_cv_header_stdc=no
5333fi
5334rm -f conftest*
5335
5336fi
5337
5338if test $ac_cv_header_stdc = yes; then
5339  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5341/* end confdefs.h.  */
5342#include <stdlib.h>
5343
5344_ACEOF
5345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5346  $EGREP "free" >/dev/null 2>&1; then :
5347
5348else
5349  ac_cv_header_stdc=no
5350fi
5351rm -f conftest*
5352
5353fi
5354
5355if test $ac_cv_header_stdc = yes; then
5356  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5357  if test "$cross_compiling" = yes; then :
5358  :
5359else
5360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361/* end confdefs.h.  */
5362#include <ctype.h>
5363#include <stdlib.h>
5364#if ((' ' & 0x0FF) == 0x020)
5365# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5366# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5367#else
5368# define ISLOWER(c) \
5369		   (('a' <= (c) && (c) <= 'i') \
5370		     || ('j' <= (c) && (c) <= 'r') \
5371		     || ('s' <= (c) && (c) <= 'z'))
5372# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5373#endif
5374
5375#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5376int
5377main ()
5378{
5379  int i;
5380  for (i = 0; i < 256; i++)
5381    if (XOR (islower (i), ISLOWER (i))
5382	|| toupper (i) != TOUPPER (i))
5383      return 2;
5384  return 0;
5385}
5386_ACEOF
5387if ac_fn_c_try_run "$LINENO"; then :
5388
5389else
5390  ac_cv_header_stdc=no
5391fi
5392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5393  conftest.$ac_objext conftest.beam conftest.$ac_ext
5394fi
5395
5396fi
5397fi
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5399$as_echo "$ac_cv_header_stdc" >&6; }
5400if test $ac_cv_header_stdc = yes; then
5401
5402$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5403
5404fi
5405
5406# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5407for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5408		  inttypes.h stdint.h unistd.h
5409do :
5410  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5411ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5412"
5413if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5414  cat >>confdefs.h <<_ACEOF
5415#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5416_ACEOF
5417
5418fi
5419
5420done
5421
5422
5423
5424
5425
5426
5427
5428
5429  is_noop=no
5430  use_elf_origin_trick=no
5431  if test $RELOCATABLE = yes; then
5432    # --enable-relocatable implies --disable-rpath
5433    enable_rpath=no
5434
5435$as_echo "#define ENABLE_RELOCATABLE 1" >>confdefs.h
5436
5437    for ac_header in unistd.h mach-o/dyld.h
5438do :
5439  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5440ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5441if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5442  cat >>confdefs.h <<_ACEOF
5443#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5444_ACEOF
5445
5446fi
5447
5448done
5449
5450    for ac_func in _NSGetExecutablePath
5451do :
5452  ac_fn_c_check_func "$LINENO" "_NSGetExecutablePath" "ac_cv_func__NSGetExecutablePath"
5453if test "x$ac_cv_func__NSGetExecutablePath" = xyes; then :
5454  cat >>confdefs.h <<_ACEOF
5455#define HAVE__NSGETEXECUTABLEPATH 1
5456_ACEOF
5457
5458fi
5459done
5460
5461    case "$host_os" in
5462      mingw*) is_noop=yes ;;
5463      linux*) use_elf_origin_trick=yes ;;
5464    esac
5465    if test $is_noop = yes; then
5466      SET_RELOCATABLE="RELOCATABLE_LDFLAGS = :"
5467    else
5468      if test $use_elf_origin_trick = yes; then
5469                case "$ac_aux_dir" in
5470          /*) reloc_ldflags="$ac_aux_dir/reloc-ldflags" ;;
5471          *) reloc_ldflags="\$(top_builddir)/$ac_aux_dir/reloc-ldflags" ;;
5472        esac
5473        SET_RELOCATABLE="RELOCATABLE_LDFLAGS = \"$reloc_ldflags\" \"\$(host)\" \"\$(RELOCATABLE_LIBRARY_PATH)\""
5474      else
5475                                        SET_RELOCATABLE="INSTALL_PROGRAM_ENV = RELOC_LIBRARY_PATH_VAR=\"$shlibpath_var\" RELOC_LIBRARY_PATH_VALUE=\"\$(RELOCATABLE_LIBRARY_PATH)\" RELOC_PREFIX=\"\$(prefix)\" RELOC_COMPILE_COMMAND=\"\$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(LDFLAGS)\" RELOC_SRCDIR=\"\$(RELOCATABLE_SRC_DIR)\" RELOC_BUILDDIR=\"\$(RELOCATABLE_BUILD_DIR)\" RELOC_CONFIG_H_DIR=\"\$(RELOCATABLE_CONFIG_H_DIR)\" RELOC_EXEEXT=\"\$(EXEEXT)\" RELOC_INSTALL_PROG=\"$INSTALL_PROGRAM\""
5476        case "$ac_aux_dir" in
5477          /*) INSTALL_PROGRAM="$ac_aux_dir/install-reloc" ;;
5478          *) INSTALL_PROGRAM="\$(top_builddir)/$ac_aux_dir/install-reloc" ;;
5479        esac
5480      fi
5481    fi
5482  else
5483    SET_RELOCATABLE=
5484  fi
5485
5486   if test $is_noop = yes || test $use_elf_origin_trick = yes; then
5487  RELOCATABLE_VIA_LD_TRUE=
5488  RELOCATABLE_VIA_LD_FALSE='#'
5489else
5490  RELOCATABLE_VIA_LD_TRUE='#'
5491  RELOCATABLE_VIA_LD_FALSE=
5492fi
5493
5494
5495
5496
5497  if test $RELOCATABLE = yes; then
5498    case " $LIBOBJS " in
5499  *" relocatable.$ac_objext "* ) ;;
5500  *) LIBOBJS="$LIBOBJS relocatable.$ac_objext"
5501 ;;
5502esac
5503
5504  fi
5505
5506
5507
5508    if test "X$prefix" = "XNONE"; then
5509    reloc_final_prefix="$ac_default_prefix"
5510  else
5511    reloc_final_prefix="$prefix"
5512  fi
5513
5514cat >>confdefs.h <<_ACEOF
5515#define INSTALLPREFIX "${reloc_final_prefix}"
5516_ACEOF
5517
5518
5519
5520
5521                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
5522$as_echo_n "checking for shared library run path origin... " >&6; }
5523if ${acl_cv_rpath+:} false; then :
5524  $as_echo_n "(cached) " >&6
5525else
5526
5527    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
5528    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
5529    . ./conftest.sh
5530    rm -f ./conftest.sh
5531    acl_cv_rpath=done
5532
5533fi
5534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
5535$as_echo "$acl_cv_rpath" >&6; }
5536  wl="$acl_cv_wl"
5537  acl_libext="$acl_cv_libext"
5538  acl_shlibext="$acl_cv_shlibext"
5539  acl_libname_spec="$acl_cv_libname_spec"
5540  acl_library_names_spec="$acl_cv_library_names_spec"
5541  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
5542  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
5543  acl_hardcode_direct="$acl_cv_hardcode_direct"
5544  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
5545    # Check whether --enable-rpath was given.
5546if test "${enable_rpath+set}" = set; then :
5547  enableval=$enable_rpath; :
5548else
5549  enable_rpath=yes
5550fi
5551
5552
5553
5554# If configure detect that timestamp changed,
5555# it tries to rebuild configure & makefile which can be a painmaker
5556# if the version is different
5557
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
5559$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
5560    # Check whether --enable-maintainer-mode was given.
5561if test "${enable_maintainer_mode+set}" = set; then :
5562  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5563else
5564  USE_MAINTAINER_MODE=no
5565fi
5566
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
5568$as_echo "$USE_MAINTAINER_MODE" >&6; }
5569   if test $USE_MAINTAINER_MODE = yes; then
5570  MAINTAINER_MODE_TRUE=
5571  MAINTAINER_MODE_FALSE='#'
5572else
5573  MAINTAINER_MODE_TRUE='#'
5574  MAINTAINER_MODE_FALSE=
5575fi
5576
5577  MAINT=$MAINTAINER_MODE_TRUE
5578
5579
5580
5581am__api_version='1.16'
5582
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
5584$as_echo_n "checking whether build environment is sane... " >&6; }
5585# Reject unsafe characters in $srcdir or the absolute working directory
5586# name.  Accept space and tab only in the latter.
5587am_lf='
5588'
5589case `pwd` in
5590  *[\\\"\#\$\&\'\`$am_lf]*)
5591    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
5592esac
5593case $srcdir in
5594  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
5595    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
5596esac
5597
5598# Do 'set' in a subshell so we don't clobber the current shell's
5599# arguments.  Must try -L first in case configure is actually a
5600# symlink; some systems play weird games with the mod time of symlinks
5601# (eg FreeBSD returns the mod time of the symlink's containing
5602# directory).
5603if (
5604   am_has_slept=no
5605   for am_try in 1 2; do
5606     echo "timestamp, slept: $am_has_slept" > conftest.file
5607     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
5608     if test "$*" = "X"; then
5609	# -L didn't work.
5610	set X `ls -t "$srcdir/configure" conftest.file`
5611     fi
5612     if test "$*" != "X $srcdir/configure conftest.file" \
5613	&& test "$*" != "X conftest.file $srcdir/configure"; then
5614
5615	# If neither matched, then we have a broken ls.  This can happen
5616	# if, for instance, CONFIG_SHELL is bash and it inherits a
5617	# broken ls alias from the environment.  This has actually
5618	# happened.  Such a system could not be considered "sane".
5619	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
5620  alias in your environment" "$LINENO" 5
5621     fi
5622     if test "$2" = conftest.file || test $am_try -eq 2; then
5623       break
5624     fi
5625     # Just in case.
5626     sleep 1
5627     am_has_slept=yes
5628   done
5629   test "$2" = conftest.file
5630   )
5631then
5632   # Ok.
5633   :
5634else
5635   as_fn_error $? "newly created file is older than distributed files!
5636Check your system clock" "$LINENO" 5
5637fi
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5639$as_echo "yes" >&6; }
5640# If we didn't sleep, we still need to ensure time stamps of config.status and
5641# generated files are strictly newer.
5642am_sleep_pid=
5643if grep 'slept: no' conftest.file >/dev/null 2>&1; then
5644  ( sleep 1 ) &
5645  am_sleep_pid=$!
5646fi
5647
5648rm -f conftest.file
5649
5650test "$program_prefix" != NONE &&
5651  program_transform_name="s&^&$program_prefix&;$program_transform_name"
5652# Use a double $ so make ignores it.
5653test "$program_suffix" != NONE &&
5654  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5655# Double any \ or $.
5656# By default was `s,x,x', remove it if useless.
5657ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5658program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5659
5660if test x"${MISSING+set}" != xset; then
5661  case $am_aux_dir in
5662  *\ * | *\	*)
5663    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
5664  *)
5665    MISSING="\${SHELL} $am_aux_dir/missing" ;;
5666  esac
5667fi
5668# Use eval to expand $SHELL
5669if eval "$MISSING --is-lightweight"; then
5670  am_missing_run="$MISSING "
5671else
5672  am_missing_run=
5673  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
5674$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
5675fi
5676
5677if test x"${install_sh+set}" != xset; then
5678  case $am_aux_dir in
5679  *\ * | *\	*)
5680    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5681  *)
5682    install_sh="\${SHELL} $am_aux_dir/install-sh"
5683  esac
5684fi
5685
5686# Installed binaries are usually stripped using 'strip' when the user
5687# run "make install-strip".  However 'strip' might not be the right
5688# tool to use in cross-compilation environments, therefore Automake
5689# will honor the 'STRIP' environment variable to overrule this program.
5690if test "$cross_compiling" != no; then
5691  if test -n "$ac_tool_prefix"; then
5692  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5693set dummy ${ac_tool_prefix}strip; ac_word=$2
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
5696if ${ac_cv_prog_STRIP+:} false; then :
5697  $as_echo_n "(cached) " >&6
5698else
5699  if test -n "$STRIP"; then
5700  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705  IFS=$as_save_IFS
5706  test -z "$as_dir" && as_dir=.
5707    for ac_exec_ext in '' $ac_executable_extensions; do
5708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5709    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5711    break 2
5712  fi
5713done
5714  done
5715IFS=$as_save_IFS
5716
5717fi
5718fi
5719STRIP=$ac_cv_prog_STRIP
5720if test -n "$STRIP"; then
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5722$as_echo "$STRIP" >&6; }
5723else
5724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
5726fi
5727
5728
5729fi
5730if test -z "$ac_cv_prog_STRIP"; then
5731  ac_ct_STRIP=$STRIP
5732  # Extract the first word of "strip", so it can be a program name with args.
5733set dummy strip; ac_word=$2
5734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5735$as_echo_n "checking for $ac_word... " >&6; }
5736if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5737  $as_echo_n "(cached) " >&6
5738else
5739  if test -n "$ac_ct_STRIP"; then
5740  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5741else
5742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745  IFS=$as_save_IFS
5746  test -z "$as_dir" && as_dir=.
5747    for ac_exec_ext in '' $ac_executable_extensions; do
5748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749    ac_cv_prog_ac_ct_STRIP="strip"
5750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751    break 2
5752  fi
5753done
5754  done
5755IFS=$as_save_IFS
5756
5757fi
5758fi
5759ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5760if test -n "$ac_ct_STRIP"; then
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5762$as_echo "$ac_ct_STRIP" >&6; }
5763else
5764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
5766fi
5767
5768  if test "x$ac_ct_STRIP" = x; then
5769    STRIP=":"
5770  else
5771    case $cross_compiling:$ac_tool_warned in
5772yes:)
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5775ac_tool_warned=yes ;;
5776esac
5777    STRIP=$ac_ct_STRIP
5778  fi
5779else
5780  STRIP="$ac_cv_prog_STRIP"
5781fi
5782
5783fi
5784INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5785
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5787$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5788if test -z "$MKDIR_P"; then
5789  if ${ac_cv_path_mkdir+:} false; then :
5790  $as_echo_n "(cached) " >&6
5791else
5792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5794do
5795  IFS=$as_save_IFS
5796  test -z "$as_dir" && as_dir=.
5797    for ac_prog in mkdir gmkdir; do
5798	 for ac_exec_ext in '' $ac_executable_extensions; do
5799	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
5800	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5801	     'mkdir (GNU coreutils) '* | \
5802	     'mkdir (coreutils) '* | \
5803	     'mkdir (fileutils) '4.1*)
5804	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5805	       break 3;;
5806	   esac
5807	 done
5808       done
5809  done
5810IFS=$as_save_IFS
5811
5812fi
5813
5814  test -d ./--version && rmdir ./--version
5815  if test "${ac_cv_path_mkdir+set}" = set; then
5816    MKDIR_P="$ac_cv_path_mkdir -p"
5817  else
5818    # As a last resort, use the slow shell script.  Don't cache a
5819    # value for MKDIR_P within a source directory, because that will
5820    # break other packages using the cache if that directory is
5821    # removed, or if the value is a relative name.
5822    MKDIR_P="$ac_install_sh -d"
5823  fi
5824fi
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5826$as_echo "$MKDIR_P" >&6; }
5827
5828for ac_prog in gawk mawk nawk awk
5829do
5830  # Extract the first word of "$ac_prog", so it can be a program name with args.
5831set dummy $ac_prog; ac_word=$2
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5833$as_echo_n "checking for $ac_word... " >&6; }
5834if ${ac_cv_prog_AWK+:} false; then :
5835  $as_echo_n "(cached) " >&6
5836else
5837  if test -n "$AWK"; then
5838  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5839else
5840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5841for as_dir in $PATH
5842do
5843  IFS=$as_save_IFS
5844  test -z "$as_dir" && as_dir=.
5845    for ac_exec_ext in '' $ac_executable_extensions; do
5846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5847    ac_cv_prog_AWK="$ac_prog"
5848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5849    break 2
5850  fi
5851done
5852  done
5853IFS=$as_save_IFS
5854
5855fi
5856fi
5857AWK=$ac_cv_prog_AWK
5858if test -n "$AWK"; then
5859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5860$as_echo "$AWK" >&6; }
5861else
5862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863$as_echo "no" >&6; }
5864fi
5865
5866
5867  test -n "$AWK" && break
5868done
5869
5870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5871$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5872set x ${MAKE-make}
5873ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5874if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
5875  $as_echo_n "(cached) " >&6
5876else
5877  cat >conftest.make <<\_ACEOF
5878SHELL = /bin/sh
5879all:
5880	@echo '@@@%%%=$(MAKE)=@@@%%%'
5881_ACEOF
5882# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5883case `${MAKE-make} -f conftest.make 2>/dev/null` in
5884  *@@@%%%=?*=@@@%%%*)
5885    eval ac_cv_prog_make_${ac_make}_set=yes;;
5886  *)
5887    eval ac_cv_prog_make_${ac_make}_set=no;;
5888esac
5889rm -f conftest.make
5890fi
5891if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5893$as_echo "yes" >&6; }
5894  SET_MAKE=
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898  SET_MAKE="MAKE=${MAKE-make}"
5899fi
5900
5901rm -rf .tst 2>/dev/null
5902mkdir .tst 2>/dev/null
5903if test -d .tst; then
5904  am__leading_dot=.
5905else
5906  am__leading_dot=_
5907fi
5908rmdir .tst 2>/dev/null
5909
5910DEPDIR="${am__leading_dot}deps"
5911
5912ac_config_commands="$ac_config_commands depfiles"
5913
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
5915$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
5916cat > confinc.mk << 'END'
5917am__doit:
5918	@echo this is the am__doit target >confinc.out
5919.PHONY: am__doit
5920END
5921am__include="#"
5922am__quote=
5923# BSD make does it like this.
5924echo '.include "confinc.mk" # ignored' > confmf.BSD
5925# Other make implementations (GNU, Solaris 10, AIX) do it like this.
5926echo 'include confinc.mk # ignored' > confmf.GNU
5927_am_result=no
5928for s in GNU BSD; do
5929  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
5930   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
5931   ac_status=$?
5932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933   (exit $ac_status); }
5934  case $?:`cat confinc.out 2>/dev/null` in #(
5935  '0:this is the am__doit target') :
5936    case $s in #(
5937  BSD) :
5938    am__include='.include' am__quote='"' ;; #(
5939  *) :
5940    am__include='include' am__quote='' ;;
5941esac ;; #(
5942  *) :
5943     ;;
5944esac
5945  if test "$am__include" != "#"; then
5946    _am_result="yes ($s style)"
5947    break
5948  fi
5949done
5950rm -f confinc.* confmf.*
5951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
5952$as_echo "${_am_result}" >&6; }
5953
5954# Check whether --enable-dependency-tracking was given.
5955if test "${enable_dependency_tracking+set}" = set; then :
5956  enableval=$enable_dependency_tracking;
5957fi
5958
5959if test "x$enable_dependency_tracking" != xno; then
5960  am_depcomp="$ac_aux_dir/depcomp"
5961  AMDEPBACKSLASH='\'
5962  am__nodep='_no'
5963fi
5964 if test "x$enable_dependency_tracking" != xno; then
5965  AMDEP_TRUE=
5966  AMDEP_FALSE='#'
5967else
5968  AMDEP_TRUE='#'
5969  AMDEP_FALSE=
5970fi
5971
5972
5973# Check whether --enable-silent-rules was given.
5974if test "${enable_silent_rules+set}" = set; then :
5975  enableval=$enable_silent_rules;
5976fi
5977
5978case $enable_silent_rules in # (((
5979  yes) AM_DEFAULT_VERBOSITY=0;;
5980   no) AM_DEFAULT_VERBOSITY=1;;
5981    *) AM_DEFAULT_VERBOSITY=1;;
5982esac
5983am_make=${MAKE-make}
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5985$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
5986if ${am_cv_make_support_nested_variables+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  if $as_echo 'TRUE=$(BAR$(V))
5990BAR0=false
5991BAR1=true
5992V=1
5993am__doit:
5994	@$(TRUE)
5995.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5996  am_cv_make_support_nested_variables=yes
5997else
5998  am_cv_make_support_nested_variables=no
5999fi
6000fi
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
6002$as_echo "$am_cv_make_support_nested_variables" >&6; }
6003if test $am_cv_make_support_nested_variables = yes; then
6004    AM_V='$(V)'
6005  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
6006else
6007  AM_V=$AM_DEFAULT_VERBOSITY
6008  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
6009fi
6010AM_BACKSLASH='\'
6011
6012if test "`cd $srcdir && pwd`" != "`pwd`"; then
6013  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6014  # is not polluted with repeated "-I."
6015  am__isrc=' -I$(srcdir)'
6016  # test to see if srcdir already configured
6017  if test -f $srcdir/config.status; then
6018    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
6019  fi
6020fi
6021
6022# test whether we have cygpath
6023if test -z "$CYGPATH_W"; then
6024  if (cygpath --version) >/dev/null 2>/dev/null; then
6025    CYGPATH_W='cygpath -w'
6026  else
6027    CYGPATH_W=echo
6028  fi
6029fi
6030
6031
6032# Define the identity of the package.
6033 PACKAGE='scilab'
6034 VERSION='6'
6035
6036
6037cat >>confdefs.h <<_ACEOF
6038#define PACKAGE "$PACKAGE"
6039_ACEOF
6040
6041
6042cat >>confdefs.h <<_ACEOF
6043#define VERSION "$VERSION"
6044_ACEOF
6045
6046# Some tools Automake needs.
6047
6048ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6049
6050
6051AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6052
6053
6054AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6055
6056
6057AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6058
6059
6060MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6061
6062# For better backward compatibility.  To be removed once Automake 1.9.x
6063# dies out for good.  For more background, see:
6064# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
6065# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
6066mkdir_p='$(MKDIR_P)'
6067
6068# We need awk for the "check" target (and possibly the TAP driver).  The
6069# system "awk" is bad on some platforms.
6070# Always define AMTAR for backward compatibility.  Yes, it's still used
6071# in the wild :-(  We should find a proper way to deprecate it ...
6072AMTAR='$${TAR-tar}'
6073
6074
6075# We'll loop over all known methods to create a tar archive until one works.
6076_am_tools='gnutar  pax cpio none'
6077
6078am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
6079
6080
6081
6082
6083
6084depcc="$CC"   am_compiler_list=
6085
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6087$as_echo_n "checking dependency style of $depcc... " >&6; }
6088if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6089  $as_echo_n "(cached) " >&6
6090else
6091  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6092  # We make a subdir and do the tests there.  Otherwise we can end up
6093  # making bogus files that we don't know about and never remove.  For
6094  # instance it was reported that on HP-UX the gcc test will end up
6095  # making a dummy file named 'D' -- because '-MD' means "put the output
6096  # in D".
6097  rm -rf conftest.dir
6098  mkdir conftest.dir
6099  # Copy depcomp to subdir because otherwise we won't find it if we're
6100  # using a relative directory.
6101  cp "$am_depcomp" conftest.dir
6102  cd conftest.dir
6103  # We will build objects and dependencies in a subdirectory because
6104  # it helps to detect inapplicable dependency modes.  For instance
6105  # both Tru64's cc and ICC support -MD to output dependencies as a
6106  # side effect of compilation, but ICC will put the dependencies in
6107  # the current directory while Tru64 will put them in the object
6108  # directory.
6109  mkdir sub
6110
6111  am_cv_CC_dependencies_compiler_type=none
6112  if test "$am_compiler_list" = ""; then
6113     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6114  fi
6115  am__universal=false
6116  case " $depcc " in #(
6117     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6118     esac
6119
6120  for depmode in $am_compiler_list; do
6121    # Setup a source with many dependencies, because some compilers
6122    # like to wrap large dependency lists on column 80 (with \), and
6123    # we should not choose a depcomp mode which is confused by this.
6124    #
6125    # We need to recreate these files for each test, as the compiler may
6126    # overwrite some of them when testing with obscure command lines.
6127    # This happens at least with the AIX C compiler.
6128    : > sub/conftest.c
6129    for i in 1 2 3 4 5 6; do
6130      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6131      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6132      # Solaris 10 /bin/sh.
6133      echo '/* dummy */' > sub/conftst$i.h
6134    done
6135    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6136
6137    # We check with '-c' and '-o' for the sake of the "dashmstdout"
6138    # mode.  It turns out that the SunPro C++ compiler does not properly
6139    # handle '-M -o', and we need to detect this.  Also, some Intel
6140    # versions had trouble with output in subdirs.
6141    am__obj=sub/conftest.${OBJEXT-o}
6142    am__minus_obj="-o $am__obj"
6143    case $depmode in
6144    gcc)
6145      # This depmode causes a compiler race in universal mode.
6146      test "$am__universal" = false || continue
6147      ;;
6148    nosideeffect)
6149      # After this tag, mechanisms are not by side-effect, so they'll
6150      # only be used when explicitly requested.
6151      if test "x$enable_dependency_tracking" = xyes; then
6152	continue
6153      else
6154	break
6155      fi
6156      ;;
6157    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6158      # This compiler won't grok '-c -o', but also, the minuso test has
6159      # not run yet.  These depmodes are late enough in the game, and
6160      # so weak that their functioning should not be impacted.
6161      am__obj=conftest.${OBJEXT-o}
6162      am__minus_obj=
6163      ;;
6164    none) break ;;
6165    esac
6166    if depmode=$depmode \
6167       source=sub/conftest.c object=$am__obj \
6168       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6169       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6170         >/dev/null 2>conftest.err &&
6171       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6172       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6173       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6174       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6175      # icc doesn't choke on unknown options, it will just issue warnings
6176      # or remarks (even with -Werror).  So we grep stderr for any message
6177      # that says an option was ignored or not supported.
6178      # When given -MP, icc 7.0 and 7.1 complain thusly:
6179      #   icc: Command line warning: ignoring option '-M'; no argument required
6180      # The diagnosis changed in icc 8.0:
6181      #   icc: Command line remark: option '-MP' not supported
6182      if (grep 'ignoring option' conftest.err ||
6183          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6184        am_cv_CC_dependencies_compiler_type=$depmode
6185        break
6186      fi
6187    fi
6188  done
6189
6190  cd ..
6191  rm -rf conftest.dir
6192else
6193  am_cv_CC_dependencies_compiler_type=none
6194fi
6195
6196fi
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6198$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6199CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6200
6201 if
6202  test "x$enable_dependency_tracking" != xno \
6203  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6204  am__fastdepCC_TRUE=
6205  am__fastdepCC_FALSE='#'
6206else
6207  am__fastdepCC_TRUE='#'
6208  am__fastdepCC_FALSE=
6209fi
6210
6211
6212
6213# POSIX will say in a future version that running "rm -f" with no argument
6214# is OK; and we want to be able to make that assumption in our Makefile
6215# recipes.  So use an aggressive probe to check that the usage we want is
6216# actually supported "in the wild" to an acceptable degree.
6217# See automake bug#10828.
6218# To make any issue more visible, cause the running configure to be aborted
6219# by default if the 'rm' program in use doesn't match our expectations; the
6220# user can still override this though.
6221if rm -f && rm -fr && rm -rf; then : OK; else
6222  cat >&2 <<'END'
6223Oops!
6224
6225Your 'rm' program seems unable to run without file operands specified
6226on the command line, even when the '-f' option is present.  This is contrary
6227to the behaviour of most rm programs out there, and not conforming with
6228the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
6229
6230Please tell bug-automake@gnu.org about your system, including the value
6231of your $PATH and any error possibly output before this message.  This
6232can help us improve future automake versions.
6233
6234END
6235  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
6236    echo 'Configuration will proceed anyway, since you have set the' >&2
6237    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
6238    echo >&2
6239  else
6240    cat >&2 <<'END'
6241Aborting the configuration process, to ensure you take notice of the issue.
6242
6243You can download and install GNU coreutils to get an 'rm' implementation
6244that behaves properly: <https://www.gnu.org/software/coreutils/>.
6245
6246If you want to complete the configuration process using your problematic
6247'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
6248to "yes", and re-run configure.
6249
6250END
6251    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
6252  fi
6253fi
6254 # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
6255
6256
6257
6258#################################
6259## all the --with-* argument help
6260#################################
6261
6262
6263# Check whether --enable-debug was given.
6264if test "${enable_debug+set}" = set; then :
6265  enableval=$enable_debug;
6266fi
6267
6268
6269# Check whether --enable-debug-C was given.
6270if test "${enable_debug_C+set}" = set; then :
6271  enableval=$enable_debug_C;
6272fi
6273
6274
6275# Check whether --enable-debug-CXX was given.
6276if test "${enable_debug_CXX+set}" = set; then :
6277  enableval=$enable_debug_CXX;
6278fi
6279
6280
6281# Check whether --enable-debug-java was given.
6282if test "${enable_debug_java+set}" = set; then :
6283  enableval=$enable_debug_java;
6284fi
6285
6286
6287# Check whether --enable-debug-fortran was given.
6288if test "${enable_debug_fortran+set}" = set; then :
6289  enableval=$enable_debug_fortran;
6290fi
6291
6292
6293# Check whether --enable-debug-linker was given.
6294if test "${enable_debug_linker+set}" = set; then :
6295  enableval=$enable_debug_linker;
6296fi
6297
6298
6299# Check whether --enable-code-coverage was given.
6300if test "${enable_code_coverage+set}" = set; then :
6301  enableval=$enable_code_coverage;
6302fi
6303
6304
6305# Check whether --enable-stop-on-warning was given.
6306if test "${enable_stop_on_warning+set}" = set; then :
6307  enableval=$enable_stop_on_warning;
6308fi
6309
6310
6311
6312# Check whether --with-gcc was given.
6313if test "${with_gcc+set}" = set; then :
6314  withval=$with_gcc;
6315fi
6316
6317
6318
6319# Check whether --with-gfortran was given.
6320if test "${with_gfortran+set}" = set; then :
6321  withval=$with_gfortran;
6322fi
6323
6324
6325
6326# Check whether --with-intelcompilers was given.
6327if test "${with_intelcompilers+set}" = set; then :
6328  withval=$with_intelcompilers;
6329fi
6330
6331
6332
6333# Check whether --with-tk was given.
6334if test "${with_tk+set}" = set; then :
6335  withval=$with_tk;
6336fi
6337
6338
6339
6340# Check whether --with-javasci was given.
6341if test "${with_javasci+set}" = set; then :
6342  withval=$with_javasci;
6343fi
6344
6345
6346# Check whether --enable-compilation-tests was given.
6347if test "${enable_compilation_tests+set}" = set; then :
6348  enableval=$enable_compilation_tests;
6349fi
6350
6351
6352
6353# Check whether --with-gui was given.
6354if test "${with_gui+set}" = set; then :
6355  withval=$with_gui;
6356fi
6357
6358
6359# Check whether --enable-build-swig was given.
6360if test "${enable_build_swig+set}" = set; then :
6361  enableval=$enable_build_swig;
6362fi
6363
6364
6365
6366# Check whether --enable-build-giws was given.
6367if test "${enable_build_giws+set}" = set; then :
6368  enableval=$enable_build_giws;
6369fi
6370
6371
6372# Check whether --enable-build-parser was given.
6373if test "${enable_build_parser+set}" = set; then :
6374  enableval=$enable_build_parser;
6375fi
6376
6377
6378
6379################################################
6380########## compilator & misc programs detection
6381################################################
6382
6383ac_ext=c
6384ac_cpp='$CPP $CPPFLAGS'
6385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6387ac_compiler_gnu=$ac_cv_c_compiler_gnu
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6389$as_echo_n "checking how to run the C preprocessor... " >&6; }
6390# On Suns, sometimes $CPP names a directory.
6391if test -n "$CPP" && test -d "$CPP"; then
6392  CPP=
6393fi
6394if test -z "$CPP"; then
6395  if ${ac_cv_prog_CPP+:} false; then :
6396  $as_echo_n "(cached) " >&6
6397else
6398      # Double quotes because CPP needs to be expanded
6399    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6400    do
6401      ac_preproc_ok=false
6402for ac_c_preproc_warn_flag in '' yes
6403do
6404  # Use a header file that comes with gcc, so configuring glibc
6405  # with a fresh cross-compiler works.
6406  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6407  # <limits.h> exists even on freestanding compilers.
6408  # On the NeXT, cc -E runs the code through the compiler's parser,
6409  # not just through cpp. "Syntax error" is here to catch this case.
6410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411/* end confdefs.h.  */
6412#ifdef __STDC__
6413# include <limits.h>
6414#else
6415# include <assert.h>
6416#endif
6417		     Syntax error
6418_ACEOF
6419if ac_fn_c_try_cpp "$LINENO"; then :
6420
6421else
6422  # Broken: fails on valid input.
6423continue
6424fi
6425rm -f conftest.err conftest.i conftest.$ac_ext
6426
6427  # OK, works on sane cases.  Now check whether nonexistent headers
6428  # can be detected and how.
6429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6430/* end confdefs.h.  */
6431#include <ac_nonexistent.h>
6432_ACEOF
6433if ac_fn_c_try_cpp "$LINENO"; then :
6434  # Broken: success on invalid input.
6435continue
6436else
6437  # Passes both tests.
6438ac_preproc_ok=:
6439break
6440fi
6441rm -f conftest.err conftest.i conftest.$ac_ext
6442
6443done
6444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6445rm -f conftest.i conftest.err conftest.$ac_ext
6446if $ac_preproc_ok; then :
6447  break
6448fi
6449
6450    done
6451    ac_cv_prog_CPP=$CPP
6452
6453fi
6454  CPP=$ac_cv_prog_CPP
6455else
6456  ac_cv_prog_CPP=$CPP
6457fi
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6459$as_echo "$CPP" >&6; }
6460ac_preproc_ok=false
6461for ac_c_preproc_warn_flag in '' yes
6462do
6463  # Use a header file that comes with gcc, so configuring glibc
6464  # with a fresh cross-compiler works.
6465  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6466  # <limits.h> exists even on freestanding compilers.
6467  # On the NeXT, cc -E runs the code through the compiler's parser,
6468  # not just through cpp. "Syntax error" is here to catch this case.
6469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6470/* end confdefs.h.  */
6471#ifdef __STDC__
6472# include <limits.h>
6473#else
6474# include <assert.h>
6475#endif
6476		     Syntax error
6477_ACEOF
6478if ac_fn_c_try_cpp "$LINENO"; then :
6479
6480else
6481  # Broken: fails on valid input.
6482continue
6483fi
6484rm -f conftest.err conftest.i conftest.$ac_ext
6485
6486  # OK, works on sane cases.  Now check whether nonexistent headers
6487  # can be detected and how.
6488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6489/* end confdefs.h.  */
6490#include <ac_nonexistent.h>
6491_ACEOF
6492if ac_fn_c_try_cpp "$LINENO"; then :
6493  # Broken: success on invalid input.
6494continue
6495else
6496  # Passes both tests.
6497ac_preproc_ok=:
6498break
6499fi
6500rm -f conftest.err conftest.i conftest.$ac_ext
6501
6502done
6503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6504rm -f conftest.i conftest.err conftest.$ac_ext
6505if $ac_preproc_ok; then :
6506
6507else
6508  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6510as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6511See \`config.log' for more details" "$LINENO" 5; }
6512fi
6513
6514ac_ext=c
6515ac_cpp='$CPP $CPPFLAGS'
6516ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6517ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6518ac_compiler_gnu=$ac_cv_c_compiler_gnu
6519
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6521$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6522if ${ac_cv_path_GREP+:} false; then :
6523  $as_echo_n "(cached) " >&6
6524else
6525  if test -z "$GREP"; then
6526  ac_path_GREP_found=false
6527  # Loop through the user's path and test for each of PROGNAME-LIST
6528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6529for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6530do
6531  IFS=$as_save_IFS
6532  test -z "$as_dir" && as_dir=.
6533    for ac_prog in grep ggrep; do
6534    for ac_exec_ext in '' $ac_executable_extensions; do
6535      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6536      as_fn_executable_p "$ac_path_GREP" || continue
6537# Check for GNU ac_path_GREP and select it if it is found.
6538  # Check for GNU $ac_path_GREP
6539case `"$ac_path_GREP" --version 2>&1` in
6540*GNU*)
6541  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6542*)
6543  ac_count=0
6544  $as_echo_n 0123456789 >"conftest.in"
6545  while :
6546  do
6547    cat "conftest.in" "conftest.in" >"conftest.tmp"
6548    mv "conftest.tmp" "conftest.in"
6549    cp "conftest.in" "conftest.nl"
6550    $as_echo 'GREP' >> "conftest.nl"
6551    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6552    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6553    as_fn_arith $ac_count + 1 && ac_count=$as_val
6554    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6555      # Best one so far, save it but keep looking for a better one
6556      ac_cv_path_GREP="$ac_path_GREP"
6557      ac_path_GREP_max=$ac_count
6558    fi
6559    # 10*(2^10) chars as input seems more than enough
6560    test $ac_count -gt 10 && break
6561  done
6562  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6563esac
6564
6565      $ac_path_GREP_found && break 3
6566    done
6567  done
6568  done
6569IFS=$as_save_IFS
6570  if test -z "$ac_cv_path_GREP"; then
6571    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6572  fi
6573else
6574  ac_cv_path_GREP=$GREP
6575fi
6576
6577fi
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6579$as_echo "$ac_cv_path_GREP" >&6; }
6580 GREP="$ac_cv_path_GREP"
6581
6582
6583
6584######
6585#### Mac OS X set of fink path with provided
6586######
6587
6588
6589# Check whether --with-fink_prefix was given.
6590if test "${with_fink_prefix+set}" = set; then :
6591  withval=$with_fink_prefix;
6592fi
6593
6594# Need MacosX Version to specify some path.
6595case "$host_os" in
6596     *Darwin* | *darwin*)
6597
6598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Mac OS X Version" >&5
6599$as_echo_n "checking Mac OS X Version... " >&6; }
6600    macosx_version=`sw_vers -productVersion`
6601    case $macosx_version in
6602         11.*)
6603              { $as_echo "$as_me:${as_lineno-$LINENO}: result: macOS $macosx_version - Big Sur." >&5
6604$as_echo "macOS $macosx_version - Big Sur." >&6; }
6605         ;;
6606         10.15*)
6607              { $as_echo "$as_me:${as_lineno-$LINENO}: result: macOS 10.15 - Catalina." >&5
6608$as_echo "macOS 10.15 - Catalina." >&6; }
6609         ;;
6610         10.14*)
6611              { $as_echo "$as_me:${as_lineno-$LINENO}: result: macOS 10.14 - Mojave." >&5
6612$as_echo "macOS 10.14 - Mojave." >&6; }
6613         ;;
6614         10.13*)
6615              { $as_echo "$as_me:${as_lineno-$LINENO}: result: macOS 10.13 - High Sierra." >&5
6616$as_echo "macOS 10.13 - High Sierra." >&6; }
6617         ;;
6618         *)
6619              as_fn_error $? "macOS 10.13 to 11 are needed. Found $macosx_version" "$LINENO" 5
6620         ;;
6621    esac
6622
6623     ;;
6624esac
6625
6626case "$host" in
6627    *darwin*)
6628        if test -n "$with_fink_prefix"; then
6629            # If with-fink-prefix is provided, use the provided path to make sure that we will
6630            # use it to detect dependencies (for example, gfortran is not provided in xcode.
6631            # Therefor, we use the one in fink)
6632            FINK_PREFIX="$with_fink_prefix/"
6633
6634            # Exec the init script of fink to make sure that the env is set
6635            if test -f $with_fink_prefix/bin/init.sh; then
6636                echo "source $with_fink_prefix/bin/init.sh executed to set the env"
6637                source $with_fink_prefix/bin/init.sh
6638            else
6639                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the fink init.sh script: $with_fink_prefix/bin/init.sh" >&5
6640$as_echo "$as_me: WARNING: Could not find the fink init.sh script: $with_fink_prefix/bin/init.sh" >&2;}
6641            fi
6642        else
6643            FINK_PREFIX="/sw/"
6644        fi
6645
6646        #Append to the default flags on Apple machines
6647        CPPFLAGS="$CPPFLAGS -I$FINK_PREFIX/include/"
6648        LDFLAGS="$LDFLAGS -L$FINK_PREFIX/lib/"
6649        ;;
6650esac
6651
6652
6653# Check whether --with-min_macosx_version was given.
6654if test "${with_min_macosx_version+set}" = set; then :
6655  withval=$with_min_macosx_version;
6656fi
6657
6658case "$host" in
6659    *darwin*)
6660    if test -n "$with_min_macosx_version"; then
6661       MIN_MACOSX_VERSION=$with_min_macosx_version
6662       #Append to the default flags on Apple machines
6663       ARCH_CFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
6664       ARCH_CXXFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
6665       ARCH_FFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
6666       ARCH_LDFLAGS="-mmacosx-version-min=$MIN_MACOSX_VERSION"
6667       # We need this to be passed to all linker commands
6668       LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_MACOSX_VERSION"
6669    fi
6670;;
6671esac
6672
6673
6674#####################################################
6675## Look for pkg-config
6676#####################################################
6677
6678
6679if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6680	if test -n "$ac_tool_prefix"; then
6681  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6682set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6684$as_echo_n "checking for $ac_word... " >&6; }
6685if ${ac_cv_path_PKG_CONFIG+:} false; then :
6686  $as_echo_n "(cached) " >&6
6687else
6688  case $PKG_CONFIG in
6689  [\\/]* | ?:[\\/]*)
6690  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6691  ;;
6692  *)
6693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6694for as_dir in $PATH
6695do
6696  IFS=$as_save_IFS
6697  test -z "$as_dir" && as_dir=.
6698    for ac_exec_ext in '' $ac_executable_extensions; do
6699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6700    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6702    break 2
6703  fi
6704done
6705  done
6706IFS=$as_save_IFS
6707
6708  ;;
6709esac
6710fi
6711PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6712if test -n "$PKG_CONFIG"; then
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6714$as_echo "$PKG_CONFIG" >&6; }
6715else
6716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6717$as_echo "no" >&6; }
6718fi
6719
6720
6721fi
6722if test -z "$ac_cv_path_PKG_CONFIG"; then
6723  ac_pt_PKG_CONFIG=$PKG_CONFIG
6724  # Extract the first word of "pkg-config", so it can be a program name with args.
6725set dummy pkg-config; ac_word=$2
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6727$as_echo_n "checking for $ac_word... " >&6; }
6728if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6729  $as_echo_n "(cached) " >&6
6730else
6731  case $ac_pt_PKG_CONFIG in
6732  [\\/]* | ?:[\\/]*)
6733  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6734  ;;
6735  *)
6736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737for as_dir in $PATH
6738do
6739  IFS=$as_save_IFS
6740  test -z "$as_dir" && as_dir=.
6741    for ac_exec_ext in '' $ac_executable_extensions; do
6742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6743    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6745    break 2
6746  fi
6747done
6748  done
6749IFS=$as_save_IFS
6750
6751  ;;
6752esac
6753fi
6754ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6755if test -n "$ac_pt_PKG_CONFIG"; then
6756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6757$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6758else
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6760$as_echo "no" >&6; }
6761fi
6762
6763  if test "x$ac_pt_PKG_CONFIG" = x; then
6764    PKG_CONFIG=""
6765  else
6766    case $cross_compiling:$ac_tool_warned in
6767yes:)
6768{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6769$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6770ac_tool_warned=yes ;;
6771esac
6772    PKG_CONFIG=$ac_pt_PKG_CONFIG
6773  fi
6774else
6775  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6776fi
6777
6778fi
6779if test -n "$PKG_CONFIG"; then
6780	_pkg_min_version=0.9.0
6781	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6782$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6783	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6784		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6785$as_echo "yes" >&6; }
6786	else
6787		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6788$as_echo "no" >&6; }
6789		PKG_CONFIG=""
6790	fi
6791
6792fi
6793
6794#####################################################
6795## check if options are correct (or not)
6796#####################################################
6797
6798if test "$with_intelcompilers" = yes -a "$with_gcc" = yes; then
6799    as_fn_error $? "Conflicting options : you specified two compiler series" "$LINENO" 5
6800fi
6801
6802######## fortran ########
6803
6804if test "$with_gfortran" = yes; then
6805   : ${FFLAGS=""}
6806   ac_ext=f
6807ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
6808ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6809ac_compiler_gnu=$ac_cv_f77_compiler_gnu
6810if test -n "$ac_tool_prefix"; then
6811  for ac_prog in gfortran
6812  do
6813    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6814set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_prog_F77+:} false; then :
6818  $as_echo_n "(cached) " >&6
6819else
6820  if test -n "$F77"; then
6821  ac_cv_prog_F77="$F77" # Let the user override the test.
6822else
6823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824for as_dir in $PATH
6825do
6826  IFS=$as_save_IFS
6827  test -z "$as_dir" && as_dir=.
6828    for ac_exec_ext in '' $ac_executable_extensions; do
6829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6830    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
6831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6832    break 2
6833  fi
6834done
6835  done
6836IFS=$as_save_IFS
6837
6838fi
6839fi
6840F77=$ac_cv_prog_F77
6841if test -n "$F77"; then
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
6843$as_echo "$F77" >&6; }
6844else
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }
6847fi
6848
6849
6850    test -n "$F77" && break
6851  done
6852fi
6853if test -z "$F77"; then
6854  ac_ct_F77=$F77
6855  for ac_prog in gfortran
6856do
6857  # Extract the first word of "$ac_prog", so it can be a program name with args.
6858set dummy $ac_prog; ac_word=$2
6859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6860$as_echo_n "checking for $ac_word... " >&6; }
6861if ${ac_cv_prog_ac_ct_F77+:} false; then :
6862  $as_echo_n "(cached) " >&6
6863else
6864  if test -n "$ac_ct_F77"; then
6865  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
6866else
6867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_prog_ac_ct_F77="$ac_prog"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882fi
6883fi
6884ac_ct_F77=$ac_cv_prog_ac_ct_F77
6885if test -n "$ac_ct_F77"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
6887$as_echo "$ac_ct_F77" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$ac_ct_F77" && break
6895done
6896
6897  if test "x$ac_ct_F77" = x; then
6898    F77=""
6899  else
6900    case $cross_compiling:$ac_tool_warned in
6901yes:)
6902{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6903$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6904ac_tool_warned=yes ;;
6905esac
6906    F77=$ac_ct_F77
6907  fi
6908fi
6909
6910
6911# Provide some information about the compiler.
6912$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
6913set X $ac_compile
6914ac_compiler=$2
6915for ac_option in --version -v -V -qversion; do
6916  { { ac_try="$ac_compiler $ac_option >&5"
6917case "(($ac_try" in
6918  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6919  *) ac_try_echo=$ac_try;;
6920esac
6921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6922$as_echo "$ac_try_echo"; } >&5
6923  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6924  ac_status=$?
6925  if test -s conftest.err; then
6926    sed '10a\
6927... rest of stderr output deleted ...
6928         10q' conftest.err >conftest.er1
6929    cat conftest.er1 >&5
6930  fi
6931  rm -f conftest.er1 conftest.err
6932  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6933  test $ac_status = 0; }
6934done
6935rm -f a.out
6936
6937# If we don't use `.F' as extension, the preprocessor is not run on the
6938# input file.  (Note that this only needs to work for GNU compilers.)
6939ac_save_ext=$ac_ext
6940ac_ext=F
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
6942$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
6943if ${ac_cv_f77_compiler_gnu+:} false; then :
6944  $as_echo_n "(cached) " >&6
6945else
6946  cat > conftest.$ac_ext <<_ACEOF
6947      program main
6948#ifndef __GNUC__
6949       choke me
6950#endif
6951
6952      end
6953_ACEOF
6954if ac_fn_f77_try_compile "$LINENO"; then :
6955  ac_compiler_gnu=yes
6956else
6957  ac_compiler_gnu=no
6958fi
6959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960ac_cv_f77_compiler_gnu=$ac_compiler_gnu
6961
6962fi
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
6964$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
6965ac_ext=$ac_save_ext
6966ac_test_FFLAGS=${FFLAGS+set}
6967ac_save_FFLAGS=$FFLAGS
6968FFLAGS=
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
6970$as_echo_n "checking whether $F77 accepts -g... " >&6; }
6971if ${ac_cv_prog_f77_g+:} false; then :
6972  $as_echo_n "(cached) " >&6
6973else
6974  FFLAGS=-g
6975cat > conftest.$ac_ext <<_ACEOF
6976      program main
6977
6978      end
6979_ACEOF
6980if ac_fn_f77_try_compile "$LINENO"; then :
6981  ac_cv_prog_f77_g=yes
6982else
6983  ac_cv_prog_f77_g=no
6984fi
6985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6986
6987fi
6988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
6989$as_echo "$ac_cv_prog_f77_g" >&6; }
6990if test "$ac_test_FFLAGS" = set; then
6991  FFLAGS=$ac_save_FFLAGS
6992elif test $ac_cv_prog_f77_g = yes; then
6993  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
6994    FFLAGS="-g -O2"
6995  else
6996    FFLAGS="-g"
6997  fi
6998else
6999  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7000    FFLAGS="-O2"
7001  else
7002    FFLAGS=
7003  fi
7004fi
7005
7006if test $ac_compiler_gnu = yes; then
7007  G77=yes
7008else
7009  G77=
7010fi
7011ac_ext=c
7012ac_cpp='$CPP $CPPFLAGS'
7013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7015ac_compiler_gnu=$ac_cv_c_compiler_gnu
7016
7017   if test -z "$F77"; then
7018     as_fn_error $? "You asked me to use gfortran but i haven't been able to find it" "$LINENO" 5
7019    fi
7020fi
7021
7022if test "$with_intelcompilers" = yes; then
7023   : ${FFLAGS=""}
7024   ac_ext=f
7025ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
7026ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7027ac_compiler_gnu=$ac_cv_f77_compiler_gnu
7028if test -n "$ac_tool_prefix"; then
7029  for ac_prog in ifc ifort
7030  do
7031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7034$as_echo_n "checking for $ac_word... " >&6; }
7035if ${ac_cv_prog_F77+:} false; then :
7036  $as_echo_n "(cached) " >&6
7037else
7038  if test -n "$F77"; then
7039  ac_cv_prog_F77="$F77" # Let the user override the test.
7040else
7041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7042for as_dir in $PATH
7043do
7044  IFS=$as_save_IFS
7045  test -z "$as_dir" && as_dir=.
7046    for ac_exec_ext in '' $ac_executable_extensions; do
7047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7048    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
7049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7050    break 2
7051  fi
7052done
7053  done
7054IFS=$as_save_IFS
7055
7056fi
7057fi
7058F77=$ac_cv_prog_F77
7059if test -n "$F77"; then
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
7061$as_echo "$F77" >&6; }
7062else
7063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
7065fi
7066
7067
7068    test -n "$F77" && break
7069  done
7070fi
7071if test -z "$F77"; then
7072  ac_ct_F77=$F77
7073  for ac_prog in ifc ifort
7074do
7075  # Extract the first word of "$ac_prog", so it can be a program name with args.
7076set dummy $ac_prog; ac_word=$2
7077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7078$as_echo_n "checking for $ac_word... " >&6; }
7079if ${ac_cv_prog_ac_ct_F77+:} false; then :
7080  $as_echo_n "(cached) " >&6
7081else
7082  if test -n "$ac_ct_F77"; then
7083  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
7084else
7085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086for as_dir in $PATH
7087do
7088  IFS=$as_save_IFS
7089  test -z "$as_dir" && as_dir=.
7090    for ac_exec_ext in '' $ac_executable_extensions; do
7091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092    ac_cv_prog_ac_ct_F77="$ac_prog"
7093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094    break 2
7095  fi
7096done
7097  done
7098IFS=$as_save_IFS
7099
7100fi
7101fi
7102ac_ct_F77=$ac_cv_prog_ac_ct_F77
7103if test -n "$ac_ct_F77"; then
7104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
7105$as_echo "$ac_ct_F77" >&6; }
7106else
7107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7108$as_echo "no" >&6; }
7109fi
7110
7111
7112  test -n "$ac_ct_F77" && break
7113done
7114
7115  if test "x$ac_ct_F77" = x; then
7116    F77=""
7117  else
7118    case $cross_compiling:$ac_tool_warned in
7119yes:)
7120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7122ac_tool_warned=yes ;;
7123esac
7124    F77=$ac_ct_F77
7125  fi
7126fi
7127
7128
7129# Provide some information about the compiler.
7130$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
7131set X $ac_compile
7132ac_compiler=$2
7133for ac_option in --version -v -V -qversion; do
7134  { { ac_try="$ac_compiler $ac_option >&5"
7135case "(($ac_try" in
7136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7137  *) ac_try_echo=$ac_try;;
7138esac
7139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7140$as_echo "$ac_try_echo"; } >&5
7141  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7142  ac_status=$?
7143  if test -s conftest.err; then
7144    sed '10a\
7145... rest of stderr output deleted ...
7146         10q' conftest.err >conftest.er1
7147    cat conftest.er1 >&5
7148  fi
7149  rm -f conftest.er1 conftest.err
7150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7151  test $ac_status = 0; }
7152done
7153rm -f a.out
7154
7155# If we don't use `.F' as extension, the preprocessor is not run on the
7156# input file.  (Note that this only needs to work for GNU compilers.)
7157ac_save_ext=$ac_ext
7158ac_ext=F
7159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
7160$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
7161if ${ac_cv_f77_compiler_gnu+:} false; then :
7162  $as_echo_n "(cached) " >&6
7163else
7164  cat > conftest.$ac_ext <<_ACEOF
7165      program main
7166#ifndef __GNUC__
7167       choke me
7168#endif
7169
7170      end
7171_ACEOF
7172if ac_fn_f77_try_compile "$LINENO"; then :
7173  ac_compiler_gnu=yes
7174else
7175  ac_compiler_gnu=no
7176fi
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7178ac_cv_f77_compiler_gnu=$ac_compiler_gnu
7179
7180fi
7181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
7182$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
7183ac_ext=$ac_save_ext
7184ac_test_FFLAGS=${FFLAGS+set}
7185ac_save_FFLAGS=$FFLAGS
7186FFLAGS=
7187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
7188$as_echo_n "checking whether $F77 accepts -g... " >&6; }
7189if ${ac_cv_prog_f77_g+:} false; then :
7190  $as_echo_n "(cached) " >&6
7191else
7192  FFLAGS=-g
7193cat > conftest.$ac_ext <<_ACEOF
7194      program main
7195
7196      end
7197_ACEOF
7198if ac_fn_f77_try_compile "$LINENO"; then :
7199  ac_cv_prog_f77_g=yes
7200else
7201  ac_cv_prog_f77_g=no
7202fi
7203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7204
7205fi
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
7207$as_echo "$ac_cv_prog_f77_g" >&6; }
7208if test "$ac_test_FFLAGS" = set; then
7209  FFLAGS=$ac_save_FFLAGS
7210elif test $ac_cv_prog_f77_g = yes; then
7211  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7212    FFLAGS="-g -O2"
7213  else
7214    FFLAGS="-g"
7215  fi
7216else
7217  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7218    FFLAGS="-O2"
7219  else
7220    FFLAGS=
7221  fi
7222fi
7223
7224if test $ac_compiler_gnu = yes; then
7225  G77=yes
7226else
7227  G77=
7228fi
7229ac_ext=c
7230ac_cpp='$CPP $CPPFLAGS'
7231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7233ac_compiler_gnu=$ac_cv_c_compiler_gnu
7234
7235   if test -z "$F77"; then
7236     as_fn_error $? "You asked me to use ifc (intel fortran compiler) but i haven't been able to find it" "$LINENO" 5
7237    fi
7238fi
7239
7240if test -z "$F77"; then
7241## No Fortran compiler specified... Prefer gfortran and intel compilers
7242   : ${FFLAGS=""}
7243   ac_ext=f
7244ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
7245ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7246ac_compiler_gnu=$ac_cv_f77_compiler_gnu
7247if test -n "$ac_tool_prefix"; then
7248  for ac_prog in gfortran ifc ifort
7249  do
7250    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7251set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7253$as_echo_n "checking for $ac_word... " >&6; }
7254if ${ac_cv_prog_F77+:} false; then :
7255  $as_echo_n "(cached) " >&6
7256else
7257  if test -n "$F77"; then
7258  ac_cv_prog_F77="$F77" # Let the user override the test.
7259else
7260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261for as_dir in $PATH
7262do
7263  IFS=$as_save_IFS
7264  test -z "$as_dir" && as_dir=.
7265    for ac_exec_ext in '' $ac_executable_extensions; do
7266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7267    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
7268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7269    break 2
7270  fi
7271done
7272  done
7273IFS=$as_save_IFS
7274
7275fi
7276fi
7277F77=$ac_cv_prog_F77
7278if test -n "$F77"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
7280$as_echo "$F77" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287    test -n "$F77" && break
7288  done
7289fi
7290if test -z "$F77"; then
7291  ac_ct_F77=$F77
7292  for ac_prog in gfortran ifc ifort
7293do
7294  # Extract the first word of "$ac_prog", so it can be a program name with args.
7295set dummy $ac_prog; ac_word=$2
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297$as_echo_n "checking for $ac_word... " >&6; }
7298if ${ac_cv_prog_ac_ct_F77+:} false; then :
7299  $as_echo_n "(cached) " >&6
7300else
7301  if test -n "$ac_ct_F77"; then
7302  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
7303else
7304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305for as_dir in $PATH
7306do
7307  IFS=$as_save_IFS
7308  test -z "$as_dir" && as_dir=.
7309    for ac_exec_ext in '' $ac_executable_extensions; do
7310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311    ac_cv_prog_ac_ct_F77="$ac_prog"
7312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313    break 2
7314  fi
7315done
7316  done
7317IFS=$as_save_IFS
7318
7319fi
7320fi
7321ac_ct_F77=$ac_cv_prog_ac_ct_F77
7322if test -n "$ac_ct_F77"; then
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
7324$as_echo "$ac_ct_F77" >&6; }
7325else
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
7328fi
7329
7330
7331  test -n "$ac_ct_F77" && break
7332done
7333
7334  if test "x$ac_ct_F77" = x; then
7335    F77=""
7336  else
7337    case $cross_compiling:$ac_tool_warned in
7338yes:)
7339{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7340$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7341ac_tool_warned=yes ;;
7342esac
7343    F77=$ac_ct_F77
7344  fi
7345fi
7346
7347
7348# Provide some information about the compiler.
7349$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
7350set X $ac_compile
7351ac_compiler=$2
7352for ac_option in --version -v -V -qversion; do
7353  { { ac_try="$ac_compiler $ac_option >&5"
7354case "(($ac_try" in
7355  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356  *) ac_try_echo=$ac_try;;
7357esac
7358eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7359$as_echo "$ac_try_echo"; } >&5
7360  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7361  ac_status=$?
7362  if test -s conftest.err; then
7363    sed '10a\
7364... rest of stderr output deleted ...
7365         10q' conftest.err >conftest.er1
7366    cat conftest.er1 >&5
7367  fi
7368  rm -f conftest.er1 conftest.err
7369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7370  test $ac_status = 0; }
7371done
7372rm -f a.out
7373
7374# If we don't use `.F' as extension, the preprocessor is not run on the
7375# input file.  (Note that this only needs to work for GNU compilers.)
7376ac_save_ext=$ac_ext
7377ac_ext=F
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
7379$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
7380if ${ac_cv_f77_compiler_gnu+:} false; then :
7381  $as_echo_n "(cached) " >&6
7382else
7383  cat > conftest.$ac_ext <<_ACEOF
7384      program main
7385#ifndef __GNUC__
7386       choke me
7387#endif
7388
7389      end
7390_ACEOF
7391if ac_fn_f77_try_compile "$LINENO"; then :
7392  ac_compiler_gnu=yes
7393else
7394  ac_compiler_gnu=no
7395fi
7396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397ac_cv_f77_compiler_gnu=$ac_compiler_gnu
7398
7399fi
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
7401$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
7402ac_ext=$ac_save_ext
7403ac_test_FFLAGS=${FFLAGS+set}
7404ac_save_FFLAGS=$FFLAGS
7405FFLAGS=
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
7407$as_echo_n "checking whether $F77 accepts -g... " >&6; }
7408if ${ac_cv_prog_f77_g+:} false; then :
7409  $as_echo_n "(cached) " >&6
7410else
7411  FFLAGS=-g
7412cat > conftest.$ac_ext <<_ACEOF
7413      program main
7414
7415      end
7416_ACEOF
7417if ac_fn_f77_try_compile "$LINENO"; then :
7418  ac_cv_prog_f77_g=yes
7419else
7420  ac_cv_prog_f77_g=no
7421fi
7422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7423
7424fi
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
7426$as_echo "$ac_cv_prog_f77_g" >&6; }
7427if test "$ac_test_FFLAGS" = set; then
7428  FFLAGS=$ac_save_FFLAGS
7429elif test $ac_cv_prog_f77_g = yes; then
7430  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7431    FFLAGS="-g -O2"
7432  else
7433    FFLAGS="-g"
7434  fi
7435else
7436  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7437    FFLAGS="-O2"
7438  else
7439    FFLAGS=
7440  fi
7441fi
7442
7443if test $ac_compiler_gnu = yes; then
7444  G77=yes
7445else
7446  G77=
7447fi
7448ac_ext=c
7449ac_cpp='$CPP $CPPFLAGS'
7450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7452ac_compiler_gnu=$ac_cv_c_compiler_gnu
7453
7454   if test -z "$F77"; then
7455        # Best effort to find a compiler (might be g77)
7456   : ${FFLAGS=""}
7457    ac_ext=f
7458ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
7459ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7460ac_compiler_gnu=$ac_cv_f77_compiler_gnu
7461if test -n "$ac_tool_prefix"; then
7462  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
7463  do
7464    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7465set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7467$as_echo_n "checking for $ac_word... " >&6; }
7468if ${ac_cv_prog_F77+:} false; then :
7469  $as_echo_n "(cached) " >&6
7470else
7471  if test -n "$F77"; then
7472  ac_cv_prog_F77="$F77" # Let the user override the test.
7473else
7474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7475for as_dir in $PATH
7476do
7477  IFS=$as_save_IFS
7478  test -z "$as_dir" && as_dir=.
7479    for ac_exec_ext in '' $ac_executable_extensions; do
7480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7481    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
7482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7483    break 2
7484  fi
7485done
7486  done
7487IFS=$as_save_IFS
7488
7489fi
7490fi
7491F77=$ac_cv_prog_F77
7492if test -n "$F77"; then
7493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
7494$as_echo "$F77" >&6; }
7495else
7496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497$as_echo "no" >&6; }
7498fi
7499
7500
7501    test -n "$F77" && break
7502  done
7503fi
7504if test -z "$F77"; then
7505  ac_ct_F77=$F77
7506  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
7507do
7508  # Extract the first word of "$ac_prog", so it can be a program name with args.
7509set dummy $ac_prog; ac_word=$2
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511$as_echo_n "checking for $ac_word... " >&6; }
7512if ${ac_cv_prog_ac_ct_F77+:} false; then :
7513  $as_echo_n "(cached) " >&6
7514else
7515  if test -n "$ac_ct_F77"; then
7516  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
7517else
7518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7519for as_dir in $PATH
7520do
7521  IFS=$as_save_IFS
7522  test -z "$as_dir" && as_dir=.
7523    for ac_exec_ext in '' $ac_executable_extensions; do
7524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7525    ac_cv_prog_ac_ct_F77="$ac_prog"
7526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7527    break 2
7528  fi
7529done
7530  done
7531IFS=$as_save_IFS
7532
7533fi
7534fi
7535ac_ct_F77=$ac_cv_prog_ac_ct_F77
7536if test -n "$ac_ct_F77"; then
7537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
7538$as_echo "$ac_ct_F77" >&6; }
7539else
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7541$as_echo "no" >&6; }
7542fi
7543
7544
7545  test -n "$ac_ct_F77" && break
7546done
7547
7548  if test "x$ac_ct_F77" = x; then
7549    F77=""
7550  else
7551    case $cross_compiling:$ac_tool_warned in
7552yes:)
7553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7555ac_tool_warned=yes ;;
7556esac
7557    F77=$ac_ct_F77
7558  fi
7559fi
7560
7561
7562# Provide some information about the compiler.
7563$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
7564set X $ac_compile
7565ac_compiler=$2
7566for ac_option in --version -v -V -qversion; do
7567  { { ac_try="$ac_compiler $ac_option >&5"
7568case "(($ac_try" in
7569  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7570  *) ac_try_echo=$ac_try;;
7571esac
7572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7573$as_echo "$ac_try_echo"; } >&5
7574  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7575  ac_status=$?
7576  if test -s conftest.err; then
7577    sed '10a\
7578... rest of stderr output deleted ...
7579         10q' conftest.err >conftest.er1
7580    cat conftest.er1 >&5
7581  fi
7582  rm -f conftest.er1 conftest.err
7583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7584  test $ac_status = 0; }
7585done
7586rm -f a.out
7587
7588# If we don't use `.F' as extension, the preprocessor is not run on the
7589# input file.  (Note that this only needs to work for GNU compilers.)
7590ac_save_ext=$ac_ext
7591ac_ext=F
7592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
7593$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
7594if ${ac_cv_f77_compiler_gnu+:} false; then :
7595  $as_echo_n "(cached) " >&6
7596else
7597  cat > conftest.$ac_ext <<_ACEOF
7598      program main
7599#ifndef __GNUC__
7600       choke me
7601#endif
7602
7603      end
7604_ACEOF
7605if ac_fn_f77_try_compile "$LINENO"; then :
7606  ac_compiler_gnu=yes
7607else
7608  ac_compiler_gnu=no
7609fi
7610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7611ac_cv_f77_compiler_gnu=$ac_compiler_gnu
7612
7613fi
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
7615$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
7616ac_ext=$ac_save_ext
7617ac_test_FFLAGS=${FFLAGS+set}
7618ac_save_FFLAGS=$FFLAGS
7619FFLAGS=
7620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
7621$as_echo_n "checking whether $F77 accepts -g... " >&6; }
7622if ${ac_cv_prog_f77_g+:} false; then :
7623  $as_echo_n "(cached) " >&6
7624else
7625  FFLAGS=-g
7626cat > conftest.$ac_ext <<_ACEOF
7627      program main
7628
7629      end
7630_ACEOF
7631if ac_fn_f77_try_compile "$LINENO"; then :
7632  ac_cv_prog_f77_g=yes
7633else
7634  ac_cv_prog_f77_g=no
7635fi
7636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7637
7638fi
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
7640$as_echo "$ac_cv_prog_f77_g" >&6; }
7641if test "$ac_test_FFLAGS" = set; then
7642  FFLAGS=$ac_save_FFLAGS
7643elif test $ac_cv_prog_f77_g = yes; then
7644  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7645    FFLAGS="-g -O2"
7646  else
7647    FFLAGS="-g"
7648  fi
7649else
7650  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
7651    FFLAGS="-O2"
7652  else
7653    FFLAGS=
7654  fi
7655fi
7656
7657if test $ac_compiler_gnu = yes; then
7658  G77=yes
7659else
7660  G77=
7661fi
7662ac_ext=c
7663ac_cpp='$CPP $CPPFLAGS'
7664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7666ac_compiler_gnu=$ac_cv_c_compiler_gnu
7667
7668   fi
7669fi
7670
7671
7672# case statements were introduced in fortran 90 so we can use that
7673# as a test to see if our compiler is fortran 90 compatible.
7674f90compatible=false
7675if test -z "$F77"; then
7676  as_fn_error $? "No fortran compiler found. Cannot compile scilab without a fortran compiler" "$LINENO" 5
7677fi
7678
7679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $F77 is a fortran 90 compatible compiler" >&5
7680$as_echo_n "checking if $F77 is a fortran 90 compatible compiler... " >&6; }
7681 f90compatible=false
7682ac_ext=f
7683ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
7684ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7685ac_compiler_gnu=$ac_cv_f77_compiler_gnu
7686
7687
7688cat > conftest.$ac_ext <<_ACEOF
7689
7690      PROGRAM hello
7691        do 50 i = 1, 5
7692           select case ( i )
7693              case (1)
7694                 print*, "case is 1, i is ", i
7695              case ( 2 : 3 )
7696                 print*, "case is 2 to 3, i is ", i
7697              case default
7698                 print*, "default case, i is ", i
7699              end select
7700 50           continue
7701      END
7702
7703_ACEOF
7704if ac_fn_f77_try_compile "$LINENO"; then :
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7706$as_echo "yes" >&6; }
7707
7708$as_echo "#define G95_FORTRAN /**/" >>confdefs.h
7709
7710     f90compatible=true
7711
7712else
7713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7714$as_echo "no" >&6; }
7715
7716fi
7717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7718ac_ext=c
7719ac_cpp='$CPP $CPPFLAGS'
7720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7722ac_compiler_gnu=$ac_cv_c_compiler_gnu
7723
7724
7725############ C ###############
7726
7727
7728if test "$with_gcc" = yes; then
7729   : ${CFLAGS=""}
7730   ac_ext=c
7731ac_cpp='$CPP $CPPFLAGS'
7732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7734ac_compiler_gnu=$ac_cv_c_compiler_gnu
7735if test -n "$ac_tool_prefix"; then
7736  for ac_prog in gcc
7737  do
7738    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_prog_CC+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  if test -n "$CC"; then
7746  ac_cv_prog_CC="$CC" # Let the user override the test.
7747else
7748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7749for as_dir in $PATH
7750do
7751  IFS=$as_save_IFS
7752  test -z "$as_dir" && as_dir=.
7753    for ac_exec_ext in '' $ac_executable_extensions; do
7754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7755    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
7756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7757    break 2
7758  fi
7759done
7760  done
7761IFS=$as_save_IFS
7762
7763fi
7764fi
7765CC=$ac_cv_prog_CC
7766if test -n "$CC"; then
7767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7768$as_echo "$CC" >&6; }
7769else
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7771$as_echo "no" >&6; }
7772fi
7773
7774
7775    test -n "$CC" && break
7776  done
7777fi
7778if test -z "$CC"; then
7779  ac_ct_CC=$CC
7780  for ac_prog in gcc
7781do
7782  # Extract the first word of "$ac_prog", so it can be a program name with args.
7783set dummy $ac_prog; ac_word=$2
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785$as_echo_n "checking for $ac_word... " >&6; }
7786if ${ac_cv_prog_ac_ct_CC+:} false; then :
7787  $as_echo_n "(cached) " >&6
7788else
7789  if test -n "$ac_ct_CC"; then
7790  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7791else
7792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7793for as_dir in $PATH
7794do
7795  IFS=$as_save_IFS
7796  test -z "$as_dir" && as_dir=.
7797    for ac_exec_ext in '' $ac_executable_extensions; do
7798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7799    ac_cv_prog_ac_ct_CC="$ac_prog"
7800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7801    break 2
7802  fi
7803done
7804  done
7805IFS=$as_save_IFS
7806
7807fi
7808fi
7809ac_ct_CC=$ac_cv_prog_ac_ct_CC
7810if test -n "$ac_ct_CC"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
7812$as_echo "$ac_ct_CC" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819  test -n "$ac_ct_CC" && break
7820done
7821
7822  if test "x$ac_ct_CC" = x; then
7823    CC=""
7824  else
7825    case $cross_compiling:$ac_tool_warned in
7826yes:)
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7829ac_tool_warned=yes ;;
7830esac
7831    CC=$ac_ct_CC
7832  fi
7833fi
7834
7835
7836test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7838as_fn_error $? "no acceptable C compiler found in \$PATH
7839See \`config.log' for more details" "$LINENO" 5; }
7840
7841# Provide some information about the compiler.
7842$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
7843set X $ac_compile
7844ac_compiler=$2
7845for ac_option in --version -v -V -qversion; do
7846  { { ac_try="$ac_compiler $ac_option >&5"
7847case "(($ac_try" in
7848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7849  *) ac_try_echo=$ac_try;;
7850esac
7851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7852$as_echo "$ac_try_echo"; } >&5
7853  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7854  ac_status=$?
7855  if test -s conftest.err; then
7856    sed '10a\
7857... rest of stderr output deleted ...
7858         10q' conftest.err >conftest.er1
7859    cat conftest.er1 >&5
7860  fi
7861  rm -f conftest.er1 conftest.err
7862  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7863  test $ac_status = 0; }
7864done
7865
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
7867$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
7868if ${ac_cv_c_compiler_gnu+:} false; then :
7869  $as_echo_n "(cached) " >&6
7870else
7871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872/* end confdefs.h.  */
7873
7874int
7875main ()
7876{
7877#ifndef __GNUC__
7878       choke me
7879#endif
7880
7881  ;
7882  return 0;
7883}
7884_ACEOF
7885if ac_fn_c_try_compile "$LINENO"; then :
7886  ac_compiler_gnu=yes
7887else
7888  ac_compiler_gnu=no
7889fi
7890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7891ac_cv_c_compiler_gnu=$ac_compiler_gnu
7892
7893fi
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
7895$as_echo "$ac_cv_c_compiler_gnu" >&6; }
7896if test $ac_compiler_gnu = yes; then
7897  GCC=yes
7898else
7899  GCC=
7900fi
7901ac_test_CFLAGS=${CFLAGS+set}
7902ac_save_CFLAGS=$CFLAGS
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
7904$as_echo_n "checking whether $CC accepts -g... " >&6; }
7905if ${ac_cv_prog_cc_g+:} false; then :
7906  $as_echo_n "(cached) " >&6
7907else
7908  ac_save_c_werror_flag=$ac_c_werror_flag
7909   ac_c_werror_flag=yes
7910   ac_cv_prog_cc_g=no
7911   CFLAGS="-g"
7912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7913/* end confdefs.h.  */
7914
7915int
7916main ()
7917{
7918
7919  ;
7920  return 0;
7921}
7922_ACEOF
7923if ac_fn_c_try_compile "$LINENO"; then :
7924  ac_cv_prog_cc_g=yes
7925else
7926  CFLAGS=""
7927      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7928/* end confdefs.h.  */
7929
7930int
7931main ()
7932{
7933
7934  ;
7935  return 0;
7936}
7937_ACEOF
7938if ac_fn_c_try_compile "$LINENO"; then :
7939
7940else
7941  ac_c_werror_flag=$ac_save_c_werror_flag
7942	 CFLAGS="-g"
7943	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7944/* end confdefs.h.  */
7945
7946int
7947main ()
7948{
7949
7950  ;
7951  return 0;
7952}
7953_ACEOF
7954if ac_fn_c_try_compile "$LINENO"; then :
7955  ac_cv_prog_cc_g=yes
7956fi
7957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7958fi
7959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7960fi
7961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7962   ac_c_werror_flag=$ac_save_c_werror_flag
7963fi
7964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
7965$as_echo "$ac_cv_prog_cc_g" >&6; }
7966if test "$ac_test_CFLAGS" = set; then
7967  CFLAGS=$ac_save_CFLAGS
7968elif test $ac_cv_prog_cc_g = yes; then
7969  if test "$GCC" = yes; then
7970    CFLAGS="-g -O2"
7971  else
7972    CFLAGS="-g"
7973  fi
7974else
7975  if test "$GCC" = yes; then
7976    CFLAGS="-O2"
7977  else
7978    CFLAGS=
7979  fi
7980fi
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7982$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7983if ${ac_cv_prog_cc_c89+:} false; then :
7984  $as_echo_n "(cached) " >&6
7985else
7986  ac_cv_prog_cc_c89=no
7987ac_save_CC=$CC
7988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7989/* end confdefs.h.  */
7990#include <stdarg.h>
7991#include <stdio.h>
7992struct stat;
7993/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7994struct buf { int x; };
7995FILE * (*rcsopen) (struct buf *, struct stat *, int);
7996static char *e (p, i)
7997     char **p;
7998     int i;
7999{
8000  return p[i];
8001}
8002static char *f (char * (*g) (char **, int), char **p, ...)
8003{
8004  char *s;
8005  va_list v;
8006  va_start (v,p);
8007  s = g (p, va_arg (v,int));
8008  va_end (v);
8009  return s;
8010}
8011
8012/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
8013   function prototypes and stuff, but not '\xHH' hex character constants.
8014   These don't provoke an error unfortunately, instead are silently treated
8015   as 'x'.  The following induces an error, until -std is added to get
8016   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
8017   array size at least.  It's necessary to write '\x00'==0 to get something
8018   that's true only with -std.  */
8019int osf4_cc_array ['\x00' == 0 ? 1 : -1];
8020
8021/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
8022   inside strings and character constants.  */
8023#define FOO(x) 'x'
8024int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
8025
8026int test (int i, double x);
8027struct s1 {int (*f) (int a);};
8028struct s2 {int (*f) (double a);};
8029int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8030int argc;
8031char **argv;
8032int
8033main ()
8034{
8035return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8036  ;
8037  return 0;
8038}
8039_ACEOF
8040for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
8041	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8042do
8043  CC="$ac_save_CC $ac_arg"
8044  if ac_fn_c_try_compile "$LINENO"; then :
8045  ac_cv_prog_cc_c89=$ac_arg
8046fi
8047rm -f core conftest.err conftest.$ac_objext
8048  test "x$ac_cv_prog_cc_c89" != "xno" && break
8049done
8050rm -f conftest.$ac_ext
8051CC=$ac_save_CC
8052
8053fi
8054# AC_CACHE_VAL
8055case "x$ac_cv_prog_cc_c89" in
8056  x)
8057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8058$as_echo "none needed" >&6; } ;;
8059  xno)
8060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8061$as_echo "unsupported" >&6; } ;;
8062  *)
8063    CC="$CC $ac_cv_prog_cc_c89"
8064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
8065$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
8066esac
8067if test "x$ac_cv_prog_cc_c89" != xno; then :
8068
8069fi
8070
8071ac_ext=c
8072ac_cpp='$CPP $CPPFLAGS'
8073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8075ac_compiler_gnu=$ac_cv_c_compiler_gnu
8076
8077ac_ext=c
8078ac_cpp='$CPP $CPPFLAGS'
8079ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8080ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8081ac_compiler_gnu=$ac_cv_c_compiler_gnu
8082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
8083$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
8084if ${am_cv_prog_cc_c_o+:} false; then :
8085  $as_echo_n "(cached) " >&6
8086else
8087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8088/* end confdefs.h.  */
8089
8090int
8091main ()
8092{
8093
8094  ;
8095  return 0;
8096}
8097_ACEOF
8098  # Make sure it works both with $CC and with simple cc.
8099  # Following AC_PROG_CC_C_O, we do the test twice because some
8100  # compilers refuse to overwrite an existing .o file with -o,
8101  # though they will create one.
8102  am_cv_prog_cc_c_o=yes
8103  for am_i in 1 2; do
8104    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
8105   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
8106   ac_status=$?
8107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8108   (exit $ac_status); } \
8109         && test -f conftest2.$ac_objext; then
8110      : OK
8111    else
8112      am_cv_prog_cc_c_o=no
8113      break
8114    fi
8115  done
8116  rm -f core conftest*
8117  unset am_i
8118fi
8119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
8120$as_echo "$am_cv_prog_cc_c_o" >&6; }
8121if test "$am_cv_prog_cc_c_o" != yes; then
8122   # Losing compiler, so override with the script.
8123   # FIXME: It is wrong to rewrite CC.
8124   # But if we don't then we get into trouble of one sort or another.
8125   # A longer-term fix would be to have automake use am__CC in this case,
8126   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8127   CC="$am_aux_dir/compile $CC"
8128fi
8129ac_ext=c
8130ac_cpp='$CPP $CPPFLAGS'
8131ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8132ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8133ac_compiler_gnu=$ac_cv_c_compiler_gnu
8134
8135
8136   if test -z "$CC"; then
8137     as_fn_error $? "You asked me to use gcc but i haven't been able to find it" "$LINENO" 5
8138    fi
8139fi
8140
8141if test "$with_intelcompilers" = yes; then
8142   : ${CFLAGS=""}
8143   ac_ext=c
8144ac_cpp='$CPP $CPPFLAGS'
8145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8147ac_compiler_gnu=$ac_cv_c_compiler_gnu
8148if test -n "$ac_tool_prefix"; then
8149  for ac_prog in icc ecc
8150  do
8151    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8152set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
8155if ${ac_cv_prog_CC+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  if test -n "$CC"; then
8159  ac_cv_prog_CC="$CC" # Let the user override the test.
8160else
8161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8162for as_dir in $PATH
8163do
8164  IFS=$as_save_IFS
8165  test -z "$as_dir" && as_dir=.
8166    for ac_exec_ext in '' $ac_executable_extensions; do
8167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8168    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
8169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8170    break 2
8171  fi
8172done
8173  done
8174IFS=$as_save_IFS
8175
8176fi
8177fi
8178CC=$ac_cv_prog_CC
8179if test -n "$CC"; then
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8181$as_echo "$CC" >&6; }
8182else
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8184$as_echo "no" >&6; }
8185fi
8186
8187
8188    test -n "$CC" && break
8189  done
8190fi
8191if test -z "$CC"; then
8192  ac_ct_CC=$CC
8193  for ac_prog in icc ecc
8194do
8195  # Extract the first word of "$ac_prog", so it can be a program name with args.
8196set dummy $ac_prog; ac_word=$2
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198$as_echo_n "checking for $ac_word... " >&6; }
8199if ${ac_cv_prog_ac_ct_CC+:} false; then :
8200  $as_echo_n "(cached) " >&6
8201else
8202  if test -n "$ac_ct_CC"; then
8203  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8204else
8205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8206for as_dir in $PATH
8207do
8208  IFS=$as_save_IFS
8209  test -z "$as_dir" && as_dir=.
8210    for ac_exec_ext in '' $ac_executable_extensions; do
8211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8212    ac_cv_prog_ac_ct_CC="$ac_prog"
8213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8214    break 2
8215  fi
8216done
8217  done
8218IFS=$as_save_IFS
8219
8220fi
8221fi
8222ac_ct_CC=$ac_cv_prog_ac_ct_CC
8223if test -n "$ac_ct_CC"; then
8224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8225$as_echo "$ac_ct_CC" >&6; }
8226else
8227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228$as_echo "no" >&6; }
8229fi
8230
8231
8232  test -n "$ac_ct_CC" && break
8233done
8234
8235  if test "x$ac_ct_CC" = x; then
8236    CC=""
8237  else
8238    case $cross_compiling:$ac_tool_warned in
8239yes:)
8240{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8241$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8242ac_tool_warned=yes ;;
8243esac
8244    CC=$ac_ct_CC
8245  fi
8246fi
8247
8248
8249test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8251as_fn_error $? "no acceptable C compiler found in \$PATH
8252See \`config.log' for more details" "$LINENO" 5; }
8253
8254# Provide some information about the compiler.
8255$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
8256set X $ac_compile
8257ac_compiler=$2
8258for ac_option in --version -v -V -qversion; do
8259  { { ac_try="$ac_compiler $ac_option >&5"
8260case "(($ac_try" in
8261  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8262  *) ac_try_echo=$ac_try;;
8263esac
8264eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8265$as_echo "$ac_try_echo"; } >&5
8266  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8267  ac_status=$?
8268  if test -s conftest.err; then
8269    sed '10a\
8270... rest of stderr output deleted ...
8271         10q' conftest.err >conftest.er1
8272    cat conftest.er1 >&5
8273  fi
8274  rm -f conftest.er1 conftest.err
8275  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8276  test $ac_status = 0; }
8277done
8278
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
8280$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
8281if ${ac_cv_c_compiler_gnu+:} false; then :
8282  $as_echo_n "(cached) " >&6
8283else
8284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8285/* end confdefs.h.  */
8286
8287int
8288main ()
8289{
8290#ifndef __GNUC__
8291       choke me
8292#endif
8293
8294  ;
8295  return 0;
8296}
8297_ACEOF
8298if ac_fn_c_try_compile "$LINENO"; then :
8299  ac_compiler_gnu=yes
8300else
8301  ac_compiler_gnu=no
8302fi
8303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8304ac_cv_c_compiler_gnu=$ac_compiler_gnu
8305
8306fi
8307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
8308$as_echo "$ac_cv_c_compiler_gnu" >&6; }
8309if test $ac_compiler_gnu = yes; then
8310  GCC=yes
8311else
8312  GCC=
8313fi
8314ac_test_CFLAGS=${CFLAGS+set}
8315ac_save_CFLAGS=$CFLAGS
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
8317$as_echo_n "checking whether $CC accepts -g... " >&6; }
8318if ${ac_cv_prog_cc_g+:} false; then :
8319  $as_echo_n "(cached) " >&6
8320else
8321  ac_save_c_werror_flag=$ac_c_werror_flag
8322   ac_c_werror_flag=yes
8323   ac_cv_prog_cc_g=no
8324   CFLAGS="-g"
8325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8326/* end confdefs.h.  */
8327
8328int
8329main ()
8330{
8331
8332  ;
8333  return 0;
8334}
8335_ACEOF
8336if ac_fn_c_try_compile "$LINENO"; then :
8337  ac_cv_prog_cc_g=yes
8338else
8339  CFLAGS=""
8340      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8341/* end confdefs.h.  */
8342
8343int
8344main ()
8345{
8346
8347  ;
8348  return 0;
8349}
8350_ACEOF
8351if ac_fn_c_try_compile "$LINENO"; then :
8352
8353else
8354  ac_c_werror_flag=$ac_save_c_werror_flag
8355	 CFLAGS="-g"
8356	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8357/* end confdefs.h.  */
8358
8359int
8360main ()
8361{
8362
8363  ;
8364  return 0;
8365}
8366_ACEOF
8367if ac_fn_c_try_compile "$LINENO"; then :
8368  ac_cv_prog_cc_g=yes
8369fi
8370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8371fi
8372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8373fi
8374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8375   ac_c_werror_flag=$ac_save_c_werror_flag
8376fi
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
8378$as_echo "$ac_cv_prog_cc_g" >&6; }
8379if test "$ac_test_CFLAGS" = set; then
8380  CFLAGS=$ac_save_CFLAGS
8381elif test $ac_cv_prog_cc_g = yes; then
8382  if test "$GCC" = yes; then
8383    CFLAGS="-g -O2"
8384  else
8385    CFLAGS="-g"
8386  fi
8387else
8388  if test "$GCC" = yes; then
8389    CFLAGS="-O2"
8390  else
8391    CFLAGS=
8392  fi
8393fi
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
8395$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
8396if ${ac_cv_prog_cc_c89+:} false; then :
8397  $as_echo_n "(cached) " >&6
8398else
8399  ac_cv_prog_cc_c89=no
8400ac_save_CC=$CC
8401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402/* end confdefs.h.  */
8403#include <stdarg.h>
8404#include <stdio.h>
8405struct stat;
8406/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8407struct buf { int x; };
8408FILE * (*rcsopen) (struct buf *, struct stat *, int);
8409static char *e (p, i)
8410     char **p;
8411     int i;
8412{
8413  return p[i];
8414}
8415static char *f (char * (*g) (char **, int), char **p, ...)
8416{
8417  char *s;
8418  va_list v;
8419  va_start (v,p);
8420  s = g (p, va_arg (v,int));
8421  va_end (v);
8422  return s;
8423}
8424
8425/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
8426   function prototypes and stuff, but not '\xHH' hex character constants.
8427   These don't provoke an error unfortunately, instead are silently treated
8428   as 'x'.  The following induces an error, until -std is added to get
8429   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
8430   array size at least.  It's necessary to write '\x00'==0 to get something
8431   that's true only with -std.  */
8432int osf4_cc_array ['\x00' == 0 ? 1 : -1];
8433
8434/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
8435   inside strings and character constants.  */
8436#define FOO(x) 'x'
8437int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
8438
8439int test (int i, double x);
8440struct s1 {int (*f) (int a);};
8441struct s2 {int (*f) (double a);};
8442int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8443int argc;
8444char **argv;
8445int
8446main ()
8447{
8448return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8449  ;
8450  return 0;
8451}
8452_ACEOF
8453for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
8454	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8455do
8456  CC="$ac_save_CC $ac_arg"
8457  if ac_fn_c_try_compile "$LINENO"; then :
8458  ac_cv_prog_cc_c89=$ac_arg
8459fi
8460rm -f core conftest.err conftest.$ac_objext
8461  test "x$ac_cv_prog_cc_c89" != "xno" && break
8462done
8463rm -f conftest.$ac_ext
8464CC=$ac_save_CC
8465
8466fi
8467# AC_CACHE_VAL
8468case "x$ac_cv_prog_cc_c89" in
8469  x)
8470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8471$as_echo "none needed" >&6; } ;;
8472  xno)
8473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8474$as_echo "unsupported" >&6; } ;;
8475  *)
8476    CC="$CC $ac_cv_prog_cc_c89"
8477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
8478$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
8479esac
8480if test "x$ac_cv_prog_cc_c89" != xno; then :
8481
8482fi
8483
8484ac_ext=c
8485ac_cpp='$CPP $CPPFLAGS'
8486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8488ac_compiler_gnu=$ac_cv_c_compiler_gnu
8489
8490ac_ext=c
8491ac_cpp='$CPP $CPPFLAGS'
8492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8494ac_compiler_gnu=$ac_cv_c_compiler_gnu
8495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
8496$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
8497if ${am_cv_prog_cc_c_o+:} false; then :
8498  $as_echo_n "(cached) " >&6
8499else
8500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8501/* end confdefs.h.  */
8502
8503int
8504main ()
8505{
8506
8507  ;
8508  return 0;
8509}
8510_ACEOF
8511  # Make sure it works both with $CC and with simple cc.
8512  # Following AC_PROG_CC_C_O, we do the test twice because some
8513  # compilers refuse to overwrite an existing .o file with -o,
8514  # though they will create one.
8515  am_cv_prog_cc_c_o=yes
8516  for am_i in 1 2; do
8517    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
8518   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
8519   ac_status=$?
8520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8521   (exit $ac_status); } \
8522         && test -f conftest2.$ac_objext; then
8523      : OK
8524    else
8525      am_cv_prog_cc_c_o=no
8526      break
8527    fi
8528  done
8529  rm -f core conftest*
8530  unset am_i
8531fi
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
8533$as_echo "$am_cv_prog_cc_c_o" >&6; }
8534if test "$am_cv_prog_cc_c_o" != yes; then
8535   # Losing compiler, so override with the script.
8536   # FIXME: It is wrong to rewrite CC.
8537   # But if we don't then we get into trouble of one sort or another.
8538   # A longer-term fix would be to have automake use am__CC in this case,
8539   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8540   CC="$am_aux_dir/compile $CC"
8541fi
8542ac_ext=c
8543ac_cpp='$CPP $CPPFLAGS'
8544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8546ac_compiler_gnu=$ac_cv_c_compiler_gnu
8547
8548
8549   if test -z "$CC"; then
8550     as_fn_error $? "You asked me to use icc (intel C compiler) but I haven't been able to find it" "$LINENO" 5
8551    fi
8552fi
8553
8554if test -z "$CC"; then
8555# No C compiler specified... We rely on Autoconf to find the best
8556   : ${CFLAGS=""}
8557   ac_ext=c
8558ac_cpp='$CPP $CPPFLAGS'
8559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8561ac_compiler_gnu=$ac_cv_c_compiler_gnu
8562if test -n "$ac_tool_prefix"; then
8563  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
8564set dummy ${ac_tool_prefix}gcc; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_prog_CC+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  if test -n "$CC"; then
8571  ac_cv_prog_CC="$CC" # Let the user override the test.
8572else
8573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8574for as_dir in $PATH
8575do
8576  IFS=$as_save_IFS
8577  test -z "$as_dir" && as_dir=.
8578    for ac_exec_ext in '' $ac_executable_extensions; do
8579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8580    ac_cv_prog_CC="${ac_tool_prefix}gcc"
8581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8582    break 2
8583  fi
8584done
8585  done
8586IFS=$as_save_IFS
8587
8588fi
8589fi
8590CC=$ac_cv_prog_CC
8591if test -n "$CC"; then
8592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8593$as_echo "$CC" >&6; }
8594else
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596$as_echo "no" >&6; }
8597fi
8598
8599
8600fi
8601if test -z "$ac_cv_prog_CC"; then
8602  ac_ct_CC=$CC
8603  # Extract the first word of "gcc", so it can be a program name with args.
8604set dummy gcc; ac_word=$2
8605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8606$as_echo_n "checking for $ac_word... " >&6; }
8607if ${ac_cv_prog_ac_ct_CC+:} false; then :
8608  $as_echo_n "(cached) " >&6
8609else
8610  if test -n "$ac_ct_CC"; then
8611  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8612else
8613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8614for as_dir in $PATH
8615do
8616  IFS=$as_save_IFS
8617  test -z "$as_dir" && as_dir=.
8618    for ac_exec_ext in '' $ac_executable_extensions; do
8619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8620    ac_cv_prog_ac_ct_CC="gcc"
8621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8622    break 2
8623  fi
8624done
8625  done
8626IFS=$as_save_IFS
8627
8628fi
8629fi
8630ac_ct_CC=$ac_cv_prog_ac_ct_CC
8631if test -n "$ac_ct_CC"; then
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8633$as_echo "$ac_ct_CC" >&6; }
8634else
8635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8636$as_echo "no" >&6; }
8637fi
8638
8639  if test "x$ac_ct_CC" = x; then
8640    CC=""
8641  else
8642    case $cross_compiling:$ac_tool_warned in
8643yes:)
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8646ac_tool_warned=yes ;;
8647esac
8648    CC=$ac_ct_CC
8649  fi
8650else
8651  CC="$ac_cv_prog_CC"
8652fi
8653
8654if test -z "$CC"; then
8655          if test -n "$ac_tool_prefix"; then
8656    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
8657set dummy ${ac_tool_prefix}cc; ac_word=$2
8658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659$as_echo_n "checking for $ac_word... " >&6; }
8660if ${ac_cv_prog_CC+:} false; then :
8661  $as_echo_n "(cached) " >&6
8662else
8663  if test -n "$CC"; then
8664  ac_cv_prog_CC="$CC" # Let the user override the test.
8665else
8666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8667for as_dir in $PATH
8668do
8669  IFS=$as_save_IFS
8670  test -z "$as_dir" && as_dir=.
8671    for ac_exec_ext in '' $ac_executable_extensions; do
8672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8673    ac_cv_prog_CC="${ac_tool_prefix}cc"
8674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8675    break 2
8676  fi
8677done
8678  done
8679IFS=$as_save_IFS
8680
8681fi
8682fi
8683CC=$ac_cv_prog_CC
8684if test -n "$CC"; then
8685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8686$as_echo "$CC" >&6; }
8687else
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8689$as_echo "no" >&6; }
8690fi
8691
8692
8693  fi
8694fi
8695if test -z "$CC"; then
8696  # Extract the first word of "cc", so it can be a program name with args.
8697set dummy cc; ac_word=$2
8698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8699$as_echo_n "checking for $ac_word... " >&6; }
8700if ${ac_cv_prog_CC+:} false; then :
8701  $as_echo_n "(cached) " >&6
8702else
8703  if test -n "$CC"; then
8704  ac_cv_prog_CC="$CC" # Let the user override the test.
8705else
8706  ac_prog_rejected=no
8707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8708for as_dir in $PATH
8709do
8710  IFS=$as_save_IFS
8711  test -z "$as_dir" && as_dir=.
8712    for ac_exec_ext in '' $ac_executable_extensions; do
8713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8714    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
8715       ac_prog_rejected=yes
8716       continue
8717     fi
8718    ac_cv_prog_CC="cc"
8719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8720    break 2
8721  fi
8722done
8723  done
8724IFS=$as_save_IFS
8725
8726if test $ac_prog_rejected = yes; then
8727  # We found a bogon in the path, so make sure we never use it.
8728  set dummy $ac_cv_prog_CC
8729  shift
8730  if test $# != 0; then
8731    # We chose a different compiler from the bogus one.
8732    # However, it has the same basename, so the bogon will be chosen
8733    # first if we set CC to just the basename; use the full file name.
8734    shift
8735    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
8736  fi
8737fi
8738fi
8739fi
8740CC=$ac_cv_prog_CC
8741if test -n "$CC"; then
8742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8743$as_echo "$CC" >&6; }
8744else
8745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8746$as_echo "no" >&6; }
8747fi
8748
8749
8750fi
8751if test -z "$CC"; then
8752  if test -n "$ac_tool_prefix"; then
8753  for ac_prog in cl.exe
8754  do
8755    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8758$as_echo_n "checking for $ac_word... " >&6; }
8759if ${ac_cv_prog_CC+:} false; then :
8760  $as_echo_n "(cached) " >&6
8761else
8762  if test -n "$CC"; then
8763  ac_cv_prog_CC="$CC" # Let the user override the test.
8764else
8765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8766for as_dir in $PATH
8767do
8768  IFS=$as_save_IFS
8769  test -z "$as_dir" && as_dir=.
8770    for ac_exec_ext in '' $ac_executable_extensions; do
8771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8772    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
8773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8774    break 2
8775  fi
8776done
8777  done
8778IFS=$as_save_IFS
8779
8780fi
8781fi
8782CC=$ac_cv_prog_CC
8783if test -n "$CC"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8785$as_echo "$CC" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792    test -n "$CC" && break
8793  done
8794fi
8795if test -z "$CC"; then
8796  ac_ct_CC=$CC
8797  for ac_prog in cl.exe
8798do
8799  # Extract the first word of "$ac_prog", so it can be a program name with args.
8800set dummy $ac_prog; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_prog_ac_ct_CC+:} false; then :
8804  $as_echo_n "(cached) " >&6
8805else
8806  if test -n "$ac_ct_CC"; then
8807  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8808else
8809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810for as_dir in $PATH
8811do
8812  IFS=$as_save_IFS
8813  test -z "$as_dir" && as_dir=.
8814    for ac_exec_ext in '' $ac_executable_extensions; do
8815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8816    ac_cv_prog_ac_ct_CC="$ac_prog"
8817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8818    break 2
8819  fi
8820done
8821  done
8822IFS=$as_save_IFS
8823
8824fi
8825fi
8826ac_ct_CC=$ac_cv_prog_ac_ct_CC
8827if test -n "$ac_ct_CC"; then
8828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8829$as_echo "$ac_ct_CC" >&6; }
8830else
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8832$as_echo "no" >&6; }
8833fi
8834
8835
8836  test -n "$ac_ct_CC" && break
8837done
8838
8839  if test "x$ac_ct_CC" = x; then
8840    CC=""
8841  else
8842    case $cross_compiling:$ac_tool_warned in
8843yes:)
8844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8846ac_tool_warned=yes ;;
8847esac
8848    CC=$ac_ct_CC
8849  fi
8850fi
8851
8852fi
8853
8854
8855test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8857as_fn_error $? "no acceptable C compiler found in \$PATH
8858See \`config.log' for more details" "$LINENO" 5; }
8859
8860# Provide some information about the compiler.
8861$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
8862set X $ac_compile
8863ac_compiler=$2
8864for ac_option in --version -v -V -qversion; do
8865  { { ac_try="$ac_compiler $ac_option >&5"
8866case "(($ac_try" in
8867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8868  *) ac_try_echo=$ac_try;;
8869esac
8870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8871$as_echo "$ac_try_echo"; } >&5
8872  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8873  ac_status=$?
8874  if test -s conftest.err; then
8875    sed '10a\
8876... rest of stderr output deleted ...
8877         10q' conftest.err >conftest.er1
8878    cat conftest.er1 >&5
8879  fi
8880  rm -f conftest.er1 conftest.err
8881  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8882  test $ac_status = 0; }
8883done
8884
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
8886$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
8887if ${ac_cv_c_compiler_gnu+:} false; then :
8888  $as_echo_n "(cached) " >&6
8889else
8890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8891/* end confdefs.h.  */
8892
8893int
8894main ()
8895{
8896#ifndef __GNUC__
8897       choke me
8898#endif
8899
8900  ;
8901  return 0;
8902}
8903_ACEOF
8904if ac_fn_c_try_compile "$LINENO"; then :
8905  ac_compiler_gnu=yes
8906else
8907  ac_compiler_gnu=no
8908fi
8909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8910ac_cv_c_compiler_gnu=$ac_compiler_gnu
8911
8912fi
8913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
8914$as_echo "$ac_cv_c_compiler_gnu" >&6; }
8915if test $ac_compiler_gnu = yes; then
8916  GCC=yes
8917else
8918  GCC=
8919fi
8920ac_test_CFLAGS=${CFLAGS+set}
8921ac_save_CFLAGS=$CFLAGS
8922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
8923$as_echo_n "checking whether $CC accepts -g... " >&6; }
8924if ${ac_cv_prog_cc_g+:} false; then :
8925  $as_echo_n "(cached) " >&6
8926else
8927  ac_save_c_werror_flag=$ac_c_werror_flag
8928   ac_c_werror_flag=yes
8929   ac_cv_prog_cc_g=no
8930   CFLAGS="-g"
8931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8932/* end confdefs.h.  */
8933
8934int
8935main ()
8936{
8937
8938  ;
8939  return 0;
8940}
8941_ACEOF
8942if ac_fn_c_try_compile "$LINENO"; then :
8943  ac_cv_prog_cc_g=yes
8944else
8945  CFLAGS=""
8946      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8947/* end confdefs.h.  */
8948
8949int
8950main ()
8951{
8952
8953  ;
8954  return 0;
8955}
8956_ACEOF
8957if ac_fn_c_try_compile "$LINENO"; then :
8958
8959else
8960  ac_c_werror_flag=$ac_save_c_werror_flag
8961	 CFLAGS="-g"
8962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8963/* end confdefs.h.  */
8964
8965int
8966main ()
8967{
8968
8969  ;
8970  return 0;
8971}
8972_ACEOF
8973if ac_fn_c_try_compile "$LINENO"; then :
8974  ac_cv_prog_cc_g=yes
8975fi
8976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8977fi
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8979fi
8980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8981   ac_c_werror_flag=$ac_save_c_werror_flag
8982fi
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
8984$as_echo "$ac_cv_prog_cc_g" >&6; }
8985if test "$ac_test_CFLAGS" = set; then
8986  CFLAGS=$ac_save_CFLAGS
8987elif test $ac_cv_prog_cc_g = yes; then
8988  if test "$GCC" = yes; then
8989    CFLAGS="-g -O2"
8990  else
8991    CFLAGS="-g"
8992  fi
8993else
8994  if test "$GCC" = yes; then
8995    CFLAGS="-O2"
8996  else
8997    CFLAGS=
8998  fi
8999fi
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
9001$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
9002if ${ac_cv_prog_cc_c89+:} false; then :
9003  $as_echo_n "(cached) " >&6
9004else
9005  ac_cv_prog_cc_c89=no
9006ac_save_CC=$CC
9007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9008/* end confdefs.h.  */
9009#include <stdarg.h>
9010#include <stdio.h>
9011struct stat;
9012/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
9013struct buf { int x; };
9014FILE * (*rcsopen) (struct buf *, struct stat *, int);
9015static char *e (p, i)
9016     char **p;
9017     int i;
9018{
9019  return p[i];
9020}
9021static char *f (char * (*g) (char **, int), char **p, ...)
9022{
9023  char *s;
9024  va_list v;
9025  va_start (v,p);
9026  s = g (p, va_arg (v,int));
9027  va_end (v);
9028  return s;
9029}
9030
9031/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
9032   function prototypes and stuff, but not '\xHH' hex character constants.
9033   These don't provoke an error unfortunately, instead are silently treated
9034   as 'x'.  The following induces an error, until -std is added to get
9035   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
9036   array size at least.  It's necessary to write '\x00'==0 to get something
9037   that's true only with -std.  */
9038int osf4_cc_array ['\x00' == 0 ? 1 : -1];
9039
9040/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
9041   inside strings and character constants.  */
9042#define FOO(x) 'x'
9043int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
9044
9045int test (int i, double x);
9046struct s1 {int (*f) (int a);};
9047struct s2 {int (*f) (double a);};
9048int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9049int argc;
9050char **argv;
9051int
9052main ()
9053{
9054return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
9055  ;
9056  return 0;
9057}
9058_ACEOF
9059for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
9060	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
9061do
9062  CC="$ac_save_CC $ac_arg"
9063  if ac_fn_c_try_compile "$LINENO"; then :
9064  ac_cv_prog_cc_c89=$ac_arg
9065fi
9066rm -f core conftest.err conftest.$ac_objext
9067  test "x$ac_cv_prog_cc_c89" != "xno" && break
9068done
9069rm -f conftest.$ac_ext
9070CC=$ac_save_CC
9071
9072fi
9073# AC_CACHE_VAL
9074case "x$ac_cv_prog_cc_c89" in
9075  x)
9076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
9077$as_echo "none needed" >&6; } ;;
9078  xno)
9079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
9080$as_echo "unsupported" >&6; } ;;
9081  *)
9082    CC="$CC $ac_cv_prog_cc_c89"
9083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
9084$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
9085esac
9086if test "x$ac_cv_prog_cc_c89" != xno; then :
9087
9088fi
9089
9090ac_ext=c
9091ac_cpp='$CPP $CPPFLAGS'
9092ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9093ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9094ac_compiler_gnu=$ac_cv_c_compiler_gnu
9095
9096ac_ext=c
9097ac_cpp='$CPP $CPPFLAGS'
9098ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9099ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9100ac_compiler_gnu=$ac_cv_c_compiler_gnu
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
9102$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
9103if ${am_cv_prog_cc_c_o+:} false; then :
9104  $as_echo_n "(cached) " >&6
9105else
9106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9107/* end confdefs.h.  */
9108
9109int
9110main ()
9111{
9112
9113  ;
9114  return 0;
9115}
9116_ACEOF
9117  # Make sure it works both with $CC and with simple cc.
9118  # Following AC_PROG_CC_C_O, we do the test twice because some
9119  # compilers refuse to overwrite an existing .o file with -o,
9120  # though they will create one.
9121  am_cv_prog_cc_c_o=yes
9122  for am_i in 1 2; do
9123    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
9124   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
9125   ac_status=$?
9126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9127   (exit $ac_status); } \
9128         && test -f conftest2.$ac_objext; then
9129      : OK
9130    else
9131      am_cv_prog_cc_c_o=no
9132      break
9133    fi
9134  done
9135  rm -f core conftest*
9136  unset am_i
9137fi
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
9139$as_echo "$am_cv_prog_cc_c_o" >&6; }
9140if test "$am_cv_prog_cc_c_o" != yes; then
9141   # Losing compiler, so override with the script.
9142   # FIXME: It is wrong to rewrite CC.
9143   # But if we don't then we get into trouble of one sort or another.
9144   # A longer-term fix would be to have automake use am__CC in this case,
9145   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9146   CC="$am_aux_dir/compile $CC"
9147fi
9148ac_ext=c
9149ac_cpp='$CPP $CPPFLAGS'
9150ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9151ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9152ac_compiler_gnu=$ac_cv_c_compiler_gnu
9153
9154
9155fi
9156
9157if test -z "$CC"; then
9158  as_fn_error $? "No C Compiler found. Cannot compile Scilab without a C compiler" "$LINENO" 5
9159fi
9160
9161# The cast to long int works around a bug in the HP C Compiler
9162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9164# This bug is HP SR number 8606223364.
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9166$as_echo_n "checking size of int... " >&6; }
9167if ${ac_cv_sizeof_int+:} false; then :
9168  $as_echo_n "(cached) " >&6
9169else
9170  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
9171
9172else
9173  if test "$ac_cv_type_int" = yes; then
9174     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9176as_fn_error 77 "cannot compute sizeof (int)
9177See \`config.log' for more details" "$LINENO" 5; }
9178   else
9179     ac_cv_sizeof_int=0
9180   fi
9181fi
9182
9183fi
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9185$as_echo "$ac_cv_sizeof_int" >&6; }
9186
9187
9188
9189cat >>confdefs.h <<_ACEOF
9190#define SIZEOF_INT $ac_cv_sizeof_int
9191_ACEOF
9192
9193
9194# The cast to long int works around a bug in the HP C Compiler
9195# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9196# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9197# This bug is HP SR number 8606223364.
9198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9199$as_echo_n "checking size of long... " >&6; }
9200if ${ac_cv_sizeof_long+:} false; then :
9201  $as_echo_n "(cached) " >&6
9202else
9203  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
9204
9205else
9206  if test "$ac_cv_type_long" = yes; then
9207     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9209as_fn_error 77 "cannot compute sizeof (long)
9210See \`config.log' for more details" "$LINENO" 5; }
9211   else
9212     ac_cv_sizeof_long=0
9213   fi
9214fi
9215
9216fi
9217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9218$as_echo "$ac_cv_sizeof_long" >&6; }
9219
9220
9221
9222cat >>confdefs.h <<_ACEOF
9223#define SIZEOF_LONG $ac_cv_sizeof_long
9224_ACEOF
9225
9226
9227
9228### C++ ###
9229: ${CXXFLAGS=""}
9230ac_ext=cpp
9231ac_cpp='$CXXCPP $CPPFLAGS'
9232ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9233ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9234ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9235if test -z "$CXX"; then
9236  if test -n "$CCC"; then
9237    CXX=$CCC
9238  else
9239    if test -n "$ac_tool_prefix"; then
9240  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
9241  do
9242    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if ${ac_cv_prog_CXX+:} false; then :
9247  $as_echo_n "(cached) " >&6
9248else
9249  if test -n "$CXX"; then
9250  ac_cv_prog_CXX="$CXX" # Let the user override the test.
9251else
9252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253for as_dir in $PATH
9254do
9255  IFS=$as_save_IFS
9256  test -z "$as_dir" && as_dir=.
9257    for ac_exec_ext in '' $ac_executable_extensions; do
9258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9259    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
9260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9261    break 2
9262  fi
9263done
9264  done
9265IFS=$as_save_IFS
9266
9267fi
9268fi
9269CXX=$ac_cv_prog_CXX
9270if test -n "$CXX"; then
9271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
9272$as_echo "$CXX" >&6; }
9273else
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
9276fi
9277
9278
9279    test -n "$CXX" && break
9280  done
9281fi
9282if test -z "$CXX"; then
9283  ac_ct_CXX=$CXX
9284  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
9285do
9286  # Extract the first word of "$ac_prog", so it can be a program name with args.
9287set dummy $ac_prog; ac_word=$2
9288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9289$as_echo_n "checking for $ac_word... " >&6; }
9290if ${ac_cv_prog_ac_ct_CXX+:} false; then :
9291  $as_echo_n "(cached) " >&6
9292else
9293  if test -n "$ac_ct_CXX"; then
9294  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
9295else
9296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9297for as_dir in $PATH
9298do
9299  IFS=$as_save_IFS
9300  test -z "$as_dir" && as_dir=.
9301    for ac_exec_ext in '' $ac_executable_extensions; do
9302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9303    ac_cv_prog_ac_ct_CXX="$ac_prog"
9304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9305    break 2
9306  fi
9307done
9308  done
9309IFS=$as_save_IFS
9310
9311fi
9312fi
9313ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
9314if test -n "$ac_ct_CXX"; then
9315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
9316$as_echo "$ac_ct_CXX" >&6; }
9317else
9318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
9320fi
9321
9322
9323  test -n "$ac_ct_CXX" && break
9324done
9325
9326  if test "x$ac_ct_CXX" = x; then
9327    CXX="g++"
9328  else
9329    case $cross_compiling:$ac_tool_warned in
9330yes:)
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9333ac_tool_warned=yes ;;
9334esac
9335    CXX=$ac_ct_CXX
9336  fi
9337fi
9338
9339  fi
9340fi
9341# Provide some information about the compiler.
9342$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
9343set X $ac_compile
9344ac_compiler=$2
9345for ac_option in --version -v -V -qversion; do
9346  { { ac_try="$ac_compiler $ac_option >&5"
9347case "(($ac_try" in
9348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9349  *) ac_try_echo=$ac_try;;
9350esac
9351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9352$as_echo "$ac_try_echo"; } >&5
9353  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
9354  ac_status=$?
9355  if test -s conftest.err; then
9356    sed '10a\
9357... rest of stderr output deleted ...
9358         10q' conftest.err >conftest.er1
9359    cat conftest.er1 >&5
9360  fi
9361  rm -f conftest.er1 conftest.err
9362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9363  test $ac_status = 0; }
9364done
9365
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
9367$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
9368if ${ac_cv_cxx_compiler_gnu+:} false; then :
9369  $as_echo_n "(cached) " >&6
9370else
9371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9372/* end confdefs.h.  */
9373
9374int
9375main ()
9376{
9377#ifndef __GNUC__
9378       choke me
9379#endif
9380
9381  ;
9382  return 0;
9383}
9384_ACEOF
9385if ac_fn_cxx_try_compile "$LINENO"; then :
9386  ac_compiler_gnu=yes
9387else
9388  ac_compiler_gnu=no
9389fi
9390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9391ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
9392
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
9395$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
9396if test $ac_compiler_gnu = yes; then
9397  GXX=yes
9398else
9399  GXX=
9400fi
9401ac_test_CXXFLAGS=${CXXFLAGS+set}
9402ac_save_CXXFLAGS=$CXXFLAGS
9403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
9404$as_echo_n "checking whether $CXX accepts -g... " >&6; }
9405if ${ac_cv_prog_cxx_g+:} false; then :
9406  $as_echo_n "(cached) " >&6
9407else
9408  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
9409   ac_cxx_werror_flag=yes
9410   ac_cv_prog_cxx_g=no
9411   CXXFLAGS="-g"
9412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9413/* end confdefs.h.  */
9414
9415int
9416main ()
9417{
9418
9419  ;
9420  return 0;
9421}
9422_ACEOF
9423if ac_fn_cxx_try_compile "$LINENO"; then :
9424  ac_cv_prog_cxx_g=yes
9425else
9426  CXXFLAGS=""
9427      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9428/* end confdefs.h.  */
9429
9430int
9431main ()
9432{
9433
9434  ;
9435  return 0;
9436}
9437_ACEOF
9438if ac_fn_cxx_try_compile "$LINENO"; then :
9439
9440else
9441  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
9442	 CXXFLAGS="-g"
9443	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9444/* end confdefs.h.  */
9445
9446int
9447main ()
9448{
9449
9450  ;
9451  return 0;
9452}
9453_ACEOF
9454if ac_fn_cxx_try_compile "$LINENO"; then :
9455  ac_cv_prog_cxx_g=yes
9456fi
9457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9458fi
9459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9460fi
9461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9462   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
9463fi
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
9465$as_echo "$ac_cv_prog_cxx_g" >&6; }
9466if test "$ac_test_CXXFLAGS" = set; then
9467  CXXFLAGS=$ac_save_CXXFLAGS
9468elif test $ac_cv_prog_cxx_g = yes; then
9469  if test "$GXX" = yes; then
9470    CXXFLAGS="-g -O2"
9471  else
9472    CXXFLAGS="-g"
9473  fi
9474else
9475  if test "$GXX" = yes; then
9476    CXXFLAGS="-O2"
9477  else
9478    CXXFLAGS=
9479  fi
9480fi
9481ac_ext=c
9482ac_cpp='$CPP $CPPFLAGS'
9483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9485ac_compiler_gnu=$ac_cv_c_compiler_gnu
9486
9487depcc="$CXX"  am_compiler_list=
9488
9489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
9490$as_echo_n "checking dependency style of $depcc... " >&6; }
9491if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
9492  $as_echo_n "(cached) " >&6
9493else
9494  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9495  # We make a subdir and do the tests there.  Otherwise we can end up
9496  # making bogus files that we don't know about and never remove.  For
9497  # instance it was reported that on HP-UX the gcc test will end up
9498  # making a dummy file named 'D' -- because '-MD' means "put the output
9499  # in D".
9500  rm -rf conftest.dir
9501  mkdir conftest.dir
9502  # Copy depcomp to subdir because otherwise we won't find it if we're
9503  # using a relative directory.
9504  cp "$am_depcomp" conftest.dir
9505  cd conftest.dir
9506  # We will build objects and dependencies in a subdirectory because
9507  # it helps to detect inapplicable dependency modes.  For instance
9508  # both Tru64's cc and ICC support -MD to output dependencies as a
9509  # side effect of compilation, but ICC will put the dependencies in
9510  # the current directory while Tru64 will put them in the object
9511  # directory.
9512  mkdir sub
9513
9514  am_cv_CXX_dependencies_compiler_type=none
9515  if test "$am_compiler_list" = ""; then
9516     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9517  fi
9518  am__universal=false
9519  case " $depcc " in #(
9520     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9521     esac
9522
9523  for depmode in $am_compiler_list; do
9524    # Setup a source with many dependencies, because some compilers
9525    # like to wrap large dependency lists on column 80 (with \), and
9526    # we should not choose a depcomp mode which is confused by this.
9527    #
9528    # We need to recreate these files for each test, as the compiler may
9529    # overwrite some of them when testing with obscure command lines.
9530    # This happens at least with the AIX C compiler.
9531    : > sub/conftest.c
9532    for i in 1 2 3 4 5 6; do
9533      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9534      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9535      # Solaris 10 /bin/sh.
9536      echo '/* dummy */' > sub/conftst$i.h
9537    done
9538    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9539
9540    # We check with '-c' and '-o' for the sake of the "dashmstdout"
9541    # mode.  It turns out that the SunPro C++ compiler does not properly
9542    # handle '-M -o', and we need to detect this.  Also, some Intel
9543    # versions had trouble with output in subdirs.
9544    am__obj=sub/conftest.${OBJEXT-o}
9545    am__minus_obj="-o $am__obj"
9546    case $depmode in
9547    gcc)
9548      # This depmode causes a compiler race in universal mode.
9549      test "$am__universal" = false || continue
9550      ;;
9551    nosideeffect)
9552      # After this tag, mechanisms are not by side-effect, so they'll
9553      # only be used when explicitly requested.
9554      if test "x$enable_dependency_tracking" = xyes; then
9555	continue
9556      else
9557	break
9558      fi
9559      ;;
9560    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9561      # This compiler won't grok '-c -o', but also, the minuso test has
9562      # not run yet.  These depmodes are late enough in the game, and
9563      # so weak that their functioning should not be impacted.
9564      am__obj=conftest.${OBJEXT-o}
9565      am__minus_obj=
9566      ;;
9567    none) break ;;
9568    esac
9569    if depmode=$depmode \
9570       source=sub/conftest.c object=$am__obj \
9571       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9572       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9573         >/dev/null 2>conftest.err &&
9574       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9575       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9576       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9577       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9578      # icc doesn't choke on unknown options, it will just issue warnings
9579      # or remarks (even with -Werror).  So we grep stderr for any message
9580      # that says an option was ignored or not supported.
9581      # When given -MP, icc 7.0 and 7.1 complain thusly:
9582      #   icc: Command line warning: ignoring option '-M'; no argument required
9583      # The diagnosis changed in icc 8.0:
9584      #   icc: Command line remark: option '-MP' not supported
9585      if (grep 'ignoring option' conftest.err ||
9586          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9587        am_cv_CXX_dependencies_compiler_type=$depmode
9588        break
9589      fi
9590    fi
9591  done
9592
9593  cd ..
9594  rm -rf conftest.dir
9595else
9596  am_cv_CXX_dependencies_compiler_type=none
9597fi
9598
9599fi
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
9601$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
9602CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
9603
9604 if
9605  test "x$enable_dependency_tracking" != xno \
9606  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
9607  am__fastdepCXX_TRUE=
9608  am__fastdepCXX_FALSE='#'
9609else
9610  am__fastdepCXX_TRUE='#'
9611  am__fastdepCXX_FALSE=
9612fi
9613
9614
9615# we can't just do something like
9616# AC_CHECK_PROG(cxx_present, $CXX, "yes", "no")
9617# because if the user has specified the full path of the desired C++ compiler then AC_CHECK_PROG
9618# will fail.  If AC_PROG_CXX fails to find a c++ compiler it will set CXX=g++ so just run AC_CHECK_PROG
9619# in this special case
9620case $CXX in
9621    g++)
9622        # Extract the first word of "$CXX", so it can be a program name with args.
9623set dummy $CXX; ac_word=$2
9624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9625$as_echo_n "checking for $ac_word... " >&6; }
9626if ${ac_cv_prog_cxx_present+:} false; then :
9627  $as_echo_n "(cached) " >&6
9628else
9629  if test -n "$cxx_present"; then
9630  ac_cv_prog_cxx_present="$cxx_present" # Let the user override the test.
9631else
9632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9633for as_dir in $PATH
9634do
9635  IFS=$as_save_IFS
9636  test -z "$as_dir" && as_dir=.
9637    for ac_exec_ext in '' $ac_executable_extensions; do
9638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9639    ac_cv_prog_cxx_present="yes"
9640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9641    break 2
9642  fi
9643done
9644  done
9645IFS=$as_save_IFS
9646
9647  test -z "$ac_cv_prog_cxx_present" && ac_cv_prog_cxx_present="no"
9648fi
9649fi
9650cxx_present=$ac_cv_prog_cxx_present
9651if test -n "$cxx_present"; then
9652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxx_present" >&5
9653$as_echo "$cxx_present" >&6; }
9654else
9655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
9657fi
9658
9659
9660        if test "x$cxx_present" != "xyes"; then
9661            as_fn_error $? "No C++ compiler found. Cannot compile scilab without a C++ compiler" "$LINENO" 5
9662        fi
9663        ;;
9664esac
9665
9666# for "subdir-objects"
9667
9668
9669ac_ext=f
9670ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
9671ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9672ac_compiler_gnu=$ac_cv_f77_compiler_gnu
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 understands -c and -o together" >&5
9674$as_echo_n "checking whether $F77 understands -c and -o together... " >&6; }
9675if ${ac_cv_prog_f77_c_o+:} false; then :
9676  $as_echo_n "(cached) " >&6
9677else
9678  cat > conftest.$ac_ext <<_ACEOF
9679      program main
9680
9681      end
9682_ACEOF
9683# We test twice because some compilers refuse to overwrite an existing
9684# `.o' file with `-o', although they will create one.
9685ac_try='$F77 $FFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
9686rm -f conftest2.*
9687if { { case "(($ac_try" in
9688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9689  *) ac_try_echo=$ac_try;;
9690esac
9691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9692$as_echo "$ac_try_echo"; } >&5
9693  (eval "$ac_try") 2>&5
9694  ac_status=$?
9695  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9696  test $ac_status = 0; } &&
9697     test -f conftest2.$ac_objext &&
9698     { { case "(($ac_try" in
9699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9700  *) ac_try_echo=$ac_try;;
9701esac
9702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9703$as_echo "$ac_try_echo"; } >&5
9704  (eval "$ac_try") 2>&5
9705  ac_status=$?
9706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9707  test $ac_status = 0; }; then
9708  ac_cv_prog_f77_c_o=yes
9709else
9710  ac_cv_prog_f77_c_o=no
9711fi
9712rm -f conftest*
9713fi
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_c_o" >&5
9715$as_echo "$ac_cv_prog_f77_c_o" >&6; }
9716if test $ac_cv_prog_f77_c_o = no; then
9717
9718$as_echo "#define F77_NO_MINUS_C_MINUS_O 1" >>confdefs.h
9719
9720fi
9721
9722ac_ext=c
9723ac_cpp='$CPP $CPPFLAGS'
9724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9726ac_compiler_gnu=$ac_cv_c_compiler_gnu
9727
9728
9729
9730if test "$enable_debug" = yes; then
9731   enable_debug_fortran=yes
9732   enable_debug_C=yes
9733   enable_debug_CXX=yes
9734   enable_debug_java=yes
9735else
9736   enable_debug=no
9737fi
9738
9739if test "$enable_debug_fortran" = yes; then
9740   FFLAGS="`echo "$FFLAGS"| sed -e 's|-O0-9+|-O0|'`"
9741else
9742   enable_debug_fortran=no
9743fi
9744
9745if test "$enable_debug_C" = yes; then
9746   CFLAGS="`echo "$CFLAGS"| sed -e 's|-O0-9+|-O0|'`"
9747else
9748   enable_debug_C=no
9749fi
9750
9751if test "$enable_debug_CXX" = yes; then
9752   CXXFLAGS="`echo "$CXXFLAGS"| sed -e 's|-O0-9+|-O0|'`"
9753else
9754   enable_debug_CXX=no
9755fi
9756
9757if test "$enable_debug_java" = yes; then
9758   LOGGING_LEVEL="INFO"
9759else
9760   LOGGING_LEVEL="SEVERE"
9761fi
9762
9763
9764if test "x${prefix}" = "xNONE"; then
9765  prefix="${ac_default_prefix}"
9766fi
9767
9768###############################
9769## get the version
9770###############################
9771
9772SCIVERSION=`cat $SCI_SRCDIR/Version.incl | sed -e "s/SCIVERSION=//" `
9773
9774#############################################
9775## Compilers and options according to machine
9776#############################################
9777
9778######################
9779######## Set compilation options for intel C/Fortran compilers
9780######################
9781
9782if test "$with_intelcompilers" = yes; then
9783
9784		case "$host" in
9785		  i*86-*-linux-gnu | *-pc-linux-gnu )
9786			# -pc64 : double precision
9787			EXTRA_OPTIONS=" -pc64 -ffnalias -falias"
9788			;;
9789		esac
9790
9791		if test "$enable_debug_CXX" = yes; then
9792			COMPILER_CXXFLAGS="-g $COMPILER_CXXFLAGS $EXTRA_OPTIONS"
9793		else
9794			COMPILER_CXXFLAGS="-O -DNDEBUG $COMPILER_CXXFLAGS "
9795		fi
9796
9797		if test "$enable_debug_C" = yes; then
9798			COMPILER_CFLAGS="-g $COMPILER_CFLAGS $EXTRA_OPTIONS"
9799		else
9800			COMPILER_CFLAGS="-O -DNDEBUG $COMPILER_CFLAGS "
9801		fi
9802
9803		if test "$enable_debug_fortran" = yes; then
9804			COMPILER_FFLAGS="-g $COMPILER_FFLAGS $EXTRA_OPTIONS"
9805		else
9806			COMPILER_FFLAGS="-O -DNDEBUG $COMPILER_FFLAGS "
9807		fi
9808
9809		# TODO : voir si obligatoire vu que c'est en partie le boulot de AC_PROG_C
9810
9811
9812fi
9813
9814########### FORTRAN ######################
9815
9816
9817######################
9818######## With gfortran ...
9819######################
9820if test -n "$F77"; then
9821   case "$F77" in
9822     gfortran*)
9823        ## With GNU Compiler enable the code coverage
9824        if test "$enable_code_coverage" = yes; then
9825            CODECOVERAGE_FFLAGS="-fprofile-arcs -ftest-coverage"
9826        fi
9827     ;;
9828     g77*)
9829        as_fn_error $? "g77 is no longer supported. Please consider switching to gfortran" "$LINENO" 5
9830     ;;
9831   esac
9832
9833   if test "$enable_debug_fortran" = yes; then
9834    ac_ext=f
9835ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
9836ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9837ac_compiler_gnu=$ac_cv_f77_compiler_gnu
9838
9839    for flag in -g -Wall -Wsurprising; do
9840        case " ${FFLAGS} " in
9841            *\ ${flag}\ *)
9842                # flag is already present
9843                ;;
9844
9845            *)
9846                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Fortran compiler accepts ${flag}" >&5
9847$as_echo_n "checking if the Fortran compiler accepts ${flag}... " >&6; }
9848                ac_save_FFLAGS="$FFLAGS"
9849                FFLAGS="$FFLAGS ${flag}"
9850                cat > conftest.$ac_ext <<_ACEOF
9851      program main
9852
9853      end
9854_ACEOF
9855if ac_fn_f77_try_compile "$LINENO"; then :
9856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9857$as_echo "yes" >&6; }
9858                     DEBUG_FFLAGS="${flag}"
9859
9860else
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
9863
9864fi
9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866                ;;
9867        esac
9868    done
9869    ac_ext=c
9870ac_cpp='$CPP $CPPFLAGS'
9871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9873ac_compiler_gnu=$ac_cv_c_compiler_gnu
9874
9875   else
9876      DEBUG_FFLAGS="-DNDEBUG -g1 -O2"
9877   fi
9878      case "$host" in
9879         x86_64-*-linux*)
9880            ARCH_FFLAGS="-m64 -fPIC"
9881                    ;;
9882        # Dec Alpha OSF 4
9883        alpha*-dec-osf4.*)
9884          ARCH_FFLAGS="-fpe3"
9885        ;;
9886        alpha*-dec-osf*)
9887            ARCH_FFLAGS="-fpe3 -switch nosqrt_recip"
9888        ;;
9889        rs6000-*-*)
9890            ARCH_FFLAGS="-qcharlen=4096"
9891            ;;
9892        mips-*-ultrix*)
9893            ARCH_FFLAGS="-O0 -fpe1"
9894        ;;
9895          *-*-hpux9.*)
9896            ARCH_FFLAGS="+Obb1200 +E4 -Dhpux"
9897        ;;
9898          *-*-hpux10.*)
9899            if test "$enable_debug_fortran" = yes; then
9900                ARCH_FFLAGS="+E4 +Z +DAportable -Dhpux"
9901            else
9902                ARCH_FFLAGS="+O2 +E4 +Z +DAportable -Dhpux"
9903            fi
9904#            ARCH_LDFLAGS="-Wl,+vnocompatwarnings,-E /usr/lib/libdld.sl"
9905
9906            ;;
9907          *-*-hpux11.*)
9908           if test "$enable_debug_fortran" = yes; then
9909              ARCH_FFLAGS=" +Z +DAportable -Dhpux"
9910             else
9911              ARCH_FFLAGS="+O2 +Z +DAportable -Dhpux"
9912           fi
9913           ARCH_LDFLAGS="-ldld -lnsl -lU77 -lm"
9914
9915     ;;
9916      esac
9917
9918fi
9919
9920#########################
9921# setting parameters according to system types
9922#########################
9923
9924case "$host" in
9925    *-*-hpux9.*|*-*-hpux10.*|*-*-hpux11.*)
9926        HPUX=1
9927    ;;
9928    sparc-*)
9929        SPARC=1
9930    ;;
9931    mips-sgi-irix*)
9932      MIPS_SGI_IRIX=1
9933    ;;
9934     *-*-solaris*)
9935     SOLARIS=1
9936     ;;
9937    *darwin*)
9938      MACOSX=1
9939    ;;
9940esac
9941
9942 if test -n "$MACOSX"; then
9943  IS_MACOSX_TRUE=
9944  IS_MACOSX_FALSE='#'
9945else
9946  IS_MACOSX_TRUE='#'
9947  IS_MACOSX_FALSE=
9948fi
9949
9950 if test -n "$HPUX"; then
9951  IS_HPUX_TRUE=
9952  IS_HPUX_FALSE='#'
9953else
9954  IS_HPUX_TRUE='#'
9955  IS_HPUX_FALSE=
9956fi
9957
9958 if test -n "$SPARC"; then
9959  IS_SPARC_TRUE=
9960  IS_SPARC_FALSE='#'
9961else
9962  IS_SPARC_TRUE='#'
9963  IS_SPARC_FALSE=
9964fi
9965
9966 if test -n "$SOLARIS"; then
9967  IS_SOLARIS_TRUE=
9968  IS_SOLARIS_FALSE='#'
9969else
9970  IS_SOLARIS_TRUE='#'
9971  IS_SOLARIS_FALSE=
9972fi
9973
9974 if test -n "$MIPS_SGI_IRIX"; then
9975  IS_MIPS_SGI_IRIX_TRUE=
9976  IS_MIPS_SGI_IRIX_FALSE='#'
9977else
9978  IS_MIPS_SGI_IRIX_TRUE='#'
9979  IS_MIPS_SGI_IRIX_FALSE=
9980fi
9981
9982
9983
9984
9985############
9986## C++
9987############
9988
9989
9990if test -z "$CXX"; then
9991  as_fn_error $? "No C++ compiler found. Cannot compile scilab without a C++ compiler" "$LINENO" 5
9992fi
9993
9994case "$CXX" in
9995    g++-* | g++ | ccache*g++ | ccache*g++-* | c++ | clang++* )
9996        ## With GNU C++ Compiler
9997
9998        # enable the code coverage
9999        if test "$enable_code_coverage" = yes; then
10000            CODECOVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage"
10001        fi
10002
10003        if test "$enable_debug_CXX" = yes; then
10004            DEBUG_CXXFLAGS="-Wall -Wextra -O0 -g3"
10005            case "$host" in
10006                *-linux-gnu )
10007                    # Only doing that under Linux
10008                    DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdiagnostics-show-option -Werror=format-security"
10009                ;;
10010            esac
10011        else
10012            DEBUG_CXXFLAGS="-DNDEBUG -g1 -O2"
10013        fi
10014        COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fno-stack-protector " # bug 3131
10015    ;;
10016
10017esac
10018
10019#### 64 bits detection
10020IS_64_BITS_CPU=false
10021case "$host" in
10022         x86_64-*-linux-gnu | x86_64-linux-gnu | ia64-*-linux-gnu | alpha-*-linux-gnu | alpha-*-netbsd* | x86_64-*-netbsd* | sparc64-*-netbsd* | amd64-*-freebsd* | powerpc64*-*-freebsd* | x86_64-*-dragonfly*)
10023                IS_64_BITS_CPU=true
10024    ;;
10025esac
10026
10027##########"
10028
10029case "$CC" in
10030     gcc-* | gcc | ccache*gcc | ccache*gcc-* | cc | clang* )
10031   ## With GNU Compiler
10032
10033   # enable the code coverage
10034   if test "$enable_code_coverage" = yes; then
10035    CODECOVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
10036   fi
10037
10038   if test "$enable_debug_C" = yes; then
10039      DEBUG_CFLAGS="-Wall -Wextra -O0 -g3"
10040      # used to be -O0
10041      case "$host" in
10042      *-linux-gnu )
10043      # Only doing that under Linux
10044        if test "$enable_debug_linker" = yes; then
10045            LDFLAGS="$LDFLAGS -Wl,--warn-common,-x"
10046        fi
10047          DEBUG_CFLAGS="$DEBUG_CFLAGS -fdiagnostics-show-option -Werror=format-security"
10048          ;;
10049          esac
10050   else
10051      DEBUG_CFLAGS="-DNDEBUG -g1 -O2"
10052   fi
10053
10054   COMPILER_CFLAGS="$COMPILER_CFLAGS -fno-stack-protector " # bug 3131
10055   # Explictly disable the as needed. It was disable by default but Ubuntu
10056   # activated it by default since release 11.04. See bug #8961.
10057   # Once all cyclic dependencies have been dropped, this line could be removed.
10058   # Check if linker supports --as-needed and --no-as-needed options
10059   if $LD --help 2>/dev/null | grep no-as-needed > /dev/null; then
10060      LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
10061   fi
10062
10063
10064   case "$host" in
10065     x86_64-*-linux-gnu | x86_64-linux-gnu)
10066        ARCH_CFLAGS="-m64"
10067    ;;
10068     alpha-*-linux-gnu)
10069        ARCH_CFLAGS="-mieee-with-inexact"
10070        ARCH_LDFLAGS="-mieee-with-inexact"
10071    ;;
10072     powerpc-*-linux-gnu)
10073        ARCH_CFLAGS="-D_GNU_SOURCE"
10074    ;;
10075     *-*-solaris*)
10076        ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris"
10077    ;;
10078   *-*-freebsd*|*-*-dragonfly*)
10079     ARCH_CFLAGS="-Dfreebsd"
10080     ARCH_LDFLAGS="-lm"
10081     ;;
10082
10083  alpha-*-netbsd*)
10084    ARCH_CFLAGS="-Dnetbsd -mieee"
10085    ARCH_FFLAGS="-Dnetbsd -mieee"
10086    ;;
10087
10088  *-*-netbsd*)
10089    ARCH_CFLAGS="-Dnetbsd"
10090    ;;
10091
10092  *-*-darwin*)
10093    # Flag no more added since :
10094    #  - No more supported in recent gcc versions (> 4.6)
10095    #  - only needed when compiling with flag -mmacosx-min-version=10.5
10096    #ARCH_CFLAGS="$ARCH_CFLAGS -no_compact_linkedit"
10097    #ARCH_CXXFLAGS="$ARCH_CXXFLAGS -no_compact_linkedit"
10098    #ARCH_LDFLAGS="$ARCH_LDFLAGS -no_compact_linkedit"
10099    # We need this to be passed to all linker commands
10100    #LDFLAGS="$LDFLAGS -no_compact_linkedit"
10101
10102    case "$F77" in
10103         gfortran-*|gfortran)
10104             # Extract from gfortran -v the version it has been built for
10105               MAC_DETECTED_ARCH="`$F77 -v 2>&1|grep "Target:"|sed -e "s/Target: \([a-z0-9A-Z_]*\).*/\1/g"`"
10106               if test "$MAC_DETECTED_ARCH" == "aarch64"; then
10107                   MAC_DETECTED_ARCH=arm64
10108               fi
10109         ;;
10110         *)
10111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gfortran not used. Could not detect the architecture. Switch to the default case: x86_64" >&5
10112$as_echo "$as_me: WARNING: gfortran not used. Could not detect the architecture. Switch to the default case: x86_64" >&2;}
10113        MAC_DETECTED_ARCH="x86_64"
10114         ;;
10115    esac
10116    CC="$CC -arch $MAC_DETECTED_ARCH"
10117    CXX="$CXX -arch $MAC_DETECTED_ARCH"
10118    ;;
10119esac
10120;; # end of the gcc case on the $CC
10121   *)
10122
10123        ## CC compiler (not GCC)
10124        if test "$enable_debug_C" != yes; then
10125             ARCH_CFLAGS="-DNDEBUG"
10126        fi
10127
10128case "$host" in
10129# Dec Alpha OSF 4
10130  alpha*-dec-osf4.*)
10131      ARCH_CFLAGS="-std -ieee_with_inexact"
10132      ARCH_LDFLAGS="-ieee_with_inexact"
10133      ;;
10134  alpha*-dec-osf*)
10135      ARCH_CFLAGS="-ieee_with_inexact"
10136      ARCH_LDFLAGS="-ieee_with_inexact"
10137      ;;
10138  rs6000-*-*) # IBM AIX RS 6000 (NO LONGER SUPPORTED)
10139    ARCH_CFLAGS="-Daix -DSYSV"
10140  ;;
10141  mips-sgi-irix*) # SGI
10142    ARCH_CFLAGS="-DSYSV -DSVR4"
10143  ;;
10144  *-*-hpux9.*)
10145    ARCH_CFLAGS="-DSYSV -Dhpux"
10146  ;;
10147  *-*-hpux10.*) # HP 10
10148    if test "$enable_debug_C" = yes; then
10149      ARCH_CFLAGS="-DSYSV -Dhpux"
10150    else
10151      ARCH_CFLAGS="-DSYSV -Dhpux +Z +DAportable"
10152    fi
10153  ;;
10154
10155  *-*-hpux11.*) # HP 11
10156    ARCH_CFLAGS="-DSYSV -Dhpux -Dhppa +Z +DAportable"
10157  ;;
10158  *-*-solaris*) # SUN SOLARIS
10159    ARCH_CFLAGS="-DSVR4 -DSYSV -Dsolaris -I/usr/local/include/"
10160    ARCH_LDFLAGS="-L/usr/local/lib/"
10161  ;;
10162esac
10163;; # end of not a gcc compiler
10164esac
10165
10166
10167# enable the code coverage
10168if test "$enable_code_coverage" = yes; then
10169   # Extract the first word of "lcov", so it can be a program name with args.
10170set dummy lcov; ac_word=$2
10171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10172$as_echo_n "checking for $ac_word... " >&6; }
10173if ${ac_cv_path_LCOV+:} false; then :
10174  $as_echo_n "(cached) " >&6
10175else
10176  case $LCOV in
10177  [\\/]* | ?:[\\/]*)
10178  ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
10179  ;;
10180  *)
10181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10182for as_dir in $PATH
10183do
10184  IFS=$as_save_IFS
10185  test -z "$as_dir" && as_dir=.
10186    for ac_exec_ext in '' $ac_executable_extensions; do
10187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10188    ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
10189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10190    break 2
10191  fi
10192done
10193  done
10194IFS=$as_save_IFS
10195
10196  ;;
10197esac
10198fi
10199LCOV=$ac_cv_path_LCOV
10200if test -n "$LCOV"; then
10201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
10202$as_echo "$LCOV" >&6; }
10203else
10204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10205$as_echo "no" >&6; }
10206fi
10207
10208
10209   if test -z "$LCOV" ; then
10210        as_fn_error $? "Cannot find lcov. Please install it (package lcov under Debian) or remove the option --enable-code-coverage" "$LINENO" 5
10211   fi
10212   # Extract the first word of "genhtml", so it can be a program name with args.
10213set dummy genhtml; ac_word=$2
10214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10215$as_echo_n "checking for $ac_word... " >&6; }
10216if ${ac_cv_path_GENHTML+:} false; then :
10217  $as_echo_n "(cached) " >&6
10218else
10219  case $GENHTML in
10220  [\\/]* | ?:[\\/]*)
10221  ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
10222  ;;
10223  *)
10224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10225for as_dir in $PATH
10226do
10227  IFS=$as_save_IFS
10228  test -z "$as_dir" && as_dir=.
10229    for ac_exec_ext in '' $ac_executable_extensions; do
10230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10231    ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
10232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10233    break 2
10234  fi
10235done
10236  done
10237IFS=$as_save_IFS
10238
10239  ;;
10240esac
10241fi
10242GENHTML=$ac_cv_path_GENHTML
10243if test -n "$GENHTML"; then
10244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
10245$as_echo "$GENHTML" >&6; }
10246else
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
10249fi
10250
10251
10252   if test -z "$GENHTML" ; then
10253        as_fn_error $? "Cannot find genhtml. Please install it (package lcov under Debian) or remove the option --enable-code-coverage" "$LINENO" 5
10254   fi
10255   CODECOVERAGE_LDFLAGS="-coverage -lgcov"
10256fi
10257 if test "$enable_code_coverage" = yes; then
10258  CODE_COVERAGE_TRUE=
10259  CODE_COVERAGE_FALSE='#'
10260else
10261  CODE_COVERAGE_TRUE='#'
10262  CODE_COVERAGE_FALSE=
10263fi
10264
10265 if test "$enable_debug" = yes; then
10266  ENABLE_DEBUG_TRUE=
10267  ENABLE_DEBUG_FALSE='#'
10268else
10269  ENABLE_DEBUG_TRUE='#'
10270  ENABLE_DEBUG_FALSE=
10271fi
10272
10273
10274# flag for possible compilations in configure
10275SCILIBS_CFLAGS=''
10276SCILIBS_CXXFLAGS=''
10277SCILIBS_FFLAGS=''
10278
10279if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then
10280   if test $f90compatible = false; then
10281      as_fn_error $? "64 bits support needs a fortran 90 compiler (try --with-gfortran)." "$LINENO" 5
10282   fi
10283fi
10284
10285 if test $IS_64_BITS_CPU = true; then
10286  IS_64_BITS_CPU_TRUE=
10287  IS_64_BITS_CPU_FALSE='#'
10288else
10289  IS_64_BITS_CPU_TRUE='#'
10290  IS_64_BITS_CPU_FALSE=
10291fi
10292
10293
10294# check if the compiler supports c++17
10295saved_cppflags="$CXXFLAGS"
10296CXXFLAGS=""
10297
10298  ax_cxx_compile_alternatives="17 1z"    ax_cxx_compile_cxx17_required=true
10299  ac_ext=cpp
10300ac_cpp='$CXXCPP $CPPFLAGS'
10301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10304  ac_success=no
10305
10306
10307
10308    if test x$ac_success = xno; then
10309                for alternative in ${ax_cxx_compile_alternatives}; do
10310      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
10311        cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
10312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
10313$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
10314if eval \${$cachevar+:} false; then :
10315  $as_echo_n "(cached) " >&6
10316else
10317  ac_save_CXX="$CXX"
10318           CXX="$CXX $switch"
10319           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10320/* end confdefs.h.  */
10321
10322
10323// If the compiler admits that it is not ready for C++11, why torture it?
10324// Hopefully, this will speed up the test.
10325
10326#ifndef __cplusplus
10327
10328#error "This is not a C++ compiler"
10329
10330#elif __cplusplus < 201103L
10331
10332#error "This is not a C++11 compiler"
10333
10334#else
10335
10336namespace cxx11
10337{
10338
10339  namespace test_static_assert
10340  {
10341
10342    template <typename T>
10343    struct check
10344    {
10345      static_assert(sizeof(int) <= sizeof(T), "not big enough");
10346    };
10347
10348  }
10349
10350  namespace test_final_override
10351  {
10352
10353    struct Base
10354    {
10355      virtual ~Base() {}
10356      virtual void f() {}
10357    };
10358
10359    struct Derived : public Base
10360    {
10361      virtual ~Derived() override {}
10362      virtual void f() override {}
10363    };
10364
10365  }
10366
10367  namespace test_double_right_angle_brackets
10368  {
10369
10370    template < typename T >
10371    struct check {};
10372
10373    typedef check<void> single_type;
10374    typedef check<check<void>> double_type;
10375    typedef check<check<check<void>>> triple_type;
10376    typedef check<check<check<check<void>>>> quadruple_type;
10377
10378  }
10379
10380  namespace test_decltype
10381  {
10382
10383    int
10384    f()
10385    {
10386      int a = 1;
10387      decltype(a) b = 2;
10388      return a + b;
10389    }
10390
10391  }
10392
10393  namespace test_type_deduction
10394  {
10395
10396    template < typename T1, typename T2 >
10397    struct is_same
10398    {
10399      static const bool value = false;
10400    };
10401
10402    template < typename T >
10403    struct is_same<T, T>
10404    {
10405      static const bool value = true;
10406    };
10407
10408    template < typename T1, typename T2 >
10409    auto
10410    add(T1 a1, T2 a2) -> decltype(a1 + a2)
10411    {
10412      return a1 + a2;
10413    }
10414
10415    int
10416    test(const int c, volatile int v)
10417    {
10418      static_assert(is_same<int, decltype(0)>::value == true, "");
10419      static_assert(is_same<int, decltype(c)>::value == false, "");
10420      static_assert(is_same<int, decltype(v)>::value == false, "");
10421      auto ac = c;
10422      auto av = v;
10423      auto sumi = ac + av + 'x';
10424      auto sumf = ac + av + 1.0;
10425      static_assert(is_same<int, decltype(ac)>::value == true, "");
10426      static_assert(is_same<int, decltype(av)>::value == true, "");
10427      static_assert(is_same<int, decltype(sumi)>::value == true, "");
10428      static_assert(is_same<int, decltype(sumf)>::value == false, "");
10429      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
10430      return (sumf > 0.0) ? sumi : add(c, v);
10431    }
10432
10433  }
10434
10435  namespace test_noexcept
10436  {
10437
10438    int f() { return 0; }
10439    int g() noexcept { return 0; }
10440
10441    static_assert(noexcept(f()) == false, "");
10442    static_assert(noexcept(g()) == true, "");
10443
10444  }
10445
10446  namespace test_constexpr
10447  {
10448
10449    template < typename CharT >
10450    unsigned long constexpr
10451    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
10452    {
10453      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
10454    }
10455
10456    template < typename CharT >
10457    unsigned long constexpr
10458    strlen_c(const CharT *const s) noexcept
10459    {
10460      return strlen_c_r(s, 0UL);
10461    }
10462
10463    static_assert(strlen_c("") == 0UL, "");
10464    static_assert(strlen_c("1") == 1UL, "");
10465    static_assert(strlen_c("example") == 7UL, "");
10466    static_assert(strlen_c("another\0example") == 7UL, "");
10467
10468  }
10469
10470  namespace test_rvalue_references
10471  {
10472
10473    template < int N >
10474    struct answer
10475    {
10476      static constexpr int value = N;
10477    };
10478
10479    answer<1> f(int&)       { return answer<1>(); }
10480    answer<2> f(const int&) { return answer<2>(); }
10481    answer<3> f(int&&)      { return answer<3>(); }
10482
10483    void
10484    test()
10485    {
10486      int i = 0;
10487      const int c = 0;
10488      static_assert(decltype(f(i))::value == 1, "");
10489      static_assert(decltype(f(c))::value == 2, "");
10490      static_assert(decltype(f(0))::value == 3, "");
10491    }
10492
10493  }
10494
10495  namespace test_uniform_initialization
10496  {
10497
10498    struct test
10499    {
10500      static const int zero {};
10501      static const int one {1};
10502    };
10503
10504    static_assert(test::zero == 0, "");
10505    static_assert(test::one == 1, "");
10506
10507  }
10508
10509  namespace test_lambdas
10510  {
10511
10512    void
10513    test1()
10514    {
10515      auto lambda1 = [](){};
10516      auto lambda2 = lambda1;
10517      lambda1();
10518      lambda2();
10519    }
10520
10521    int
10522    test2()
10523    {
10524      auto a = [](int i, int j){ return i + j; }(1, 2);
10525      auto b = []() -> int { return '0'; }();
10526      auto c = [=](){ return a + b; }();
10527      auto d = [&](){ return c; }();
10528      auto e = [a, &b](int x) mutable {
10529        const auto identity = [](int y){ return y; };
10530        for (auto i = 0; i < a; ++i)
10531          a += b--;
10532        return x + identity(a + b);
10533      }(0);
10534      return a + b + c + d + e;
10535    }
10536
10537    int
10538    test3()
10539    {
10540      const auto nullary = [](){ return 0; };
10541      const auto unary = [](int x){ return x; };
10542      using nullary_t = decltype(nullary);
10543      using unary_t = decltype(unary);
10544      const auto higher1st = [](nullary_t f){ return f(); };
10545      const auto higher2nd = [unary](nullary_t f1){
10546        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
10547      };
10548      return higher1st(nullary) + higher2nd(nullary)(unary);
10549    }
10550
10551  }
10552
10553  namespace test_variadic_templates
10554  {
10555
10556    template <int...>
10557    struct sum;
10558
10559    template <int N0, int... N1toN>
10560    struct sum<N0, N1toN...>
10561    {
10562      static constexpr auto value = N0 + sum<N1toN...>::value;
10563    };
10564
10565    template <>
10566    struct sum<>
10567    {
10568      static constexpr auto value = 0;
10569    };
10570
10571    static_assert(sum<>::value == 0, "");
10572    static_assert(sum<1>::value == 1, "");
10573    static_assert(sum<23>::value == 23, "");
10574    static_assert(sum<1, 2>::value == 3, "");
10575    static_assert(sum<5, 5, 11>::value == 21, "");
10576    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
10577
10578  }
10579
10580  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
10581  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
10582  // because of this.
10583  namespace test_template_alias_sfinae
10584  {
10585
10586    struct foo {};
10587
10588    template<typename T>
10589    using member = typename T::member_type;
10590
10591    template<typename T>
10592    void func(...) {}
10593
10594    template<typename T>
10595    void func(member<T>*) {}
10596
10597    void test();
10598
10599    void test() { func<foo>(0); }
10600
10601  }
10602
10603}  // namespace cxx11
10604
10605#endif  // __cplusplus >= 201103L
10606
10607
10608
10609
10610// If the compiler admits that it is not ready for C++14, why torture it?
10611// Hopefully, this will speed up the test.
10612
10613#ifndef __cplusplus
10614
10615#error "This is not a C++ compiler"
10616
10617#elif __cplusplus < 201402L
10618
10619#error "This is not a C++14 compiler"
10620
10621#else
10622
10623namespace cxx14
10624{
10625
10626  namespace test_polymorphic_lambdas
10627  {
10628
10629    int
10630    test()
10631    {
10632      const auto lambda = [](auto&&... args){
10633        const auto istiny = [](auto x){
10634          return (sizeof(x) == 1UL) ? 1 : 0;
10635        };
10636        const int aretiny[] = { istiny(args)... };
10637        return aretiny[0];
10638      };
10639      return lambda(1, 1L, 1.0f, '1');
10640    }
10641
10642  }
10643
10644  namespace test_binary_literals
10645  {
10646
10647    constexpr auto ivii = 0b0000000000101010;
10648    static_assert(ivii == 42, "wrong value");
10649
10650  }
10651
10652  namespace test_generalized_constexpr
10653  {
10654
10655    template < typename CharT >
10656    constexpr unsigned long
10657    strlen_c(const CharT *const s) noexcept
10658    {
10659      auto length = 0UL;
10660      for (auto p = s; *p; ++p)
10661        ++length;
10662      return length;
10663    }
10664
10665    static_assert(strlen_c("") == 0UL, "");
10666    static_assert(strlen_c("x") == 1UL, "");
10667    static_assert(strlen_c("test") == 4UL, "");
10668    static_assert(strlen_c("another\0test") == 7UL, "");
10669
10670  }
10671
10672  namespace test_lambda_init_capture
10673  {
10674
10675    int
10676    test()
10677    {
10678      auto x = 0;
10679      const auto lambda1 = [a = x](int b){ return a + b; };
10680      const auto lambda2 = [a = lambda1(x)](){ return a; };
10681      return lambda2();
10682    }
10683
10684  }
10685
10686  namespace test_digit_separators
10687  {
10688
10689    constexpr auto ten_million = 100'000'000;
10690    static_assert(ten_million == 100000000, "");
10691
10692  }
10693
10694  namespace test_return_type_deduction
10695  {
10696
10697    auto f(int& x) { return x; }
10698    decltype(auto) g(int& x) { return x; }
10699
10700    template < typename T1, typename T2 >
10701    struct is_same
10702    {
10703      static constexpr auto value = false;
10704    };
10705
10706    template < typename T >
10707    struct is_same<T, T>
10708    {
10709      static constexpr auto value = true;
10710    };
10711
10712    int
10713    test()
10714    {
10715      auto x = 0;
10716      static_assert(is_same<int, decltype(f(x))>::value, "");
10717      static_assert(is_same<int&, decltype(g(x))>::value, "");
10718      return x;
10719    }
10720
10721  }
10722
10723}  // namespace cxx14
10724
10725#endif  // __cplusplus >= 201402L
10726
10727
10728
10729
10730// If the compiler admits that it is not ready for C++17, why torture it?
10731// Hopefully, this will speed up the test.
10732
10733#ifndef __cplusplus
10734
10735#error "This is not a C++ compiler"
10736
10737#elif __cplusplus < 201703L
10738
10739#error "This is not a C++17 compiler"
10740
10741#else
10742
10743#include <initializer_list>
10744#include <utility>
10745#include <type_traits>
10746
10747namespace cxx17
10748{
10749
10750  namespace test_constexpr_lambdas
10751  {
10752
10753    constexpr int foo = [](){return 42;}();
10754
10755  }
10756
10757  namespace test::nested_namespace::definitions
10758  {
10759
10760  }
10761
10762  namespace test_fold_expression
10763  {
10764
10765    template<typename... Args>
10766    int multiply(Args... args)
10767    {
10768      return (args * ... * 1);
10769    }
10770
10771    template<typename... Args>
10772    bool all(Args... args)
10773    {
10774      return (args && ...);
10775    }
10776
10777  }
10778
10779  namespace test_extended_static_assert
10780  {
10781
10782    static_assert (true);
10783
10784  }
10785
10786  namespace test_auto_brace_init_list
10787  {
10788
10789    auto foo = {5};
10790    auto bar {5};
10791
10792    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
10793    static_assert(std::is_same<int, decltype(bar)>::value);
10794  }
10795
10796  namespace test_typename_in_template_template_parameter
10797  {
10798
10799    template<template<typename> typename X> struct D;
10800
10801  }
10802
10803  namespace test_fallthrough_nodiscard_maybe_unused_attributes
10804  {
10805
10806    int f1()
10807    {
10808      return 42;
10809    }
10810
10811    [[nodiscard]] int f2()
10812    {
10813      [[maybe_unused]] auto unused = f1();
10814
10815      switch (f1())
10816      {
10817      case 17:
10818        f1();
10819        [[fallthrough]];
10820      case 42:
10821        f1();
10822      }
10823      return f1();
10824    }
10825
10826  }
10827
10828  namespace test_extended_aggregate_initialization
10829  {
10830
10831    struct base1
10832    {
10833      int b1, b2 = 42;
10834    };
10835
10836    struct base2
10837    {
10838      base2() {
10839        b3 = 42;
10840      }
10841      int b3;
10842    };
10843
10844    struct derived : base1, base2
10845    {
10846        int d;
10847    };
10848
10849    derived d1 {{1, 2}, {}, 4};  // full initialization
10850    derived d2 {{}, {}, 4};      // value-initialized bases
10851
10852  }
10853
10854  namespace test_general_range_based_for_loop
10855  {
10856
10857    struct iter
10858    {
10859      int i;
10860
10861      int& operator* ()
10862      {
10863        return i;
10864      }
10865
10866      const int& operator* () const
10867      {
10868        return i;
10869      }
10870
10871      iter& operator++()
10872      {
10873        ++i;
10874        return *this;
10875      }
10876    };
10877
10878    struct sentinel
10879    {
10880      int i;
10881    };
10882
10883    bool operator== (const iter& i, const sentinel& s)
10884    {
10885      return i.i == s.i;
10886    }
10887
10888    bool operator!= (const iter& i, const sentinel& s)
10889    {
10890      return !(i == s);
10891    }
10892
10893    struct range
10894    {
10895      iter begin() const
10896      {
10897        return {0};
10898      }
10899
10900      sentinel end() const
10901      {
10902        return {5};
10903      }
10904    };
10905
10906    void f()
10907    {
10908      range r {};
10909
10910      for (auto i : r)
10911      {
10912        [[maybe_unused]] auto v = i;
10913      }
10914    }
10915
10916  }
10917
10918  namespace test_lambda_capture_asterisk_this_by_value
10919  {
10920
10921    struct t
10922    {
10923      int i;
10924      int foo()
10925      {
10926        return [*this]()
10927        {
10928          return i;
10929        }();
10930      }
10931    };
10932
10933  }
10934
10935  namespace test_enum_class_construction
10936  {
10937
10938    enum class byte : unsigned char
10939    {};
10940
10941    byte foo {42};
10942
10943  }
10944
10945  namespace test_constexpr_if
10946  {
10947
10948    template <bool cond>
10949    int f ()
10950    {
10951      if constexpr(cond)
10952      {
10953        return 13;
10954      }
10955      else
10956      {
10957        return 42;
10958      }
10959    }
10960
10961  }
10962
10963  namespace test_selection_statement_with_initializer
10964  {
10965
10966    int f()
10967    {
10968      return 13;
10969    }
10970
10971    int f2()
10972    {
10973      if (auto i = f(); i > 0)
10974      {
10975        return 3;
10976      }
10977
10978      switch (auto i = f(); i + 4)
10979      {
10980      case 17:
10981        return 2;
10982
10983      default:
10984        return 1;
10985      }
10986    }
10987
10988  }
10989
10990  namespace test_template_argument_deduction_for_class_templates
10991  {
10992
10993    template <typename T1, typename T2>
10994    struct pair
10995    {
10996      pair (T1 p1, T2 p2)
10997        : m1 {p1},
10998          m2 {p2}
10999      {}
11000
11001      T1 m1;
11002      T2 m2;
11003    };
11004
11005    void f()
11006    {
11007      [[maybe_unused]] auto p = pair{13, 42u};
11008    }
11009
11010  }
11011
11012  namespace test_non_type_auto_template_parameters
11013  {
11014
11015    template <auto n>
11016    struct B
11017    {};
11018
11019    B<5> b1;
11020    B<'a'> b2;
11021
11022  }
11023
11024  namespace test_structured_bindings
11025  {
11026
11027    int arr[2] = { 1, 2 };
11028    std::pair<int, int> pr = { 1, 2 };
11029
11030    auto f1() -> int(&)[2]
11031    {
11032      return arr;
11033    }
11034
11035    auto f2() -> std::pair<int, int>&
11036    {
11037      return pr;
11038    }
11039
11040    struct S
11041    {
11042      int x1 : 2;
11043      volatile double y1;
11044    };
11045
11046    S f3()
11047    {
11048      return {};
11049    }
11050
11051    auto [ x1, y1 ] = f1();
11052    auto& [ xr1, yr1 ] = f1();
11053    auto [ x2, y2 ] = f2();
11054    auto& [ xr2, yr2 ] = f2();
11055    const auto [ x3, y3 ] = f3();
11056
11057  }
11058
11059  namespace test_exception_spec_type_system
11060  {
11061
11062    struct Good {};
11063    struct Bad {};
11064
11065    void g1() noexcept;
11066    void g2();
11067
11068    template<typename T>
11069    Bad
11070    f(T*, T*);
11071
11072    template<typename T1, typename T2>
11073    Good
11074    f(T1*, T2*);
11075
11076    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
11077
11078  }
11079
11080  namespace test_inline_variables
11081  {
11082
11083    template<class T> void f(T)
11084    {}
11085
11086    template<class T> inline T g(T)
11087    {
11088      return T{};
11089    }
11090
11091    template<> inline void f<>(int)
11092    {}
11093
11094    template<> int g<>(int)
11095    {
11096      return 5;
11097    }
11098
11099  }
11100
11101}  // namespace cxx17
11102
11103#endif  // __cplusplus < 201703L
11104
11105
11106
11107_ACEOF
11108if ac_fn_cxx_try_compile "$LINENO"; then :
11109  eval $cachevar=yes
11110else
11111  eval $cachevar=no
11112fi
11113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11114           CXX="$ac_save_CXX"
11115fi
11116eval ac_res=\$$cachevar
11117	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11118$as_echo "$ac_res" >&6; }
11119        if eval test x\$$cachevar = xyes; then
11120          CXX="$CXX $switch"
11121          if test -n "$CXXCPP" ; then
11122            CXXCPP="$CXXCPP $switch"
11123          fi
11124          ac_success=yes
11125          break
11126        fi
11127      done
11128      if test x$ac_success = xyes; then
11129        break
11130      fi
11131    done
11132  fi
11133  ac_ext=c
11134ac_cpp='$CPP $CPPFLAGS'
11135ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11136ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11137ac_compiler_gnu=$ac_cv_c_compiler_gnu
11138
11139  if test x$ax_cxx_compile_cxx17_required = xtrue; then
11140    if test x$ac_success = xno; then
11141      as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
11142    fi
11143  fi
11144  if test x$ac_success = xno; then
11145    HAVE_CXX17=0
11146    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
11147$as_echo "$as_me: No compiler with C++17 support was found" >&6;}
11148  else
11149    HAVE_CXX17=1
11150
11151$as_echo "#define HAVE_CXX17 1" >>confdefs.h
11152
11153  fi
11154
11155
11156STDCXX_CXXFLAGS="$CXXFLAGS"
11157CXXFLAGS="$saved_cppflags"
11158
11159################
11160## SSE
11161## By default, for x86 CPU, enable the SSE2.
11162## Note that it is already the case with 64 bits CPU
11163## (these extensions are enabled by default by gcc)
11164################
11165
11166case "$host" in
11167     i*86-linux-gnu|i*86-*-linux-gnu)
11168        SSE_CFLAGS="-msse2"
11169        SSE_FFLAGS="-msse2"
11170        SSE_CXXFLAGS="-msse2"
11171     ;;
11172esac
11173
11174#######################
11175## test for underscores (name mangling issues between C and fortran)
11176#######################
11177
11178
11179for ac_prog in nm
11180do
11181  # Extract the first word of "$ac_prog", so it can be a program name with args.
11182set dummy $ac_prog; ac_word=$2
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11184$as_echo_n "checking for $ac_word... " >&6; }
11185if ${ac_cv_prog_NM+:} false; then :
11186  $as_echo_n "(cached) " >&6
11187else
11188  if test -n "$NM"; then
11189  ac_cv_prog_NM="$NM" # Let the user override the test.
11190else
11191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11192for as_dir in $PATH
11193do
11194  IFS=$as_save_IFS
11195  test -z "$as_dir" && as_dir=.
11196    for ac_exec_ext in '' $ac_executable_extensions; do
11197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11198    ac_cv_prog_NM="$ac_prog"
11199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11200    break 2
11201  fi
11202done
11203  done
11204IFS=$as_save_IFS
11205
11206fi
11207fi
11208NM=$ac_cv_prog_NM
11209if test -n "$NM"; then
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
11211$as_echo "$NM" >&6; }
11212else
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
11215fi
11216
11217
11218  test -n "$NM" && break
11219done
11220test -n "$NM" || NM="no"
11221
11222if test "x$NM" = "xno"; then
11223	as_fn_error $? "Unable to find nm in the path. nm is used to list all the symbol from a lib" "$LINENO" 5
11224fi
11225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for leading underscores with Fortran (name-mangling scheme)" >&5
11226$as_echo_n "checking for leading underscores with Fortran (name-mangling scheme)... " >&6; }
11227
11228cat << EOF > pipof.f
11229       subroutine pipof
11230       end
11231EOF
11232
11233eval "$F77 -c pipof.f > /dev/null 2>&1"
11234
11235FC_LEADING_UNDERSCORE=no
11236FC_TRAILING_UNDERSCORE=no
11237
11238output=`$NM $NMOPT pipof.o|grep _pipof 2>&1`
11239if test ! -z "$output"; then
11240  FC_LEADING_UNDERSCORE=yes
11241  FC_TRAILING_UNDERSCORE=no
11242fi
11243
11244output=`$NM $NMOPT pipof.o|grep pipof_ 2>&1`
11245if test ! -z "$output"; then
11246  FC_LEADING_UNDERSCORE=no
11247  FC_TRAILING_UNDERSCORE=yes
11248fi
11249
11250output=`$NM $NMOPT pipof.o|grep _pipof_ 2>&1`
11251if test ! -z "$output"; then
11252  FC_LEADING_UNDERSCORE=yes
11253  FC_TRAILING_UNDERSCORE=yes
11254fi
11255
11256if test "$FC_LEADING_UNDERSCORE" = yes; then
11257
11258$as_echo "#define WLU /**/" >>confdefs.h
11259
11260fi
11261if test "$FC_TRAILING_UNDERSCORE" = yes; then
11262
11263$as_echo "#define WTU /**/" >>confdefs.h
11264
11265fi
11266
11267rm -f pipof.f pipof.o
11268
11269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC_LEADING_UNDERSCORE" >&5
11270$as_echo "$FC_LEADING_UNDERSCORE" >&6; }
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for trailing underscores with Fortran (name-mangling scheme)" >&5
11272$as_echo_n "checking for trailing underscores with Fortran (name-mangling scheme)... " >&6; }
11273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC_TRAILING_UNDERSCORE" >&5
11274$as_echo "$FC_TRAILING_UNDERSCORE" >&6; }
11275
11276#####################
11277## test for sharpsign
11278#####################
11279
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking use of the sharpsign in CPP" >&5
11281$as_echo_n "checking use of the sharpsign in CPP... " >&6; }
11282
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11284/* end confdefs.h.  */
11285
11286		#define C2F(name) name##_
11287extern int C2F(toto)(void);
11288int
11289main ()
11290{
11291C2F(toto)();
11292
11293  ;
11294  return 0;
11295}
11296
11297_ACEOF
11298if ac_fn_c_try_compile "$LINENO"; then :
11299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11300$as_echo "yes" >&6; }
11301
11302$as_echo "#define CNAME(name1,name2) name1##name2" >>confdefs.h
11303
11304	USE_SHARP_SIGN=yes
11305
11306else
11307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308$as_echo "no" >&6; }
11309
11310$as_echo "#define CNAME(name1,name2) name1/**/name2" >>confdefs.h
11311
11312	USE_SHARP_SIGN=no
11313
11314fi
11315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11316
11317## Define  C2F and F2C entry point conversion ##
11318if test "$FC_TRAILING_UNDERSCORE" = yes; then
11319	if test "$USE_SHARP_SIGN" = yes; then
11320	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Define C2F with Trailing Underscore and Sharp Sign" >&5
11321$as_echo "Define C2F with Trailing Underscore and Sharp Sign" >&6; }
11322
11323$as_echo "#define C2F(name) name##_" >>confdefs.h
11324
11325
11326$as_echo "#define F2C(name) name##_" >>confdefs.h
11327
11328	else
11329	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Define C2F with Trailing Underscore and without Sharp Sign" >&5
11330$as_echo "Define C2F with Trailing Underscore and without Sharp Sign" >&6; }
11331
11332$as_echo "#define C2F(name) name/**/_" >>confdefs.h
11333
11334
11335$as_echo "#define F2C(name) name/**/_" >>confdefs.h
11336
11337	fi
11338else
11339		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Define C2F without Trailing Underscore" >&5
11340$as_echo "Define C2F without Trailing Underscore" >&6; }
11341
11342$as_echo "#define C2F(name) name" >>confdefs.h
11343
11344
11345$as_echo "#define F2C(name) name" >>confdefs.h
11346
11347fi
11348
11349
11350
11351###############################
11352### Regenerate the parser files
11353### Flex & Yacc
11354###############################
11355
11356if test "$enable_build_parser" = yes; then
11357
11358   for ac_prog in flex lex
11359do
11360  # Extract the first word of "$ac_prog", so it can be a program name with args.
11361set dummy $ac_prog; ac_word=$2
11362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11363$as_echo_n "checking for $ac_word... " >&6; }
11364if ${ac_cv_prog_LEX+:} false; then :
11365  $as_echo_n "(cached) " >&6
11366else
11367  if test -n "$LEX"; then
11368  ac_cv_prog_LEX="$LEX" # Let the user override the test.
11369else
11370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11371for as_dir in $PATH
11372do
11373  IFS=$as_save_IFS
11374  test -z "$as_dir" && as_dir=.
11375    for ac_exec_ext in '' $ac_executable_extensions; do
11376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11377    ac_cv_prog_LEX="$ac_prog"
11378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11379    break 2
11380  fi
11381done
11382  done
11383IFS=$as_save_IFS
11384
11385fi
11386fi
11387LEX=$ac_cv_prog_LEX
11388if test -n "$LEX"; then
11389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
11390$as_echo "$LEX" >&6; }
11391else
11392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
11394fi
11395
11396
11397  test -n "$LEX" && break
11398done
11399test -n "$LEX" || LEX=":"
11400
11401if test "x$LEX" != "x:"; then
11402  cat >conftest.l <<_ACEOF
11403%%
11404a { ECHO; }
11405b { REJECT; }
11406c { yymore (); }
11407d { yyless (1); }
11408e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
11409    yyless ((input () != 0)); }
11410f { unput (yytext[0]); }
11411. { BEGIN INITIAL; }
11412%%
11413#ifdef YYTEXT_POINTER
11414extern char *yytext;
11415#endif
11416int
11417main (void)
11418{
11419  return ! yylex () + ! yywrap ();
11420}
11421_ACEOF
11422{ { ac_try="$LEX conftest.l"
11423case "(($ac_try" in
11424  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11425  *) ac_try_echo=$ac_try;;
11426esac
11427eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11428$as_echo "$ac_try_echo"; } >&5
11429  (eval "$LEX conftest.l") 2>&5
11430  ac_status=$?
11431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11432  test $ac_status = 0; }
11433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
11434$as_echo_n "checking lex output file root... " >&6; }
11435if ${ac_cv_prog_lex_root+:} false; then :
11436  $as_echo_n "(cached) " >&6
11437else
11438
11439if test -f lex.yy.c; then
11440  ac_cv_prog_lex_root=lex.yy
11441elif test -f lexyy.c; then
11442  ac_cv_prog_lex_root=lexyy
11443else
11444  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
11445fi
11446fi
11447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
11448$as_echo "$ac_cv_prog_lex_root" >&6; }
11449LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
11450
11451if test -z "${LEXLIB+set}"; then
11452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
11453$as_echo_n "checking lex library... " >&6; }
11454if ${ac_cv_lib_lex+:} false; then :
11455  $as_echo_n "(cached) " >&6
11456else
11457
11458    ac_save_LIBS=$LIBS
11459    ac_cv_lib_lex='none needed'
11460    for ac_lib in '' -lfl -ll; do
11461      LIBS="$ac_lib $ac_save_LIBS"
11462      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h.  */
11464`cat $LEX_OUTPUT_ROOT.c`
11465_ACEOF
11466if ac_fn_c_try_link "$LINENO"; then :
11467  ac_cv_lib_lex=$ac_lib
11468fi
11469rm -f core conftest.err conftest.$ac_objext \
11470    conftest$ac_exeext conftest.$ac_ext
11471      test "$ac_cv_lib_lex" != 'none needed' && break
11472    done
11473    LIBS=$ac_save_LIBS
11474
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
11477$as_echo "$ac_cv_lib_lex" >&6; }
11478  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
11479fi
11480
11481
11482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
11483$as_echo_n "checking whether yytext is a pointer... " >&6; }
11484if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
11485  $as_echo_n "(cached) " >&6
11486else
11487  # POSIX says lex can declare yytext either as a pointer or an array; the
11488# default is implementation-dependent.  Figure out which it is, since
11489# not all implementations provide the %pointer and %array declarations.
11490ac_cv_prog_lex_yytext_pointer=no
11491ac_save_LIBS=$LIBS
11492LIBS="$LEXLIB $ac_save_LIBS"
11493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11494/* end confdefs.h.  */
11495
11496  #define YYTEXT_POINTER 1
11497`cat $LEX_OUTPUT_ROOT.c`
11498_ACEOF
11499if ac_fn_c_try_link "$LINENO"; then :
11500  ac_cv_prog_lex_yytext_pointer=yes
11501fi
11502rm -f core conftest.err conftest.$ac_objext \
11503    conftest$ac_exeext conftest.$ac_ext
11504LIBS=$ac_save_LIBS
11505
11506fi
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
11508$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
11509if test $ac_cv_prog_lex_yytext_pointer = yes; then
11510
11511$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
11512
11513fi
11514rm -f conftest.l $LEX_OUTPUT_ROOT.c
11515
11516fi
11517   if test -z "$LEX" -o "$LEX" = ":"; then
11518	  as_fn_error $? "No implementation of Lex (flex, lex) detected. Please install it (package flex)" "$LINENO" 5
11519   fi
11520
11521   for ac_prog in 'bison -y' byacc
11522do
11523  # Extract the first word of "$ac_prog", so it can be a program name with args.
11524set dummy $ac_prog; ac_word=$2
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11526$as_echo_n "checking for $ac_word... " >&6; }
11527if ${ac_cv_prog_YACC+:} false; then :
11528  $as_echo_n "(cached) " >&6
11529else
11530  if test -n "$YACC"; then
11531  ac_cv_prog_YACC="$YACC" # Let the user override the test.
11532else
11533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11534for as_dir in $PATH
11535do
11536  IFS=$as_save_IFS
11537  test -z "$as_dir" && as_dir=.
11538    for ac_exec_ext in '' $ac_executable_extensions; do
11539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11540    ac_cv_prog_YACC="$ac_prog"
11541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11542    break 2
11543  fi
11544done
11545  done
11546IFS=$as_save_IFS
11547
11548fi
11549fi
11550YACC=$ac_cv_prog_YACC
11551if test -n "$YACC"; then
11552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
11553$as_echo "$YACC" >&6; }
11554else
11555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11556$as_echo "no" >&6; }
11557fi
11558
11559
11560  test -n "$YACC" && break
11561done
11562test -n "$YACC" || YACC="yacc"
11563
11564   if test -z "$YACC"; then
11565	  as_fn_error $? "No implementation of Yacc (bison, yacc) detected. Please install it (package bison)" "$LINENO" 5
11566  fi
11567# Actually, AC_PROG_YACC is lying. It sometimes put yacc into $YACC even it
11568# hasn't been able to find it.
11569#  AC_CHECK_PROG(YACC_PRESENT, $YACC, AC_MSG_ERROR([No implementation of Yacc (bison, yacc) detected. Please install it (package bison)]) )
11570
11571   # Extract the first word of "$YACC", so it can be a program name with args.
11572set dummy $YACC; ac_word=$2
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11574$as_echo_n "checking for $ac_word... " >&6; }
11575if ${ac_cv_prog_yacc_present+:} false; then :
11576  $as_echo_n "(cached) " >&6
11577else
11578  if test -n "$yacc_present"; then
11579  ac_cv_prog_yacc_present="$yacc_present" # Let the user override the test.
11580else
11581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11582for as_dir in $PATH
11583do
11584  IFS=$as_save_IFS
11585  test -z "$as_dir" && as_dir=.
11586    for ac_exec_ext in '' $ac_executable_extensions; do
11587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11588    ac_cv_prog_yacc_present=""yes""
11589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11590    break 2
11591  fi
11592done
11593  done
11594IFS=$as_save_IFS
11595
11596  test -z "$ac_cv_prog_yacc_present" && ac_cv_prog_yacc_present=""no""
11597fi
11598fi
11599yacc_present=$ac_cv_prog_yacc_present
11600if test -n "$yacc_present"; then
11601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yacc_present" >&5
11602$as_echo "$yacc_present" >&6; }
11603else
11604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
11606fi
11607
11608
11609   if test "x$yacc_present" != "xyes"; then
11610      as_fn_error $? "No implementation of Yacc (bison, yacc) detected. Please install it (package bison)" "$LINENO" 5
11611   fi
11612
11613fi
11614 if test "$enable_build_parser" = yes; then
11615  BUILD_PARSER_TRUE=
11616  BUILD_PARSER_FALSE='#'
11617else
11618  BUILD_PARSER_TRUE='#'
11619  BUILD_PARSER_FALSE=
11620fi
11621
11622
11623#################
11624## HDF5
11625#################
11626
11627
11628
11629
11630
11631# Check whether --with-hdf5_include was given.
11632if test "${with_hdf5_include+set}" = set; then :
11633  withval=$with_hdf5_include; with_hdf5_include=$withval
11634else
11635  with_hdf5_include='yes'
11636
11637fi
11638
11639
11640
11641# Check whether --with-hdf5_library was given.
11642if test "${with_hdf5_library+set}" = set; then :
11643  withval=$with_hdf5_library; with_hdf5_library=$withval
11644else
11645  with_hdf5_library='yes'
11646
11647fi
11648
11649
11650if test "x$with_hdf5_include" != "xyes"; then
11651    save_CFLAGS="$CFLAGS"
11652    CFLAGS="-I$with_hdf5_include"
11653    ac_fn_c_check_header_mongrel "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default"
11654if test "x$ac_cv_header_hdf5_h" = xyes; then :
11655  HDF5_CFLAGS="$CFLAGS"
11656else
11657  as_fn_error $? "Cannot find headers (hdf5.h) of the library HDF5 in $with_hdf5_include. Please install the dev package" "$LINENO" 5
11658
11659fi
11660
11661
11662    CFLAGS="$save_CFLAGS"
11663else
11664    HDF5_CFLAGS=""
11665    if $WITH_DEVTOOLS; then # Scilab thirdparties
11666        HDF5_CFLAGS="-I$DEVTOOLS_INCDIR"
11667    else
11668        if test -d /usr/include/hdf5/serial; then # New Debian packaging layout since hdf5-1.8.13
11669            ac_fn_c_check_header_mongrel "$LINENO" "hdf5/serial/hdf5.h" "ac_cv_header_hdf5_serial_hdf5_h" "$ac_includes_default"
11670if test "x$ac_cv_header_hdf5_serial_hdf5_h" = xyes; then :
11671  HDF5_CFLAGS="-I/usr/include/hdf5/serial"
11672else
11673  as_fn_error $? "Cannot find headers (hdf5.h) of the library HDF5. Please install the dev package" "$LINENO" 5
11674fi
11675
11676
11677        else
11678            ac_fn_c_check_header_mongrel "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default"
11679if test "x$ac_cv_header_hdf5_h" = xyes; then :
11680  HDF5_CFLAGS=""
11681else
11682  as_fn_error $? "Cannot find headers (hdf5.h) of the library HDF5. Please install the dev package" "$LINENO" 5
11683fi
11684
11685
11686        fi
11687    fi
11688fi
11689
11690save_LIBS="$LIBS"
11691
11692# --with-hdf5-library set then check in this dir
11693if test "x$with_hdf5_library" != "xyes"; then
11694    HDF5_LIBS="-L$with_hdf5_library -lhdf5 -lhdf5_hl"
11695    LIBS="$LIBS $HDF5_LIBS"
11696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5
11697$as_echo_n "checking for H5Fopen in -lhdf5... " >&6; }
11698if ${ac_cv_lib_hdf5_H5Fopen+:} false; then :
11699  $as_echo_n "(cached) " >&6
11700else
11701  ac_check_lib_save_LIBS=$LIBS
11702LIBS="-lhdf5 -lz
11703             $LIBS"
11704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11705/* end confdefs.h.  */
11706
11707/* Override any GCC internal prototype to avoid an error.
11708   Use char because int might match the return type of a GCC
11709   builtin and then its argument prototype would still apply.  */
11710#ifdef __cplusplus
11711extern "C"
11712#endif
11713char H5Fopen ();
11714int
11715main ()
11716{
11717return H5Fopen ();
11718  ;
11719  return 0;
11720}
11721_ACEOF
11722if ac_fn_c_try_link "$LINENO"; then :
11723  ac_cv_lib_hdf5_H5Fopen=yes
11724else
11725  ac_cv_lib_hdf5_H5Fopen=no
11726fi
11727rm -f core conftest.err conftest.$ac_objext \
11728    conftest$ac_exeext conftest.$ac_ext
11729LIBS=$ac_check_lib_save_LIBS
11730fi
11731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5
11732$as_echo "$ac_cv_lib_hdf5_H5Fopen" >&6; }
11733if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes; then :
11734  cat >>confdefs.h <<_ACEOF
11735#define HAVE_LIBHDF5 1
11736_ACEOF
11737
11738  LIBS="-lhdf5 $LIBS"
11739
11740else
11741  as_fn_error $? "libhdf5 or libhdf5_hl: library missing. (Cannot find symbol H5Fopen) in $with_hdf5_library. Check if libhdf5 is installed and if the version is correct" "$LINENO" 5
11742fi
11743
11744else
11745    if $WITH_DEVTOOLS; then # Scilab thirparties
11746        HDF5_LIBS="-L$DEVTOOLS_LIBDIR -lhdf5 -lhdf5_hl"
11747    else
11748        if test -d /usr/include/hdf5/serial; then # New Debian packaging layout since hdf5-1.8.13
11749            HDF5_LIBS="-lhdf5_serial -lhdf5_serial_hl"
11750            LIBS="$LIBS $HDF5_LIBS"
11751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5_serial" >&5
11752$as_echo_n "checking for H5Fopen in -lhdf5_serial... " >&6; }
11753if ${ac_cv_lib_hdf5_serial_H5Fopen+:} false; then :
11754  $as_echo_n "(cached) " >&6
11755else
11756  ac_check_lib_save_LIBS=$LIBS
11757LIBS="-lhdf5_serial -lz
11758                 $LIBS"
11759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11760/* end confdefs.h.  */
11761
11762/* Override any GCC internal prototype to avoid an error.
11763   Use char because int might match the return type of a GCC
11764   builtin and then its argument prototype would still apply.  */
11765#ifdef __cplusplus
11766extern "C"
11767#endif
11768char H5Fopen ();
11769int
11770main ()
11771{
11772return H5Fopen ();
11773  ;
11774  return 0;
11775}
11776_ACEOF
11777if ac_fn_c_try_link "$LINENO"; then :
11778  ac_cv_lib_hdf5_serial_H5Fopen=yes
11779else
11780  ac_cv_lib_hdf5_serial_H5Fopen=no
11781fi
11782rm -f core conftest.err conftest.$ac_objext \
11783    conftest$ac_exeext conftest.$ac_ext
11784LIBS=$ac_check_lib_save_LIBS
11785fi
11786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_serial_H5Fopen" >&5
11787$as_echo "$ac_cv_lib_hdf5_serial_H5Fopen" >&6; }
11788if test "x$ac_cv_lib_hdf5_serial_H5Fopen" = xyes; then :
11789  cat >>confdefs.h <<_ACEOF
11790#define HAVE_LIBHDF5_SERIAL 1
11791_ACEOF
11792
11793  LIBS="-lhdf5_serial $LIBS"
11794
11795else
11796  as_fn_error $? "libhdf5_serial or libhdf5_serial_hl: library missing. (Cannot find symbol H5Fopen). Check if libhdf5 is installed and if the version is correct" "$LINENO" 5
11797fi
11798
11799        else
11800            HDF5_LIBS="-lhdf5 -lhdf5_hl"
11801            LIBS="$LIBS $HDF5_LIBS"
11802            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for H5Fopen in -lhdf5" >&5
11803$as_echo_n "checking for H5Fopen in -lhdf5... " >&6; }
11804if ${ac_cv_lib_hdf5_H5Fopen+:} false; then :
11805  $as_echo_n "(cached) " >&6
11806else
11807  ac_check_lib_save_LIBS=$LIBS
11808LIBS="-lhdf5 -lz
11809                 $LIBS"
11810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811/* end confdefs.h.  */
11812
11813/* Override any GCC internal prototype to avoid an error.
11814   Use char because int might match the return type of a GCC
11815   builtin and then its argument prototype would still apply.  */
11816#ifdef __cplusplus
11817extern "C"
11818#endif
11819char H5Fopen ();
11820int
11821main ()
11822{
11823return H5Fopen ();
11824  ;
11825  return 0;
11826}
11827_ACEOF
11828if ac_fn_c_try_link "$LINENO"; then :
11829  ac_cv_lib_hdf5_H5Fopen=yes
11830else
11831  ac_cv_lib_hdf5_H5Fopen=no
11832fi
11833rm -f core conftest.err conftest.$ac_objext \
11834    conftest$ac_exeext conftest.$ac_ext
11835LIBS=$ac_check_lib_save_LIBS
11836fi
11837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fopen" >&5
11838$as_echo "$ac_cv_lib_hdf5_H5Fopen" >&6; }
11839if test "x$ac_cv_lib_hdf5_H5Fopen" = xyes; then :
11840  cat >>confdefs.h <<_ACEOF
11841#define HAVE_LIBHDF5 1
11842_ACEOF
11843
11844  LIBS="-lhdf5 $LIBS"
11845
11846else
11847  as_fn_error $? "libhdf5 or libhdf5_hl: library missing. (Cannot find symbol H5Fopen). Check if libhdf5 is installed and if the version is correct" "$LINENO" 5
11848fi
11849
11850        fi
11851    fi
11852fi
11853
11854LIBS="$save_LIBS"
11855
11856
11857
11858
11859
11860$as_echo "#define WITH_HDF5 /**/" >>confdefs.h
11861
11862
11863# Gets compilation and library flags
11864
11865# The Java detection is done after in this file.
11866
11867
11868#################
11869## scirenderer
11870#################
11871
11872
11873# Check whether --with-external-scirenderer was given.
11874if test "${with_external_scirenderer+set}" = set; then :
11875  withval=$with_external_scirenderer;
11876fi
11877
11878
11879 if test "$with_external_scirenderer" = yes; then
11880  EXTERNAL_SCIRENDERER_TRUE=
11881  EXTERNAL_SCIRENDERER_FALSE='#'
11882else
11883  EXTERNAL_SCIRENDERER_TRUE='#'
11884  EXTERNAL_SCIRENDERER_FALSE=
11885fi
11886
11887
11888
11889#################
11890## XCOS
11891#################
11892
11893
11894# Check whether --with-xcos was given.
11895if test "${with_xcos+set}" = set; then :
11896  withval=$with_xcos;
11897fi
11898
11899
11900
11901# Check whether --with-modelica was given.
11902if test "${with_modelica+set}" = set; then :
11903  withval=$with_modelica;
11904fi
11905
11906
11907
11908if test "$with_gui" = no; then
11909   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GUI is disabled. Disabling then Xcos GUI" >&5
11910$as_echo "$as_me: WARNING: GUI is disabled. Disabling then Xcos GUI" >&2;}
11911fi
11912
11913XCOS_ENABLE=no
11914
11915if test "$with_xcos" != no; then
11916
11917$as_echo "#define WITH_XCOS /**/" >>confdefs.h
11918
11919
11920   save_LIBS="$LIBS"
11921
11922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11923$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11924if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11925  $as_echo_n "(cached) " >&6
11926else
11927  ac_check_lib_save_LIBS=$LIBS
11928LIBS="-lrt  $LIBS"
11929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11930/* end confdefs.h.  */
11931
11932/* Override any GCC internal prototype to avoid an error.
11933   Use char because int might match the return type of a GCC
11934   builtin and then its argument prototype would still apply.  */
11935#ifdef __cplusplus
11936extern "C"
11937#endif
11938char clock_gettime ();
11939int
11940main ()
11941{
11942return clock_gettime ();
11943  ;
11944  return 0;
11945}
11946_ACEOF
11947if ac_fn_c_try_link "$LINENO"; then :
11948  ac_cv_lib_rt_clock_gettime=yes
11949else
11950  ac_cv_lib_rt_clock_gettime=no
11951fi
11952rm -f core conftest.err conftest.$ac_objext \
11953    conftest$ac_exeext conftest.$ac_ext
11954LIBS=$ac_check_lib_save_LIBS
11955fi
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11957$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11958if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11959  RT_LIB="-lrt";
11960
11961$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11962
11963else
11964  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: librt: library missing (Cannot find symbol clock_gettime). Check if librt is installed (it is usually provided by the libc) and if the version is correct" >&5
11965$as_echo "$as_me: WARNING: librt: library missing (Cannot find symbol clock_gettime). Check if librt is installed (it is usually provided by the libc) and if the version is correct" >&2;}
11966
11967fi
11968
11969   LIBS="$save_LIBS"
11970
11971
11972
11973#################
11974## ocaml which only called when using Xcos
11975#################
11976
11977   if test "$with_modelica" != no; then
11978
11979# checking for ocamlc
11980
11981	# Extract the first word of "ocamlc", so it can be a program name with args.
11982set dummy ocamlc; 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_OCAMLC+:} false; then :
11986  $as_echo_n "(cached) " >&6
11987else
11988  if test -n "$OCAMLC"; then
11989  ac_cv_prog_OCAMLC="$OCAMLC" # 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_OCAMLC="ocamlc"
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
12006  test -z "$ac_cv_prog_OCAMLC" && ac_cv_prog_OCAMLC="no"
12007fi
12008fi
12009OCAMLC=$ac_cv_prog_OCAMLC
12010if test -n "$OCAMLC"; then
12011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5
12012$as_echo "$OCAMLC" >&6; }
12013else
12014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12015$as_echo "no" >&6; }
12016fi
12017
12018
12019	if test "$OCAMLC" = no; then
12020		as_fn_error $? "ocamlc not found. Mandatory to build the Scicos modelica compiler (Use --without-modelica to disable the Modelica compiler)." "$LINENO" 5
12021	fi
12022	# since ocaml 4.06, unsafe string is no more the default parameter ; enforce it
12023        "$OCAMLC" -unsafe-string
12024	if test "$?" -ne "0"; then
12025		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ocamlc does not support \"-unsafe-string\". Needed to build the Scicos modelica compiler (Use --without-modelica to disable the Modelica compiler)." >&5
12026$as_echo "$as_me: WARNING: ocamlc does not support \"-unsafe-string\". Needed to build the Scicos modelica compiler (Use --without-modelica to disable the Modelica compiler)." >&2;}
12027	fi
12028        OCAMLCFLAGS="$OCAMLCFLAGS -unsafe-string"
12029	# Extract the first word of "ocamlopt", so it can be a program name with args.
12030set dummy ocamlopt; ac_word=$2
12031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12032$as_echo_n "checking for $ac_word... " >&6; }
12033if ${ac_cv_prog_OCAMLOPT+:} false; then :
12034  $as_echo_n "(cached) " >&6
12035else
12036  if test -n "$OCAMLOPT"; then
12037  ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test.
12038else
12039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12040for as_dir in $PATH
12041do
12042  IFS=$as_save_IFS
12043  test -z "$as_dir" && as_dir=.
12044    for ac_exec_ext in '' $ac_executable_extensions; do
12045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12046    ac_cv_prog_OCAMLOPT="ocamlopt"
12047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12048    break 2
12049  fi
12050done
12051  done
12052IFS=$as_save_IFS
12053
12054  test -z "$ac_cv_prog_OCAMLOPT" && ac_cv_prog_OCAMLOPT="no"
12055fi
12056fi
12057OCAMLOPT=$ac_cv_prog_OCAMLOPT
12058if test -n "$OCAMLOPT"; then
12059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5
12060$as_echo "$OCAMLOPT" >&6; }
12061else
12062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12063$as_echo "no" >&6; }
12064fi
12065
12066
12067	if test "$OCAMLOPT" = no; then
12068		as_fn_error $? "ocamlopt not found. Mandatory to build the Scicos modelica compiler." "$LINENO" 5
12069	fi
12070	# since ocaml 4.06, unsafe string is no more the default parameter ; enforce it
12071        "$OCAMLOPT" -unsafe-string
12072	if test "$?" -ne "0"; then
12073		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ocamlc does not support \"-unsafe-string\". Needed to build the Scicos modelica compiler (Use --without-modelica to disable the Modelica compiler)." >&5
12074$as_echo "$as_me: WARNING: ocamlc does not support \"-unsafe-string\". Needed to build the Scicos modelica compiler (Use --without-modelica to disable the Modelica compiler)." >&2;}
12075	fi
12076        OCAMLOPTFLAGS="$OCAMLOPTFLAGS -unsafe-string"
12077	# Extract the first word of "ocamldep", so it can be a program name with args.
12078set dummy ocamldep; ac_word=$2
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12080$as_echo_n "checking for $ac_word... " >&6; }
12081if ${ac_cv_prog_OCAMLDEP+:} false; then :
12082  $as_echo_n "(cached) " >&6
12083else
12084  if test -n "$OCAMLDEP"; then
12085  ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test.
12086else
12087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12088for as_dir in $PATH
12089do
12090  IFS=$as_save_IFS
12091  test -z "$as_dir" && as_dir=.
12092    for ac_exec_ext in '' $ac_executable_extensions; do
12093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12094    ac_cv_prog_OCAMLDEP="ocamldep"
12095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12096    break 2
12097  fi
12098done
12099  done
12100IFS=$as_save_IFS
12101
12102  test -z "$ac_cv_prog_OCAMLDEP" && ac_cv_prog_OCAMLDEP="no"
12103fi
12104fi
12105OCAMLDEP=$ac_cv_prog_OCAMLDEP
12106if test -n "$OCAMLDEP"; then
12107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5
12108$as_echo "$OCAMLDEP" >&6; }
12109else
12110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12111$as_echo "no" >&6; }
12112fi
12113
12114
12115	if test "$OCAMLDEP" = no; then
12116		as_fn_error $? "ocamldep not found. Mandatory to build the Scicos modelica compiler." "$LINENO" 5
12117	fi
12118	# Extract the first word of "ocamlyacc", so it can be a program name with args.
12119set dummy ocamlyacc; ac_word=$2
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12121$as_echo_n "checking for $ac_word... " >&6; }
12122if ${ac_cv_prog_OCAMLYACC+:} false; then :
12123  $as_echo_n "(cached) " >&6
12124else
12125  if test -n "$OCAMLYACC"; then
12126  ac_cv_prog_OCAMLYACC="$OCAMLYACC" # Let the user override the test.
12127else
12128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12129for as_dir in $PATH
12130do
12131  IFS=$as_save_IFS
12132  test -z "$as_dir" && as_dir=.
12133    for ac_exec_ext in '' $ac_executable_extensions; do
12134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12135    ac_cv_prog_OCAMLYACC="ocamlyacc"
12136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12137    break 2
12138  fi
12139done
12140  done
12141IFS=$as_save_IFS
12142
12143  test -z "$ac_cv_prog_OCAMLYACC" && ac_cv_prog_OCAMLYACC="no"
12144fi
12145fi
12146OCAMLYACC=$ac_cv_prog_OCAMLYACC
12147if test -n "$OCAMLYACC"; then
12148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLYACC" >&5
12149$as_echo "$OCAMLYACC" >&6; }
12150else
12151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12152$as_echo "no" >&6; }
12153fi
12154
12155
12156	if test "$OCAMLYACC" = no; then
12157		as_fn_error $? "ocamlyacc not found. Mandatory to build the Scicos modelica compiler." "$LINENO" 5
12158	fi
12159	# Extract the first word of "ocamllex", so it can be a program name with args.
12160set dummy ocamllex; ac_word=$2
12161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12162$as_echo_n "checking for $ac_word... " >&6; }
12163if ${ac_cv_prog_OCAMLLEX+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  if test -n "$OCAMLLEX"; then
12167  ac_cv_prog_OCAMLLEX="$OCAMLLEX" # Let the user override the test.
12168else
12169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12170for as_dir in $PATH
12171do
12172  IFS=$as_save_IFS
12173  test -z "$as_dir" && as_dir=.
12174    for ac_exec_ext in '' $ac_executable_extensions; do
12175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12176    ac_cv_prog_OCAMLLEX="ocamllex"
12177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12178    break 2
12179  fi
12180done
12181  done
12182IFS=$as_save_IFS
12183
12184  test -z "$ac_cv_prog_OCAMLLEX" && ac_cv_prog_OCAMLLEX="no"
12185fi
12186fi
12187OCAMLLEX=$ac_cv_prog_OCAMLLEX
12188if test -n "$OCAMLLEX"; then
12189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLLEX" >&5
12190$as_echo "$OCAMLLEX" >&6; }
12191else
12192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12193$as_echo "no" >&6; }
12194fi
12195
12196
12197	if test "$OCAMLLEX" = no; then
12198		as_fn_error $? "ocamllex not found. Mandatory to build the Scicos modelica compiler." "$LINENO" 5
12199	fi
12200
12201$as_echo "#define WITH_OCAML /**/" >>confdefs.h
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214   fi
12215   XCOS_ENABLE=yes
12216
12217fi
12218
12219
12220
12221 if test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
12222  OCAML_TRUE=
12223  OCAML_FALSE='#'
12224else
12225  OCAML_TRUE='#'
12226  OCAML_FALSE=
12227fi
12228
12229 if test "$XCOS_ENABLE" != no; then
12230  XCOS_TRUE=
12231  XCOS_FALSE='#'
12232else
12233  XCOS_TRUE='#'
12234  XCOS_FALSE=
12235fi
12236
12237
12238###########################
12239## test for JAVA compiler
12240###########################
12241if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no; then
12242
12243     # See if --with-jdk command line argument is given
12244     # Try to detect the installed JVM, this could be controlled
12245     # by the above --with options
12246
12247
12248# Check whether --with-jdk was given.
12249if test "${with_jdk+set}" = set; then :
12250  withval=$with_jdk;
12251fi
12252
12253
12254    if test "$with_jdk" = "no" -o -z "$with_jdk"; then
12255        NO=op
12256    elif test "$with_jdk" = "yes" -o \( ! -d "$with_jdk" \); then
12257        as_fn_error $? "--with-jdk=DIR option, must pass a valid DIR" "$LINENO" 5
12258    elif test "$with_jdk" != "no" ; then
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Use JDK path specified ($with_jdk)" >&5
12260$as_echo "Use JDK path specified ($with_jdk)" >&6; }
12261        ac_java_jvm_dir=$with_jdk
12262        ac_java_jvm_name=jdk
12263    fi
12264
12265     if test "$with_jdk" != no; then
12266
12267
12268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JAVA_HOME variable" >&5
12269$as_echo_n "checking JAVA_HOME variable... " >&6; }
12270    # check if JAVA_HOME is set. If it is the case, try to use if first
12271    if test ! -z "$JAVA_HOME" && test "x$ac_java_jvm_dir" = "x"; then
12272        if test -x $JAVA_HOME/bin/javac${EXEEXT}; then
12273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: JAVA_HOME variable found, use it as JVM root directory" >&5
12274$as_echo "JAVA_HOME variable found, use it as JVM root directory" >&6; }
12275                ac_java_jvm_dir=`cd $JAVA_HOME ; pwd`
12276            JAVAC=$ac_java_jvm_dir/bin/javac${EXEEXT}
12277        else
12278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: JAVA_HOME variable found, but unable to find javac
12279Maybe JAVA_HOME is pointing to a JRE (Java Runtime Environment) instead of a JDK (Java Developement Kit) ? )" >&5
12280$as_echo "JAVA_HOME variable found, but unable to find javac
12281Maybe JAVA_HOME is pointing to a JRE (Java Runtime Environment) instead of a JDK (Java Developement Kit) ? )" >&6; }
12282        fi
12283    else
12284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not defined" >&5
12285$as_echo "not defined" >&6; }
12286    fi
12287
12288# Mac OS default path
12289    if test "x$JAVAC" = "x" && test "x$ac_java_jvm_dir" != "x"; then
12290        case "$host_os" in
12291             *darwin* )
12292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin (Mac OS X) found. Use the standard paths." >&5
12293$as_echo "Darwin (Mac OS X) found. Use the standard paths." >&6; }
12294            # See: http://developer.apple.com/mac/library/qa/qa2001/qa1170.html
12295            ac_java_jvm_dir=$(/usr/libexec/java_home --arch x86_64 --failfast --version 1.8+)
12296            JAVAC=$ac_java_jvm_dir/bin/javac
12297            ;;
12298        esac
12299    fi
12300
12301    # if we do not know the jvm dir, javac will be found on the PATH
12302    if test "x$JAVAC" = "x" && test "x$ac_java_jvm_dir" != "x"; then
12303        ac_java_jvm_dir=`cd $ac_java_jvm_dir ; pwd`
12304        JAVAC=$ac_java_jvm_dir/bin/javac${EXEEXT}
12305    fi
12306
12307    # Search for and test the javac compiler
12308
12309# Mac OS X
12310    if test "x$JAVAC" = "x" ; then
12311    case "$host_os" in
12312         *darwin* )
12313         # Don't follow the symlink since Java under MacOS is messy
12314         # Uses the wrapper providing by Apple to retrieve the path
12315         # See: http://developer.apple.com/mac/library/qa/qa2001/qa1170.html
12316           JAVAC=$(/usr/libexec/java_home --arch x86_64 --failfast --version 1.8+)/bin/javac
12317               DONT_FOLLOW_SYMLINK=yes
12318         ;;
12319    esac
12320    fi
12321    if test "x$JAVAC" = "x" ; then
12322        # Extract the first word of "javac", so it can be a program name with args.
12323set dummy javac; ac_word=$2
12324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12325$as_echo_n "checking for $ac_word... " >&6; }
12326if ${ac_cv_path_JAVAC+:} false; then :
12327  $as_echo_n "(cached) " >&6
12328else
12329  case $JAVAC in
12330  [\\/]* | ?:[\\/]*)
12331  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
12332  ;;
12333  *)
12334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12335for as_dir in $PATH
12336do
12337  IFS=$as_save_IFS
12338  test -z "$as_dir" && as_dir=.
12339    for ac_exec_ext in '' $ac_executable_extensions; do
12340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12341    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
12342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12343    break 2
12344  fi
12345done
12346  done
12347IFS=$as_save_IFS
12348
12349  ;;
12350esac
12351fi
12352JAVAC=$ac_cv_path_JAVAC
12353if test -n "$JAVAC"; then
12354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
12355$as_echo "$JAVAC" >&6; }
12356else
12357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12358$as_echo "no" >&6; }
12359fi
12360
12361
12362        if test "x$JAVAC" = "x" ; then
12363            as_fn_error $? "javac not found on PATH ... did you try with --with-jdk=DIR" "$LINENO" 5
12364        fi
12365    fi
12366    if test ! -f "$JAVAC" ; then
12367        as_fn_error $? "javac '$JAVAC' does not exist.
12368        Perhaps Java is not installed or you passed a bad dir to a --with option." "$LINENO" 5
12369    fi
12370
12371    # Check for installs which uses a symlink. If it is the case, try to resolve JAVA_HOME from it
12372    if test -h "$JAVAC" -a "x$DONT_FOLLOW_SYMLINK" != "xyes"; then
12373
12374
12375		_cur="$JAVAC"
12376	if test ! -z ""javac""; then
12377		_fileNameWanted="javac"
12378	else
12379		_fileNameWanted=$JAVAC
12380	fi
12381	while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
12382		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Symlink for $_cur" >&5
12383$as_echo_n "checking Symlink for $_cur... " >&6; }
12384
12385		_slink=`ls -ld "$_cur" | sed 's/.* -> //'`
12386		if test "$_fileNameWanted" != "`basename $_slink`"; then
12387			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Filename changed... Keeping the one found before" >&5
12388$as_echo "Filename changed... Keeping the one found before" >&6; }
12389			break
12390		fi
12391		case "$_slink" in
12392			/*)
12393				_cur="$_slink";;
12394			# 'X' avoids triggering unwanted echo options.
12395			*)
12396				_cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[^/]*$::'`"$_slink";;
12397		esac
12398		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cur" >&5
12399$as_echo "$_cur" >&6; }
12400	done
12401	SYMLINK_FOLLOWED_TO="$_cur"
12402
12403        JAVAC=$SYMLINK_FOLLOWED_TO
12404        TMP=`dirname $SYMLINK_FOLLOWED_TO`
12405        TMP=`dirname $TMP`
12406        ac_java_jvm_dir=$TMP
12407        echo "Java base directory (probably) available here : $ac_java_jvm_dir"
12408    fi
12409
12410
12411
12412    # If we were searching for javac, then set ac_java_jvm_dir
12413    if test "x$ac_java_jvm_dir" = "x"; then
12414        TMP=`dirname $JAVAC`
12415        TMP=`dirname $TMP`
12416        ac_java_jvm_dir=$TMP
12417    fi
12418
12419    # Look for a setting for the CLASSPATH, we might need one to run JAVAC
12420
12421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zip or jar files to include on CLASSPATH" >&5
12422$as_echo_n "checking for zip or jar files to include on CLASSPATH... " >&6; }
12423
12424    if test "x$ac_java_jvm_dir" = "x" ; then
12425        as_fn_error $? "jvm directory not set" "$LINENO" 5
12426    fi
12427
12428    # GNU gcj does not need to set the CLASSPATH.
12429
12430    # Assume that JDK 1.4 and newer systems will
12431    # not need to explicitly set the CLASSPATH.
12432
12433    # Append CLASSPATH if env var is set. Avoid append
12434    # under msys because CLASSPATH is in Win32 format
12435    # and we can't combine it with a msys path.
12436    if test "x$CLASSPATH" != "x" && test "$ac_cv_tcl_win32" != "yes" ; then
12437
12438    echo Adding user supplied CLASSPATH env var >&5
12439    echo Adding user supplied CLASSPATH env var
12440
12441        ac_java_classpath="${ac_java_classpath}:${CLASSPATH}"
12442    fi
12443
12444
12445    echo Using CLASSPATH=$ac_java_classpath >&5
12446
12447
12448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_java_classpath" >&5
12449$as_echo "$ac_java_classpath" >&6; }
12450
12451
12452    # FIXME : add detection of command line arguments for JAVAC
12453
12454    JAVAC_FLAGS=-g
12455    JAVAC_D_FLAG=-d
12456
12457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if the java compiler works" >&5
12458$as_echo_n "checking to see if the java compiler works... " >&6; }
12459
12460    cat << \EOF > conftest.java
12461// #line 12461 "configure"
12462import java.util.regex.Pattern;
12463
12464
12465
12466public class conftest {
12467    public static void main(String[] argv) {
12468
12469    }
12470
12471    private static int compare(String v1, String v2) {
12472        String s1 = normalisedVersion(v1);
12473        String s2 = normalisedVersion(v2);
12474        return s1.compareTo(s2);
12475    }
12476
12477    private static String normalisedVersion(String version) {
12478        return normalisedVersion(version, ".", 4);
12479    }
12480
12481    private static String normalisedVersion(String version, String sep, int maxWidth) {
12482        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12483        StringBuilder sb = new StringBuilder();
12484        for (String s : split) {
12485            sb.append(String.format("%" + maxWidth + 's', s));
12486        }
12487        return sb.toString();
12488    }
12489}
12490EOF
12491
12492    CLASSPATH=$ac_java_classpath
12493    export CLASSPATH
12494    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12495    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12496       if test ""no"" = "no"; then
12497           echo "yes" >&5
12498              works=yes
12499       else
12500              cmd="$JAVA conftest"
12501              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12502               echo "yes" >&5
12503                  works=yes
12504            else
12505                echo "configure: failed program was:" >&5
12506                cat conftest.java >&5
12507                if test -s conftest.java.output; then
12508                   STDOUT=`cat conftest.java.output`
12509                fi
12510                echo "configure: CLASSPATH was $CLASSPATH" >&5
12511                            fi
12512        fi
12513        if test -f conftest.java.output; then
12514           rm conftest.java.output
12515        fi
12516    else
12517        echo "configure: failed program was:" >&5
12518        cat conftest.java >&5
12519        echo "configure: CLASSPATH was $CLASSPATH" >&5
12520            fi
12521
12522    if test "$works" = "yes" ; then
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12524$as_echo "$works" >&6; }
12525    else
12526        as_fn_error $? "Could not compile simple Java program with '$JAVAC'. Try with the Sun JDK (1.5 or 6)." "$LINENO" 5
12527    fi
12528
12529
12530    echo Using JAVAC=$JAVAC >&5
12531    echo Using JAVAC=$JAVAC
12532
12533
12534
12535
12536    echo Java found in $ac_java_jvm_dir >&5
12537    echo Java found in $ac_java_jvm_dir
12538
12539
12540    # Try to detect non JDK JVMs. If we can't, then just assume a jdk
12541
12542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of jvm" >&5
12543$as_echo_n "checking type of jvm... " >&6; }
12544
12545    if test "x$ac_java_jvm_name" = "x" ; then
12546
12547    cat << \EOF > conftest.java
12548// #line 12548 "configure"
12549import java.util.regex.Pattern;
12550
12551import gnu.java.io.EncodingManager;
12552
12553public class conftest {
12554    public static void main(String[] argv) {
12555
12556    }
12557
12558    private static int compare(String v1, String v2) {
12559        String s1 = normalisedVersion(v1);
12560        String s2 = normalisedVersion(v2);
12561        return s1.compareTo(s2);
12562    }
12563
12564    private static String normalisedVersion(String version) {
12565        return normalisedVersion(version, ".", 4);
12566    }
12567
12568    private static String normalisedVersion(String version, String sep, int maxWidth) {
12569        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12570        StringBuilder sb = new StringBuilder();
12571        for (String s : split) {
12572            sb.append(String.format("%" + maxWidth + 's', s));
12573        }
12574        return sb.toString();
12575    }
12576}
12577EOF
12578
12579    CLASSPATH=$ac_java_classpath
12580    export CLASSPATH
12581    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12582    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12583       if test ""no"" = "no"; then
12584           echo "yes" >&5
12585              ac_java_jvm_name=gcj
12586       else
12587              cmd="$JAVA conftest"
12588              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12589               echo "yes" >&5
12590                  ac_java_jvm_name=gcj
12591            else
12592                echo "configure: failed program was:" >&5
12593                cat conftest.java >&5
12594                if test -s conftest.java.output; then
12595                   STDOUT=`cat conftest.java.output`
12596                fi
12597                echo "configure: CLASSPATH was $CLASSPATH" >&5
12598                            fi
12599        fi
12600        if test -f conftest.java.output; then
12601           rm conftest.java.output
12602        fi
12603    else
12604        echo "configure: failed program was:" >&5
12605        cat conftest.java >&5
12606        echo "configure: CLASSPATH was $CLASSPATH" >&5
12607            fi
12608
12609    fi
12610
12611    if test "x$ac_java_jvm_name" = "x" ; then
12612       ac_java_jvm_name=jdk
12613    fi
12614
12615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_java_jvm_name" >&5
12616$as_echo "$ac_java_jvm_name" >&6; }
12617
12618    case "$ac_java_jvm_name" in
12619        gcj) DO=nothing ;;
12620        jdk) DO=nothing ;;
12621        *) as_fn_error $? "'$ac_java_jvm_name' is not a supported JVM" "$LINENO" 5 ;;
12622    esac
12623
12624    # Try to detect the version of java that is installed
12625
12626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking java API version" >&5
12627$as_echo_n "checking java API version... " >&6; }
12628
12629    # The class java.nio.charset.Charset is new to 1.4
12630
12631    cat << \EOF > conftest.java
12632// #line 12632 "configure"
12633import java.util.regex.Pattern;
12634
12635import java.nio.charset.Charset;
12636
12637public class conftest {
12638    public static void main(String[] argv) {
12639
12640    }
12641
12642    private static int compare(String v1, String v2) {
12643        String s1 = normalisedVersion(v1);
12644        String s2 = normalisedVersion(v2);
12645        return s1.compareTo(s2);
12646    }
12647
12648    private static String normalisedVersion(String version) {
12649        return normalisedVersion(version, ".", 4);
12650    }
12651
12652    private static String normalisedVersion(String version, String sep, int maxWidth) {
12653        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12654        StringBuilder sb = new StringBuilder();
12655        for (String s : split) {
12656            sb.append(String.format("%" + maxWidth + 's', s));
12657        }
12658        return sb.toString();
12659    }
12660}
12661EOF
12662
12663    CLASSPATH=$ac_java_classpath
12664    export CLASSPATH
12665    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12666    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12667       if test ""no"" = "no"; then
12668           echo "yes" >&5
12669              ac_java_jvm_version=1.4
12670       else
12671              cmd="$JAVA conftest"
12672              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12673               echo "yes" >&5
12674                  ac_java_jvm_version=1.4
12675            else
12676                echo "configure: failed program was:" >&5
12677                cat conftest.java >&5
12678                if test -s conftest.java.output; then
12679                   STDOUT=`cat conftest.java.output`
12680                fi
12681                echo "configure: CLASSPATH was $CLASSPATH" >&5
12682                            fi
12683        fi
12684        if test -f conftest.java.output; then
12685           rm conftest.java.output
12686        fi
12687    else
12688        echo "configure: failed program was:" >&5
12689        cat conftest.java >&5
12690        echo "configure: CLASSPATH was $CLASSPATH" >&5
12691            fi
12692
12693
12694    # The class java.lang.StringBuilder is new to 1.5
12695
12696    cat << \EOF > conftest.java
12697// #line 12697 "configure"
12698import java.util.regex.Pattern;
12699
12700import java.lang.StringBuilder;
12701
12702public class conftest {
12703    public static void main(String[] argv) {
12704
12705    }
12706
12707    private static int compare(String v1, String v2) {
12708        String s1 = normalisedVersion(v1);
12709        String s2 = normalisedVersion(v2);
12710        return s1.compareTo(s2);
12711    }
12712
12713    private static String normalisedVersion(String version) {
12714        return normalisedVersion(version, ".", 4);
12715    }
12716
12717    private static String normalisedVersion(String version, String sep, int maxWidth) {
12718        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12719        StringBuilder sb = new StringBuilder();
12720        for (String s : split) {
12721            sb.append(String.format("%" + maxWidth + 's', s));
12722        }
12723        return sb.toString();
12724    }
12725}
12726EOF
12727
12728    CLASSPATH=$ac_java_classpath
12729    export CLASSPATH
12730    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12731    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12732       if test ""no"" = "no"; then
12733           echo "yes" >&5
12734              ac_java_jvm_version=1.5
12735       else
12736              cmd="$JAVA conftest"
12737              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12738               echo "yes" >&5
12739                  ac_java_jvm_version=1.5
12740            else
12741                echo "configure: failed program was:" >&5
12742                cat conftest.java >&5
12743                if test -s conftest.java.output; then
12744                   STDOUT=`cat conftest.java.output`
12745                fi
12746                echo "configure: CLASSPATH was $CLASSPATH" >&5
12747                            fi
12748        fi
12749        if test -f conftest.java.output; then
12750           rm conftest.java.output
12751        fi
12752    else
12753        echo "configure: failed program was:" >&5
12754        cat conftest.java >&5
12755        echo "configure: CLASSPATH was $CLASSPATH" >&5
12756            fi
12757
12758
12759    # The class java.util.ArrayDeque is new to 1.6
12760
12761    cat << \EOF > conftest.java
12762// #line 12762 "configure"
12763import java.util.regex.Pattern;
12764
12765import java.util.ArrayDeque;
12766
12767public class conftest {
12768    public static void main(String[] argv) {
12769
12770    }
12771
12772    private static int compare(String v1, String v2) {
12773        String s1 = normalisedVersion(v1);
12774        String s2 = normalisedVersion(v2);
12775        return s1.compareTo(s2);
12776    }
12777
12778    private static String normalisedVersion(String version) {
12779        return normalisedVersion(version, ".", 4);
12780    }
12781
12782    private static String normalisedVersion(String version, String sep, int maxWidth) {
12783        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12784        StringBuilder sb = new StringBuilder();
12785        for (String s : split) {
12786            sb.append(String.format("%" + maxWidth + 's', s));
12787        }
12788        return sb.toString();
12789    }
12790}
12791EOF
12792
12793    CLASSPATH=$ac_java_classpath
12794    export CLASSPATH
12795    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12796    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12797       if test ""no"" = "no"; then
12798           echo "yes" >&5
12799              ac_java_jvm_version=1.6
12800       else
12801              cmd="$JAVA conftest"
12802              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12803               echo "yes" >&5
12804                  ac_java_jvm_version=1.6
12805            else
12806                echo "configure: failed program was:" >&5
12807                cat conftest.java >&5
12808                if test -s conftest.java.output; then
12809                   STDOUT=`cat conftest.java.output`
12810                fi
12811                echo "configure: CLASSPATH was $CLASSPATH" >&5
12812                            fi
12813        fi
12814        if test -f conftest.java.output; then
12815           rm conftest.java.output
12816        fi
12817    else
12818        echo "configure: failed program was:" >&5
12819        cat conftest.java >&5
12820        echo "configure: CLASSPATH was $CLASSPATH" >&5
12821            fi
12822
12823
12824    # The class java.nio.file.Path is new to 1.7
12825
12826    cat << \EOF > conftest.java
12827// #line 12827 "configure"
12828import java.util.regex.Pattern;
12829
12830import java.nio.file.Path;
12831
12832public class conftest {
12833    public static void main(String[] argv) {
12834
12835    }
12836
12837    private static int compare(String v1, String v2) {
12838        String s1 = normalisedVersion(v1);
12839        String s2 = normalisedVersion(v2);
12840        return s1.compareTo(s2);
12841    }
12842
12843    private static String normalisedVersion(String version) {
12844        return normalisedVersion(version, ".", 4);
12845    }
12846
12847    private static String normalisedVersion(String version, String sep, int maxWidth) {
12848        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12849        StringBuilder sb = new StringBuilder();
12850        for (String s : split) {
12851            sb.append(String.format("%" + maxWidth + 's', s));
12852        }
12853        return sb.toString();
12854    }
12855}
12856EOF
12857
12858    CLASSPATH=$ac_java_classpath
12859    export CLASSPATH
12860    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12861    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12862       if test ""no"" = "no"; then
12863           echo "yes" >&5
12864              ac_java_jvm_version=1.7
12865       else
12866              cmd="$JAVA conftest"
12867              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12868               echo "yes" >&5
12869                  ac_java_jvm_version=1.7
12870            else
12871                echo "configure: failed program was:" >&5
12872                cat conftest.java >&5
12873                if test -s conftest.java.output; then
12874                   STDOUT=`cat conftest.java.output`
12875                fi
12876                echo "configure: CLASSPATH was $CLASSPATH" >&5
12877                            fi
12878        fi
12879        if test -f conftest.java.output; then
12880           rm conftest.java.output
12881        fi
12882    else
12883        echo "configure: failed program was:" >&5
12884        cat conftest.java >&5
12885        echo "configure: CLASSPATH was $CLASSPATH" >&5
12886            fi
12887
12888
12889    # The class java.util.stream.DoubleStream is new to 1.8
12890
12891    cat << \EOF > conftest.java
12892// #line 12892 "configure"
12893import java.util.regex.Pattern;
12894
12895import java.util.stream.DoubleStream;
12896
12897public class conftest {
12898    public static void main(String[] argv) {
12899
12900    }
12901
12902    private static int compare(String v1, String v2) {
12903        String s1 = normalisedVersion(v1);
12904        String s2 = normalisedVersion(v2);
12905        return s1.compareTo(s2);
12906    }
12907
12908    private static String normalisedVersion(String version) {
12909        return normalisedVersion(version, ".", 4);
12910    }
12911
12912    private static String normalisedVersion(String version, String sep, int maxWidth) {
12913        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12914        StringBuilder sb = new StringBuilder();
12915        for (String s : split) {
12916            sb.append(String.format("%" + maxWidth + 's', s));
12917        }
12918        return sb.toString();
12919    }
12920}
12921EOF
12922
12923    CLASSPATH=$ac_java_classpath
12924    export CLASSPATH
12925    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12926    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12927       if test ""no"" = "no"; then
12928           echo "yes" >&5
12929              ac_java_jvm_version=1.8
12930       else
12931              cmd="$JAVA conftest"
12932              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12933               echo "yes" >&5
12934                  ac_java_jvm_version=1.8
12935            else
12936                echo "configure: failed program was:" >&5
12937                cat conftest.java >&5
12938                if test -s conftest.java.output; then
12939                   STDOUT=`cat conftest.java.output`
12940                fi
12941                echo "configure: CLASSPATH was $CLASSPATH" >&5
12942                            fi
12943        fi
12944        if test -f conftest.java.output; then
12945           rm conftest.java.output
12946        fi
12947    else
12948        echo "configure: failed program was:" >&5
12949        cat conftest.java >&5
12950        echo "configure: CLASSPATH was $CLASSPATH" >&5
12951            fi
12952
12953
12954    # The class java.lang.ProcessHandle is new to 1.9
12955
12956    cat << \EOF > conftest.java
12957// #line 12957 "configure"
12958import java.util.regex.Pattern;
12959
12960import java.lang.ProcessHandle;
12961
12962public class conftest {
12963    public static void main(String[] argv) {
12964
12965    }
12966
12967    private static int compare(String v1, String v2) {
12968        String s1 = normalisedVersion(v1);
12969        String s2 = normalisedVersion(v2);
12970        return s1.compareTo(s2);
12971    }
12972
12973    private static String normalisedVersion(String version) {
12974        return normalisedVersion(version, ".", 4);
12975    }
12976
12977    private static String normalisedVersion(String version, String sep, int maxWidth) {
12978        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
12979        StringBuilder sb = new StringBuilder();
12980        for (String s : split) {
12981            sb.append(String.format("%" + maxWidth + 's', s));
12982        }
12983        return sb.toString();
12984    }
12985}
12986EOF
12987
12988    CLASSPATH=$ac_java_classpath
12989    export CLASSPATH
12990    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
12991    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
12992       if test ""no"" = "no"; then
12993           echo "yes" >&5
12994              ac_java_jvm_version=1.9
12995       else
12996              cmd="$JAVA conftest"
12997              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
12998               echo "yes" >&5
12999                  ac_java_jvm_version=1.9
13000            else
13001                echo "configure: failed program was:" >&5
13002                cat conftest.java >&5
13003                if test -s conftest.java.output; then
13004                   STDOUT=`cat conftest.java.output`
13005                fi
13006                echo "configure: CLASSPATH was $CLASSPATH" >&5
13007                            fi
13008        fi
13009        if test -f conftest.java.output; then
13010           rm conftest.java.output
13011        fi
13012    else
13013        echo "configure: failed program was:" >&5
13014        cat conftest.java >&5
13015        echo "configure: CLASSPATH was $CLASSPATH" >&5
13016            fi
13017
13018
13019    if test "x$ac_java_jvm_version" = "x" ; then
13020        as_fn_error $? "Could not detect Java version, 1.4 or newer is required" "$LINENO" 5
13021    fi
13022
13023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_java_jvm_version" >&5
13024$as_echo "$ac_java_jvm_version" >&6; }
13025
13026
13027     case "$ac_java_jvm_version" in
13028        1.9)
13029        ;;
13030        1.8)
13031        ;;
13032        *)
13033            as_fn_error $? "Wrong version of Java. Expected at least 1.8. Found $ac_java_jvm_version" "$LINENO" 5
13034        ;;
13035     esac
13036
13037   if test "$ac_java_jvm_name" = "jdk"; then
13038        JAVA_HOME=$ac_java_jvm_dir
13039        JAVA_VERSION=$ac_java_jvm_version
13040#     AC_JAVA_TOOLS
13041
13042
13043
13044    # JAVA_HOME specificed, check if we can find jni.h in this path
13045    if test !  -z "$JAVA_HOME"; then
13046        ac_java_jvm_dir=$JAVA_HOME
13047    fi
13048    # Look for jni.h in the subdirectory $ac_java_jvm_dir/include
13049
13050    F=$ac_java_jvm_dir/include/jni.h
13051    if test -f "$F" ; then
13052         ac_java_jvm_jni_include_flags="-I`dirname $F`"
13053    else
13054         F=`ls $ac_java_jvm_dir/include/dragonfly/jni.h 2>/dev/null`
13055         if test -f "$F" ; then
13056             ac_java_jvm_jni_include_flags="-I`dirname $F`"
13057         else
13058        case "$host_os" in
13059             *darwin* )
13060                       ac_java_jvm_jni_include_flags="-I/Developer/SDKs/MacOSX${macosx_version}.sdk/System/Library/Frameworks/JavaVM.framework/Headers -I$(/usr/libexec/java_home --arch x86_64 --failfast --version 1.8+)/include/ -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/"
13061                  ;;
13062              *)
13063                       as_fn_error $? "Could not locate Java's jni.h include file" "$LINENO" 5
13064               ;;
13065               esac
13066         fi
13067    fi
13068
13069    # Look for jni_md.h in an arch specific subdirectory
13070    # we assume that there is only one arch subdirectory,
13071    # if that is not the case we would need to use $host
13072
13073    F=`ls $ac_java_jvm_dir/include/dragonfly/jni_md.h 2>/dev/null`
13074    if test -f "$F" ; then
13075        ac_java_jvm_jni_include_flags="$ac_java_jvm_jni_include_flags -I`dirname $F`"
13076    fi
13077
13078
13079    echo Using the following JNI include flags $ac_java_jvm_jni_include_flags >&5
13080    echo Using the following JNI include flags $ac_java_jvm_jni_include_flags
13081
13082
13083    # Make sure a simple #include <jni.h> will compile.
13084
13085
13086
13087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jni.h can be included" >&5
13088$as_echo_n "checking if jni.h can be included... " >&6; }
13089if ${ac_cv_java_jvm_jni_working+:} false; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092
13093        ac_ext=c
13094ac_cpp='$CPP $CPPFLAGS'
13095ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13096ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13097ac_compiler_gnu=$ac_cv_c_compiler_gnu
13098
13099        ac_saved_cflags=$CFLAGS
13100        CFLAGS="$CFLAGS $ac_java_jvm_jni_include_flags"
13101        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13102/* end confdefs.h.  */
13103
13104            #include <jni.h>
13105
13106int
13107main ()
13108{
13109return 0;
13110  ;
13111  return 0;
13112}
13113_ACEOF
13114if ac_fn_c_try_compile "$LINENO"; then :
13115  ac_cv_java_jvm_jni_working=yes
13116else
13117  as_fn_error $? "could not compile file that includes jni.h. If you run Mac OS X please make sure you have 'Java developer package'. This is available on http://connect.apple.com/ " "$LINENO" 5
13118fi
13119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13120        ac_ext=c
13121ac_cpp='$CPP $CPPFLAGS'
13122ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13123ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13124ac_compiler_gnu=$ac_cv_c_compiler_gnu
13125
13126        CFLAGS=$ac_saved_cflags
13127
13128fi
13129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_java_jvm_jni_working" >&5
13130$as_echo "$ac_cv_java_jvm_jni_working" >&6; }
13131
13132    # FIXME: should we look for or require a include/native_threads dir?
13133
13134        JAVA_JNI_INCLUDE=$ac_java_jvm_jni_include_flags
13135
13136        case "$host_os" in
13137             *Darwin* | *darwin*)
13138               # Mac OS X does not link against the lib but uses -framework
13139               macosx_version=`sw_vers -productVersion`
13140               case $macosx_version in
13141                   11.*)
13142                   JAVA_JNI_LIBS="-framework JavaNativeFoundation"
13143                   ;;
13144                   10.*)
13145                   JAVA_JNI_LIBS="-framework JavaVM"
13146                   ;;
13147               esac
13148               ;;
13149             *)
13150
13151    machine=`uname -p`
13152    case "$machine" in
13153        i?86)
13154          machine=i386
13155          ;;
13156        i86pc)
13157        # Solaris 10 x86
13158          machine=i386
13159          ;;
13160        sun*|sparc64)
13161       # Sun
13162          machine=sparc
13163          ;;
13164        powerpc)
13165          machine=ppc
13166          ;;
13167        powerpc64le|ppc64le)
13168          machine=ppc64le
13169          ;;
13170        powerpc64|ppc64)
13171          machine=ppc64
13172          ;;
13173        armv*)
13174          machine=arm
13175          ;;
13176        sh*)
13177            machine=sh
13178          ;;
13179        mips64)
13180            machine=mips
13181          ;;
13182    esac
13183
13184
13185    echo Looking for JNI libs with $machine as machine hardware name >&5
13186    echo Looking for JNI libs with $machine as machine hardware name
13187
13188
13189    # Check for known JDK installation layouts
13190
13191    # Gives the name of the symbol we want to look for.
13192    # Mac OS X add a trailing _Impl
13193    libSymbolToTest="JNI_GetCreatedJavaVMs"
13194
13195    if test "$ac_java_jvm_name" = "jdk"; then
13196
13197        # OpenJDK 9
13198        F=lib/libjava.so
13199        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13200
13201    echo Looking for $ac_java_jvm_dir/$F >&5
13202    echo Looking for $ac_java_jvm_dir/$F
13203
13204            if test -f $ac_java_jvm_dir/$F ; then
13205
13206    echo Found $ac_java_jvm_dir/$F >&5
13207    echo Found $ac_java_jvm_dir/$F
13208
13209                D=`dirname $ac_java_jvm_dir/$F`
13210                ac_java_jvm_jni_lib_runtime_path=$D
13211                ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify"
13212                D=$ac_java_jvm_dir/lib/client
13213        if test ! -f $D/libjvm.so; then # Check if it is in the client or server directory
13214            # Try the server directory
13215            D=$ac_java_jvm_dir/lib/server
13216            if test ! -f $D/libjvm.so; then
13217                as_fn_error $? "Could not find libjvm.so in
13218                jre/lib/$machine/client/ or in jre/lib/$machine/server/.
13219                Please report to http://bugzilla.scilab.org/" "$LINENO" 5
13220            fi
13221        fi
13222                ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13223                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm -pthread"
13224            fi
13225        fi
13226
13227        # Sun/Blackdown 1.4 for Linux (client JVM)
13228        F=jre/lib/$machine/libjava.so
13229        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13230
13231    echo Looking for $ac_java_jvm_dir/$F >&5
13232    echo Looking for $ac_java_jvm_dir/$F
13233
13234            if test -f $ac_java_jvm_dir/$F ; then
13235
13236    echo Found $ac_java_jvm_dir/$F >&5
13237    echo Found $ac_java_jvm_dir/$F
13238
13239                D=`dirname $ac_java_jvm_dir/$F`
13240                ac_java_jvm_jni_lib_runtime_path=$D
13241                ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify"
13242                D=$ac_java_jvm_dir/jre/lib/$machine/client
13243        if test ! -f $D/libjvm.so; then # Check if it is in the client or server directory
13244            # Try the server directory
13245            D=$ac_java_jvm_dir/jre/lib/$machine/server
13246            if test ! -f $D/libjvm.so; then
13247                as_fn_error $? "Could not find libjvm.so in
13248                jre/lib/$machine/client/ or in jre/lib/$machine/server/.
13249                Please report to http://bugzilla.scilab.org/" "$LINENO" 5
13250            fi
13251        fi
13252                ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13253                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm -pthread"
13254                D=$ac_java_jvm_dir/jre/lib/$machine/native_threads
13255                if test -d $D; then
13256                  ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13257                  ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D"
13258                fi
13259            fi
13260        fi
13261
13262        # Sun JDK 1.5 for AMD64 Linux (server JVM)
13263
13264        F=jre/lib/amd64/libjava.so
13265        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13266
13267    echo Looking for $ac_java_jvm_dir/$F >&5
13268    echo Looking for $ac_java_jvm_dir/$F
13269
13270            if test -f $ac_java_jvm_dir/$F ; then
13271
13272    echo Found $ac_java_jvm_dir/$F >&5
13273    echo Found $ac_java_jvm_dir/$F
13274
13275
13276                D=`dirname $ac_java_jvm_dir/$F`
13277                ac_java_jvm_jni_lib_runtime_path=$D
13278                ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify"
13279
13280                D=$ac_java_jvm_dir/jre/lib/amd64/server
13281                ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13282                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm -pthread"
13283            fi
13284        fi
13285
13286        # Eclipse/IBM Java Compiler
13287
13288        F=jre/lib/i386/client/libjvm.so
13289        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13290
13291    echo Looking for $ac_java_jvm_dir/$F >&5
13292    echo Looking for $ac_java_jvm_dir/$F
13293
13294            if test -f $ac_java_jvm_dir/$F ; then
13295
13296    echo Found $ac_java_jvm_dir/$F >&5
13297    echo Found $ac_java_jvm_dir/$F
13298
13299
13300                D=`dirname $ac_java_jvm_dir/$F`
13301                ac_java_jvm_jni_lib_runtime_path=$D
13302                ac_java_jvm_jni_lib_flags="-L$D -ljvm -pthread"
13303
13304                D=$ac_java_jvm_dir/jre/lib/i386/server
13305                ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13306                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm -pthread"
13307            fi
13308        fi
13309
13310        # IBM Java Compiler under Suse (and probably others)
13311
13312        F=jre/bin/classic/libjvm.so
13313        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13314
13315    echo Looking for $ac_java_jvm_dir/$F >&5
13316    echo Looking for $ac_java_jvm_dir/$F
13317
13318            if test -f $ac_java_jvm_dir/$F ; then
13319
13320    echo Found $ac_java_jvm_dir/$F >&5
13321    echo Found $ac_java_jvm_dir/$F
13322
13323
13324                D=`dirname $ac_java_jvm_dir/$F`
13325                ac_java_jvm_jni_lib_runtime_path=$D
13326                ac_java_jvm_jni_lib_flags="-L$D -ljvm -pthread"
13327
13328                D=$ac_java_jvm_dir/bin/
13329                ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13330                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljava"
13331            fi
13332        fi
13333
13334        # Sun JDK 1.4 and 1.5 for Win32 (client JVM)
13335
13336        F=lib/jvm.lib
13337        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13338
13339    echo Looking for $ac_java_jvm_dir/$F >&5
13340    echo Looking for $ac_java_jvm_dir/$F
13341
13342            if test -f $ac_java_jvm_dir/$F ; then
13343                # jre/bin/client must contain jvm.dll
13344                # jre/bin/server directory could also contain jvm.dll,
13345                # just assume the user wants to use the client JVM.
13346                DLL=jre/bin/client/jvm.dll
13347                if test -f $ac_java_jvm_dir/$DLL ; then
13348
13349    echo Found $ac_java_jvm_dir/$F >&5
13350    echo Found $ac_java_jvm_dir/$F
13351
13352                    D1=$ac_java_jvm_dir/jre/bin
13353                    D2=$ac_java_jvm_dir/jre/bin/client
13354                    ac_java_jvm_jni_lib_runtime_path="${D1}:${D2}"
13355                    ac_java_jvm_jni_lib_flags="$ac_java_jvm_dir/$F"
13356                fi
13357            fi
13358        fi
13359    fi
13360
13361        # Under GNU/Debian on a mipsel CPU, uname -m is still returning mips
13362        # causing a confusion with mips... Therefor, I have to hardcode this
13363        # test
13364        # Note that most of the code is duplicated from
13365        # Sun/Blackdown 1.4 for Linux (client JVM) tests
13366        F=jre/lib/mipsel/libjava.so
13367        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13368
13369    echo Looking for $ac_java_jvm_dir/$F >&5
13370    echo Looking for $ac_java_jvm_dir/$F
13371
13372            if test -f $ac_java_jvm_dir/$F ; then
13373
13374    echo Found $ac_java_jvm_dir/$F >&5
13375    echo Found $ac_java_jvm_dir/$F
13376
13377                D=`dirname $ac_java_jvm_dir/$F`
13378                ac_java_jvm_jni_lib_runtime_path=$D
13379                ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify"
13380                D=$ac_java_jvm_dir/jre/lib/mipsel/client
13381        if test ! -f $D/libjvm.so; then # Check if it is in the client or server directory
13382            # Try the server directory
13383            D=$ac_java_jvm_dir/jre/lib/mipsel/server
13384        fi
13385                ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13386                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm -pthread"
13387                D=$ac_java_jvm_dir/jre/lib/mipsel/native_threads
13388                if test -d $D; then
13389                  ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
13390                  ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D"
13391                fi
13392            fi
13393        fi
13394
13395    # Generate error for unsupported JVM layout
13396
13397    if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
13398        as_fn_error $? "Could not detect the location of the Java
13399            shared library. You will need to update java.m4
13400            to add support for this JVM configuration." "$LINENO" 5
13401    fi
13402
13403
13404    echo Using the following JNI library flags $ac_java_jvm_jni_lib_flags >&5
13405    echo Using the following JNI library flags $ac_java_jvm_jni_lib_flags
13406
13407
13408    echo Using the following runtime library path $ac_java_jvm_jni_lib_runtime_path >&5
13409    echo Using the following runtime library path $ac_java_jvm_jni_lib_runtime_path
13410
13411
13412
13413    echo Using LD_PRELOAD=$ac_java_jvm_ld_preload >&5
13414
13415
13416
13417    echo Using LD_BIND_NOW=$ac_java_jvm_ld_bind_now >&5
13418
13419
13420
13421    # Make sure we can compile and link a trivial JNI program
13422
13423
13424
13425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we can link a JNI application" >&5
13426$as_echo_n "checking to see if we can link a JNI application... " >&6; }
13427if ${ac_cv_java_jvm_working_jni_link+:} false; then :
13428  $as_echo_n "(cached) " >&6
13429else
13430
13431        ac_ext=c
13432ac_cpp='$CPP $CPPFLAGS'
13433ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13434ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13435ac_compiler_gnu=$ac_cv_c_compiler_gnu
13436
13437        ac_saved_cflags=$CFLAGS
13438        ac_saved_libs=$LIBS
13439        CFLAGS="$CFLAGS $ac_java_jvm_jni_include_flags"
13440        LIBS="$LIBS $ac_java_jvm_jni_lib_flags"
13441        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13442/* end confdefs.h.  */
13443
13444            #include <jni.h>
13445
13446int
13447main ()
13448{
13449$libSymbolToTest(NULL,0,NULL);
13450  ;
13451  return 0;
13452}
13453_ACEOF
13454if ac_fn_c_try_link "$LINENO"; then :
13455  ac_cv_java_jvm_working_jni_link=yes
13456else
13457  ac_cv_java_jvm_working_jni_link=no
13458fi
13459rm -f core conftest.err conftest.$ac_objext \
13460    conftest$ac_exeext conftest.$ac_ext
13461        ac_ext=c
13462ac_cpp='$CPP $CPPFLAGS'
13463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13465ac_compiler_gnu=$ac_cv_c_compiler_gnu
13466
13467        CFLAGS=$ac_saved_cflags
13468        LIBS=$ac_saved_libs
13469
13470fi
13471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_java_jvm_working_jni_link" >&5
13472$as_echo "$ac_cv_java_jvm_working_jni_link" >&6; }
13473
13474    # gcc can't link with some JDK .lib files under Win32.
13475    # Work around this problem by linking with win/libjvm.dll.a
13476
13477    if test "$ac_cv_java_jvm_working_jni_link" != "yes" &&
13478      test "$ac_cv_tcl_win32" = "yes"; then
13479        ac_ext=c
13480ac_cpp='$CPP $CPPFLAGS'
13481ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13482ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13483ac_compiler_gnu=$ac_cv_c_compiler_gnu
13484
13485        ac_saved_cflags=$CFLAGS
13486        ac_saved_libs=$LIBS
13487        CFLAGS="$CFLAGS $ac_java_jvm_jni_include_flags"
13488        LIBS="$LIBS -L$srcdir/win -ljvm"
13489        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13490/* end confdefs.h.  */
13491
13492            #include <jni.h>
13493
13494int
13495main ()
13496{
13497$libSymbolToTest(NULL,0,NULL);
13498  ;
13499  return 0;
13500}
13501_ACEOF
13502if ac_fn_c_try_link "$LINENO"; then :
13503  ac_cv_java_jvm_working_jni_link=yes
13504else
13505  ac_cv_java_jvm_working_jni_link=no
13506fi
13507rm -f core conftest.err conftest.$ac_objext \
13508    conftest$ac_exeext conftest.$ac_ext
13509        ac_ext=c
13510ac_cpp='$CPP $CPPFLAGS'
13511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13513ac_compiler_gnu=$ac_cv_c_compiler_gnu
13514
13515        CFLAGS=$ac_saved_cflags
13516        LIBS=$ac_saved_libs
13517
13518        if test "$ac_cv_java_jvm_working_jni_link" = "yes"; then
13519
13520    echo Using custom JNI link lib >&5
13521    echo Using custom JNI link lib
13522
13523            ac_java_jvm_jni_lib_flags="-L$srcdir/win -ljvm -pthread"
13524        fi
13525    fi
13526
13527    if test "$ac_cv_java_jvm_working_jni_link" != "yes"; then
13528        as_fn_error $? "could not link file that includes jni.h
13529        Either the configure script does not know how to deal with
13530        this JVM configuration or the JVM install is broken or corrupted." "$LINENO" 5
13531    fi
13532
13533               JAVA_JNI_LIBS=$ac_java_jvm_jni_lib_flags
13534               JAVA_JNI_LIBS_PRELOAD=$ac_java_jvm_ld_preload
13535             ;;
13536        esac
13537
13538
13539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zip or jar files to include on CLASSPATH" >&5
13540$as_echo_n "checking for zip or jar files to include on CLASSPATH... " >&6; }
13541
13542    if test "x$ac_java_jvm_dir" = "x" ; then
13543        as_fn_error $? "jvm directory not set" "$LINENO" 5
13544    fi
13545
13546    # GNU gcj does not need to set the CLASSPATH.
13547
13548    # Assume that JDK 1.4 and newer systems will
13549    # not need to explicitly set the CLASSPATH.
13550
13551    # Append CLASSPATH if env var is set. Avoid append
13552    # under msys because CLASSPATH is in Win32 format
13553    # and we can't combine it with a msys path.
13554    if test "x$CLASSPATH" != "x" && test "$ac_cv_tcl_win32" != "yes" ; then
13555
13556    echo Adding user supplied CLASSPATH env var >&5
13557    echo Adding user supplied CLASSPATH env var
13558
13559        ac_java_classpath="${ac_java_classpath}:${CLASSPATH}"
13560    fi
13561
13562
13563    echo Using CLASSPATH=$ac_java_classpath >&5
13564
13565
13566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_java_classpath" >&5
13567$as_echo "$ac_java_classpath" >&6; }
13568
13569        JAVA_CLASSPATH=$ac_java_classpath
13570
13571
13572    ac_java_jvm_bin_dir=$ac_java_jvm_dir/bin
13573
13574
13575    if test "$cross_compiling" = "yes" ; then
13576        # Extract the first word of "java", so it can be a program name with args.
13577set dummy java; ac_word=$2
13578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13579$as_echo_n "checking for $ac_word... " >&6; }
13580if ${ac_cv_path_JAVA+:} false; then :
13581  $as_echo_n "(cached) " >&6
13582else
13583  case $JAVA in
13584  [\\/]* | ?:[\\/]*)
13585  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
13586  ;;
13587  *)
13588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13589for as_dir in $PATH
13590do
13591  IFS=$as_save_IFS
13592  test -z "$as_dir" && as_dir=.
13593    for ac_exec_ext in '' $ac_executable_extensions; do
13594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13595    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
13596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13597    break 2
13598  fi
13599done
13600  done
13601IFS=$as_save_IFS
13602
13603  ;;
13604esac
13605fi
13606JAVA=$ac_cv_path_JAVA
13607if test -n "$JAVA"; then
13608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
13609$as_echo "$JAVA" >&6; }
13610else
13611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13612$as_echo "no" >&6; }
13613fi
13614
13615
13616    else
13617        # Extract the first word of "java", so it can be a program name with args.
13618set dummy java; ac_word=$2
13619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13620$as_echo_n "checking for $ac_word... " >&6; }
13621if ${ac_cv_path_JAVA+:} false; then :
13622  $as_echo_n "(cached) " >&6
13623else
13624  case $JAVA in
13625  [\\/]* | ?:[\\/]*)
13626  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
13627  ;;
13628  *)
13629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13630for as_dir in $ac_java_jvm_bin_dir
13631do
13632  IFS=$as_save_IFS
13633  test -z "$as_dir" && as_dir=.
13634    for ac_exec_ext in '' $ac_executable_extensions; do
13635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13636    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
13637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13638    break 2
13639  fi
13640done
13641  done
13642IFS=$as_save_IFS
13643
13644  ;;
13645esac
13646fi
13647JAVA=$ac_cv_path_JAVA
13648if test -n "$JAVA"; then
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
13650$as_echo "$JAVA" >&6; }
13651else
13652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13653$as_echo "no" >&6; }
13654fi
13655
13656
13657    fi
13658
13659    # Check to see if JAVA could not be found
13660
13661
13662    if test "x$JAVA" = "x" ; then
13663        as_fn_error $? "Cannot find java" "$LINENO" 5
13664    fi
13665
13666
13667
13668    # Don't error if java_g can not be found
13669
13670    if test "$cross_compiling" = "yes" ; then
13671        # Extract the first word of "java_g", so it can be a program name with args.
13672set dummy java_g; ac_word=$2
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13674$as_echo_n "checking for $ac_word... " >&6; }
13675if ${ac_cv_path_JAVA_G+:} false; then :
13676  $as_echo_n "(cached) " >&6
13677else
13678  case $JAVA_G in
13679  [\\/]* | ?:[\\/]*)
13680  ac_cv_path_JAVA_G="$JAVA_G" # Let the user override the test with a path.
13681  ;;
13682  *)
13683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13684for as_dir in $PATH
13685do
13686  IFS=$as_save_IFS
13687  test -z "$as_dir" && as_dir=.
13688    for ac_exec_ext in '' $ac_executable_extensions; do
13689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13690    ac_cv_path_JAVA_G="$as_dir/$ac_word$ac_exec_ext"
13691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13692    break 2
13693  fi
13694done
13695  done
13696IFS=$as_save_IFS
13697
13698  ;;
13699esac
13700fi
13701JAVA_G=$ac_cv_path_JAVA_G
13702if test -n "$JAVA_G"; then
13703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_G" >&5
13704$as_echo "$JAVA_G" >&6; }
13705else
13706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13707$as_echo "no" >&6; }
13708fi
13709
13710
13711    else
13712        # Extract the first word of "java_g", so it can be a program name with args.
13713set dummy java_g; ac_word=$2
13714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13715$as_echo_n "checking for $ac_word... " >&6; }
13716if ${ac_cv_path_JAVA_G+:} false; then :
13717  $as_echo_n "(cached) " >&6
13718else
13719  case $JAVA_G in
13720  [\\/]* | ?:[\\/]*)
13721  ac_cv_path_JAVA_G="$JAVA_G" # Let the user override the test with a path.
13722  ;;
13723  *)
13724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13725for as_dir in $ac_java_jvm_bin_dir
13726do
13727  IFS=$as_save_IFS
13728  test -z "$as_dir" && as_dir=.
13729    for ac_exec_ext in '' $ac_executable_extensions; do
13730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13731    ac_cv_path_JAVA_G="$as_dir/$ac_word$ac_exec_ext"
13732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13733    break 2
13734  fi
13735done
13736  done
13737IFS=$as_save_IFS
13738
13739  ;;
13740esac
13741fi
13742JAVA_G=$ac_cv_path_JAVA_G
13743if test -n "$JAVA_G"; then
13744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_G" >&5
13745$as_echo "$JAVA_G" >&6; }
13746else
13747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13748$as_echo "no" >&6; }
13749fi
13750
13751
13752    fi
13753
13754    # Check to see if JAVA_G could not be found
13755
13756
13757
13758
13759    if test "x$JAVA_G" = "x" ; then
13760        JAVA_G=$JAVA
13761    fi
13762
13763
13764    if test "$cross_compiling" = "yes" ; then
13765        # Extract the first word of "jar", so it can be a program name with args.
13766set dummy jar; ac_word=$2
13767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13768$as_echo_n "checking for $ac_word... " >&6; }
13769if ${ac_cv_path_JAR+:} false; then :
13770  $as_echo_n "(cached) " >&6
13771else
13772  case $JAR in
13773  [\\/]* | ?:[\\/]*)
13774  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
13775  ;;
13776  *)
13777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13778for as_dir in $PATH
13779do
13780  IFS=$as_save_IFS
13781  test -z "$as_dir" && as_dir=.
13782    for ac_exec_ext in '' $ac_executable_extensions; do
13783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13784    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
13785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13786    break 2
13787  fi
13788done
13789  done
13790IFS=$as_save_IFS
13791
13792  ;;
13793esac
13794fi
13795JAR=$ac_cv_path_JAR
13796if test -n "$JAR"; then
13797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
13798$as_echo "$JAR" >&6; }
13799else
13800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13801$as_echo "no" >&6; }
13802fi
13803
13804
13805    else
13806        # Extract the first word of "jar", so it can be a program name with args.
13807set dummy jar; ac_word=$2
13808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13809$as_echo_n "checking for $ac_word... " >&6; }
13810if ${ac_cv_path_JAR+:} false; then :
13811  $as_echo_n "(cached) " >&6
13812else
13813  case $JAR in
13814  [\\/]* | ?:[\\/]*)
13815  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
13816  ;;
13817  *)
13818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13819for as_dir in $ac_java_jvm_bin_dir
13820do
13821  IFS=$as_save_IFS
13822  test -z "$as_dir" && as_dir=.
13823    for ac_exec_ext in '' $ac_executable_extensions; do
13824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13825    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
13826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13827    break 2
13828  fi
13829done
13830  done
13831IFS=$as_save_IFS
13832
13833  ;;
13834esac
13835fi
13836JAR=$ac_cv_path_JAR
13837if test -n "$JAR"; then
13838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
13839$as_echo "$JAR" >&6; }
13840else
13841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13842$as_echo "no" >&6; }
13843fi
13844
13845
13846    fi
13847
13848    # Check to see if JAR could not be found
13849
13850
13851    if test "x$JAR" = "x" ; then
13852        as_fn_error $? "Cannot find jar" "$LINENO" 5
13853    fi
13854
13855
13856
13857
13858    if test "$cross_compiling" = "yes" ; then
13859        # Extract the first word of "javadoc", so it can be a program name with args.
13860set dummy javadoc; ac_word=$2
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13862$as_echo_n "checking for $ac_word... " >&6; }
13863if ${ac_cv_path_JAVADOC+:} false; then :
13864  $as_echo_n "(cached) " >&6
13865else
13866  case $JAVADOC in
13867  [\\/]* | ?:[\\/]*)
13868  ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
13869  ;;
13870  *)
13871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13872for as_dir in $PATH
13873do
13874  IFS=$as_save_IFS
13875  test -z "$as_dir" && as_dir=.
13876    for ac_exec_ext in '' $ac_executable_extensions; do
13877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13878    ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
13879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13880    break 2
13881  fi
13882done
13883  done
13884IFS=$as_save_IFS
13885
13886  ;;
13887esac
13888fi
13889JAVADOC=$ac_cv_path_JAVADOC
13890if test -n "$JAVADOC"; then
13891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5
13892$as_echo "$JAVADOC" >&6; }
13893else
13894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13895$as_echo "no" >&6; }
13896fi
13897
13898
13899    else
13900        # Extract the first word of "javadoc", so it can be a program name with args.
13901set dummy javadoc; ac_word=$2
13902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13903$as_echo_n "checking for $ac_word... " >&6; }
13904if ${ac_cv_path_JAVADOC+:} false; then :
13905  $as_echo_n "(cached) " >&6
13906else
13907  case $JAVADOC in
13908  [\\/]* | ?:[\\/]*)
13909  ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
13910  ;;
13911  *)
13912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13913for as_dir in $ac_java_jvm_bin_dir
13914do
13915  IFS=$as_save_IFS
13916  test -z "$as_dir" && as_dir=.
13917    for ac_exec_ext in '' $ac_executable_extensions; do
13918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13919    ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
13920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13921    break 2
13922  fi
13923done
13924  done
13925IFS=$as_save_IFS
13926
13927  ;;
13928esac
13929fi
13930JAVADOC=$ac_cv_path_JAVADOC
13931if test -n "$JAVADOC"; then
13932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5
13933$as_echo "$JAVADOC" >&6; }
13934else
13935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13936$as_echo "no" >&6; }
13937fi
13938
13939
13940    fi
13941
13942    # Check to see if JAVADOC could not be found
13943
13944
13945    if test "x$JAVADOC" = "x" ; then
13946        as_fn_error $? "Cannot find javadoc" "$LINENO" 5
13947    fi
13948
13949
13950
13951    # Don't error if jdb can not be found
13952
13953    if test "$cross_compiling" = "yes" ; then
13954        # Extract the first word of "jdb", so it can be a program name with args.
13955set dummy jdb; ac_word=$2
13956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13957$as_echo_n "checking for $ac_word... " >&6; }
13958if ${ac_cv_path_JDB+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  case $JDB in
13962  [\\/]* | ?:[\\/]*)
13963  ac_cv_path_JDB="$JDB" # Let the user override the test with a path.
13964  ;;
13965  *)
13966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13967for as_dir in $PATH
13968do
13969  IFS=$as_save_IFS
13970  test -z "$as_dir" && as_dir=.
13971    for ac_exec_ext in '' $ac_executable_extensions; do
13972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13973    ac_cv_path_JDB="$as_dir/$ac_word$ac_exec_ext"
13974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13975    break 2
13976  fi
13977done
13978  done
13979IFS=$as_save_IFS
13980
13981  ;;
13982esac
13983fi
13984JDB=$ac_cv_path_JDB
13985if test -n "$JDB"; then
13986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDB" >&5
13987$as_echo "$JDB" >&6; }
13988else
13989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13990$as_echo "no" >&6; }
13991fi
13992
13993
13994    else
13995        # Extract the first word of "jdb", so it can be a program name with args.
13996set dummy jdb; ac_word=$2
13997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13998$as_echo_n "checking for $ac_word... " >&6; }
13999if ${ac_cv_path_JDB+:} false; then :
14000  $as_echo_n "(cached) " >&6
14001else
14002  case $JDB in
14003  [\\/]* | ?:[\\/]*)
14004  ac_cv_path_JDB="$JDB" # Let the user override the test with a path.
14005  ;;
14006  *)
14007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14008for as_dir in $ac_java_jvm_bin_dir
14009do
14010  IFS=$as_save_IFS
14011  test -z "$as_dir" && as_dir=.
14012    for ac_exec_ext in '' $ac_executable_extensions; do
14013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14014    ac_cv_path_JDB="$as_dir/$ac_word$ac_exec_ext"
14015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14016    break 2
14017  fi
14018done
14019  done
14020IFS=$as_save_IFS
14021
14022  ;;
14023esac
14024fi
14025JDB=$ac_cv_path_JDB
14026if test -n "$JDB"; then
14027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDB" >&5
14028$as_echo "$JDB" >&6; }
14029else
14030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14031$as_echo "no" >&6; }
14032fi
14033
14034
14035    fi
14036
14037    # Check to see if JDB could not be found
14038
14039
14040
14041
14042    case "$ac_java_jvm_version" in
14043        *)
14044            # JDK on Win32 does not allow connection with suspend=n
14045            if test "$ac_cv_tcl_win32" = "yes"; then
14046                suspend="y"
14047            else
14048                suspend="n"
14049            fi
14050            JDB_ATTACH_FLAGS="-attach 8757"
14051            JAVA_G_FLAGS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8757,server=y,suspend=$suspend"
14052            JDB_ATTACH_FLAGS="-attach 8757"
14053            ;;
14054    esac
14055
14056
14057
14058# Check whether --with-ant was given.
14059if test "${with_ant+set}" = set; then :
14060  withval=$with_ant; ANTPATH=$withval
14061else
14062  ANTPATH=no
14063fi
14064
14065    if test "$ANTPATH" = "no" ; then
14066        if test -d "$SCI_SRCDIR_FULL/java/ant"; then # Scilab thirdparties
14067            ANTPATH=$SCI_SRCDIR_FULL/java/ant
14068
14069    if test "$cross_compiling" = "yes" ; then
14070        # Extract the first word of "ant", so it can be a program name with args.
14071set dummy ant; ac_word=$2
14072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14073$as_echo_n "checking for $ac_word... " >&6; }
14074if ${ac_cv_path_ANT+:} false; then :
14075  $as_echo_n "(cached) " >&6
14076else
14077  case $ANT in
14078  [\\/]* | ?:[\\/]*)
14079  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
14080  ;;
14081  *)
14082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14083for as_dir in $PATH
14084do
14085  IFS=$as_save_IFS
14086  test -z "$as_dir" && as_dir=.
14087    for ac_exec_ext in '' $ac_executable_extensions; do
14088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14089    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
14090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14091    break 2
14092  fi
14093done
14094  done
14095IFS=$as_save_IFS
14096
14097  ;;
14098esac
14099fi
14100ANT=$ac_cv_path_ANT
14101if test -n "$ANT"; then
14102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
14103$as_echo "$ANT" >&6; }
14104else
14105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14106$as_echo "no" >&6; }
14107fi
14108
14109
14110    else
14111        # Extract the first word of "ant", so it can be a program name with args.
14112set dummy ant; ac_word=$2
14113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14114$as_echo_n "checking for $ac_word... " >&6; }
14115if ${ac_cv_path_ANT+:} false; then :
14116  $as_echo_n "(cached) " >&6
14117else
14118  case $ANT in
14119  [\\/]* | ?:[\\/]*)
14120  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
14121  ;;
14122  *)
14123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14124for as_dir in $ANTPATH/bin $ANTPATH
14125do
14126  IFS=$as_save_IFS
14127  test -z "$as_dir" && as_dir=.
14128    for ac_exec_ext in '' $ac_executable_extensions; do
14129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14130    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
14131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14132    break 2
14133  fi
14134done
14135  done
14136IFS=$as_save_IFS
14137
14138  ;;
14139esac
14140fi
14141ANT=$ac_cv_path_ANT
14142if test -n "$ANT"; then
14143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
14144$as_echo "$ANT" >&6; }
14145else
14146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14147$as_echo "no" >&6; }
14148fi
14149
14150
14151    fi
14152
14153    # Check to see if ANT could not be found
14154
14155
14156    if test "x$ANT" = "x" ; then
14157        as_fn_error $? "Cannot find ant" "$LINENO" 5
14158    fi
14159
14160
14161        else
14162
14163    if test "$cross_compiling" = "yes" ; then
14164        # Extract the first word of "ant", so it can be a program name with args.
14165set dummy ant; ac_word=$2
14166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14167$as_echo_n "checking for $ac_word... " >&6; }
14168if ${ac_cv_path_ANT+:} false; then :
14169  $as_echo_n "(cached) " >&6
14170else
14171  case $ANT in
14172  [\\/]* | ?:[\\/]*)
14173  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
14174  ;;
14175  *)
14176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14177for as_dir in $PATH
14178do
14179  IFS=$as_save_IFS
14180  test -z "$as_dir" && as_dir=.
14181    for ac_exec_ext in '' $ac_executable_extensions; do
14182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14183    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
14184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14185    break 2
14186  fi
14187done
14188  done
14189IFS=$as_save_IFS
14190
14191  ;;
14192esac
14193fi
14194ANT=$ac_cv_path_ANT
14195if test -n "$ANT"; then
14196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
14197$as_echo "$ANT" >&6; }
14198else
14199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14200$as_echo "no" >&6; }
14201fi
14202
14203
14204    else
14205        # Extract the first word of "ant", so it can be a program name with args.
14206set dummy ant; ac_word=$2
14207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14208$as_echo_n "checking for $ac_word... " >&6; }
14209if ${ac_cv_path_ANT+:} false; then :
14210  $as_echo_n "(cached) " >&6
14211else
14212  case $ANT in
14213  [\\/]* | ?:[\\/]*)
14214  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
14215  ;;
14216  *)
14217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14218for as_dir in $PATH
14219do
14220  IFS=$as_save_IFS
14221  test -z "$as_dir" && as_dir=.
14222    for ac_exec_ext in '' $ac_executable_extensions; do
14223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14224    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
14225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14226    break 2
14227  fi
14228done
14229  done
14230IFS=$as_save_IFS
14231
14232  ;;
14233esac
14234fi
14235ANT=$ac_cv_path_ANT
14236if test -n "$ANT"; then
14237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
14238$as_echo "$ANT" >&6; }
14239else
14240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14241$as_echo "no" >&6; }
14242fi
14243
14244
14245    fi
14246
14247    # Check to see if ANT could not be found
14248
14249
14250    if test "x$ANT" = "x" ; then
14251        as_fn_error $? "Cannot find ant" "$LINENO" 5
14252    fi
14253
14254
14255        fi
14256    elif test ! -d "$ANTPATH"; then
14257        as_fn_error $? "--with-ant=DIR option, must pass a valid DIR" "$LINENO" 5
14258    else
14259
14260    if test "$cross_compiling" = "yes" ; then
14261        # Extract the first word of "ant", so it can be a program name with args.
14262set dummy ant; ac_word=$2
14263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14264$as_echo_n "checking for $ac_word... " >&6; }
14265if ${ac_cv_path_ANT+:} false; then :
14266  $as_echo_n "(cached) " >&6
14267else
14268  case $ANT in
14269  [\\/]* | ?:[\\/]*)
14270  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
14271  ;;
14272  *)
14273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14274for as_dir in $PATH
14275do
14276  IFS=$as_save_IFS
14277  test -z "$as_dir" && as_dir=.
14278    for ac_exec_ext in '' $ac_executable_extensions; do
14279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14280    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
14281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14282    break 2
14283  fi
14284done
14285  done
14286IFS=$as_save_IFS
14287
14288  ;;
14289esac
14290fi
14291ANT=$ac_cv_path_ANT
14292if test -n "$ANT"; then
14293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
14294$as_echo "$ANT" >&6; }
14295else
14296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14297$as_echo "no" >&6; }
14298fi
14299
14300
14301    else
14302        # Extract the first word of "ant", so it can be a program name with args.
14303set dummy ant; ac_word=$2
14304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14305$as_echo_n "checking for $ac_word... " >&6; }
14306if ${ac_cv_path_ANT+:} false; then :
14307  $as_echo_n "(cached) " >&6
14308else
14309  case $ANT in
14310  [\\/]* | ?:[\\/]*)
14311  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
14312  ;;
14313  *)
14314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14315for as_dir in $ANTPATH/bin $ANTPATH
14316do
14317  IFS=$as_save_IFS
14318  test -z "$as_dir" && as_dir=.
14319    for ac_exec_ext in '' $ac_executable_extensions; do
14320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14321    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
14322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14323    break 2
14324  fi
14325done
14326  done
14327IFS=$as_save_IFS
14328
14329  ;;
14330esac
14331fi
14332ANT=$ac_cv_path_ANT
14333if test -n "$ANT"; then
14334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
14335$as_echo "$ANT" >&6; }
14336else
14337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14338$as_echo "no" >&6; }
14339fi
14340
14341
14342    fi
14343
14344    # Check to see if ANT could not be found
14345
14346
14347    if test "x$ANT" = "x" ; then
14348        as_fn_error $? "Cannot find ant" "$LINENO" 5
14349    fi
14350
14351
14352    fi
14353
14354
14355        case "$host_os" in
14356             *Darwin* | *darwin*)
14357                  JAVA_HOME=""
14358             ;;
14359        esac
14360
14361
14362        if test "$with_gui" != no; then
14363
14364                if test "$with_xcos" != no; then
14365                   # jgraphx
14366
14367    cat << \EOF > conftestSharedChecker.java
14368// #line 14368 "configure"
14369import java.util.regex.Pattern;
14370import java.io.File;
14371import java.io.IOException;
14372import java.lang.reflect.Field;
14373import java.lang.reflect.InvocationTargetException;
14374import java.lang.reflect.Method;
14375import java.net.URL;
14376import java.net.URLClassLoader;
14377import java.util.ArrayList;
14378
14379public class conftestSharedChecker {
14380
14381    /**
14382     * Required arguments :
14383     *  argv[0]: name of the jar package
14384     *  argv[1]: name of the class (with the package prefix)
14385     *  argv[2]: possible paths of the jar package (separated by ':')
14386     *
14387     * Optional arguments:
14388     *  argv[3]: field or method used to retrieve the version
14389     *  argv[4]: expected version
14390     *  argv[5]: String comparator :
14391     *      "="  for exact version
14392     */
14393    public static void main(String[] argv) {
14394        final String packageName = argv[0];
14395        final String className = argv[1];
14396        final String[] jarList = argv[2].split(":");
14397
14398        ArrayList<URL> found = new ArrayList<>();
14399        for(String jar : jarList)
14400        {
14401            try {
14402                File f = new File(jar);
14403                if (f.exists()) {
14404                    found.add(f.toURI().toURL());
14405                }
14406            } catch (IOException ex) {
14407                System.err.println(ex.toString());
14408            }
14409        }
14410
14411        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
14412        URL klassURL = null;
14413        Class<?> klass = null;
14414        try {
14415            String resourceName = className.replace(".", "/") + ".class";
14416            klassURL = localClassLoader.getResource(resourceName);
14417            klass = localClassLoader.loadClass(className);
14418        } catch (ClassNotFoundException ex) {
14419            System.err.println(className + " not found");
14420            System.exit(-1);
14421        }
14422
14423        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
14424        String path = pathURL.substring(pathURL.indexOf(':') + 1);
14425        System.err.println("found: " + path);
14426
14427        String version;
14428        if (!"".equals(argv[3])) {
14429            version = checkVersion(klass, argv);
14430        } else {
14431            version = klass.getPackage().getSpecificationVersion();
14432        }
14433
14434        System.out.println(path + " " + version);
14435    }
14436
14437    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
14438        final String versionMethod = argv[3];
14439        final String expected = argv[4];
14440        final String atLeastOrEqual;
14441        if (!"".equals(argv[5])) {
14442            atLeastOrEqual = argv[5];
14443        } else {
14444            atLeastOrEqual = "<=";
14445        }
14446
14447        String value = "";
14448        if (versionMethod.isEmpty()) {
14449            value = klass.getPackage().getSpecificationVersion();
14450            compareAndDisplay(atLeastOrEqual, expected, value);
14451            return value;
14452        }
14453
14454        try {
14455            try {
14456                Field field = klass.getField(versionMethod);
14457                value = String.valueOf(field.get(null));
14458                compareAndDisplay(atLeastOrEqual, expected, value);
14459            } catch (NoSuchFieldException fe) {
14460                Method method = null;
14461                try {
14462                    method = klass.getMethod(versionMethod);
14463                } catch (NoSuchMethodException ex) {
14464                    System.err.println(ex.toString());
14465                    System.exit(-3);
14466                }
14467
14468                try {
14469                    value = String.valueOf(method.invoke(null));
14470                    compareAndDisplay(atLeastOrEqual, expected, value);
14471                } catch (NullPointerException ex) {
14472                    value = String.valueOf(method.invoke(klass.newInstance()));
14473                    compareAndDisplay(atLeastOrEqual, expected, value);
14474                }
14475            }
14476        } catch (IllegalAccessException ex) {
14477            System.err.println(ex);
14478            System.exit(-2);
14479        } catch (InvocationTargetException ex) {
14480            System.err.println(ex);
14481            System.exit(-2);
14482        } catch (InstantiationException ex) {
14483            System.err.println(ex);
14484            System.exit(-2);
14485        }
14486        return value;
14487    }
14488
14489    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
14490        int cmp = compare(expected, value);
14491
14492        switch(atLeastOrEqual) {
14493            case ">":
14494                if (cmp > 0) {
14495                    return;
14496                } else {
14497                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14498                    System.exit(-4);
14499                }
14500            case "==":
14501                if (cmp == 0) {
14502                    return;
14503                } else {
14504                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14505                    System.exit(-4);
14506                }
14507            case "<=":
14508                if (cmp <= 0) {
14509                    return;
14510                } else {
14511                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14512                    System.exit(-4);
14513                }
14514            default:
14515                System.err.println("unable to compare with "+atLeastOrEqual);
14516                System.exit(-4);
14517        }
14518    }
14519
14520    private static int compare(String v1, String v2) {
14521        String s1 = normalisedVersion(v1);
14522        String s2 = normalisedVersion(v2);
14523
14524        System.err.println("compare: " + v1 + " normalised to " + s1);
14525        System.err.println("compare: " + v2 + " normalised to " + s2);
14526        return s1.compareTo(s2);
14527    }
14528
14529    private static String normalisedVersion(String version) {
14530        return normalisedVersion(version, ".", 4);
14531    }
14532
14533    private static String normalisedVersion(String version, String sep, int maxWidth) {
14534        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
14535        StringBuilder sb = new StringBuilder();
14536        for (String s : split) {
14537            sb.append(String.format("%" + maxWidth + 's', s));
14538        }
14539        return sb.toString();
14540    }
14541}
14542EOF
14543
14544    CLASSPATH=$ac_java_classpath
14545    export CLASSPATH
14546    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
14547    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
14548        echo "configure: conftestSharedChecker.class available" >&5
14549    else
14550        echo "configure: failed program was:" >&5
14551        cat conftestSharedChecker.java >&5
14552        echo "configure: CLASSPATH was $CLASSPATH" >&5
14553    fi
14554
14555
14556
14557
14558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jgraphx" >&5
14559$as_echo_n "checking jgraphx... " >&6; }
14560    PACKAGE_JAR_FILE=
14561
14562    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
14563
14564    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jgraphx.jar' -or -name 'libjgraphx.jar' -or -name 'libjgraphx-java.jar' -or -name 'jgraphx*.jar' \) 2>/dev/null |tr '\n' ':')."
14565
14566    if test ! -f conftestSharedChecker.class ; then
14567
14568    cat << \EOF > conftestSharedChecker.java
14569// #line 14569 "configure"
14570import java.util.regex.Pattern;
14571import java.io.File;
14572import java.io.IOException;
14573import java.lang.reflect.Field;
14574import java.lang.reflect.InvocationTargetException;
14575import java.lang.reflect.Method;
14576import java.net.URL;
14577import java.net.URLClassLoader;
14578import java.util.ArrayList;
14579
14580public class conftestSharedChecker {
14581
14582    /**
14583     * Required arguments :
14584     *  argv[0]: name of the jar package
14585     *  argv[1]: name of the class (with the package prefix)
14586     *  argv[2]: possible paths of the jar package (separated by ':')
14587     *
14588     * Optional arguments:
14589     *  argv[3]: field or method used to retrieve the version
14590     *  argv[4]: expected version
14591     *  argv[5]: String comparator :
14592     *      "="  for exact version
14593     */
14594    public static void main(String[] argv) {
14595        final String packageName = argv[0];
14596        final String className = argv[1];
14597        final String[] jarList = argv[2].split(":");
14598
14599        ArrayList<URL> found = new ArrayList<>();
14600        for(String jar : jarList)
14601        {
14602            try {
14603                File f = new File(jar);
14604                if (f.exists()) {
14605                    found.add(f.toURI().toURL());
14606                }
14607            } catch (IOException ex) {
14608                System.err.println(ex.toString());
14609            }
14610        }
14611
14612        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
14613        URL klassURL = null;
14614        Class<?> klass = null;
14615        try {
14616            String resourceName = className.replace(".", "/") + ".class";
14617            klassURL = localClassLoader.getResource(resourceName);
14618            klass = localClassLoader.loadClass(className);
14619        } catch (ClassNotFoundException ex) {
14620            System.err.println(className + " not found");
14621            System.exit(-1);
14622        }
14623
14624        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
14625        String path = pathURL.substring(pathURL.indexOf(':') + 1);
14626        System.err.println("found: " + path);
14627
14628        String version;
14629        if (!"".equals(argv[3])) {
14630            version = checkVersion(klass, argv);
14631        } else {
14632            version = klass.getPackage().getSpecificationVersion();
14633        }
14634
14635        System.out.println(path + " " + version);
14636    }
14637
14638    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
14639        final String versionMethod = argv[3];
14640        final String expected = argv[4];
14641        final String atLeastOrEqual;
14642        if (!"".equals(argv[5])) {
14643            atLeastOrEqual = argv[5];
14644        } else {
14645            atLeastOrEqual = "<=";
14646        }
14647
14648        String value = "";
14649        if (versionMethod.isEmpty()) {
14650            value = klass.getPackage().getSpecificationVersion();
14651            compareAndDisplay(atLeastOrEqual, expected, value);
14652            return value;
14653        }
14654
14655        try {
14656            try {
14657                Field field = klass.getField(versionMethod);
14658                value = String.valueOf(field.get(null));
14659                compareAndDisplay(atLeastOrEqual, expected, value);
14660            } catch (NoSuchFieldException fe) {
14661                Method method = null;
14662                try {
14663                    method = klass.getMethod(versionMethod);
14664                } catch (NoSuchMethodException ex) {
14665                    System.err.println(ex.toString());
14666                    System.exit(-3);
14667                }
14668
14669                try {
14670                    value = String.valueOf(method.invoke(null));
14671                    compareAndDisplay(atLeastOrEqual, expected, value);
14672                } catch (NullPointerException ex) {
14673                    value = String.valueOf(method.invoke(klass.newInstance()));
14674                    compareAndDisplay(atLeastOrEqual, expected, value);
14675                }
14676            }
14677        } catch (IllegalAccessException ex) {
14678            System.err.println(ex);
14679            System.exit(-2);
14680        } catch (InvocationTargetException ex) {
14681            System.err.println(ex);
14682            System.exit(-2);
14683        } catch (InstantiationException ex) {
14684            System.err.println(ex);
14685            System.exit(-2);
14686        }
14687        return value;
14688    }
14689
14690    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
14691        int cmp = compare(expected, value);
14692
14693        switch(atLeastOrEqual) {
14694            case ">":
14695                if (cmp > 0) {
14696                    return;
14697                } else {
14698                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14699                    System.exit(-4);
14700                }
14701            case "==":
14702                if (cmp == 0) {
14703                    return;
14704                } else {
14705                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14706                    System.exit(-4);
14707                }
14708            case "<=":
14709                if (cmp <= 0) {
14710                    return;
14711                } else {
14712                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14713                    System.exit(-4);
14714                }
14715            default:
14716                System.err.println("unable to compare with "+atLeastOrEqual);
14717                System.exit(-4);
14718        }
14719    }
14720
14721    private static int compare(String v1, String v2) {
14722        String s1 = normalisedVersion(v1);
14723        String s2 = normalisedVersion(v2);
14724
14725        System.err.println("compare: " + v1 + " normalised to " + s1);
14726        System.err.println("compare: " + v2 + " normalised to " + s2);
14727        return s1.compareTo(s2);
14728    }
14729
14730    private static String normalisedVersion(String version) {
14731        return normalisedVersion(version, ".", 4);
14732    }
14733
14734    private static String normalisedVersion(String version, String sep, int maxWidth) {
14735        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
14736        StringBuilder sb = new StringBuilder();
14737        for (String s : split) {
14738            sb.append(String.format("%" + maxWidth + 's', s));
14739        }
14740        return sb.toString();
14741    }
14742}
14743EOF
14744
14745    CLASSPATH=$ac_java_classpath
14746    export CLASSPATH
14747    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
14748    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
14749        echo "configure: conftestSharedChecker.class available" >&5
14750    else
14751        echo "configure: failed program was:" >&5
14752        cat conftestSharedChecker.java >&5
14753        echo "configure: CLASSPATH was $CLASSPATH" >&5
14754    fi
14755
14756    fi
14757
14758    CLASSPATH=$ac_java_classpath
14759    export CLASSPATH
14760    echo "CLASSPATH="$CLASSPATH >&5
14761    cmd="$JAVA conftestSharedChecker \"jgraphx\" \"com.mxgraph.view.mxGraph\" \"$jar_resolved\" \"VERSION\" \"2.0.0.1\" \"\""
14762    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
14763        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
14764$(tail -n 1 conftestSharedChecker.java.output)
14765EOF
14766        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
14767$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
14768        echo "yes" >&5
14769        # append the found file to the classpath to manage jar dependency
14770        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
14771    else
14772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14773$as_echo "no" >&6; }
14774      if test "" = "yes"; then
14775         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jgraphx used by Diagram design (looking for package com.mxgraph.view.mxGraph)" >&5
14776$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jgraphx used by Diagram design (looking for package com.mxgraph.view.mxGraph)" >&2;}
14777      else
14778          as_fn_error $? "Could not find or use the Java package/jar jgraphx used by Diagram design (looking for package com.mxgraph.view.mxGraph)" "$LINENO" 5
14779      fi
14780    fi
14781    if test -f conftestSharedChecker.java.output; then
14782        rm conftestSharedChecker.java.output
14783    fi
14784
14785                   JGRAPHX=$PACKAGE_JAR_FILE
14786
14787                fi
14788
14789                if test "$with_external_scirenderer" = yes; then
14790                   # scirenderer
14791
14792
14793
14794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking scirenderer" >&5
14795$as_echo_n "checking scirenderer... " >&6; }
14796    PACKAGE_JAR_FILE=
14797
14798    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
14799
14800    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'scirenderer.jar' -or -name 'libscirenderer.jar' -or -name 'libscirenderer-java.jar' -or -name 'scirenderer*.jar' \) 2>/dev/null |tr '\n' ':')."
14801
14802    if test ! -f conftestSharedChecker.class ; then
14803
14804    cat << \EOF > conftestSharedChecker.java
14805// #line 14805 "configure"
14806import java.util.regex.Pattern;
14807import java.io.File;
14808import java.io.IOException;
14809import java.lang.reflect.Field;
14810import java.lang.reflect.InvocationTargetException;
14811import java.lang.reflect.Method;
14812import java.net.URL;
14813import java.net.URLClassLoader;
14814import java.util.ArrayList;
14815
14816public class conftestSharedChecker {
14817
14818    /**
14819     * Required arguments :
14820     *  argv[0]: name of the jar package
14821     *  argv[1]: name of the class (with the package prefix)
14822     *  argv[2]: possible paths of the jar package (separated by ':')
14823     *
14824     * Optional arguments:
14825     *  argv[3]: field or method used to retrieve the version
14826     *  argv[4]: expected version
14827     *  argv[5]: String comparator :
14828     *      "="  for exact version
14829     */
14830    public static void main(String[] argv) {
14831        final String packageName = argv[0];
14832        final String className = argv[1];
14833        final String[] jarList = argv[2].split(":");
14834
14835        ArrayList<URL> found = new ArrayList<>();
14836        for(String jar : jarList)
14837        {
14838            try {
14839                File f = new File(jar);
14840                if (f.exists()) {
14841                    found.add(f.toURI().toURL());
14842                }
14843            } catch (IOException ex) {
14844                System.err.println(ex.toString());
14845            }
14846        }
14847
14848        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
14849        URL klassURL = null;
14850        Class<?> klass = null;
14851        try {
14852            String resourceName = className.replace(".", "/") + ".class";
14853            klassURL = localClassLoader.getResource(resourceName);
14854            klass = localClassLoader.loadClass(className);
14855        } catch (ClassNotFoundException ex) {
14856            System.err.println(className + " not found");
14857            System.exit(-1);
14858        }
14859
14860        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
14861        String path = pathURL.substring(pathURL.indexOf(':') + 1);
14862        System.err.println("found: " + path);
14863
14864        String version;
14865        if (!"".equals(argv[3])) {
14866            version = checkVersion(klass, argv);
14867        } else {
14868            version = klass.getPackage().getSpecificationVersion();
14869        }
14870
14871        System.out.println(path + " " + version);
14872    }
14873
14874    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
14875        final String versionMethod = argv[3];
14876        final String expected = argv[4];
14877        final String atLeastOrEqual;
14878        if (!"".equals(argv[5])) {
14879            atLeastOrEqual = argv[5];
14880        } else {
14881            atLeastOrEqual = "<=";
14882        }
14883
14884        String value = "";
14885        if (versionMethod.isEmpty()) {
14886            value = klass.getPackage().getSpecificationVersion();
14887            compareAndDisplay(atLeastOrEqual, expected, value);
14888            return value;
14889        }
14890
14891        try {
14892            try {
14893                Field field = klass.getField(versionMethod);
14894                value = String.valueOf(field.get(null));
14895                compareAndDisplay(atLeastOrEqual, expected, value);
14896            } catch (NoSuchFieldException fe) {
14897                Method method = null;
14898                try {
14899                    method = klass.getMethod(versionMethod);
14900                } catch (NoSuchMethodException ex) {
14901                    System.err.println(ex.toString());
14902                    System.exit(-3);
14903                }
14904
14905                try {
14906                    value = String.valueOf(method.invoke(null));
14907                    compareAndDisplay(atLeastOrEqual, expected, value);
14908                } catch (NullPointerException ex) {
14909                    value = String.valueOf(method.invoke(klass.newInstance()));
14910                    compareAndDisplay(atLeastOrEqual, expected, value);
14911                }
14912            }
14913        } catch (IllegalAccessException ex) {
14914            System.err.println(ex);
14915            System.exit(-2);
14916        } catch (InvocationTargetException ex) {
14917            System.err.println(ex);
14918            System.exit(-2);
14919        } catch (InstantiationException ex) {
14920            System.err.println(ex);
14921            System.exit(-2);
14922        }
14923        return value;
14924    }
14925
14926    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
14927        int cmp = compare(expected, value);
14928
14929        switch(atLeastOrEqual) {
14930            case ">":
14931                if (cmp > 0) {
14932                    return;
14933                } else {
14934                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14935                    System.exit(-4);
14936                }
14937            case "==":
14938                if (cmp == 0) {
14939                    return;
14940                } else {
14941                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14942                    System.exit(-4);
14943                }
14944            case "<=":
14945                if (cmp <= 0) {
14946                    return;
14947                } else {
14948                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
14949                    System.exit(-4);
14950                }
14951            default:
14952                System.err.println("unable to compare with "+atLeastOrEqual);
14953                System.exit(-4);
14954        }
14955    }
14956
14957    private static int compare(String v1, String v2) {
14958        String s1 = normalisedVersion(v1);
14959        String s2 = normalisedVersion(v2);
14960
14961        System.err.println("compare: " + v1 + " normalised to " + s1);
14962        System.err.println("compare: " + v2 + " normalised to " + s2);
14963        return s1.compareTo(s2);
14964    }
14965
14966    private static String normalisedVersion(String version) {
14967        return normalisedVersion(version, ".", 4);
14968    }
14969
14970    private static String normalisedVersion(String version, String sep, int maxWidth) {
14971        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
14972        StringBuilder sb = new StringBuilder();
14973        for (String s : split) {
14974            sb.append(String.format("%" + maxWidth + 's', s));
14975        }
14976        return sb.toString();
14977    }
14978}
14979EOF
14980
14981    CLASSPATH=$ac_java_classpath
14982    export CLASSPATH
14983    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
14984    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
14985        echo "configure: conftestSharedChecker.class available" >&5
14986    else
14987        echo "configure: failed program was:" >&5
14988        cat conftestSharedChecker.java >&5
14989        echo "configure: CLASSPATH was $CLASSPATH" >&5
14990    fi
14991
14992    fi
14993
14994    CLASSPATH=$ac_java_classpath
14995    export CLASSPATH
14996    echo "CLASSPATH="$CLASSPATH >&5
14997    cmd="$JAVA conftestSharedChecker \"scirenderer\" \"org.scilab.forge.scirenderer.PackageInfo\" \"$jar_resolved\" \"VERSION\" \"1.1.0\" \"\""
14998    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
14999        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
15000$(tail -n 1 conftestSharedChecker.java.output)
15001EOF
15002        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
15003$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
15004        echo "yes" >&5
15005        # append the found file to the classpath to manage jar dependency
15006        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
15007    else
15008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15009$as_echo "no" >&6; }
15010      if test "" = "yes"; then
15011         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar scirenderer used by Scilab Renderer (looking for package org.scilab.forge.scirenderer.PackageInfo)" >&5
15012$as_echo "$as_me: WARNING: Could not find or use the Java package/jar scirenderer used by Scilab Renderer (looking for package org.scilab.forge.scirenderer.PackageInfo)" >&2;}
15013      else
15014          as_fn_error $? "Could not find or use the Java package/jar scirenderer used by Scilab Renderer (looking for package org.scilab.forge.scirenderer.PackageInfo)" "$LINENO" 5
15015      fi
15016    fi
15017    if test -f conftestSharedChecker.java.output; then
15018        rm conftestSharedChecker.java.output
15019    fi
15020
15021                   SCIRENDERER=$PACKAGE_JAR_FILE
15022                   SCIRENDERER_CP=$PACKAGE_JAR_FILE
15023                 else
15024                   echo "Use external version of scirenderer"
15025                   # Use the scirenderer in Scilab sources
15026                   SCIRENDERER="\${modules.dir}/scirenderer/\${build.jar.dir}/scirenderer.jar"
15027                   SCIRENDERER_CP="\$SCILAB/modules/scirenderer/jar/scirenderer.jar"
15028                fi
15029
15030
15031
15032               # Docking system
15033
15034
15035
15036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking flexdock" >&5
15037$as_echo_n "checking flexdock... " >&6; }
15038    PACKAGE_JAR_FILE=
15039
15040    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
15041
15042    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'flexdock.jar' -or -name 'libflexdock.jar' -or -name 'libflexdock-java.jar' -or -name 'flexdock*.jar' \) 2>/dev/null |tr '\n' ':')."
15043
15044    if test ! -f conftestSharedChecker.class ; then
15045
15046    cat << \EOF > conftestSharedChecker.java
15047// #line 15047 "configure"
15048import java.util.regex.Pattern;
15049import java.io.File;
15050import java.io.IOException;
15051import java.lang.reflect.Field;
15052import java.lang.reflect.InvocationTargetException;
15053import java.lang.reflect.Method;
15054import java.net.URL;
15055import java.net.URLClassLoader;
15056import java.util.ArrayList;
15057
15058public class conftestSharedChecker {
15059
15060    /**
15061     * Required arguments :
15062     *  argv[0]: name of the jar package
15063     *  argv[1]: name of the class (with the package prefix)
15064     *  argv[2]: possible paths of the jar package (separated by ':')
15065     *
15066     * Optional arguments:
15067     *  argv[3]: field or method used to retrieve the version
15068     *  argv[4]: expected version
15069     *  argv[5]: String comparator :
15070     *      "="  for exact version
15071     */
15072    public static void main(String[] argv) {
15073        final String packageName = argv[0];
15074        final String className = argv[1];
15075        final String[] jarList = argv[2].split(":");
15076
15077        ArrayList<URL> found = new ArrayList<>();
15078        for(String jar : jarList)
15079        {
15080            try {
15081                File f = new File(jar);
15082                if (f.exists()) {
15083                    found.add(f.toURI().toURL());
15084                }
15085            } catch (IOException ex) {
15086                System.err.println(ex.toString());
15087            }
15088        }
15089
15090        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
15091        URL klassURL = null;
15092        Class<?> klass = null;
15093        try {
15094            String resourceName = className.replace(".", "/") + ".class";
15095            klassURL = localClassLoader.getResource(resourceName);
15096            klass = localClassLoader.loadClass(className);
15097        } catch (ClassNotFoundException ex) {
15098            System.err.println(className + " not found");
15099            System.exit(-1);
15100        }
15101
15102        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
15103        String path = pathURL.substring(pathURL.indexOf(':') + 1);
15104        System.err.println("found: " + path);
15105
15106        String version;
15107        if (!"".equals(argv[3])) {
15108            version = checkVersion(klass, argv);
15109        } else {
15110            version = klass.getPackage().getSpecificationVersion();
15111        }
15112
15113        System.out.println(path + " " + version);
15114    }
15115
15116    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
15117        final String versionMethod = argv[3];
15118        final String expected = argv[4];
15119        final String atLeastOrEqual;
15120        if (!"".equals(argv[5])) {
15121            atLeastOrEqual = argv[5];
15122        } else {
15123            atLeastOrEqual = "<=";
15124        }
15125
15126        String value = "";
15127        if (versionMethod.isEmpty()) {
15128            value = klass.getPackage().getSpecificationVersion();
15129            compareAndDisplay(atLeastOrEqual, expected, value);
15130            return value;
15131        }
15132
15133        try {
15134            try {
15135                Field field = klass.getField(versionMethod);
15136                value = String.valueOf(field.get(null));
15137                compareAndDisplay(atLeastOrEqual, expected, value);
15138            } catch (NoSuchFieldException fe) {
15139                Method method = null;
15140                try {
15141                    method = klass.getMethod(versionMethod);
15142                } catch (NoSuchMethodException ex) {
15143                    System.err.println(ex.toString());
15144                    System.exit(-3);
15145                }
15146
15147                try {
15148                    value = String.valueOf(method.invoke(null));
15149                    compareAndDisplay(atLeastOrEqual, expected, value);
15150                } catch (NullPointerException ex) {
15151                    value = String.valueOf(method.invoke(klass.newInstance()));
15152                    compareAndDisplay(atLeastOrEqual, expected, value);
15153                }
15154            }
15155        } catch (IllegalAccessException ex) {
15156            System.err.println(ex);
15157            System.exit(-2);
15158        } catch (InvocationTargetException ex) {
15159            System.err.println(ex);
15160            System.exit(-2);
15161        } catch (InstantiationException ex) {
15162            System.err.println(ex);
15163            System.exit(-2);
15164        }
15165        return value;
15166    }
15167
15168    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
15169        int cmp = compare(expected, value);
15170
15171        switch(atLeastOrEqual) {
15172            case ">":
15173                if (cmp > 0) {
15174                    return;
15175                } else {
15176                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15177                    System.exit(-4);
15178                }
15179            case "==":
15180                if (cmp == 0) {
15181                    return;
15182                } else {
15183                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15184                    System.exit(-4);
15185                }
15186            case "<=":
15187                if (cmp <= 0) {
15188                    return;
15189                } else {
15190                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15191                    System.exit(-4);
15192                }
15193            default:
15194                System.err.println("unable to compare with "+atLeastOrEqual);
15195                System.exit(-4);
15196        }
15197    }
15198
15199    private static int compare(String v1, String v2) {
15200        String s1 = normalisedVersion(v1);
15201        String s2 = normalisedVersion(v2);
15202
15203        System.err.println("compare: " + v1 + " normalised to " + s1);
15204        System.err.println("compare: " + v2 + " normalised to " + s2);
15205        return s1.compareTo(s2);
15206    }
15207
15208    private static String normalisedVersion(String version) {
15209        return normalisedVersion(version, ".", 4);
15210    }
15211
15212    private static String normalisedVersion(String version, String sep, int maxWidth) {
15213        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
15214        StringBuilder sb = new StringBuilder();
15215        for (String s : split) {
15216            sb.append(String.format("%" + maxWidth + 's', s));
15217        }
15218        return sb.toString();
15219    }
15220}
15221EOF
15222
15223    CLASSPATH=$ac_java_classpath
15224    export CLASSPATH
15225    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
15226    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
15227        echo "configure: conftestSharedChecker.class available" >&5
15228    else
15229        echo "configure: failed program was:" >&5
15230        cat conftestSharedChecker.java >&5
15231        echo "configure: CLASSPATH was $CLASSPATH" >&5
15232    fi
15233
15234    fi
15235
15236    CLASSPATH=$ac_java_classpath
15237    export CLASSPATH
15238    echo "CLASSPATH="$CLASSPATH >&5
15239    cmd="$JAVA conftestSharedChecker \"flexdock\" \"org.flexdock.util.Utilities\" \"$jar_resolved\" \"VERSION\" \"1.2.4\" \"\""
15240    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
15241        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
15242$(tail -n 1 conftestSharedChecker.java.output)
15243EOF
15244        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
15245$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
15246        echo "yes" >&5
15247        # append the found file to the classpath to manage jar dependency
15248        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
15249    else
15250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15251$as_echo "no" >&6; }
15252      if test "" = "yes"; then
15253         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar flexdock used by Scilab Gui (looking for package org.flexdock.util.Utilities)" >&5
15254$as_echo "$as_me: WARNING: Could not find or use the Java package/jar flexdock used by Scilab Gui (looking for package org.flexdock.util.Utilities)" >&2;}
15255      else
15256          as_fn_error $? "Could not find or use the Java package/jar flexdock used by Scilab Gui (looking for package org.flexdock.util.Utilities)" "$LINENO" 5
15257      fi
15258    fi
15259    if test -f conftestSharedChecker.java.output; then
15260        rm conftestSharedChecker.java.output
15261    fi
15262
15263                FLEXDOCK=$PACKAGE_JAR_FILE
15264
15265
15266                # Swing look&feel implementations
15267
15268
15269
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking looks" >&5
15271$as_echo_n "checking looks... " >&6; }
15272    PACKAGE_JAR_FILE=
15273
15274    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
15275
15276    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'looks.jar' -or -name 'liblooks.jar' -or -name 'liblooks-java.jar' -or -name 'looks*.jar' \) 2>/dev/null |tr '\n' ':')."
15277
15278    if test ! -f conftestSharedChecker.class ; then
15279
15280    cat << \EOF > conftestSharedChecker.java
15281// #line 15281 "configure"
15282import java.util.regex.Pattern;
15283import java.io.File;
15284import java.io.IOException;
15285import java.lang.reflect.Field;
15286import java.lang.reflect.InvocationTargetException;
15287import java.lang.reflect.Method;
15288import java.net.URL;
15289import java.net.URLClassLoader;
15290import java.util.ArrayList;
15291
15292public class conftestSharedChecker {
15293
15294    /**
15295     * Required arguments :
15296     *  argv[0]: name of the jar package
15297     *  argv[1]: name of the class (with the package prefix)
15298     *  argv[2]: possible paths of the jar package (separated by ':')
15299     *
15300     * Optional arguments:
15301     *  argv[3]: field or method used to retrieve the version
15302     *  argv[4]: expected version
15303     *  argv[5]: String comparator :
15304     *      "="  for exact version
15305     */
15306    public static void main(String[] argv) {
15307        final String packageName = argv[0];
15308        final String className = argv[1];
15309        final String[] jarList = argv[2].split(":");
15310
15311        ArrayList<URL> found = new ArrayList<>();
15312        for(String jar : jarList)
15313        {
15314            try {
15315                File f = new File(jar);
15316                if (f.exists()) {
15317                    found.add(f.toURI().toURL());
15318                }
15319            } catch (IOException ex) {
15320                System.err.println(ex.toString());
15321            }
15322        }
15323
15324        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
15325        URL klassURL = null;
15326        Class<?> klass = null;
15327        try {
15328            String resourceName = className.replace(".", "/") + ".class";
15329            klassURL = localClassLoader.getResource(resourceName);
15330            klass = localClassLoader.loadClass(className);
15331        } catch (ClassNotFoundException ex) {
15332            System.err.println(className + " not found");
15333            System.exit(-1);
15334        }
15335
15336        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
15337        String path = pathURL.substring(pathURL.indexOf(':') + 1);
15338        System.err.println("found: " + path);
15339
15340        String version;
15341        if (!"".equals(argv[3])) {
15342            version = checkVersion(klass, argv);
15343        } else {
15344            version = klass.getPackage().getSpecificationVersion();
15345        }
15346
15347        System.out.println(path + " " + version);
15348    }
15349
15350    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
15351        final String versionMethod = argv[3];
15352        final String expected = argv[4];
15353        final String atLeastOrEqual;
15354        if (!"".equals(argv[5])) {
15355            atLeastOrEqual = argv[5];
15356        } else {
15357            atLeastOrEqual = "<=";
15358        }
15359
15360        String value = "";
15361        if (versionMethod.isEmpty()) {
15362            value = klass.getPackage().getSpecificationVersion();
15363            compareAndDisplay(atLeastOrEqual, expected, value);
15364            return value;
15365        }
15366
15367        try {
15368            try {
15369                Field field = klass.getField(versionMethod);
15370                value = String.valueOf(field.get(null));
15371                compareAndDisplay(atLeastOrEqual, expected, value);
15372            } catch (NoSuchFieldException fe) {
15373                Method method = null;
15374                try {
15375                    method = klass.getMethod(versionMethod);
15376                } catch (NoSuchMethodException ex) {
15377                    System.err.println(ex.toString());
15378                    System.exit(-3);
15379                }
15380
15381                try {
15382                    value = String.valueOf(method.invoke(null));
15383                    compareAndDisplay(atLeastOrEqual, expected, value);
15384                } catch (NullPointerException ex) {
15385                    value = String.valueOf(method.invoke(klass.newInstance()));
15386                    compareAndDisplay(atLeastOrEqual, expected, value);
15387                }
15388            }
15389        } catch (IllegalAccessException ex) {
15390            System.err.println(ex);
15391            System.exit(-2);
15392        } catch (InvocationTargetException ex) {
15393            System.err.println(ex);
15394            System.exit(-2);
15395        } catch (InstantiationException ex) {
15396            System.err.println(ex);
15397            System.exit(-2);
15398        }
15399        return value;
15400    }
15401
15402    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
15403        int cmp = compare(expected, value);
15404
15405        switch(atLeastOrEqual) {
15406            case ">":
15407                if (cmp > 0) {
15408                    return;
15409                } else {
15410                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15411                    System.exit(-4);
15412                }
15413            case "==":
15414                if (cmp == 0) {
15415                    return;
15416                } else {
15417                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15418                    System.exit(-4);
15419                }
15420            case "<=":
15421                if (cmp <= 0) {
15422                    return;
15423                } else {
15424                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15425                    System.exit(-4);
15426                }
15427            default:
15428                System.err.println("unable to compare with "+atLeastOrEqual);
15429                System.exit(-4);
15430        }
15431    }
15432
15433    private static int compare(String v1, String v2) {
15434        String s1 = normalisedVersion(v1);
15435        String s2 = normalisedVersion(v2);
15436
15437        System.err.println("compare: " + v1 + " normalised to " + s1);
15438        System.err.println("compare: " + v2 + " normalised to " + s2);
15439        return s1.compareTo(s2);
15440    }
15441
15442    private static String normalisedVersion(String version) {
15443        return normalisedVersion(version, ".", 4);
15444    }
15445
15446    private static String normalisedVersion(String version, String sep, int maxWidth) {
15447        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
15448        StringBuilder sb = new StringBuilder();
15449        for (String s : split) {
15450            sb.append(String.format("%" + maxWidth + 's', s));
15451        }
15452        return sb.toString();
15453    }
15454}
15455EOF
15456
15457    CLASSPATH=$ac_java_classpath
15458    export CLASSPATH
15459    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
15460    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
15461        echo "configure: conftestSharedChecker.class available" >&5
15462    else
15463        echo "configure: failed program was:" >&5
15464        cat conftestSharedChecker.java >&5
15465        echo "configure: CLASSPATH was $CLASSPATH" >&5
15466    fi
15467
15468    fi
15469
15470    CLASSPATH=$ac_java_classpath
15471    export CLASSPATH
15472    echo "CLASSPATH="$CLASSPATH >&5
15473    cmd="$JAVA conftestSharedChecker \"looks\" \"com.jgoodies.looks.common.MenuItemRenderer\" \"$jar_resolved\" \"\" \"\" \"\""
15474    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
15475        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
15476$(tail -n 1 conftestSharedChecker.java.output)
15477EOF
15478        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
15479$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
15480        echo "yes" >&5
15481        # append the found file to the classpath to manage jar dependency
15482        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
15483    else
15484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15485$as_echo "no" >&6; }
15486      if test ""yes"" = "yes"; then
15487         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)" >&5
15488$as_echo "$as_me: WARNING: Could not find or use the Java package/jar looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)" >&2;}
15489      else
15490          as_fn_error $? "Could not find or use the Java package/jar looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)" "$LINENO" 5
15491      fi
15492    fi
15493    if test -f conftestSharedChecker.java.output; then
15494        rm conftestSharedChecker.java.output
15495    fi
15496
15497                LOOKS=$PACKAGE_JAR_FILE
15498
15499                # Named differently under ArchLinux or Fedora
15500                if test -z "$LOOKS"; then
15501
15502
15503
15504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jgoodies-looks" >&5
15505$as_echo_n "checking jgoodies-looks... " >&6; }
15506    PACKAGE_JAR_FILE=
15507
15508    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
15509
15510    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jgoodies-looks.jar' -or -name 'libjgoodies-looks.jar' -or -name 'libjgoodies-looks-java.jar' -or -name 'jgoodies-looks*.jar' \) 2>/dev/null |tr '\n' ':')."
15511
15512    if test ! -f conftestSharedChecker.class ; then
15513
15514    cat << \EOF > conftestSharedChecker.java
15515// #line 15515 "configure"
15516import java.util.regex.Pattern;
15517import java.io.File;
15518import java.io.IOException;
15519import java.lang.reflect.Field;
15520import java.lang.reflect.InvocationTargetException;
15521import java.lang.reflect.Method;
15522import java.net.URL;
15523import java.net.URLClassLoader;
15524import java.util.ArrayList;
15525
15526public class conftestSharedChecker {
15527
15528    /**
15529     * Required arguments :
15530     *  argv[0]: name of the jar package
15531     *  argv[1]: name of the class (with the package prefix)
15532     *  argv[2]: possible paths of the jar package (separated by ':')
15533     *
15534     * Optional arguments:
15535     *  argv[3]: field or method used to retrieve the version
15536     *  argv[4]: expected version
15537     *  argv[5]: String comparator :
15538     *      "="  for exact version
15539     */
15540    public static void main(String[] argv) {
15541        final String packageName = argv[0];
15542        final String className = argv[1];
15543        final String[] jarList = argv[2].split(":");
15544
15545        ArrayList<URL> found = new ArrayList<>();
15546        for(String jar : jarList)
15547        {
15548            try {
15549                File f = new File(jar);
15550                if (f.exists()) {
15551                    found.add(f.toURI().toURL());
15552                }
15553            } catch (IOException ex) {
15554                System.err.println(ex.toString());
15555            }
15556        }
15557
15558        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
15559        URL klassURL = null;
15560        Class<?> klass = null;
15561        try {
15562            String resourceName = className.replace(".", "/") + ".class";
15563            klassURL = localClassLoader.getResource(resourceName);
15564            klass = localClassLoader.loadClass(className);
15565        } catch (ClassNotFoundException ex) {
15566            System.err.println(className + " not found");
15567            System.exit(-1);
15568        }
15569
15570        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
15571        String path = pathURL.substring(pathURL.indexOf(':') + 1);
15572        System.err.println("found: " + path);
15573
15574        String version;
15575        if (!"".equals(argv[3])) {
15576            version = checkVersion(klass, argv);
15577        } else {
15578            version = klass.getPackage().getSpecificationVersion();
15579        }
15580
15581        System.out.println(path + " " + version);
15582    }
15583
15584    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
15585        final String versionMethod = argv[3];
15586        final String expected = argv[4];
15587        final String atLeastOrEqual;
15588        if (!"".equals(argv[5])) {
15589            atLeastOrEqual = argv[5];
15590        } else {
15591            atLeastOrEqual = "<=";
15592        }
15593
15594        String value = "";
15595        if (versionMethod.isEmpty()) {
15596            value = klass.getPackage().getSpecificationVersion();
15597            compareAndDisplay(atLeastOrEqual, expected, value);
15598            return value;
15599        }
15600
15601        try {
15602            try {
15603                Field field = klass.getField(versionMethod);
15604                value = String.valueOf(field.get(null));
15605                compareAndDisplay(atLeastOrEqual, expected, value);
15606            } catch (NoSuchFieldException fe) {
15607                Method method = null;
15608                try {
15609                    method = klass.getMethod(versionMethod);
15610                } catch (NoSuchMethodException ex) {
15611                    System.err.println(ex.toString());
15612                    System.exit(-3);
15613                }
15614
15615                try {
15616                    value = String.valueOf(method.invoke(null));
15617                    compareAndDisplay(atLeastOrEqual, expected, value);
15618                } catch (NullPointerException ex) {
15619                    value = String.valueOf(method.invoke(klass.newInstance()));
15620                    compareAndDisplay(atLeastOrEqual, expected, value);
15621                }
15622            }
15623        } catch (IllegalAccessException ex) {
15624            System.err.println(ex);
15625            System.exit(-2);
15626        } catch (InvocationTargetException ex) {
15627            System.err.println(ex);
15628            System.exit(-2);
15629        } catch (InstantiationException ex) {
15630            System.err.println(ex);
15631            System.exit(-2);
15632        }
15633        return value;
15634    }
15635
15636    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
15637        int cmp = compare(expected, value);
15638
15639        switch(atLeastOrEqual) {
15640            case ">":
15641                if (cmp > 0) {
15642                    return;
15643                } else {
15644                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15645                    System.exit(-4);
15646                }
15647            case "==":
15648                if (cmp == 0) {
15649                    return;
15650                } else {
15651                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15652                    System.exit(-4);
15653                }
15654            case "<=":
15655                if (cmp <= 0) {
15656                    return;
15657                } else {
15658                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15659                    System.exit(-4);
15660                }
15661            default:
15662                System.err.println("unable to compare with "+atLeastOrEqual);
15663                System.exit(-4);
15664        }
15665    }
15666
15667    private static int compare(String v1, String v2) {
15668        String s1 = normalisedVersion(v1);
15669        String s2 = normalisedVersion(v2);
15670
15671        System.err.println("compare: " + v1 + " normalised to " + s1);
15672        System.err.println("compare: " + v2 + " normalised to " + s2);
15673        return s1.compareTo(s2);
15674    }
15675
15676    private static String normalisedVersion(String version) {
15677        return normalisedVersion(version, ".", 4);
15678    }
15679
15680    private static String normalisedVersion(String version, String sep, int maxWidth) {
15681        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
15682        StringBuilder sb = new StringBuilder();
15683        for (String s : split) {
15684            sb.append(String.format("%" + maxWidth + 's', s));
15685        }
15686        return sb.toString();
15687    }
15688}
15689EOF
15690
15691    CLASSPATH=$ac_java_classpath
15692    export CLASSPATH
15693    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
15694    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
15695        echo "configure: conftestSharedChecker.class available" >&5
15696    else
15697        echo "configure: failed program was:" >&5
15698        cat conftestSharedChecker.java >&5
15699        echo "configure: CLASSPATH was $CLASSPATH" >&5
15700    fi
15701
15702    fi
15703
15704    CLASSPATH=$ac_java_classpath
15705    export CLASSPATH
15706    echo "CLASSPATH="$CLASSPATH >&5
15707    cmd="$JAVA conftestSharedChecker \"jgoodies-looks\" \"com.jgoodies.looks.common.MenuItemRenderer\" \"$jar_resolved\" \"\" \"\" \"\""
15708    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
15709        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
15710$(tail -n 1 conftestSharedChecker.java.output)
15711EOF
15712        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
15713$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
15714        echo "yes" >&5
15715        # append the found file to the classpath to manage jar dependency
15716        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
15717    else
15718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15719$as_echo "no" >&6; }
15720      if test "" = "yes"; then
15721         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jgoodies-looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)" >&5
15722$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jgoodies-looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)" >&2;}
15723      else
15724          as_fn_error $? "Could not find or use the Java package/jar jgoodies-looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)" "$LINENO" 5
15725      fi
15726    fi
15727    if test -f conftestSharedChecker.java.output; then
15728        rm conftestSharedChecker.java.output
15729    fi
15730
15731                    LOOKS=$PACKAGE_JAR_FILE
15732                fi
15733
15734
15735                #  Skin Look and Feel
15736
15737
15738
15739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking skinlf" >&5
15740$as_echo_n "checking skinlf... " >&6; }
15741    PACKAGE_JAR_FILE=
15742
15743    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
15744
15745    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'skinlf.jar' -or -name 'libskinlf.jar' -or -name 'libskinlf-java.jar' -or -name 'skinlf*.jar' \) 2>/dev/null |tr '\n' ':')."
15746
15747    if test ! -f conftestSharedChecker.class ; then
15748
15749    cat << \EOF > conftestSharedChecker.java
15750// #line 15750 "configure"
15751import java.util.regex.Pattern;
15752import java.io.File;
15753import java.io.IOException;
15754import java.lang.reflect.Field;
15755import java.lang.reflect.InvocationTargetException;
15756import java.lang.reflect.Method;
15757import java.net.URL;
15758import java.net.URLClassLoader;
15759import java.util.ArrayList;
15760
15761public class conftestSharedChecker {
15762
15763    /**
15764     * Required arguments :
15765     *  argv[0]: name of the jar package
15766     *  argv[1]: name of the class (with the package prefix)
15767     *  argv[2]: possible paths of the jar package (separated by ':')
15768     *
15769     * Optional arguments:
15770     *  argv[3]: field or method used to retrieve the version
15771     *  argv[4]: expected version
15772     *  argv[5]: String comparator :
15773     *      "="  for exact version
15774     */
15775    public static void main(String[] argv) {
15776        final String packageName = argv[0];
15777        final String className = argv[1];
15778        final String[] jarList = argv[2].split(":");
15779
15780        ArrayList<URL> found = new ArrayList<>();
15781        for(String jar : jarList)
15782        {
15783            try {
15784                File f = new File(jar);
15785                if (f.exists()) {
15786                    found.add(f.toURI().toURL());
15787                }
15788            } catch (IOException ex) {
15789                System.err.println(ex.toString());
15790            }
15791        }
15792
15793        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
15794        URL klassURL = null;
15795        Class<?> klass = null;
15796        try {
15797            String resourceName = className.replace(".", "/") + ".class";
15798            klassURL = localClassLoader.getResource(resourceName);
15799            klass = localClassLoader.loadClass(className);
15800        } catch (ClassNotFoundException ex) {
15801            System.err.println(className + " not found");
15802            System.exit(-1);
15803        }
15804
15805        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
15806        String path = pathURL.substring(pathURL.indexOf(':') + 1);
15807        System.err.println("found: " + path);
15808
15809        String version;
15810        if (!"".equals(argv[3])) {
15811            version = checkVersion(klass, argv);
15812        } else {
15813            version = klass.getPackage().getSpecificationVersion();
15814        }
15815
15816        System.out.println(path + " " + version);
15817    }
15818
15819    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
15820        final String versionMethod = argv[3];
15821        final String expected = argv[4];
15822        final String atLeastOrEqual;
15823        if (!"".equals(argv[5])) {
15824            atLeastOrEqual = argv[5];
15825        } else {
15826            atLeastOrEqual = "<=";
15827        }
15828
15829        String value = "";
15830        if (versionMethod.isEmpty()) {
15831            value = klass.getPackage().getSpecificationVersion();
15832            compareAndDisplay(atLeastOrEqual, expected, value);
15833            return value;
15834        }
15835
15836        try {
15837            try {
15838                Field field = klass.getField(versionMethod);
15839                value = String.valueOf(field.get(null));
15840                compareAndDisplay(atLeastOrEqual, expected, value);
15841            } catch (NoSuchFieldException fe) {
15842                Method method = null;
15843                try {
15844                    method = klass.getMethod(versionMethod);
15845                } catch (NoSuchMethodException ex) {
15846                    System.err.println(ex.toString());
15847                    System.exit(-3);
15848                }
15849
15850                try {
15851                    value = String.valueOf(method.invoke(null));
15852                    compareAndDisplay(atLeastOrEqual, expected, value);
15853                } catch (NullPointerException ex) {
15854                    value = String.valueOf(method.invoke(klass.newInstance()));
15855                    compareAndDisplay(atLeastOrEqual, expected, value);
15856                }
15857            }
15858        } catch (IllegalAccessException ex) {
15859            System.err.println(ex);
15860            System.exit(-2);
15861        } catch (InvocationTargetException ex) {
15862            System.err.println(ex);
15863            System.exit(-2);
15864        } catch (InstantiationException ex) {
15865            System.err.println(ex);
15866            System.exit(-2);
15867        }
15868        return value;
15869    }
15870
15871    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
15872        int cmp = compare(expected, value);
15873
15874        switch(atLeastOrEqual) {
15875            case ">":
15876                if (cmp > 0) {
15877                    return;
15878                } else {
15879                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15880                    System.exit(-4);
15881                }
15882            case "==":
15883                if (cmp == 0) {
15884                    return;
15885                } else {
15886                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15887                    System.exit(-4);
15888                }
15889            case "<=":
15890                if (cmp <= 0) {
15891                    return;
15892                } else {
15893                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
15894                    System.exit(-4);
15895                }
15896            default:
15897                System.err.println("unable to compare with "+atLeastOrEqual);
15898                System.exit(-4);
15899        }
15900    }
15901
15902    private static int compare(String v1, String v2) {
15903        String s1 = normalisedVersion(v1);
15904        String s2 = normalisedVersion(v2);
15905
15906        System.err.println("compare: " + v1 + " normalised to " + s1);
15907        System.err.println("compare: " + v2 + " normalised to " + s2);
15908        return s1.compareTo(s2);
15909    }
15910
15911    private static String normalisedVersion(String version) {
15912        return normalisedVersion(version, ".", 4);
15913    }
15914
15915    private static String normalisedVersion(String version, String sep, int maxWidth) {
15916        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
15917        StringBuilder sb = new StringBuilder();
15918        for (String s : split) {
15919            sb.append(String.format("%" + maxWidth + 's', s));
15920        }
15921        return sb.toString();
15922    }
15923}
15924EOF
15925
15926    CLASSPATH=$ac_java_classpath
15927    export CLASSPATH
15928    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
15929    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
15930        echo "configure: conftestSharedChecker.class available" >&5
15931    else
15932        echo "configure: failed program was:" >&5
15933        cat conftestSharedChecker.java >&5
15934        echo "configure: CLASSPATH was $CLASSPATH" >&5
15935    fi
15936
15937    fi
15938
15939    CLASSPATH=$ac_java_classpath
15940    export CLASSPATH
15941    echo "CLASSPATH="$CLASSPATH >&5
15942    cmd="$JAVA conftestSharedChecker \"skinlf\" \"com.l2fprod.util.AccessUtils\" \"$jar_resolved\" \"\" \"\" \"\""
15943    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
15944        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
15945$(tail -n 1 conftestSharedChecker.java.output)
15946EOF
15947        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
15948$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
15949        echo "yes" >&5
15950        # append the found file to the classpath to manage jar dependency
15951        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
15952    else
15953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15954$as_echo "no" >&6; }
15955      if test "" = "yes"; then
15956         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar skinlf used by Scilab Gui - Skin Look and Feel (looking for package com.l2fprod.util.AccessUtils)" >&5
15957$as_echo "$as_me: WARNING: Could not find or use the Java package/jar skinlf used by Scilab Gui - Skin Look and Feel (looking for package com.l2fprod.util.AccessUtils)" >&2;}
15958      else
15959          as_fn_error $? "Could not find or use the Java package/jar skinlf used by Scilab Gui - Skin Look and Feel (looking for package com.l2fprod.util.AccessUtils)" "$LINENO" 5
15960      fi
15961    fi
15962    if test -f conftestSharedChecker.java.output; then
15963        rm conftestSharedChecker.java.output
15964    fi
15965
15966                SKINLF=$PACKAGE_JAR_FILE
15967
15968
15969                # JOGL 2
15970
15971
15972
15973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jogl2" >&5
15974$as_echo_n "checking jogl2... " >&6; }
15975    PACKAGE_JAR_FILE=
15976
15977    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
15978
15979    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jogl2.jar' -or -name 'libjogl2.jar' -or -name 'libjogl2-java.jar' -or -name 'jogl2*.jar' \) 2>/dev/null |tr '\n' ':')."
15980
15981    if test ! -f conftestSharedChecker.class ; then
15982
15983    cat << \EOF > conftestSharedChecker.java
15984// #line 15984 "configure"
15985import java.util.regex.Pattern;
15986import java.io.File;
15987import java.io.IOException;
15988import java.lang.reflect.Field;
15989import java.lang.reflect.InvocationTargetException;
15990import java.lang.reflect.Method;
15991import java.net.URL;
15992import java.net.URLClassLoader;
15993import java.util.ArrayList;
15994
15995public class conftestSharedChecker {
15996
15997    /**
15998     * Required arguments :
15999     *  argv[0]: name of the jar package
16000     *  argv[1]: name of the class (with the package prefix)
16001     *  argv[2]: possible paths of the jar package (separated by ':')
16002     *
16003     * Optional arguments:
16004     *  argv[3]: field or method used to retrieve the version
16005     *  argv[4]: expected version
16006     *  argv[5]: String comparator :
16007     *      "="  for exact version
16008     */
16009    public static void main(String[] argv) {
16010        final String packageName = argv[0];
16011        final String className = argv[1];
16012        final String[] jarList = argv[2].split(":");
16013
16014        ArrayList<URL> found = new ArrayList<>();
16015        for(String jar : jarList)
16016        {
16017            try {
16018                File f = new File(jar);
16019                if (f.exists()) {
16020                    found.add(f.toURI().toURL());
16021                }
16022            } catch (IOException ex) {
16023                System.err.println(ex.toString());
16024            }
16025        }
16026
16027        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
16028        URL klassURL = null;
16029        Class<?> klass = null;
16030        try {
16031            String resourceName = className.replace(".", "/") + ".class";
16032            klassURL = localClassLoader.getResource(resourceName);
16033            klass = localClassLoader.loadClass(className);
16034        } catch (ClassNotFoundException ex) {
16035            System.err.println(className + " not found");
16036            System.exit(-1);
16037        }
16038
16039        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
16040        String path = pathURL.substring(pathURL.indexOf(':') + 1);
16041        System.err.println("found: " + path);
16042
16043        String version;
16044        if (!"".equals(argv[3])) {
16045            version = checkVersion(klass, argv);
16046        } else {
16047            version = klass.getPackage().getSpecificationVersion();
16048        }
16049
16050        System.out.println(path + " " + version);
16051    }
16052
16053    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
16054        final String versionMethod = argv[3];
16055        final String expected = argv[4];
16056        final String atLeastOrEqual;
16057        if (!"".equals(argv[5])) {
16058            atLeastOrEqual = argv[5];
16059        } else {
16060            atLeastOrEqual = "<=";
16061        }
16062
16063        String value = "";
16064        if (versionMethod.isEmpty()) {
16065            value = klass.getPackage().getSpecificationVersion();
16066            compareAndDisplay(atLeastOrEqual, expected, value);
16067            return value;
16068        }
16069
16070        try {
16071            try {
16072                Field field = klass.getField(versionMethod);
16073                value = String.valueOf(field.get(null));
16074                compareAndDisplay(atLeastOrEqual, expected, value);
16075            } catch (NoSuchFieldException fe) {
16076                Method method = null;
16077                try {
16078                    method = klass.getMethod(versionMethod);
16079                } catch (NoSuchMethodException ex) {
16080                    System.err.println(ex.toString());
16081                    System.exit(-3);
16082                }
16083
16084                try {
16085                    value = String.valueOf(method.invoke(null));
16086                    compareAndDisplay(atLeastOrEqual, expected, value);
16087                } catch (NullPointerException ex) {
16088                    value = String.valueOf(method.invoke(klass.newInstance()));
16089                    compareAndDisplay(atLeastOrEqual, expected, value);
16090                }
16091            }
16092        } catch (IllegalAccessException ex) {
16093            System.err.println(ex);
16094            System.exit(-2);
16095        } catch (InvocationTargetException ex) {
16096            System.err.println(ex);
16097            System.exit(-2);
16098        } catch (InstantiationException ex) {
16099            System.err.println(ex);
16100            System.exit(-2);
16101        }
16102        return value;
16103    }
16104
16105    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
16106        int cmp = compare(expected, value);
16107
16108        switch(atLeastOrEqual) {
16109            case ">":
16110                if (cmp > 0) {
16111                    return;
16112                } else {
16113                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16114                    System.exit(-4);
16115                }
16116            case "==":
16117                if (cmp == 0) {
16118                    return;
16119                } else {
16120                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16121                    System.exit(-4);
16122                }
16123            case "<=":
16124                if (cmp <= 0) {
16125                    return;
16126                } else {
16127                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16128                    System.exit(-4);
16129                }
16130            default:
16131                System.err.println("unable to compare with "+atLeastOrEqual);
16132                System.exit(-4);
16133        }
16134    }
16135
16136    private static int compare(String v1, String v2) {
16137        String s1 = normalisedVersion(v1);
16138        String s2 = normalisedVersion(v2);
16139
16140        System.err.println("compare: " + v1 + " normalised to " + s1);
16141        System.err.println("compare: " + v2 + " normalised to " + s2);
16142        return s1.compareTo(s2);
16143    }
16144
16145    private static String normalisedVersion(String version) {
16146        return normalisedVersion(version, ".", 4);
16147    }
16148
16149    private static String normalisedVersion(String version, String sep, int maxWidth) {
16150        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
16151        StringBuilder sb = new StringBuilder();
16152        for (String s : split) {
16153            sb.append(String.format("%" + maxWidth + 's', s));
16154        }
16155        return sb.toString();
16156    }
16157}
16158EOF
16159
16160    CLASSPATH=$ac_java_classpath
16161    export CLASSPATH
16162    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
16163    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
16164        echo "configure: conftestSharedChecker.class available" >&5
16165    else
16166        echo "configure: failed program was:" >&5
16167        cat conftestSharedChecker.java >&5
16168        echo "configure: CLASSPATH was $CLASSPATH" >&5
16169    fi
16170
16171    fi
16172
16173    CLASSPATH=$ac_java_classpath
16174    export CLASSPATH
16175    echo "CLASSPATH="$CLASSPATH >&5
16176    cmd="$JAVA conftestSharedChecker \"jogl2\" \"com.jogamp.opengl.glu.GLUnurbs\" \"$jar_resolved\" \"\" \"2.2\" \"\""
16177    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
16178        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
16179$(tail -n 1 conftestSharedChecker.java.output)
16180EOF
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
16182$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
16183        echo "yes" >&5
16184        # append the found file to the classpath to manage jar dependency
16185        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
16186    else
16187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16188$as_echo "no" >&6; }
16189      if test "" = "yes"; then
16190         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jogl2 used by Scilab 3D rendering - Version 2.0 (looking for package com.jogamp.opengl.glu.GLUnurbs)" >&5
16191$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jogl2 used by Scilab 3D rendering - Version 2.0 (looking for package com.jogamp.opengl.glu.GLUnurbs)" >&2;}
16192      else
16193          as_fn_error $? "Could not find or use the Java package/jar jogl2 used by Scilab 3D rendering - Version 2.0 (looking for package com.jogamp.opengl.glu.GLUnurbs)" "$LINENO" 5
16194      fi
16195    fi
16196    if test -f conftestSharedChecker.java.output; then
16197        rm conftestSharedChecker.java.output
16198    fi
16199
16200                JOGL2=$PACKAGE_JAR_FILE
16201
16202
16203                if test "$MACOSX" = 1; then
16204                   echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
16205                else
16206                   LDFLAGS_save=$LDFLAGS
16207                   # Provide known paths where distribs/OS can store JNI libs
16208                   LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/local/lib/"                   # Debian
16209                   LDFLAGS="$LDFLAGS -L/usr/local/share/java/classes -L/usr/lib64/java"                 # jpackage.org
16210                   LDFLAGS="$LDFLAGS -L/usr/lib/jogl2 -L/usr/lib64/jogl2"               # RedHat
16211                   LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin"        # Scilab thirdparties
16212                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glTexParameterf in -ljogl_desktop" >&5
16213$as_echo_n "checking for glTexParameterf in -ljogl_desktop... " >&6; }
16214if ${ac_cv_lib_jogl_desktop_glTexParameterf+:} false; then :
16215  $as_echo_n "(cached) " >&6
16216else
16217  ac_check_lib_save_LIBS=$LIBS
16218LIBS="-ljogl_desktop  $LIBS"
16219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16220/* end confdefs.h.  */
16221
16222/* Override any GCC internal prototype to avoid an error.
16223   Use char because int might match the return type of a GCC
16224   builtin and then its argument prototype would still apply.  */
16225#ifdef __cplusplus
16226extern "C"
16227#endif
16228char glTexParameterf ();
16229int
16230main ()
16231{
16232return glTexParameterf ();
16233  ;
16234  return 0;
16235}
16236_ACEOF
16237if ac_fn_c_try_link "$LINENO"; then :
16238  ac_cv_lib_jogl_desktop_glTexParameterf=yes
16239else
16240  ac_cv_lib_jogl_desktop_glTexParameterf=no
16241fi
16242rm -f core conftest.err conftest.$ac_objext \
16243    conftest$ac_exeext conftest.$ac_ext
16244LIBS=$ac_check_lib_save_LIBS
16245fi
16246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jogl_desktop_glTexParameterf" >&5
16247$as_echo "$ac_cv_lib_jogl_desktop_glTexParameterf" >&6; }
16248if test "x$ac_cv_lib_jogl_desktop_glTexParameterf" = xyes; then :
16249  JOGL2_LIBS="-ljogl_desktop"
16250else
16251  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not link against -ljogl_desktop. Will try against -ljogl_desktop -lGL" >&5
16252$as_echo "$as_me: WARNING: Could not link against -ljogl_desktop. Will try against -ljogl_desktop -lGL" >&2;}
16253fi
16254
16255                   if test -z "$JOGL2_LIBS"; then # The previous test failed add more options to the LDFLAGS
16256                       # the space after "jogl" in the following line is on
16257                       # purpose to disable the cache
16258                          as_ac_Lib=`$as_echo "ac_cv_lib_jogl_desktop ''_glTexParameterf" | $as_tr_sh`
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glTexParameterf in -ljogl_desktop " >&5
16260$as_echo_n "checking for glTexParameterf in -ljogl_desktop ... " >&6; }
16261if eval \${$as_ac_Lib+:} false; then :
16262  $as_echo_n "(cached) " >&6
16263else
16264  ac_check_lib_save_LIBS=$LIBS
16265LIBS="-ljogl_desktop  -lGL $LIBS"
16266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h.  */
16268
16269/* Override any GCC internal prototype to avoid an error.
16270   Use char because int might match the return type of a GCC
16271   builtin and then its argument prototype would still apply.  */
16272#ifdef __cplusplus
16273extern "C"
16274#endif
16275char glTexParameterf ();
16276int
16277main ()
16278{
16279return glTexParameterf ();
16280  ;
16281  return 0;
16282}
16283_ACEOF
16284if ac_fn_c_try_link "$LINENO"; then :
16285  eval "$as_ac_Lib=yes"
16286else
16287  eval "$as_ac_Lib=no"
16288fi
16289rm -f core conftest.err conftest.$ac_objext \
16290    conftest$ac_exeext conftest.$ac_ext
16291LIBS=$ac_check_lib_save_LIBS
16292fi
16293eval ac_res=\$$as_ac_Lib
16294	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16295$as_echo "$ac_res" >&6; }
16296if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16297  JOGL2_LIBS="-ljogl_desktop -lGL"
16298else
16299  as_fn_error $? "\"libjogl: Library
16300missing (Cannot find symbol glTexParameterf). Check if libjogl - C/Java (JNI)
16301interface for JOGL2 - or libGL (OpenGL library) are installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries.\"" "$LINENO" 5
16302fi
16303
16304                   fi
16305
16306                   LDFLAGS=$LDFLAGS_save
16307                fi
16308
16309                # JoGL Native <=> Java connector
16310
16311
16312
16313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking gluegen2-rt" >&5
16314$as_echo_n "checking gluegen2-rt... " >&6; }
16315    PACKAGE_JAR_FILE=
16316
16317    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
16318
16319    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'gluegen2-rt.jar' -or -name 'libgluegen2-rt.jar' -or -name 'libgluegen2-rt-java.jar' -or -name 'gluegen2-rt*.jar' \) 2>/dev/null |tr '\n' ':')."
16320
16321    if test ! -f conftestSharedChecker.class ; then
16322
16323    cat << \EOF > conftestSharedChecker.java
16324// #line 16324 "configure"
16325import java.util.regex.Pattern;
16326import java.io.File;
16327import java.io.IOException;
16328import java.lang.reflect.Field;
16329import java.lang.reflect.InvocationTargetException;
16330import java.lang.reflect.Method;
16331import java.net.URL;
16332import java.net.URLClassLoader;
16333import java.util.ArrayList;
16334
16335public class conftestSharedChecker {
16336
16337    /**
16338     * Required arguments :
16339     *  argv[0]: name of the jar package
16340     *  argv[1]: name of the class (with the package prefix)
16341     *  argv[2]: possible paths of the jar package (separated by ':')
16342     *
16343     * Optional arguments:
16344     *  argv[3]: field or method used to retrieve the version
16345     *  argv[4]: expected version
16346     *  argv[5]: String comparator :
16347     *      "="  for exact version
16348     */
16349    public static void main(String[] argv) {
16350        final String packageName = argv[0];
16351        final String className = argv[1];
16352        final String[] jarList = argv[2].split(":");
16353
16354        ArrayList<URL> found = new ArrayList<>();
16355        for(String jar : jarList)
16356        {
16357            try {
16358                File f = new File(jar);
16359                if (f.exists()) {
16360                    found.add(f.toURI().toURL());
16361                }
16362            } catch (IOException ex) {
16363                System.err.println(ex.toString());
16364            }
16365        }
16366
16367        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
16368        URL klassURL = null;
16369        Class<?> klass = null;
16370        try {
16371            String resourceName = className.replace(".", "/") + ".class";
16372            klassURL = localClassLoader.getResource(resourceName);
16373            klass = localClassLoader.loadClass(className);
16374        } catch (ClassNotFoundException ex) {
16375            System.err.println(className + " not found");
16376            System.exit(-1);
16377        }
16378
16379        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
16380        String path = pathURL.substring(pathURL.indexOf(':') + 1);
16381        System.err.println("found: " + path);
16382
16383        String version;
16384        if (!"".equals(argv[3])) {
16385            version = checkVersion(klass, argv);
16386        } else {
16387            version = klass.getPackage().getSpecificationVersion();
16388        }
16389
16390        System.out.println(path + " " + version);
16391    }
16392
16393    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
16394        final String versionMethod = argv[3];
16395        final String expected = argv[4];
16396        final String atLeastOrEqual;
16397        if (!"".equals(argv[5])) {
16398            atLeastOrEqual = argv[5];
16399        } else {
16400            atLeastOrEqual = "<=";
16401        }
16402
16403        String value = "";
16404        if (versionMethod.isEmpty()) {
16405            value = klass.getPackage().getSpecificationVersion();
16406            compareAndDisplay(atLeastOrEqual, expected, value);
16407            return value;
16408        }
16409
16410        try {
16411            try {
16412                Field field = klass.getField(versionMethod);
16413                value = String.valueOf(field.get(null));
16414                compareAndDisplay(atLeastOrEqual, expected, value);
16415            } catch (NoSuchFieldException fe) {
16416                Method method = null;
16417                try {
16418                    method = klass.getMethod(versionMethod);
16419                } catch (NoSuchMethodException ex) {
16420                    System.err.println(ex.toString());
16421                    System.exit(-3);
16422                }
16423
16424                try {
16425                    value = String.valueOf(method.invoke(null));
16426                    compareAndDisplay(atLeastOrEqual, expected, value);
16427                } catch (NullPointerException ex) {
16428                    value = String.valueOf(method.invoke(klass.newInstance()));
16429                    compareAndDisplay(atLeastOrEqual, expected, value);
16430                }
16431            }
16432        } catch (IllegalAccessException ex) {
16433            System.err.println(ex);
16434            System.exit(-2);
16435        } catch (InvocationTargetException ex) {
16436            System.err.println(ex);
16437            System.exit(-2);
16438        } catch (InstantiationException ex) {
16439            System.err.println(ex);
16440            System.exit(-2);
16441        }
16442        return value;
16443    }
16444
16445    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
16446        int cmp = compare(expected, value);
16447
16448        switch(atLeastOrEqual) {
16449            case ">":
16450                if (cmp > 0) {
16451                    return;
16452                } else {
16453                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16454                    System.exit(-4);
16455                }
16456            case "==":
16457                if (cmp == 0) {
16458                    return;
16459                } else {
16460                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16461                    System.exit(-4);
16462                }
16463            case "<=":
16464                if (cmp <= 0) {
16465                    return;
16466                } else {
16467                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16468                    System.exit(-4);
16469                }
16470            default:
16471                System.err.println("unable to compare with "+atLeastOrEqual);
16472                System.exit(-4);
16473        }
16474    }
16475
16476    private static int compare(String v1, String v2) {
16477        String s1 = normalisedVersion(v1);
16478        String s2 = normalisedVersion(v2);
16479
16480        System.err.println("compare: " + v1 + " normalised to " + s1);
16481        System.err.println("compare: " + v2 + " normalised to " + s2);
16482        return s1.compareTo(s2);
16483    }
16484
16485    private static String normalisedVersion(String version) {
16486        return normalisedVersion(version, ".", 4);
16487    }
16488
16489    private static String normalisedVersion(String version, String sep, int maxWidth) {
16490        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
16491        StringBuilder sb = new StringBuilder();
16492        for (String s : split) {
16493            sb.append(String.format("%" + maxWidth + 's', s));
16494        }
16495        return sb.toString();
16496    }
16497}
16498EOF
16499
16500    CLASSPATH=$ac_java_classpath
16501    export CLASSPATH
16502    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
16503    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
16504        echo "configure: conftestSharedChecker.class available" >&5
16505    else
16506        echo "configure: failed program was:" >&5
16507        cat conftestSharedChecker.java >&5
16508        echo "configure: CLASSPATH was $CLASSPATH" >&5
16509    fi
16510
16511    fi
16512
16513    CLASSPATH=$ac_java_classpath
16514    export CLASSPATH
16515    echo "CLASSPATH="$CLASSPATH >&5
16516    cmd="$JAVA conftestSharedChecker \"gluegen2-rt\" \"jogamp.common.os.MachineDataInfoRuntime\" \"$jar_resolved\" \"\" \"\" \"\""
16517    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
16518        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
16519$(tail -n 1 conftestSharedChecker.java.output)
16520EOF
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
16522$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
16523        echo "yes" >&5
16524        # append the found file to the classpath to manage jar dependency
16525        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
16526    else
16527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16528$as_echo "no" >&6; }
16529      if test "" = "yes"; then
16530         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar gluegen2-rt used by Scilab 3D rendering (looking for package jogamp.common.os.MachineDataInfoRuntime)" >&5
16531$as_echo "$as_me: WARNING: Could not find or use the Java package/jar gluegen2-rt used by Scilab 3D rendering (looking for package jogamp.common.os.MachineDataInfoRuntime)" >&2;}
16532      else
16533          as_fn_error $? "Could not find or use the Java package/jar gluegen2-rt used by Scilab 3D rendering (looking for package jogamp.common.os.MachineDataInfoRuntime)" "$LINENO" 5
16534      fi
16535    fi
16536    if test -f conftestSharedChecker.java.output; then
16537        rm conftestSharedChecker.java.output
16538    fi
16539
16540                GLUEGEN2_RT=$PACKAGE_JAR_FILE
16541
16542
16543                if test "$MACOSX" = 1; then
16544                   echo "Check of the presence of libgluegen-rt.jnilib disabled under Mac OS X"
16545                else
16546                   LDFLAGS_save=$LDFLAGS
16547                   # Provide known paths where distribs/OS can store JNI libs
16548                   LDFLAGS="$LDFLAGS -L/usr/lib/jni -L/usr/local/lib/"                   # Debian
16549                   LDFLAGS="$LDFLAGS -L/usr/local/share/java/classes -L/usr/lib64/java"                 # jpackage.org
16550                   LDFLAGS="$LDFLAGS -L/usr/lib/gluegen2 -L/usr/lib64/gluegen2"         # RedHat
16551                   LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin"        # Scilab thirdparties
16552                   symbol="Java_jogamp_common_jvm_JVMUtil_initialize"
16553                   as_ac_Lib=`$as_echo "ac_cv_lib_gluegen2-rt_$symbol" | $as_tr_sh`
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $symbol in -lgluegen2-rt" >&5
16555$as_echo_n "checking for $symbol in -lgluegen2-rt... " >&6; }
16556if eval \${$as_ac_Lib+:} false; then :
16557  $as_echo_n "(cached) " >&6
16558else
16559  ac_check_lib_save_LIBS=$LIBS
16560LIBS="-lgluegen2-rt -ldl $LIBS"
16561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16562/* end confdefs.h.  */
16563
16564/* Override any GCC internal prototype to avoid an error.
16565   Use char because int might match the return type of a GCC
16566   builtin and then its argument prototype would still apply.  */
16567#ifdef __cplusplus
16568extern "C"
16569#endif
16570char $symbol ();
16571int
16572main ()
16573{
16574return $symbol ();
16575  ;
16576  return 0;
16577}
16578_ACEOF
16579if ac_fn_c_try_link "$LINENO"; then :
16580  eval "$as_ac_Lib=yes"
16581else
16582  eval "$as_ac_Lib=no"
16583fi
16584rm -f core conftest.err conftest.$ac_objext \
16585    conftest$ac_exeext conftest.$ac_ext
16586LIBS=$ac_check_lib_save_LIBS
16587fi
16588eval ac_res=\$$as_ac_Lib
16589	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16590$as_echo "$ac_res" >&6; }
16591if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16592  GLUEGEN2_RT_LIBS="-lgluegen2-rt"
16593else
16594  as_fn_error $? "libgluegen2-rt: Library missing (Cannot find symbol $symbol). Check if libgluegen-rt - C/Java (JNI) interface for GLUEGEN2 - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries." "$LINENO" 5
16595fi
16596
16597                   LDFLAGS=$LDFLAGS_save
16598                fi
16599
16600                # Jhall
16601
16602
16603
16604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jhall" >&5
16605$as_echo_n "checking jhall... " >&6; }
16606    PACKAGE_JAR_FILE=
16607
16608    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
16609
16610    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jhall.jar' -or -name 'libjhall.jar' -or -name 'libjhall-java.jar' -or -name 'jhall*.jar' \) 2>/dev/null |tr '\n' ':')."
16611
16612    if test ! -f conftestSharedChecker.class ; then
16613
16614    cat << \EOF > conftestSharedChecker.java
16615// #line 16615 "configure"
16616import java.util.regex.Pattern;
16617import java.io.File;
16618import java.io.IOException;
16619import java.lang.reflect.Field;
16620import java.lang.reflect.InvocationTargetException;
16621import java.lang.reflect.Method;
16622import java.net.URL;
16623import java.net.URLClassLoader;
16624import java.util.ArrayList;
16625
16626public class conftestSharedChecker {
16627
16628    /**
16629     * Required arguments :
16630     *  argv[0]: name of the jar package
16631     *  argv[1]: name of the class (with the package prefix)
16632     *  argv[2]: possible paths of the jar package (separated by ':')
16633     *
16634     * Optional arguments:
16635     *  argv[3]: field or method used to retrieve the version
16636     *  argv[4]: expected version
16637     *  argv[5]: String comparator :
16638     *      "="  for exact version
16639     */
16640    public static void main(String[] argv) {
16641        final String packageName = argv[0];
16642        final String className = argv[1];
16643        final String[] jarList = argv[2].split(":");
16644
16645        ArrayList<URL> found = new ArrayList<>();
16646        for(String jar : jarList)
16647        {
16648            try {
16649                File f = new File(jar);
16650                if (f.exists()) {
16651                    found.add(f.toURI().toURL());
16652                }
16653            } catch (IOException ex) {
16654                System.err.println(ex.toString());
16655            }
16656        }
16657
16658        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
16659        URL klassURL = null;
16660        Class<?> klass = null;
16661        try {
16662            String resourceName = className.replace(".", "/") + ".class";
16663            klassURL = localClassLoader.getResource(resourceName);
16664            klass = localClassLoader.loadClass(className);
16665        } catch (ClassNotFoundException ex) {
16666            System.err.println(className + " not found");
16667            System.exit(-1);
16668        }
16669
16670        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
16671        String path = pathURL.substring(pathURL.indexOf(':') + 1);
16672        System.err.println("found: " + path);
16673
16674        String version;
16675        if (!"".equals(argv[3])) {
16676            version = checkVersion(klass, argv);
16677        } else {
16678            version = klass.getPackage().getSpecificationVersion();
16679        }
16680
16681        System.out.println(path + " " + version);
16682    }
16683
16684    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
16685        final String versionMethod = argv[3];
16686        final String expected = argv[4];
16687        final String atLeastOrEqual;
16688        if (!"".equals(argv[5])) {
16689            atLeastOrEqual = argv[5];
16690        } else {
16691            atLeastOrEqual = "<=";
16692        }
16693
16694        String value = "";
16695        if (versionMethod.isEmpty()) {
16696            value = klass.getPackage().getSpecificationVersion();
16697            compareAndDisplay(atLeastOrEqual, expected, value);
16698            return value;
16699        }
16700
16701        try {
16702            try {
16703                Field field = klass.getField(versionMethod);
16704                value = String.valueOf(field.get(null));
16705                compareAndDisplay(atLeastOrEqual, expected, value);
16706            } catch (NoSuchFieldException fe) {
16707                Method method = null;
16708                try {
16709                    method = klass.getMethod(versionMethod);
16710                } catch (NoSuchMethodException ex) {
16711                    System.err.println(ex.toString());
16712                    System.exit(-3);
16713                }
16714
16715                try {
16716                    value = String.valueOf(method.invoke(null));
16717                    compareAndDisplay(atLeastOrEqual, expected, value);
16718                } catch (NullPointerException ex) {
16719                    value = String.valueOf(method.invoke(klass.newInstance()));
16720                    compareAndDisplay(atLeastOrEqual, expected, value);
16721                }
16722            }
16723        } catch (IllegalAccessException ex) {
16724            System.err.println(ex);
16725            System.exit(-2);
16726        } catch (InvocationTargetException ex) {
16727            System.err.println(ex);
16728            System.exit(-2);
16729        } catch (InstantiationException ex) {
16730            System.err.println(ex);
16731            System.exit(-2);
16732        }
16733        return value;
16734    }
16735
16736    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
16737        int cmp = compare(expected, value);
16738
16739        switch(atLeastOrEqual) {
16740            case ">":
16741                if (cmp > 0) {
16742                    return;
16743                } else {
16744                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16745                    System.exit(-4);
16746                }
16747            case "==":
16748                if (cmp == 0) {
16749                    return;
16750                } else {
16751                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16752                    System.exit(-4);
16753                }
16754            case "<=":
16755                if (cmp <= 0) {
16756                    return;
16757                } else {
16758                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16759                    System.exit(-4);
16760                }
16761            default:
16762                System.err.println("unable to compare with "+atLeastOrEqual);
16763                System.exit(-4);
16764        }
16765    }
16766
16767    private static int compare(String v1, String v2) {
16768        String s1 = normalisedVersion(v1);
16769        String s2 = normalisedVersion(v2);
16770
16771        System.err.println("compare: " + v1 + " normalised to " + s1);
16772        System.err.println("compare: " + v2 + " normalised to " + s2);
16773        return s1.compareTo(s2);
16774    }
16775
16776    private static String normalisedVersion(String version) {
16777        return normalisedVersion(version, ".", 4);
16778    }
16779
16780    private static String normalisedVersion(String version, String sep, int maxWidth) {
16781        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
16782        StringBuilder sb = new StringBuilder();
16783        for (String s : split) {
16784            sb.append(String.format("%" + maxWidth + 's', s));
16785        }
16786        return sb.toString();
16787    }
16788}
16789EOF
16790
16791    CLASSPATH=$ac_java_classpath
16792    export CLASSPATH
16793    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
16794    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
16795        echo "configure: conftestSharedChecker.class available" >&5
16796    else
16797        echo "configure: failed program was:" >&5
16798        cat conftestSharedChecker.java >&5
16799        echo "configure: CLASSPATH was $CLASSPATH" >&5
16800    fi
16801
16802    fi
16803
16804    CLASSPATH=$ac_java_classpath
16805    export CLASSPATH
16806    echo "CLASSPATH="$CLASSPATH >&5
16807    cmd="$JAVA conftestSharedChecker \"jhall\" \"javax.help.JHelp\" \"$jar_resolved\" \"\" \"\" \"\""
16808    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
16809        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
16810$(tail -n 1 conftestSharedChecker.java.output)
16811EOF
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
16813$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
16814        echo "yes" >&5
16815        # append the found file to the classpath to manage jar dependency
16816        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
16817    else
16818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16819$as_echo "no" >&6; }
16820      if test ""yes"" = "yes"; then
16821         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jhall used by Scilab Help Browser (looking for package javax.help.JHelp)" >&5
16822$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jhall used by Scilab Help Browser (looking for package javax.help.JHelp)" >&2;}
16823      else
16824          as_fn_error $? "Could not find or use the Java package/jar jhall used by Scilab Help Browser (looking for package javax.help.JHelp)" "$LINENO" 5
16825      fi
16826    fi
16827    if test -f conftestSharedChecker.java.output; then
16828        rm conftestSharedChecker.java.output
16829    fi
16830
16831                # Named differently under Mandriva or Fedora
16832                if test -z "$PACKAGE_JAR_FILE"; then
16833
16834
16835
16836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking javahelp2" >&5
16837$as_echo_n "checking javahelp2... " >&6; }
16838    PACKAGE_JAR_FILE=
16839
16840    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
16841
16842    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'javahelp2.jar' -or -name 'libjavahelp2.jar' -or -name 'libjavahelp2-java.jar' -or -name 'javahelp2*.jar' \) 2>/dev/null |tr '\n' ':')."
16843
16844    if test ! -f conftestSharedChecker.class ; then
16845
16846    cat << \EOF > conftestSharedChecker.java
16847// #line 16847 "configure"
16848import java.util.regex.Pattern;
16849import java.io.File;
16850import java.io.IOException;
16851import java.lang.reflect.Field;
16852import java.lang.reflect.InvocationTargetException;
16853import java.lang.reflect.Method;
16854import java.net.URL;
16855import java.net.URLClassLoader;
16856import java.util.ArrayList;
16857
16858public class conftestSharedChecker {
16859
16860    /**
16861     * Required arguments :
16862     *  argv[0]: name of the jar package
16863     *  argv[1]: name of the class (with the package prefix)
16864     *  argv[2]: possible paths of the jar package (separated by ':')
16865     *
16866     * Optional arguments:
16867     *  argv[3]: field or method used to retrieve the version
16868     *  argv[4]: expected version
16869     *  argv[5]: String comparator :
16870     *      "="  for exact version
16871     */
16872    public static void main(String[] argv) {
16873        final String packageName = argv[0];
16874        final String className = argv[1];
16875        final String[] jarList = argv[2].split(":");
16876
16877        ArrayList<URL> found = new ArrayList<>();
16878        for(String jar : jarList)
16879        {
16880            try {
16881                File f = new File(jar);
16882                if (f.exists()) {
16883                    found.add(f.toURI().toURL());
16884                }
16885            } catch (IOException ex) {
16886                System.err.println(ex.toString());
16887            }
16888        }
16889
16890        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
16891        URL klassURL = null;
16892        Class<?> klass = null;
16893        try {
16894            String resourceName = className.replace(".", "/") + ".class";
16895            klassURL = localClassLoader.getResource(resourceName);
16896            klass = localClassLoader.loadClass(className);
16897        } catch (ClassNotFoundException ex) {
16898            System.err.println(className + " not found");
16899            System.exit(-1);
16900        }
16901
16902        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
16903        String path = pathURL.substring(pathURL.indexOf(':') + 1);
16904        System.err.println("found: " + path);
16905
16906        String version;
16907        if (!"".equals(argv[3])) {
16908            version = checkVersion(klass, argv);
16909        } else {
16910            version = klass.getPackage().getSpecificationVersion();
16911        }
16912
16913        System.out.println(path + " " + version);
16914    }
16915
16916    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
16917        final String versionMethod = argv[3];
16918        final String expected = argv[4];
16919        final String atLeastOrEqual;
16920        if (!"".equals(argv[5])) {
16921            atLeastOrEqual = argv[5];
16922        } else {
16923            atLeastOrEqual = "<=";
16924        }
16925
16926        String value = "";
16927        if (versionMethod.isEmpty()) {
16928            value = klass.getPackage().getSpecificationVersion();
16929            compareAndDisplay(atLeastOrEqual, expected, value);
16930            return value;
16931        }
16932
16933        try {
16934            try {
16935                Field field = klass.getField(versionMethod);
16936                value = String.valueOf(field.get(null));
16937                compareAndDisplay(atLeastOrEqual, expected, value);
16938            } catch (NoSuchFieldException fe) {
16939                Method method = null;
16940                try {
16941                    method = klass.getMethod(versionMethod);
16942                } catch (NoSuchMethodException ex) {
16943                    System.err.println(ex.toString());
16944                    System.exit(-3);
16945                }
16946
16947                try {
16948                    value = String.valueOf(method.invoke(null));
16949                    compareAndDisplay(atLeastOrEqual, expected, value);
16950                } catch (NullPointerException ex) {
16951                    value = String.valueOf(method.invoke(klass.newInstance()));
16952                    compareAndDisplay(atLeastOrEqual, expected, value);
16953                }
16954            }
16955        } catch (IllegalAccessException ex) {
16956            System.err.println(ex);
16957            System.exit(-2);
16958        } catch (InvocationTargetException ex) {
16959            System.err.println(ex);
16960            System.exit(-2);
16961        } catch (InstantiationException ex) {
16962            System.err.println(ex);
16963            System.exit(-2);
16964        }
16965        return value;
16966    }
16967
16968    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
16969        int cmp = compare(expected, value);
16970
16971        switch(atLeastOrEqual) {
16972            case ">":
16973                if (cmp > 0) {
16974                    return;
16975                } else {
16976                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16977                    System.exit(-4);
16978                }
16979            case "==":
16980                if (cmp == 0) {
16981                    return;
16982                } else {
16983                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16984                    System.exit(-4);
16985                }
16986            case "<=":
16987                if (cmp <= 0) {
16988                    return;
16989                } else {
16990                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
16991                    System.exit(-4);
16992                }
16993            default:
16994                System.err.println("unable to compare with "+atLeastOrEqual);
16995                System.exit(-4);
16996        }
16997    }
16998
16999    private static int compare(String v1, String v2) {
17000        String s1 = normalisedVersion(v1);
17001        String s2 = normalisedVersion(v2);
17002
17003        System.err.println("compare: " + v1 + " normalised to " + s1);
17004        System.err.println("compare: " + v2 + " normalised to " + s2);
17005        return s1.compareTo(s2);
17006    }
17007
17008    private static String normalisedVersion(String version) {
17009        return normalisedVersion(version, ".", 4);
17010    }
17011
17012    private static String normalisedVersion(String version, String sep, int maxWidth) {
17013        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
17014        StringBuilder sb = new StringBuilder();
17015        for (String s : split) {
17016            sb.append(String.format("%" + maxWidth + 's', s));
17017        }
17018        return sb.toString();
17019    }
17020}
17021EOF
17022
17023    CLASSPATH=$ac_java_classpath
17024    export CLASSPATH
17025    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
17026    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
17027        echo "configure: conftestSharedChecker.class available" >&5
17028    else
17029        echo "configure: failed program was:" >&5
17030        cat conftestSharedChecker.java >&5
17031        echo "configure: CLASSPATH was $CLASSPATH" >&5
17032    fi
17033
17034    fi
17035
17036    CLASSPATH=$ac_java_classpath
17037    export CLASSPATH
17038    echo "CLASSPATH="$CLASSPATH >&5
17039    cmd="$JAVA conftestSharedChecker \"javahelp2\" \"javax.help.JHelp\" \"$jar_resolved\" \"\" \"\" \"\""
17040    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
17041        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
17042$(tail -n 1 conftestSharedChecker.java.output)
17043EOF
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
17045$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
17046        echo "yes" >&5
17047        # append the found file to the classpath to manage jar dependency
17048        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
17049    else
17050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17051$as_echo "no" >&6; }
17052      if test "" = "yes"; then
17053         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar javahelp2 used by Scilab Help Browser (looking for package javax.help.JHelp)" >&5
17054$as_echo "$as_me: WARNING: Could not find or use the Java package/jar javahelp2 used by Scilab Help Browser (looking for package javax.help.JHelp)" >&2;}
17055      else
17056          as_fn_error $? "Could not find or use the Java package/jar javahelp2 used by Scilab Help Browser (looking for package javax.help.JHelp)" "$LINENO" 5
17057      fi
17058    fi
17059    if test -f conftestSharedChecker.java.output; then
17060        rm conftestSharedChecker.java.output
17061    fi
17062
17063                fi
17064                JHALL=$PACKAGE_JAR_FILE
17065
17066
17067                # Lucene Apache - core
17068
17069
17070
17071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking lucene-core" >&5
17072$as_echo_n "checking lucene-core... " >&6; }
17073    PACKAGE_JAR_FILE=
17074
17075    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
17076
17077    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'lucene-core.jar' -or -name 'liblucene-core.jar' -or -name 'liblucene-core-java.jar' -or -name 'lucene-core*.jar' \) 2>/dev/null |tr '\n' ':')."
17078
17079    if test ! -f conftestSharedChecker.class ; then
17080
17081    cat << \EOF > conftestSharedChecker.java
17082// #line 17082 "configure"
17083import java.util.regex.Pattern;
17084import java.io.File;
17085import java.io.IOException;
17086import java.lang.reflect.Field;
17087import java.lang.reflect.InvocationTargetException;
17088import java.lang.reflect.Method;
17089import java.net.URL;
17090import java.net.URLClassLoader;
17091import java.util.ArrayList;
17092
17093public class conftestSharedChecker {
17094
17095    /**
17096     * Required arguments :
17097     *  argv[0]: name of the jar package
17098     *  argv[1]: name of the class (with the package prefix)
17099     *  argv[2]: possible paths of the jar package (separated by ':')
17100     *
17101     * Optional arguments:
17102     *  argv[3]: field or method used to retrieve the version
17103     *  argv[4]: expected version
17104     *  argv[5]: String comparator :
17105     *      "="  for exact version
17106     */
17107    public static void main(String[] argv) {
17108        final String packageName = argv[0];
17109        final String className = argv[1];
17110        final String[] jarList = argv[2].split(":");
17111
17112        ArrayList<URL> found = new ArrayList<>();
17113        for(String jar : jarList)
17114        {
17115            try {
17116                File f = new File(jar);
17117                if (f.exists()) {
17118                    found.add(f.toURI().toURL());
17119                }
17120            } catch (IOException ex) {
17121                System.err.println(ex.toString());
17122            }
17123        }
17124
17125        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
17126        URL klassURL = null;
17127        Class<?> klass = null;
17128        try {
17129            String resourceName = className.replace(".", "/") + ".class";
17130            klassURL = localClassLoader.getResource(resourceName);
17131            klass = localClassLoader.loadClass(className);
17132        } catch (ClassNotFoundException ex) {
17133            System.err.println(className + " not found");
17134            System.exit(-1);
17135        }
17136
17137        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
17138        String path = pathURL.substring(pathURL.indexOf(':') + 1);
17139        System.err.println("found: " + path);
17140
17141        String version;
17142        if (!"".equals(argv[3])) {
17143            version = checkVersion(klass, argv);
17144        } else {
17145            version = klass.getPackage().getSpecificationVersion();
17146        }
17147
17148        System.out.println(path + " " + version);
17149    }
17150
17151    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
17152        final String versionMethod = argv[3];
17153        final String expected = argv[4];
17154        final String atLeastOrEqual;
17155        if (!"".equals(argv[5])) {
17156            atLeastOrEqual = argv[5];
17157        } else {
17158            atLeastOrEqual = "<=";
17159        }
17160
17161        String value = "";
17162        if (versionMethod.isEmpty()) {
17163            value = klass.getPackage().getSpecificationVersion();
17164            compareAndDisplay(atLeastOrEqual, expected, value);
17165            return value;
17166        }
17167
17168        try {
17169            try {
17170                Field field = klass.getField(versionMethod);
17171                value = String.valueOf(field.get(null));
17172                compareAndDisplay(atLeastOrEqual, expected, value);
17173            } catch (NoSuchFieldException fe) {
17174                Method method = null;
17175                try {
17176                    method = klass.getMethod(versionMethod);
17177                } catch (NoSuchMethodException ex) {
17178                    System.err.println(ex.toString());
17179                    System.exit(-3);
17180                }
17181
17182                try {
17183                    value = String.valueOf(method.invoke(null));
17184                    compareAndDisplay(atLeastOrEqual, expected, value);
17185                } catch (NullPointerException ex) {
17186                    value = String.valueOf(method.invoke(klass.newInstance()));
17187                    compareAndDisplay(atLeastOrEqual, expected, value);
17188                }
17189            }
17190        } catch (IllegalAccessException ex) {
17191            System.err.println(ex);
17192            System.exit(-2);
17193        } catch (InvocationTargetException ex) {
17194            System.err.println(ex);
17195            System.exit(-2);
17196        } catch (InstantiationException ex) {
17197            System.err.println(ex);
17198            System.exit(-2);
17199        }
17200        return value;
17201    }
17202
17203    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
17204        int cmp = compare(expected, value);
17205
17206        switch(atLeastOrEqual) {
17207            case ">":
17208                if (cmp > 0) {
17209                    return;
17210                } else {
17211                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17212                    System.exit(-4);
17213                }
17214            case "==":
17215                if (cmp == 0) {
17216                    return;
17217                } else {
17218                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17219                    System.exit(-4);
17220                }
17221            case "<=":
17222                if (cmp <= 0) {
17223                    return;
17224                } else {
17225                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17226                    System.exit(-4);
17227                }
17228            default:
17229                System.err.println("unable to compare with "+atLeastOrEqual);
17230                System.exit(-4);
17231        }
17232    }
17233
17234    private static int compare(String v1, String v2) {
17235        String s1 = normalisedVersion(v1);
17236        String s2 = normalisedVersion(v2);
17237
17238        System.err.println("compare: " + v1 + " normalised to " + s1);
17239        System.err.println("compare: " + v2 + " normalised to " + s2);
17240        return s1.compareTo(s2);
17241    }
17242
17243    private static String normalisedVersion(String version) {
17244        return normalisedVersion(version, ".", 4);
17245    }
17246
17247    private static String normalisedVersion(String version, String sep, int maxWidth) {
17248        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
17249        StringBuilder sb = new StringBuilder();
17250        for (String s : split) {
17251            sb.append(String.format("%" + maxWidth + 's', s));
17252        }
17253        return sb.toString();
17254    }
17255}
17256EOF
17257
17258    CLASSPATH=$ac_java_classpath
17259    export CLASSPATH
17260    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
17261    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
17262        echo "configure: conftestSharedChecker.class available" >&5
17263    else
17264        echo "configure: failed program was:" >&5
17265        cat conftestSharedChecker.java >&5
17266        echo "configure: CLASSPATH was $CLASSPATH" >&5
17267    fi
17268
17269    fi
17270
17271    CLASSPATH=$ac_java_classpath
17272    export CLASSPATH
17273    echo "CLASSPATH="$CLASSPATH >&5
17274    cmd="$JAVA conftestSharedChecker \"lucene-core\" \"org.apache.lucene.LucenePackage\" \"$jar_resolved\" \"\" \"\" \"\""
17275    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
17276        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
17277$(tail -n 1 conftestSharedChecker.java.output)
17278EOF
17279        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
17280$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
17281        echo "yes" >&5
17282        # append the found file to the classpath to manage jar dependency
17283        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
17284    else
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17286$as_echo "no" >&6; }
17287      if test "" = "yes"; then
17288         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-core used by Lucene (looking for package org.apache.lucene.LucenePackage)" >&5
17289$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-core used by Lucene (looking for package org.apache.lucene.LucenePackage)" >&2;}
17290      else
17291          as_fn_error $? "Could not find or use the Java package/jar lucene-core used by Lucene (looking for package org.apache.lucene.LucenePackage)" "$LINENO" 5
17292      fi
17293    fi
17294    if test -f conftestSharedChecker.java.output; then
17295        rm conftestSharedChecker.java.output
17296    fi
17297
17298                LUCENE=$PACKAGE_JAR_FILE
17299
17300
17301                # Lucene Apache - analyzers-common
17302
17303
17304
17305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking lucene-analyzers-common" >&5
17306$as_echo_n "checking lucene-analyzers-common... " >&6; }
17307    PACKAGE_JAR_FILE=
17308
17309    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
17310
17311    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'lucene-analyzers-common.jar' -or -name 'liblucene-analyzers-common.jar' -or -name 'liblucene-analyzers-common-java.jar' -or -name 'lucene-analyzers-common*.jar' \) 2>/dev/null |tr '\n' ':')."
17312
17313    if test ! -f conftestSharedChecker.class ; then
17314
17315    cat << \EOF > conftestSharedChecker.java
17316// #line 17316 "configure"
17317import java.util.regex.Pattern;
17318import java.io.File;
17319import java.io.IOException;
17320import java.lang.reflect.Field;
17321import java.lang.reflect.InvocationTargetException;
17322import java.lang.reflect.Method;
17323import java.net.URL;
17324import java.net.URLClassLoader;
17325import java.util.ArrayList;
17326
17327public class conftestSharedChecker {
17328
17329    /**
17330     * Required arguments :
17331     *  argv[0]: name of the jar package
17332     *  argv[1]: name of the class (with the package prefix)
17333     *  argv[2]: possible paths of the jar package (separated by ':')
17334     *
17335     * Optional arguments:
17336     *  argv[3]: field or method used to retrieve the version
17337     *  argv[4]: expected version
17338     *  argv[5]: String comparator :
17339     *      "="  for exact version
17340     */
17341    public static void main(String[] argv) {
17342        final String packageName = argv[0];
17343        final String className = argv[1];
17344        final String[] jarList = argv[2].split(":");
17345
17346        ArrayList<URL> found = new ArrayList<>();
17347        for(String jar : jarList)
17348        {
17349            try {
17350                File f = new File(jar);
17351                if (f.exists()) {
17352                    found.add(f.toURI().toURL());
17353                }
17354            } catch (IOException ex) {
17355                System.err.println(ex.toString());
17356            }
17357        }
17358
17359        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
17360        URL klassURL = null;
17361        Class<?> klass = null;
17362        try {
17363            String resourceName = className.replace(".", "/") + ".class";
17364            klassURL = localClassLoader.getResource(resourceName);
17365            klass = localClassLoader.loadClass(className);
17366        } catch (ClassNotFoundException ex) {
17367            System.err.println(className + " not found");
17368            System.exit(-1);
17369        }
17370
17371        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
17372        String path = pathURL.substring(pathURL.indexOf(':') + 1);
17373        System.err.println("found: " + path);
17374
17375        String version;
17376        if (!"".equals(argv[3])) {
17377            version = checkVersion(klass, argv);
17378        } else {
17379            version = klass.getPackage().getSpecificationVersion();
17380        }
17381
17382        System.out.println(path + " " + version);
17383    }
17384
17385    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
17386        final String versionMethod = argv[3];
17387        final String expected = argv[4];
17388        final String atLeastOrEqual;
17389        if (!"".equals(argv[5])) {
17390            atLeastOrEqual = argv[5];
17391        } else {
17392            atLeastOrEqual = "<=";
17393        }
17394
17395        String value = "";
17396        if (versionMethod.isEmpty()) {
17397            value = klass.getPackage().getSpecificationVersion();
17398            compareAndDisplay(atLeastOrEqual, expected, value);
17399            return value;
17400        }
17401
17402        try {
17403            try {
17404                Field field = klass.getField(versionMethod);
17405                value = String.valueOf(field.get(null));
17406                compareAndDisplay(atLeastOrEqual, expected, value);
17407            } catch (NoSuchFieldException fe) {
17408                Method method = null;
17409                try {
17410                    method = klass.getMethod(versionMethod);
17411                } catch (NoSuchMethodException ex) {
17412                    System.err.println(ex.toString());
17413                    System.exit(-3);
17414                }
17415
17416                try {
17417                    value = String.valueOf(method.invoke(null));
17418                    compareAndDisplay(atLeastOrEqual, expected, value);
17419                } catch (NullPointerException ex) {
17420                    value = String.valueOf(method.invoke(klass.newInstance()));
17421                    compareAndDisplay(atLeastOrEqual, expected, value);
17422                }
17423            }
17424        } catch (IllegalAccessException ex) {
17425            System.err.println(ex);
17426            System.exit(-2);
17427        } catch (InvocationTargetException ex) {
17428            System.err.println(ex);
17429            System.exit(-2);
17430        } catch (InstantiationException ex) {
17431            System.err.println(ex);
17432            System.exit(-2);
17433        }
17434        return value;
17435    }
17436
17437    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
17438        int cmp = compare(expected, value);
17439
17440        switch(atLeastOrEqual) {
17441            case ">":
17442                if (cmp > 0) {
17443                    return;
17444                } else {
17445                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17446                    System.exit(-4);
17447                }
17448            case "==":
17449                if (cmp == 0) {
17450                    return;
17451                } else {
17452                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17453                    System.exit(-4);
17454                }
17455            case "<=":
17456                if (cmp <= 0) {
17457                    return;
17458                } else {
17459                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17460                    System.exit(-4);
17461                }
17462            default:
17463                System.err.println("unable to compare with "+atLeastOrEqual);
17464                System.exit(-4);
17465        }
17466    }
17467
17468    private static int compare(String v1, String v2) {
17469        String s1 = normalisedVersion(v1);
17470        String s2 = normalisedVersion(v2);
17471
17472        System.err.println("compare: " + v1 + " normalised to " + s1);
17473        System.err.println("compare: " + v2 + " normalised to " + s2);
17474        return s1.compareTo(s2);
17475    }
17476
17477    private static String normalisedVersion(String version) {
17478        return normalisedVersion(version, ".", 4);
17479    }
17480
17481    private static String normalisedVersion(String version, String sep, int maxWidth) {
17482        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
17483        StringBuilder sb = new StringBuilder();
17484        for (String s : split) {
17485            sb.append(String.format("%" + maxWidth + 's', s));
17486        }
17487        return sb.toString();
17488    }
17489}
17490EOF
17491
17492    CLASSPATH=$ac_java_classpath
17493    export CLASSPATH
17494    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
17495    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
17496        echo "configure: conftestSharedChecker.class available" >&5
17497    else
17498        echo "configure: failed program was:" >&5
17499        cat conftestSharedChecker.java >&5
17500        echo "configure: CLASSPATH was $CLASSPATH" >&5
17501    fi
17502
17503    fi
17504
17505    CLASSPATH=$ac_java_classpath
17506    export CLASSPATH
17507    echo "CLASSPATH="$CLASSPATH >&5
17508    cmd="$JAVA conftestSharedChecker \"lucene-analyzers-common\" \"org.apache.lucene.analysis.standard.StandardAnalyzer\" \"$jar_resolved\" \"\" \"\" \"\""
17509    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
17510        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
17511$(tail -n 1 conftestSharedChecker.java.output)
17512EOF
17513        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
17514$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
17515        echo "yes" >&5
17516        # append the found file to the classpath to manage jar dependency
17517        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
17518    else
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17520$as_echo "no" >&6; }
17521      if test "" = "yes"; then
17522         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-analyzers-common used by Lucene StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" >&5
17523$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-analyzers-common used by Lucene StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" >&2;}
17524      else
17525          as_fn_error $? "Could not find or use the Java package/jar lucene-analyzers-common used by Lucene StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" "$LINENO" 5
17526      fi
17527    fi
17528    if test -f conftestSharedChecker.java.output; then
17529        rm conftestSharedChecker.java.output
17530    fi
17531
17532                LUCENE_ANALYZER=$PACKAGE_JAR_FILE
17533
17534
17535                # Lucene Apache - lucene-queryparser
17536
17537
17538
17539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking lucene-queryparser" >&5
17540$as_echo_n "checking lucene-queryparser... " >&6; }
17541    PACKAGE_JAR_FILE=
17542
17543    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
17544
17545    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'lucene-queryparser.jar' -or -name 'liblucene-queryparser.jar' -or -name 'liblucene-queryparser-java.jar' -or -name 'lucene-queryparser*.jar' \) 2>/dev/null |tr '\n' ':')."
17546
17547    if test ! -f conftestSharedChecker.class ; then
17548
17549    cat << \EOF > conftestSharedChecker.java
17550// #line 17550 "configure"
17551import java.util.regex.Pattern;
17552import java.io.File;
17553import java.io.IOException;
17554import java.lang.reflect.Field;
17555import java.lang.reflect.InvocationTargetException;
17556import java.lang.reflect.Method;
17557import java.net.URL;
17558import java.net.URLClassLoader;
17559import java.util.ArrayList;
17560
17561public class conftestSharedChecker {
17562
17563    /**
17564     * Required arguments :
17565     *  argv[0]: name of the jar package
17566     *  argv[1]: name of the class (with the package prefix)
17567     *  argv[2]: possible paths of the jar package (separated by ':')
17568     *
17569     * Optional arguments:
17570     *  argv[3]: field or method used to retrieve the version
17571     *  argv[4]: expected version
17572     *  argv[5]: String comparator :
17573     *      "="  for exact version
17574     */
17575    public static void main(String[] argv) {
17576        final String packageName = argv[0];
17577        final String className = argv[1];
17578        final String[] jarList = argv[2].split(":");
17579
17580        ArrayList<URL> found = new ArrayList<>();
17581        for(String jar : jarList)
17582        {
17583            try {
17584                File f = new File(jar);
17585                if (f.exists()) {
17586                    found.add(f.toURI().toURL());
17587                }
17588            } catch (IOException ex) {
17589                System.err.println(ex.toString());
17590            }
17591        }
17592
17593        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
17594        URL klassURL = null;
17595        Class<?> klass = null;
17596        try {
17597            String resourceName = className.replace(".", "/") + ".class";
17598            klassURL = localClassLoader.getResource(resourceName);
17599            klass = localClassLoader.loadClass(className);
17600        } catch (ClassNotFoundException ex) {
17601            System.err.println(className + " not found");
17602            System.exit(-1);
17603        }
17604
17605        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
17606        String path = pathURL.substring(pathURL.indexOf(':') + 1);
17607        System.err.println("found: " + path);
17608
17609        String version;
17610        if (!"".equals(argv[3])) {
17611            version = checkVersion(klass, argv);
17612        } else {
17613            version = klass.getPackage().getSpecificationVersion();
17614        }
17615
17616        System.out.println(path + " " + version);
17617    }
17618
17619    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
17620        final String versionMethod = argv[3];
17621        final String expected = argv[4];
17622        final String atLeastOrEqual;
17623        if (!"".equals(argv[5])) {
17624            atLeastOrEqual = argv[5];
17625        } else {
17626            atLeastOrEqual = "<=";
17627        }
17628
17629        String value = "";
17630        if (versionMethod.isEmpty()) {
17631            value = klass.getPackage().getSpecificationVersion();
17632            compareAndDisplay(atLeastOrEqual, expected, value);
17633            return value;
17634        }
17635
17636        try {
17637            try {
17638                Field field = klass.getField(versionMethod);
17639                value = String.valueOf(field.get(null));
17640                compareAndDisplay(atLeastOrEqual, expected, value);
17641            } catch (NoSuchFieldException fe) {
17642                Method method = null;
17643                try {
17644                    method = klass.getMethod(versionMethod);
17645                } catch (NoSuchMethodException ex) {
17646                    System.err.println(ex.toString());
17647                    System.exit(-3);
17648                }
17649
17650                try {
17651                    value = String.valueOf(method.invoke(null));
17652                    compareAndDisplay(atLeastOrEqual, expected, value);
17653                } catch (NullPointerException ex) {
17654                    value = String.valueOf(method.invoke(klass.newInstance()));
17655                    compareAndDisplay(atLeastOrEqual, expected, value);
17656                }
17657            }
17658        } catch (IllegalAccessException ex) {
17659            System.err.println(ex);
17660            System.exit(-2);
17661        } catch (InvocationTargetException ex) {
17662            System.err.println(ex);
17663            System.exit(-2);
17664        } catch (InstantiationException ex) {
17665            System.err.println(ex);
17666            System.exit(-2);
17667        }
17668        return value;
17669    }
17670
17671    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
17672        int cmp = compare(expected, value);
17673
17674        switch(atLeastOrEqual) {
17675            case ">":
17676                if (cmp > 0) {
17677                    return;
17678                } else {
17679                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17680                    System.exit(-4);
17681                }
17682            case "==":
17683                if (cmp == 0) {
17684                    return;
17685                } else {
17686                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17687                    System.exit(-4);
17688                }
17689            case "<=":
17690                if (cmp <= 0) {
17691                    return;
17692                } else {
17693                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17694                    System.exit(-4);
17695                }
17696            default:
17697                System.err.println("unable to compare with "+atLeastOrEqual);
17698                System.exit(-4);
17699        }
17700    }
17701
17702    private static int compare(String v1, String v2) {
17703        String s1 = normalisedVersion(v1);
17704        String s2 = normalisedVersion(v2);
17705
17706        System.err.println("compare: " + v1 + " normalised to " + s1);
17707        System.err.println("compare: " + v2 + " normalised to " + s2);
17708        return s1.compareTo(s2);
17709    }
17710
17711    private static String normalisedVersion(String version) {
17712        return normalisedVersion(version, ".", 4);
17713    }
17714
17715    private static String normalisedVersion(String version, String sep, int maxWidth) {
17716        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
17717        StringBuilder sb = new StringBuilder();
17718        for (String s : split) {
17719            sb.append(String.format("%" + maxWidth + 's', s));
17720        }
17721        return sb.toString();
17722    }
17723}
17724EOF
17725
17726    CLASSPATH=$ac_java_classpath
17727    export CLASSPATH
17728    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
17729    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
17730        echo "configure: conftestSharedChecker.class available" >&5
17731    else
17732        echo "configure: failed program was:" >&5
17733        cat conftestSharedChecker.java >&5
17734        echo "configure: CLASSPATH was $CLASSPATH" >&5
17735    fi
17736
17737    fi
17738
17739    CLASSPATH=$ac_java_classpath
17740    export CLASSPATH
17741    echo "CLASSPATH="$CLASSPATH >&5
17742    cmd="$JAVA conftestSharedChecker \"lucene-queryparser\" \"org.apache.lucene.queryparser.classic.QueryParser\" \"$jar_resolved\" \"\" \"\" \"\""
17743    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
17744        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
17745$(tail -n 1 conftestSharedChecker.java.output)
17746EOF
17747        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
17748$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
17749        echo "yes" >&5
17750        # append the found file to the classpath to manage jar dependency
17751        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
17752    else
17753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17754$as_echo "no" >&6; }
17755      if test "" = "yes"; then
17756         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-queryparser used by Lucene QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" >&5
17757$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-queryparser used by Lucene QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" >&2;}
17758      else
17759          as_fn_error $? "Could not find or use the Java package/jar lucene-queryparser used by Lucene QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" "$LINENO" 5
17760      fi
17761    fi
17762    if test -f conftestSharedChecker.java.output; then
17763        rm conftestSharedChecker.java.output
17764    fi
17765
17766                LUCENE_PARSER=$PACKAGE_JAR_FILE
17767
17768
17769                # Console API
17770
17771
17772
17773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jrosetta-API" >&5
17774$as_echo_n "checking jrosetta-API... " >&6; }
17775    PACKAGE_JAR_FILE=
17776
17777    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
17778
17779    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jrosetta-API.jar' -or -name 'libjrosetta-API.jar' -or -name 'libjrosetta-API-java.jar' -or -name 'jrosetta-API*.jar' \) 2>/dev/null |tr '\n' ':')."
17780
17781    if test ! -f conftestSharedChecker.class ; then
17782
17783    cat << \EOF > conftestSharedChecker.java
17784// #line 17784 "configure"
17785import java.util.regex.Pattern;
17786import java.io.File;
17787import java.io.IOException;
17788import java.lang.reflect.Field;
17789import java.lang.reflect.InvocationTargetException;
17790import java.lang.reflect.Method;
17791import java.net.URL;
17792import java.net.URLClassLoader;
17793import java.util.ArrayList;
17794
17795public class conftestSharedChecker {
17796
17797    /**
17798     * Required arguments :
17799     *  argv[0]: name of the jar package
17800     *  argv[1]: name of the class (with the package prefix)
17801     *  argv[2]: possible paths of the jar package (separated by ':')
17802     *
17803     * Optional arguments:
17804     *  argv[3]: field or method used to retrieve the version
17805     *  argv[4]: expected version
17806     *  argv[5]: String comparator :
17807     *      "="  for exact version
17808     */
17809    public static void main(String[] argv) {
17810        final String packageName = argv[0];
17811        final String className = argv[1];
17812        final String[] jarList = argv[2].split(":");
17813
17814        ArrayList<URL> found = new ArrayList<>();
17815        for(String jar : jarList)
17816        {
17817            try {
17818                File f = new File(jar);
17819                if (f.exists()) {
17820                    found.add(f.toURI().toURL());
17821                }
17822            } catch (IOException ex) {
17823                System.err.println(ex.toString());
17824            }
17825        }
17826
17827        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
17828        URL klassURL = null;
17829        Class<?> klass = null;
17830        try {
17831            String resourceName = className.replace(".", "/") + ".class";
17832            klassURL = localClassLoader.getResource(resourceName);
17833            klass = localClassLoader.loadClass(className);
17834        } catch (ClassNotFoundException ex) {
17835            System.err.println(className + " not found");
17836            System.exit(-1);
17837        }
17838
17839        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
17840        String path = pathURL.substring(pathURL.indexOf(':') + 1);
17841        System.err.println("found: " + path);
17842
17843        String version;
17844        if (!"".equals(argv[3])) {
17845            version = checkVersion(klass, argv);
17846        } else {
17847            version = klass.getPackage().getSpecificationVersion();
17848        }
17849
17850        System.out.println(path + " " + version);
17851    }
17852
17853    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
17854        final String versionMethod = argv[3];
17855        final String expected = argv[4];
17856        final String atLeastOrEqual;
17857        if (!"".equals(argv[5])) {
17858            atLeastOrEqual = argv[5];
17859        } else {
17860            atLeastOrEqual = "<=";
17861        }
17862
17863        String value = "";
17864        if (versionMethod.isEmpty()) {
17865            value = klass.getPackage().getSpecificationVersion();
17866            compareAndDisplay(atLeastOrEqual, expected, value);
17867            return value;
17868        }
17869
17870        try {
17871            try {
17872                Field field = klass.getField(versionMethod);
17873                value = String.valueOf(field.get(null));
17874                compareAndDisplay(atLeastOrEqual, expected, value);
17875            } catch (NoSuchFieldException fe) {
17876                Method method = null;
17877                try {
17878                    method = klass.getMethod(versionMethod);
17879                } catch (NoSuchMethodException ex) {
17880                    System.err.println(ex.toString());
17881                    System.exit(-3);
17882                }
17883
17884                try {
17885                    value = String.valueOf(method.invoke(null));
17886                    compareAndDisplay(atLeastOrEqual, expected, value);
17887                } catch (NullPointerException ex) {
17888                    value = String.valueOf(method.invoke(klass.newInstance()));
17889                    compareAndDisplay(atLeastOrEqual, expected, value);
17890                }
17891            }
17892        } catch (IllegalAccessException ex) {
17893            System.err.println(ex);
17894            System.exit(-2);
17895        } catch (InvocationTargetException ex) {
17896            System.err.println(ex);
17897            System.exit(-2);
17898        } catch (InstantiationException ex) {
17899            System.err.println(ex);
17900            System.exit(-2);
17901        }
17902        return value;
17903    }
17904
17905    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
17906        int cmp = compare(expected, value);
17907
17908        switch(atLeastOrEqual) {
17909            case ">":
17910                if (cmp > 0) {
17911                    return;
17912                } else {
17913                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17914                    System.exit(-4);
17915                }
17916            case "==":
17917                if (cmp == 0) {
17918                    return;
17919                } else {
17920                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17921                    System.exit(-4);
17922                }
17923            case "<=":
17924                if (cmp <= 0) {
17925                    return;
17926                } else {
17927                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
17928                    System.exit(-4);
17929                }
17930            default:
17931                System.err.println("unable to compare with "+atLeastOrEqual);
17932                System.exit(-4);
17933        }
17934    }
17935
17936    private static int compare(String v1, String v2) {
17937        String s1 = normalisedVersion(v1);
17938        String s2 = normalisedVersion(v2);
17939
17940        System.err.println("compare: " + v1 + " normalised to " + s1);
17941        System.err.println("compare: " + v2 + " normalised to " + s2);
17942        return s1.compareTo(s2);
17943    }
17944
17945    private static String normalisedVersion(String version) {
17946        return normalisedVersion(version, ".", 4);
17947    }
17948
17949    private static String normalisedVersion(String version, String sep, int maxWidth) {
17950        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
17951        StringBuilder sb = new StringBuilder();
17952        for (String s : split) {
17953            sb.append(String.format("%" + maxWidth + 's', s));
17954        }
17955        return sb.toString();
17956    }
17957}
17958EOF
17959
17960    CLASSPATH=$ac_java_classpath
17961    export CLASSPATH
17962    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
17963    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
17964        echo "configure: conftestSharedChecker.class available" >&5
17965    else
17966        echo "configure: failed program was:" >&5
17967        cat conftestSharedChecker.java >&5
17968        echo "configure: CLASSPATH was $CLASSPATH" >&5
17969    fi
17970
17971    fi
17972
17973    CLASSPATH=$ac_java_classpath
17974    export CLASSPATH
17975    echo "CLASSPATH="$CLASSPATH >&5
17976    cmd="$JAVA conftestSharedChecker \"jrosetta-API\" \"com.artenum.rosetta.interfaces.core.ConsoleConfiguration\" \"$jar_resolved\" \"\" \"\" \"\""
17977    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
17978        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
17979$(tail -n 1 conftestSharedChecker.java.output)
17980EOF
17981        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
17982$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
17983        echo "yes" >&5
17984        # append the found file to the classpath to manage jar dependency
17985        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
17986    else
17987      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17988$as_echo "no" >&6; }
17989      if test ""yes"" = "yes"; then
17990         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jrosetta-API used by JRosetta : Console API Artenum / Scilab (looking for package com.artenum.rosetta.interfaces.core.ConsoleConfiguration)" >&5
17991$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jrosetta-API used by JRosetta : Console API Artenum / Scilab (looking for package com.artenum.rosetta.interfaces.core.ConsoleConfiguration)" >&2;}
17992      else
17993          as_fn_error $? "Could not find or use the Java package/jar jrosetta-API used by JRosetta : Console API Artenum / Scilab (looking for package com.artenum.rosetta.interfaces.core.ConsoleConfiguration)" "$LINENO" 5
17994      fi
17995    fi
17996    if test -f conftestSharedChecker.java.output; then
17997        rm conftestSharedChecker.java.output
17998    fi
17999
18000                if test -z "$PACKAGE_JAR_FILE"; then
18001
18002
18003
18004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jrosetta-api" >&5
18005$as_echo_n "checking jrosetta-api... " >&6; }
18006    PACKAGE_JAR_FILE=
18007
18008    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
18009
18010    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jrosetta-api.jar' -or -name 'libjrosetta-api.jar' -or -name 'libjrosetta-api-java.jar' -or -name 'jrosetta-api*.jar' \) 2>/dev/null |tr '\n' ':')."
18011
18012    if test ! -f conftestSharedChecker.class ; then
18013
18014    cat << \EOF > conftestSharedChecker.java
18015// #line 18015 "configure"
18016import java.util.regex.Pattern;
18017import java.io.File;
18018import java.io.IOException;
18019import java.lang.reflect.Field;
18020import java.lang.reflect.InvocationTargetException;
18021import java.lang.reflect.Method;
18022import java.net.URL;
18023import java.net.URLClassLoader;
18024import java.util.ArrayList;
18025
18026public class conftestSharedChecker {
18027
18028    /**
18029     * Required arguments :
18030     *  argv[0]: name of the jar package
18031     *  argv[1]: name of the class (with the package prefix)
18032     *  argv[2]: possible paths of the jar package (separated by ':')
18033     *
18034     * Optional arguments:
18035     *  argv[3]: field or method used to retrieve the version
18036     *  argv[4]: expected version
18037     *  argv[5]: String comparator :
18038     *      "="  for exact version
18039     */
18040    public static void main(String[] argv) {
18041        final String packageName = argv[0];
18042        final String className = argv[1];
18043        final String[] jarList = argv[2].split(":");
18044
18045        ArrayList<URL> found = new ArrayList<>();
18046        for(String jar : jarList)
18047        {
18048            try {
18049                File f = new File(jar);
18050                if (f.exists()) {
18051                    found.add(f.toURI().toURL());
18052                }
18053            } catch (IOException ex) {
18054                System.err.println(ex.toString());
18055            }
18056        }
18057
18058        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
18059        URL klassURL = null;
18060        Class<?> klass = null;
18061        try {
18062            String resourceName = className.replace(".", "/") + ".class";
18063            klassURL = localClassLoader.getResource(resourceName);
18064            klass = localClassLoader.loadClass(className);
18065        } catch (ClassNotFoundException ex) {
18066            System.err.println(className + " not found");
18067            System.exit(-1);
18068        }
18069
18070        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
18071        String path = pathURL.substring(pathURL.indexOf(':') + 1);
18072        System.err.println("found: " + path);
18073
18074        String version;
18075        if (!"".equals(argv[3])) {
18076            version = checkVersion(klass, argv);
18077        } else {
18078            version = klass.getPackage().getSpecificationVersion();
18079        }
18080
18081        System.out.println(path + " " + version);
18082    }
18083
18084    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
18085        final String versionMethod = argv[3];
18086        final String expected = argv[4];
18087        final String atLeastOrEqual;
18088        if (!"".equals(argv[5])) {
18089            atLeastOrEqual = argv[5];
18090        } else {
18091            atLeastOrEqual = "<=";
18092        }
18093
18094        String value = "";
18095        if (versionMethod.isEmpty()) {
18096            value = klass.getPackage().getSpecificationVersion();
18097            compareAndDisplay(atLeastOrEqual, expected, value);
18098            return value;
18099        }
18100
18101        try {
18102            try {
18103                Field field = klass.getField(versionMethod);
18104                value = String.valueOf(field.get(null));
18105                compareAndDisplay(atLeastOrEqual, expected, value);
18106            } catch (NoSuchFieldException fe) {
18107                Method method = null;
18108                try {
18109                    method = klass.getMethod(versionMethod);
18110                } catch (NoSuchMethodException ex) {
18111                    System.err.println(ex.toString());
18112                    System.exit(-3);
18113                }
18114
18115                try {
18116                    value = String.valueOf(method.invoke(null));
18117                    compareAndDisplay(atLeastOrEqual, expected, value);
18118                } catch (NullPointerException ex) {
18119                    value = String.valueOf(method.invoke(klass.newInstance()));
18120                    compareAndDisplay(atLeastOrEqual, expected, value);
18121                }
18122            }
18123        } catch (IllegalAccessException ex) {
18124            System.err.println(ex);
18125            System.exit(-2);
18126        } catch (InvocationTargetException ex) {
18127            System.err.println(ex);
18128            System.exit(-2);
18129        } catch (InstantiationException ex) {
18130            System.err.println(ex);
18131            System.exit(-2);
18132        }
18133        return value;
18134    }
18135
18136    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
18137        int cmp = compare(expected, value);
18138
18139        switch(atLeastOrEqual) {
18140            case ">":
18141                if (cmp > 0) {
18142                    return;
18143                } else {
18144                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18145                    System.exit(-4);
18146                }
18147            case "==":
18148                if (cmp == 0) {
18149                    return;
18150                } else {
18151                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18152                    System.exit(-4);
18153                }
18154            case "<=":
18155                if (cmp <= 0) {
18156                    return;
18157                } else {
18158                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18159                    System.exit(-4);
18160                }
18161            default:
18162                System.err.println("unable to compare with "+atLeastOrEqual);
18163                System.exit(-4);
18164        }
18165    }
18166
18167    private static int compare(String v1, String v2) {
18168        String s1 = normalisedVersion(v1);
18169        String s2 = normalisedVersion(v2);
18170
18171        System.err.println("compare: " + v1 + " normalised to " + s1);
18172        System.err.println("compare: " + v2 + " normalised to " + s2);
18173        return s1.compareTo(s2);
18174    }
18175
18176    private static String normalisedVersion(String version) {
18177        return normalisedVersion(version, ".", 4);
18178    }
18179
18180    private static String normalisedVersion(String version, String sep, int maxWidth) {
18181        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
18182        StringBuilder sb = new StringBuilder();
18183        for (String s : split) {
18184            sb.append(String.format("%" + maxWidth + 's', s));
18185        }
18186        return sb.toString();
18187    }
18188}
18189EOF
18190
18191    CLASSPATH=$ac_java_classpath
18192    export CLASSPATH
18193    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
18194    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
18195        echo "configure: conftestSharedChecker.class available" >&5
18196    else
18197        echo "configure: failed program was:" >&5
18198        cat conftestSharedChecker.java >&5
18199        echo "configure: CLASSPATH was $CLASSPATH" >&5
18200    fi
18201
18202    fi
18203
18204    CLASSPATH=$ac_java_classpath
18205    export CLASSPATH
18206    echo "CLASSPATH="$CLASSPATH >&5
18207    cmd="$JAVA conftestSharedChecker \"jrosetta-api\" \"com.artenum.rosetta.interfaces.core.ConsoleConfiguration\" \"$jar_resolved\" \"\" \"\" \"\""
18208    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
18209        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
18210$(tail -n 1 conftestSharedChecker.java.output)
18211EOF
18212        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
18213$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
18214        echo "yes" >&5
18215        # append the found file to the classpath to manage jar dependency
18216        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
18217    else
18218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220      if test "" = "yes"; then
18221         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jrosetta-api used by JRosetta : Console API Artenum / Scilab (looking for package com.artenum.rosetta.interfaces.core.ConsoleConfiguration)" >&5
18222$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jrosetta-api used by JRosetta : Console API Artenum / Scilab (looking for package com.artenum.rosetta.interfaces.core.ConsoleConfiguration)" >&2;}
18223      else
18224          as_fn_error $? "Could not find or use the Java package/jar jrosetta-api used by JRosetta : Console API Artenum / Scilab (looking for package com.artenum.rosetta.interfaces.core.ConsoleConfiguration)" "$LINENO" 5
18225      fi
18226    fi
18227    if test -f conftestSharedChecker.java.output; then
18228        rm conftestSharedChecker.java.output
18229    fi
18230
18231                fi
18232                JROSETTA_API=$PACKAGE_JAR_FILE
18233
18234
18235                # Console Core
18236
18237
18238
18239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jrosetta-engine" >&5
18240$as_echo_n "checking jrosetta-engine... " >&6; }
18241    PACKAGE_JAR_FILE=
18242
18243    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
18244
18245    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jrosetta-engine.jar' -or -name 'libjrosetta-engine.jar' -or -name 'libjrosetta-engine-java.jar' -or -name 'jrosetta-engine*.jar' \) 2>/dev/null |tr '\n' ':')."
18246
18247    if test ! -f conftestSharedChecker.class ; then
18248
18249    cat << \EOF > conftestSharedChecker.java
18250// #line 18250 "configure"
18251import java.util.regex.Pattern;
18252import java.io.File;
18253import java.io.IOException;
18254import java.lang.reflect.Field;
18255import java.lang.reflect.InvocationTargetException;
18256import java.lang.reflect.Method;
18257import java.net.URL;
18258import java.net.URLClassLoader;
18259import java.util.ArrayList;
18260
18261public class conftestSharedChecker {
18262
18263    /**
18264     * Required arguments :
18265     *  argv[0]: name of the jar package
18266     *  argv[1]: name of the class (with the package prefix)
18267     *  argv[2]: possible paths of the jar package (separated by ':')
18268     *
18269     * Optional arguments:
18270     *  argv[3]: field or method used to retrieve the version
18271     *  argv[4]: expected version
18272     *  argv[5]: String comparator :
18273     *      "="  for exact version
18274     */
18275    public static void main(String[] argv) {
18276        final String packageName = argv[0];
18277        final String className = argv[1];
18278        final String[] jarList = argv[2].split(":");
18279
18280        ArrayList<URL> found = new ArrayList<>();
18281        for(String jar : jarList)
18282        {
18283            try {
18284                File f = new File(jar);
18285                if (f.exists()) {
18286                    found.add(f.toURI().toURL());
18287                }
18288            } catch (IOException ex) {
18289                System.err.println(ex.toString());
18290            }
18291        }
18292
18293        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
18294        URL klassURL = null;
18295        Class<?> klass = null;
18296        try {
18297            String resourceName = className.replace(".", "/") + ".class";
18298            klassURL = localClassLoader.getResource(resourceName);
18299            klass = localClassLoader.loadClass(className);
18300        } catch (ClassNotFoundException ex) {
18301            System.err.println(className + " not found");
18302            System.exit(-1);
18303        }
18304
18305        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
18306        String path = pathURL.substring(pathURL.indexOf(':') + 1);
18307        System.err.println("found: " + path);
18308
18309        String version;
18310        if (!"".equals(argv[3])) {
18311            version = checkVersion(klass, argv);
18312        } else {
18313            version = klass.getPackage().getSpecificationVersion();
18314        }
18315
18316        System.out.println(path + " " + version);
18317    }
18318
18319    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
18320        final String versionMethod = argv[3];
18321        final String expected = argv[4];
18322        final String atLeastOrEqual;
18323        if (!"".equals(argv[5])) {
18324            atLeastOrEqual = argv[5];
18325        } else {
18326            atLeastOrEqual = "<=";
18327        }
18328
18329        String value = "";
18330        if (versionMethod.isEmpty()) {
18331            value = klass.getPackage().getSpecificationVersion();
18332            compareAndDisplay(atLeastOrEqual, expected, value);
18333            return value;
18334        }
18335
18336        try {
18337            try {
18338                Field field = klass.getField(versionMethod);
18339                value = String.valueOf(field.get(null));
18340                compareAndDisplay(atLeastOrEqual, expected, value);
18341            } catch (NoSuchFieldException fe) {
18342                Method method = null;
18343                try {
18344                    method = klass.getMethod(versionMethod);
18345                } catch (NoSuchMethodException ex) {
18346                    System.err.println(ex.toString());
18347                    System.exit(-3);
18348                }
18349
18350                try {
18351                    value = String.valueOf(method.invoke(null));
18352                    compareAndDisplay(atLeastOrEqual, expected, value);
18353                } catch (NullPointerException ex) {
18354                    value = String.valueOf(method.invoke(klass.newInstance()));
18355                    compareAndDisplay(atLeastOrEqual, expected, value);
18356                }
18357            }
18358        } catch (IllegalAccessException ex) {
18359            System.err.println(ex);
18360            System.exit(-2);
18361        } catch (InvocationTargetException ex) {
18362            System.err.println(ex);
18363            System.exit(-2);
18364        } catch (InstantiationException ex) {
18365            System.err.println(ex);
18366            System.exit(-2);
18367        }
18368        return value;
18369    }
18370
18371    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
18372        int cmp = compare(expected, value);
18373
18374        switch(atLeastOrEqual) {
18375            case ">":
18376                if (cmp > 0) {
18377                    return;
18378                } else {
18379                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18380                    System.exit(-4);
18381                }
18382            case "==":
18383                if (cmp == 0) {
18384                    return;
18385                } else {
18386                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18387                    System.exit(-4);
18388                }
18389            case "<=":
18390                if (cmp <= 0) {
18391                    return;
18392                } else {
18393                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18394                    System.exit(-4);
18395                }
18396            default:
18397                System.err.println("unable to compare with "+atLeastOrEqual);
18398                System.exit(-4);
18399        }
18400    }
18401
18402    private static int compare(String v1, String v2) {
18403        String s1 = normalisedVersion(v1);
18404        String s2 = normalisedVersion(v2);
18405
18406        System.err.println("compare: " + v1 + " normalised to " + s1);
18407        System.err.println("compare: " + v2 + " normalised to " + s2);
18408        return s1.compareTo(s2);
18409    }
18410
18411    private static String normalisedVersion(String version) {
18412        return normalisedVersion(version, ".", 4);
18413    }
18414
18415    private static String normalisedVersion(String version, String sep, int maxWidth) {
18416        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
18417        StringBuilder sb = new StringBuilder();
18418        for (String s : split) {
18419            sb.append(String.format("%" + maxWidth + 's', s));
18420        }
18421        return sb.toString();
18422    }
18423}
18424EOF
18425
18426    CLASSPATH=$ac_java_classpath
18427    export CLASSPATH
18428    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
18429    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
18430        echo "configure: conftestSharedChecker.class available" >&5
18431    else
18432        echo "configure: failed program was:" >&5
18433        cat conftestSharedChecker.java >&5
18434        echo "configure: CLASSPATH was $CLASSPATH" >&5
18435    fi
18436
18437    fi
18438
18439    CLASSPATH=$ac_java_classpath
18440    export CLASSPATH
18441    echo "CLASSPATH="$CLASSPATH >&5
18442    cmd="$JAVA conftestSharedChecker \"jrosetta-engine\" \"com.artenum.rosetta.util.ConfigurationBuilder\" \"$jar_resolved\" \"getVersion\" \"1.0.4\" \"\""
18443    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
18444        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
18445$(tail -n 1 conftestSharedChecker.java.output)
18446EOF
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
18448$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
18449        echo "yes" >&5
18450        # append the found file to the classpath to manage jar dependency
18451        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
18452    else
18453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18454$as_echo "no" >&6; }
18455      if test "" = "yes"; then
18456         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jrosetta-engine used by JRosetta : Console Core Artenum / Scilab (looking for package com.artenum.rosetta.util.ConfigurationBuilder)" >&5
18457$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jrosetta-engine used by JRosetta : Console Core Artenum / Scilab (looking for package com.artenum.rosetta.util.ConfigurationBuilder)" >&2;}
18458      else
18459          as_fn_error $? "Could not find or use the Java package/jar jrosetta-engine used by JRosetta : Console Core Artenum / Scilab (looking for package com.artenum.rosetta.util.ConfigurationBuilder)" "$LINENO" 5
18460      fi
18461    fi
18462    if test -f conftestSharedChecker.java.output; then
18463        rm conftestSharedChecker.java.output
18464    fi
18465
18466                JROSETTA_ENGINE=$PACKAGE_JAR_FILE
18467
18468
18469
18470                # MathML rendering solution
18471                # Used in both graphic & help
18472
18473
18474
18475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jeuclid-core" >&5
18476$as_echo_n "checking jeuclid-core... " >&6; }
18477    PACKAGE_JAR_FILE=
18478
18479    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
18480
18481    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jeuclid-core.jar' -or -name 'libjeuclid-core.jar' -or -name 'libjeuclid-core-java.jar' -or -name 'jeuclid-core*.jar' \) 2>/dev/null |tr '\n' ':')."
18482
18483    if test ! -f conftestSharedChecker.class ; then
18484
18485    cat << \EOF > conftestSharedChecker.java
18486// #line 18486 "configure"
18487import java.util.regex.Pattern;
18488import java.io.File;
18489import java.io.IOException;
18490import java.lang.reflect.Field;
18491import java.lang.reflect.InvocationTargetException;
18492import java.lang.reflect.Method;
18493import java.net.URL;
18494import java.net.URLClassLoader;
18495import java.util.ArrayList;
18496
18497public class conftestSharedChecker {
18498
18499    /**
18500     * Required arguments :
18501     *  argv[0]: name of the jar package
18502     *  argv[1]: name of the class (with the package prefix)
18503     *  argv[2]: possible paths of the jar package (separated by ':')
18504     *
18505     * Optional arguments:
18506     *  argv[3]: field or method used to retrieve the version
18507     *  argv[4]: expected version
18508     *  argv[5]: String comparator :
18509     *      "="  for exact version
18510     */
18511    public static void main(String[] argv) {
18512        final String packageName = argv[0];
18513        final String className = argv[1];
18514        final String[] jarList = argv[2].split(":");
18515
18516        ArrayList<URL> found = new ArrayList<>();
18517        for(String jar : jarList)
18518        {
18519            try {
18520                File f = new File(jar);
18521                if (f.exists()) {
18522                    found.add(f.toURI().toURL());
18523                }
18524            } catch (IOException ex) {
18525                System.err.println(ex.toString());
18526            }
18527        }
18528
18529        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
18530        URL klassURL = null;
18531        Class<?> klass = null;
18532        try {
18533            String resourceName = className.replace(".", "/") + ".class";
18534            klassURL = localClassLoader.getResource(resourceName);
18535            klass = localClassLoader.loadClass(className);
18536        } catch (ClassNotFoundException ex) {
18537            System.err.println(className + " not found");
18538            System.exit(-1);
18539        }
18540
18541        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
18542        String path = pathURL.substring(pathURL.indexOf(':') + 1);
18543        System.err.println("found: " + path);
18544
18545        String version;
18546        if (!"".equals(argv[3])) {
18547            version = checkVersion(klass, argv);
18548        } else {
18549            version = klass.getPackage().getSpecificationVersion();
18550        }
18551
18552        System.out.println(path + " " + version);
18553    }
18554
18555    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
18556        final String versionMethod = argv[3];
18557        final String expected = argv[4];
18558        final String atLeastOrEqual;
18559        if (!"".equals(argv[5])) {
18560            atLeastOrEqual = argv[5];
18561        } else {
18562            atLeastOrEqual = "<=";
18563        }
18564
18565        String value = "";
18566        if (versionMethod.isEmpty()) {
18567            value = klass.getPackage().getSpecificationVersion();
18568            compareAndDisplay(atLeastOrEqual, expected, value);
18569            return value;
18570        }
18571
18572        try {
18573            try {
18574                Field field = klass.getField(versionMethod);
18575                value = String.valueOf(field.get(null));
18576                compareAndDisplay(atLeastOrEqual, expected, value);
18577            } catch (NoSuchFieldException fe) {
18578                Method method = null;
18579                try {
18580                    method = klass.getMethod(versionMethod);
18581                } catch (NoSuchMethodException ex) {
18582                    System.err.println(ex.toString());
18583                    System.exit(-3);
18584                }
18585
18586                try {
18587                    value = String.valueOf(method.invoke(null));
18588                    compareAndDisplay(atLeastOrEqual, expected, value);
18589                } catch (NullPointerException ex) {
18590                    value = String.valueOf(method.invoke(klass.newInstance()));
18591                    compareAndDisplay(atLeastOrEqual, expected, value);
18592                }
18593            }
18594        } catch (IllegalAccessException ex) {
18595            System.err.println(ex);
18596            System.exit(-2);
18597        } catch (InvocationTargetException ex) {
18598            System.err.println(ex);
18599            System.exit(-2);
18600        } catch (InstantiationException ex) {
18601            System.err.println(ex);
18602            System.exit(-2);
18603        }
18604        return value;
18605    }
18606
18607    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
18608        int cmp = compare(expected, value);
18609
18610        switch(atLeastOrEqual) {
18611            case ">":
18612                if (cmp > 0) {
18613                    return;
18614                } else {
18615                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18616                    System.exit(-4);
18617                }
18618            case "==":
18619                if (cmp == 0) {
18620                    return;
18621                } else {
18622                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18623                    System.exit(-4);
18624                }
18625            case "<=":
18626                if (cmp <= 0) {
18627                    return;
18628                } else {
18629                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18630                    System.exit(-4);
18631                }
18632            default:
18633                System.err.println("unable to compare with "+atLeastOrEqual);
18634                System.exit(-4);
18635        }
18636    }
18637
18638    private static int compare(String v1, String v2) {
18639        String s1 = normalisedVersion(v1);
18640        String s2 = normalisedVersion(v2);
18641
18642        System.err.println("compare: " + v1 + " normalised to " + s1);
18643        System.err.println("compare: " + v2 + " normalised to " + s2);
18644        return s1.compareTo(s2);
18645    }
18646
18647    private static String normalisedVersion(String version) {
18648        return normalisedVersion(version, ".", 4);
18649    }
18650
18651    private static String normalisedVersion(String version, String sep, int maxWidth) {
18652        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
18653        StringBuilder sb = new StringBuilder();
18654        for (String s : split) {
18655            sb.append(String.format("%" + maxWidth + 's', s));
18656        }
18657        return sb.toString();
18658    }
18659}
18660EOF
18661
18662    CLASSPATH=$ac_java_classpath
18663    export CLASSPATH
18664    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
18665    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
18666        echo "configure: conftestSharedChecker.class available" >&5
18667    else
18668        echo "configure: failed program was:" >&5
18669        cat conftestSharedChecker.java >&5
18670        echo "configure: CLASSPATH was $CLASSPATH" >&5
18671    fi
18672
18673    fi
18674
18675    CLASSPATH=$ac_java_classpath
18676    export CLASSPATH
18677    echo "CLASSPATH="$CLASSPATH >&5
18678    cmd="$JAVA conftestSharedChecker \"jeuclid-core\" \"net.sourceforge.jeuclid.LayoutContext\" \"$jar_resolved\" \"\" \"\" \"\""
18679    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
18680        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
18681$(tail -n 1 conftestSharedChecker.java.output)
18682EOF
18683        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
18684$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
18685        echo "yes" >&5
18686        # append the found file to the classpath to manage jar dependency
18687        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
18688    else
18689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18690$as_echo "no" >&6; }
18691      if test "" = "yes"; then
18692         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jeuclid-core used by MathML rendering solution (at least version 3.1.X) (looking for package net.sourceforge.jeuclid.LayoutContext)" >&5
18693$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jeuclid-core used by MathML rendering solution (at least version 3.1.X) (looking for package net.sourceforge.jeuclid.LayoutContext)" >&2;}
18694      else
18695          as_fn_error $? "Could not find or use the Java package/jar jeuclid-core used by MathML rendering solution (at least version 3.1.X) (looking for package net.sourceforge.jeuclid.LayoutContext)" "$LINENO" 5
18696      fi
18697    fi
18698    if test -f conftestSharedChecker.java.output; then
18699        rm conftestSharedChecker.java.output
18700    fi
18701
18702                JEUCLID_CORE=$PACKAGE_JAR_FILE
18703
18704
18705
18706                ################ Mandatory for graphic_export features #####
18707                # XML to PDF/other Translator
18708
18709
18710
18711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking fop" >&5
18712$as_echo_n "checking fop... " >&6; }
18713    PACKAGE_JAR_FILE=
18714
18715    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
18716
18717    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'fop.jar' -or -name 'libfop.jar' -or -name 'libfop-java.jar' -or -name 'fop.jar' \) 2>/dev/null |tr '\n' ':')."
18718
18719    if test ! -f conftestSharedChecker.class ; then
18720
18721    cat << \EOF > conftestSharedChecker.java
18722// #line 18722 "configure"
18723import java.util.regex.Pattern;
18724import java.io.File;
18725import java.io.IOException;
18726import java.lang.reflect.Field;
18727import java.lang.reflect.InvocationTargetException;
18728import java.lang.reflect.Method;
18729import java.net.URL;
18730import java.net.URLClassLoader;
18731import java.util.ArrayList;
18732
18733public class conftestSharedChecker {
18734
18735    /**
18736     * Required arguments :
18737     *  argv[0]: name of the jar package
18738     *  argv[1]: name of the class (with the package prefix)
18739     *  argv[2]: possible paths of the jar package (separated by ':')
18740     *
18741     * Optional arguments:
18742     *  argv[3]: field or method used to retrieve the version
18743     *  argv[4]: expected version
18744     *  argv[5]: String comparator :
18745     *      "="  for exact version
18746     */
18747    public static void main(String[] argv) {
18748        final String packageName = argv[0];
18749        final String className = argv[1];
18750        final String[] jarList = argv[2].split(":");
18751
18752        ArrayList<URL> found = new ArrayList<>();
18753        for(String jar : jarList)
18754        {
18755            try {
18756                File f = new File(jar);
18757                if (f.exists()) {
18758                    found.add(f.toURI().toURL());
18759                }
18760            } catch (IOException ex) {
18761                System.err.println(ex.toString());
18762            }
18763        }
18764
18765        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
18766        URL klassURL = null;
18767        Class<?> klass = null;
18768        try {
18769            String resourceName = className.replace(".", "/") + ".class";
18770            klassURL = localClassLoader.getResource(resourceName);
18771            klass = localClassLoader.loadClass(className);
18772        } catch (ClassNotFoundException ex) {
18773            System.err.println(className + " not found");
18774            System.exit(-1);
18775        }
18776
18777        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
18778        String path = pathURL.substring(pathURL.indexOf(':') + 1);
18779        System.err.println("found: " + path);
18780
18781        String version;
18782        if (!"".equals(argv[3])) {
18783            version = checkVersion(klass, argv);
18784        } else {
18785            version = klass.getPackage().getSpecificationVersion();
18786        }
18787
18788        System.out.println(path + " " + version);
18789    }
18790
18791    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
18792        final String versionMethod = argv[3];
18793        final String expected = argv[4];
18794        final String atLeastOrEqual;
18795        if (!"".equals(argv[5])) {
18796            atLeastOrEqual = argv[5];
18797        } else {
18798            atLeastOrEqual = "<=";
18799        }
18800
18801        String value = "";
18802        if (versionMethod.isEmpty()) {
18803            value = klass.getPackage().getSpecificationVersion();
18804            compareAndDisplay(atLeastOrEqual, expected, value);
18805            return value;
18806        }
18807
18808        try {
18809            try {
18810                Field field = klass.getField(versionMethod);
18811                value = String.valueOf(field.get(null));
18812                compareAndDisplay(atLeastOrEqual, expected, value);
18813            } catch (NoSuchFieldException fe) {
18814                Method method = null;
18815                try {
18816                    method = klass.getMethod(versionMethod);
18817                } catch (NoSuchMethodException ex) {
18818                    System.err.println(ex.toString());
18819                    System.exit(-3);
18820                }
18821
18822                try {
18823                    value = String.valueOf(method.invoke(null));
18824                    compareAndDisplay(atLeastOrEqual, expected, value);
18825                } catch (NullPointerException ex) {
18826                    value = String.valueOf(method.invoke(klass.newInstance()));
18827                    compareAndDisplay(atLeastOrEqual, expected, value);
18828                }
18829            }
18830        } catch (IllegalAccessException ex) {
18831            System.err.println(ex);
18832            System.exit(-2);
18833        } catch (InvocationTargetException ex) {
18834            System.err.println(ex);
18835            System.exit(-2);
18836        } catch (InstantiationException ex) {
18837            System.err.println(ex);
18838            System.exit(-2);
18839        }
18840        return value;
18841    }
18842
18843    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
18844        int cmp = compare(expected, value);
18845
18846        switch(atLeastOrEqual) {
18847            case ">":
18848                if (cmp > 0) {
18849                    return;
18850                } else {
18851                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18852                    System.exit(-4);
18853                }
18854            case "==":
18855                if (cmp == 0) {
18856                    return;
18857                } else {
18858                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18859                    System.exit(-4);
18860                }
18861            case "<=":
18862                if (cmp <= 0) {
18863                    return;
18864                } else {
18865                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
18866                    System.exit(-4);
18867                }
18868            default:
18869                System.err.println("unable to compare with "+atLeastOrEqual);
18870                System.exit(-4);
18871        }
18872    }
18873
18874    private static int compare(String v1, String v2) {
18875        String s1 = normalisedVersion(v1);
18876        String s2 = normalisedVersion(v2);
18877
18878        System.err.println("compare: " + v1 + " normalised to " + s1);
18879        System.err.println("compare: " + v2 + " normalised to " + s2);
18880        return s1.compareTo(s2);
18881    }
18882
18883    private static String normalisedVersion(String version) {
18884        return normalisedVersion(version, ".", 4);
18885    }
18886
18887    private static String normalisedVersion(String version, String sep, int maxWidth) {
18888        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
18889        StringBuilder sb = new StringBuilder();
18890        for (String s : split) {
18891            sb.append(String.format("%" + maxWidth + 's', s));
18892        }
18893        return sb.toString();
18894    }
18895}
18896EOF
18897
18898    CLASSPATH=$ac_java_classpath
18899    export CLASSPATH
18900    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
18901    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
18902        echo "configure: conftestSharedChecker.class available" >&5
18903    else
18904        echo "configure: failed program was:" >&5
18905        cat conftestSharedChecker.java >&5
18906        echo "configure: CLASSPATH was $CLASSPATH" >&5
18907    fi
18908
18909    fi
18910
18911    CLASSPATH=$ac_java_classpath
18912    export CLASSPATH
18913    echo "CLASSPATH="$CLASSPATH >&5
18914    cmd="$JAVA conftestSharedChecker \"fop\" \"org.apache.fop.pdf.PDFInfo\" \"$jar_resolved\" \"\" \"\" \"\""
18915    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
18916        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
18917$(tail -n 1 conftestSharedChecker.java.output)
18918EOF
18919        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
18920$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
18921        echo "yes" >&5
18922        # append the found file to the classpath to manage jar dependency
18923        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
18924    else
18925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926$as_echo "no" >&6; }
18927      if test "" = "yes"; then
18928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar fop used by XML to PDF Translator (fop) (looking for package org.apache.fop.pdf.PDFInfo)" >&5
18929$as_echo "$as_me: WARNING: Could not find or use the Java package/jar fop used by XML to PDF Translator (fop) (looking for package org.apache.fop.pdf.PDFInfo)" >&2;}
18930      else
18931          as_fn_error $? "Could not find or use the Java package/jar fop used by XML to PDF Translator (fop) (looking for package org.apache.fop.pdf.PDFInfo)" "$LINENO" 5
18932      fi
18933    fi
18934    if test -f conftestSharedChecker.java.output; then
18935        rm conftestSharedChecker.java.output
18936    fi
18937
18938                FOP=$PACKAGE_JAR_FILE
18939
18940
18941
18942# Check whether --with-emf was given.
18943if test "${with_emf+set}" = set; then :
18944  withval=$with_emf;
18945fi
18946
18947                if test "x$with_emf" != xno; then
18948                    # Freehep Graphics2D
18949
18950
18951
18952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking freehep-graphics2d" >&5
18953$as_echo_n "checking freehep-graphics2d... " >&6; }
18954    PACKAGE_JAR_FILE=
18955
18956    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
18957
18958    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'freehep-graphics2d.jar' -or -name 'libfreehep-graphics2d.jar' -or -name 'libfreehep-graphics2d-java.jar' -or -name 'freehep-graphics2d*.jar' \) 2>/dev/null |tr '\n' ':')."
18959
18960    if test ! -f conftestSharedChecker.class ; then
18961
18962    cat << \EOF > conftestSharedChecker.java
18963// #line 18963 "configure"
18964import java.util.regex.Pattern;
18965import java.io.File;
18966import java.io.IOException;
18967import java.lang.reflect.Field;
18968import java.lang.reflect.InvocationTargetException;
18969import java.lang.reflect.Method;
18970import java.net.URL;
18971import java.net.URLClassLoader;
18972import java.util.ArrayList;
18973
18974public class conftestSharedChecker {
18975
18976    /**
18977     * Required arguments :
18978     *  argv[0]: name of the jar package
18979     *  argv[1]: name of the class (with the package prefix)
18980     *  argv[2]: possible paths of the jar package (separated by ':')
18981     *
18982     * Optional arguments:
18983     *  argv[3]: field or method used to retrieve the version
18984     *  argv[4]: expected version
18985     *  argv[5]: String comparator :
18986     *      "="  for exact version
18987     */
18988    public static void main(String[] argv) {
18989        final String packageName = argv[0];
18990        final String className = argv[1];
18991        final String[] jarList = argv[2].split(":");
18992
18993        ArrayList<URL> found = new ArrayList<>();
18994        for(String jar : jarList)
18995        {
18996            try {
18997                File f = new File(jar);
18998                if (f.exists()) {
18999                    found.add(f.toURI().toURL());
19000                }
19001            } catch (IOException ex) {
19002                System.err.println(ex.toString());
19003            }
19004        }
19005
19006        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
19007        URL klassURL = null;
19008        Class<?> klass = null;
19009        try {
19010            String resourceName = className.replace(".", "/") + ".class";
19011            klassURL = localClassLoader.getResource(resourceName);
19012            klass = localClassLoader.loadClass(className);
19013        } catch (ClassNotFoundException ex) {
19014            System.err.println(className + " not found");
19015            System.exit(-1);
19016        }
19017
19018        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
19019        String path = pathURL.substring(pathURL.indexOf(':') + 1);
19020        System.err.println("found: " + path);
19021
19022        String version;
19023        if (!"".equals(argv[3])) {
19024            version = checkVersion(klass, argv);
19025        } else {
19026            version = klass.getPackage().getSpecificationVersion();
19027        }
19028
19029        System.out.println(path + " " + version);
19030    }
19031
19032    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
19033        final String versionMethod = argv[3];
19034        final String expected = argv[4];
19035        final String atLeastOrEqual;
19036        if (!"".equals(argv[5])) {
19037            atLeastOrEqual = argv[5];
19038        } else {
19039            atLeastOrEqual = "<=";
19040        }
19041
19042        String value = "";
19043        if (versionMethod.isEmpty()) {
19044            value = klass.getPackage().getSpecificationVersion();
19045            compareAndDisplay(atLeastOrEqual, expected, value);
19046            return value;
19047        }
19048
19049        try {
19050            try {
19051                Field field = klass.getField(versionMethod);
19052                value = String.valueOf(field.get(null));
19053                compareAndDisplay(atLeastOrEqual, expected, value);
19054            } catch (NoSuchFieldException fe) {
19055                Method method = null;
19056                try {
19057                    method = klass.getMethod(versionMethod);
19058                } catch (NoSuchMethodException ex) {
19059                    System.err.println(ex.toString());
19060                    System.exit(-3);
19061                }
19062
19063                try {
19064                    value = String.valueOf(method.invoke(null));
19065                    compareAndDisplay(atLeastOrEqual, expected, value);
19066                } catch (NullPointerException ex) {
19067                    value = String.valueOf(method.invoke(klass.newInstance()));
19068                    compareAndDisplay(atLeastOrEqual, expected, value);
19069                }
19070            }
19071        } catch (IllegalAccessException ex) {
19072            System.err.println(ex);
19073            System.exit(-2);
19074        } catch (InvocationTargetException ex) {
19075            System.err.println(ex);
19076            System.exit(-2);
19077        } catch (InstantiationException ex) {
19078            System.err.println(ex);
19079            System.exit(-2);
19080        }
19081        return value;
19082    }
19083
19084    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
19085        int cmp = compare(expected, value);
19086
19087        switch(atLeastOrEqual) {
19088            case ">":
19089                if (cmp > 0) {
19090                    return;
19091                } else {
19092                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19093                    System.exit(-4);
19094                }
19095            case "==":
19096                if (cmp == 0) {
19097                    return;
19098                } else {
19099                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19100                    System.exit(-4);
19101                }
19102            case "<=":
19103                if (cmp <= 0) {
19104                    return;
19105                } else {
19106                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19107                    System.exit(-4);
19108                }
19109            default:
19110                System.err.println("unable to compare with "+atLeastOrEqual);
19111                System.exit(-4);
19112        }
19113    }
19114
19115    private static int compare(String v1, String v2) {
19116        String s1 = normalisedVersion(v1);
19117        String s2 = normalisedVersion(v2);
19118
19119        System.err.println("compare: " + v1 + " normalised to " + s1);
19120        System.err.println("compare: " + v2 + " normalised to " + s2);
19121        return s1.compareTo(s2);
19122    }
19123
19124    private static String normalisedVersion(String version) {
19125        return normalisedVersion(version, ".", 4);
19126    }
19127
19128    private static String normalisedVersion(String version, String sep, int maxWidth) {
19129        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
19130        StringBuilder sb = new StringBuilder();
19131        for (String s : split) {
19132            sb.append(String.format("%" + maxWidth + 's', s));
19133        }
19134        return sb.toString();
19135    }
19136}
19137EOF
19138
19139    CLASSPATH=$ac_java_classpath
19140    export CLASSPATH
19141    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
19142    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
19143        echo "configure: conftestSharedChecker.class available" >&5
19144    else
19145        echo "configure: failed program was:" >&5
19146        cat conftestSharedChecker.java >&5
19147        echo "configure: CLASSPATH was $CLASSPATH" >&5
19148    fi
19149
19150    fi
19151
19152    CLASSPATH=$ac_java_classpath
19153    export CLASSPATH
19154    echo "CLASSPATH="$CLASSPATH >&5
19155    cmd="$JAVA conftestSharedChecker \"freehep-graphics2d\" \"org.freehep.graphics2d.VectorGraphics\" \"$jar_resolved\" \"\" \"\" \"\""
19156    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
19157        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
19158$(tail -n 1 conftestSharedChecker.java.output)
19159EOF
19160        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
19161$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
19162        echo "yes" >&5
19163        # append the found file to the classpath to manage jar dependency
19164        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
19165    else
19166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19167$as_echo "no" >&6; }
19168      if test "" = "yes"; then
19169         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar freehep-graphics2d used by Freehep Graphics2D (looking for package org.freehep.graphics2d.VectorGraphics)" >&5
19170$as_echo "$as_me: WARNING: Could not find or use the Java package/jar freehep-graphics2d used by Freehep Graphics2D (looking for package org.freehep.graphics2d.VectorGraphics)" >&2;}
19171      else
19172          as_fn_error $? "Could not find or use the Java package/jar freehep-graphics2d used by Freehep Graphics2D (looking for package org.freehep.graphics2d.VectorGraphics)" "$LINENO" 5
19173      fi
19174    fi
19175    if test -f conftestSharedChecker.java.output; then
19176        rm conftestSharedChecker.java.output
19177    fi
19178
19179                    FREEHEP_GRAPHICS2D=$PACKAGE_JAR_FILE
19180
19181
19182                    # Freehep GraphicsIO
19183
19184
19185
19186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking freehep-graphicsio" >&5
19187$as_echo_n "checking freehep-graphicsio... " >&6; }
19188    PACKAGE_JAR_FILE=
19189
19190    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
19191
19192    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'freehep-graphicsio.jar' -or -name 'libfreehep-graphicsio.jar' -or -name 'libfreehep-graphicsio-java.jar' -or -name 'freehep-graphicsio*.jar' \) 2>/dev/null |tr '\n' ':')."
19193
19194    if test ! -f conftestSharedChecker.class ; then
19195
19196    cat << \EOF > conftestSharedChecker.java
19197// #line 19197 "configure"
19198import java.util.regex.Pattern;
19199import java.io.File;
19200import java.io.IOException;
19201import java.lang.reflect.Field;
19202import java.lang.reflect.InvocationTargetException;
19203import java.lang.reflect.Method;
19204import java.net.URL;
19205import java.net.URLClassLoader;
19206import java.util.ArrayList;
19207
19208public class conftestSharedChecker {
19209
19210    /**
19211     * Required arguments :
19212     *  argv[0]: name of the jar package
19213     *  argv[1]: name of the class (with the package prefix)
19214     *  argv[2]: possible paths of the jar package (separated by ':')
19215     *
19216     * Optional arguments:
19217     *  argv[3]: field or method used to retrieve the version
19218     *  argv[4]: expected version
19219     *  argv[5]: String comparator :
19220     *      "="  for exact version
19221     */
19222    public static void main(String[] argv) {
19223        final String packageName = argv[0];
19224        final String className = argv[1];
19225        final String[] jarList = argv[2].split(":");
19226
19227        ArrayList<URL> found = new ArrayList<>();
19228        for(String jar : jarList)
19229        {
19230            try {
19231                File f = new File(jar);
19232                if (f.exists()) {
19233                    found.add(f.toURI().toURL());
19234                }
19235            } catch (IOException ex) {
19236                System.err.println(ex.toString());
19237            }
19238        }
19239
19240        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
19241        URL klassURL = null;
19242        Class<?> klass = null;
19243        try {
19244            String resourceName = className.replace(".", "/") + ".class";
19245            klassURL = localClassLoader.getResource(resourceName);
19246            klass = localClassLoader.loadClass(className);
19247        } catch (ClassNotFoundException ex) {
19248            System.err.println(className + " not found");
19249            System.exit(-1);
19250        }
19251
19252        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
19253        String path = pathURL.substring(pathURL.indexOf(':') + 1);
19254        System.err.println("found: " + path);
19255
19256        String version;
19257        if (!"".equals(argv[3])) {
19258            version = checkVersion(klass, argv);
19259        } else {
19260            version = klass.getPackage().getSpecificationVersion();
19261        }
19262
19263        System.out.println(path + " " + version);
19264    }
19265
19266    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
19267        final String versionMethod = argv[3];
19268        final String expected = argv[4];
19269        final String atLeastOrEqual;
19270        if (!"".equals(argv[5])) {
19271            atLeastOrEqual = argv[5];
19272        } else {
19273            atLeastOrEqual = "<=";
19274        }
19275
19276        String value = "";
19277        if (versionMethod.isEmpty()) {
19278            value = klass.getPackage().getSpecificationVersion();
19279            compareAndDisplay(atLeastOrEqual, expected, value);
19280            return value;
19281        }
19282
19283        try {
19284            try {
19285                Field field = klass.getField(versionMethod);
19286                value = String.valueOf(field.get(null));
19287                compareAndDisplay(atLeastOrEqual, expected, value);
19288            } catch (NoSuchFieldException fe) {
19289                Method method = null;
19290                try {
19291                    method = klass.getMethod(versionMethod);
19292                } catch (NoSuchMethodException ex) {
19293                    System.err.println(ex.toString());
19294                    System.exit(-3);
19295                }
19296
19297                try {
19298                    value = String.valueOf(method.invoke(null));
19299                    compareAndDisplay(atLeastOrEqual, expected, value);
19300                } catch (NullPointerException ex) {
19301                    value = String.valueOf(method.invoke(klass.newInstance()));
19302                    compareAndDisplay(atLeastOrEqual, expected, value);
19303                }
19304            }
19305        } catch (IllegalAccessException ex) {
19306            System.err.println(ex);
19307            System.exit(-2);
19308        } catch (InvocationTargetException ex) {
19309            System.err.println(ex);
19310            System.exit(-2);
19311        } catch (InstantiationException ex) {
19312            System.err.println(ex);
19313            System.exit(-2);
19314        }
19315        return value;
19316    }
19317
19318    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
19319        int cmp = compare(expected, value);
19320
19321        switch(atLeastOrEqual) {
19322            case ">":
19323                if (cmp > 0) {
19324                    return;
19325                } else {
19326                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19327                    System.exit(-4);
19328                }
19329            case "==":
19330                if (cmp == 0) {
19331                    return;
19332                } else {
19333                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19334                    System.exit(-4);
19335                }
19336            case "<=":
19337                if (cmp <= 0) {
19338                    return;
19339                } else {
19340                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19341                    System.exit(-4);
19342                }
19343            default:
19344                System.err.println("unable to compare with "+atLeastOrEqual);
19345                System.exit(-4);
19346        }
19347    }
19348
19349    private static int compare(String v1, String v2) {
19350        String s1 = normalisedVersion(v1);
19351        String s2 = normalisedVersion(v2);
19352
19353        System.err.println("compare: " + v1 + " normalised to " + s1);
19354        System.err.println("compare: " + v2 + " normalised to " + s2);
19355        return s1.compareTo(s2);
19356    }
19357
19358    private static String normalisedVersion(String version) {
19359        return normalisedVersion(version, ".", 4);
19360    }
19361
19362    private static String normalisedVersion(String version, String sep, int maxWidth) {
19363        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
19364        StringBuilder sb = new StringBuilder();
19365        for (String s : split) {
19366            sb.append(String.format("%" + maxWidth + 's', s));
19367        }
19368        return sb.toString();
19369    }
19370}
19371EOF
19372
19373    CLASSPATH=$ac_java_classpath
19374    export CLASSPATH
19375    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
19376    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
19377        echo "configure: conftestSharedChecker.class available" >&5
19378    else
19379        echo "configure: failed program was:" >&5
19380        cat conftestSharedChecker.java >&5
19381        echo "configure: CLASSPATH was $CLASSPATH" >&5
19382    fi
19383
19384    fi
19385
19386    CLASSPATH=$ac_java_classpath
19387    export CLASSPATH
19388    echo "CLASSPATH="$CLASSPATH >&5
19389    cmd="$JAVA conftestSharedChecker \"freehep-graphicsio\" \"org.freehep.graphicsio.VectorGraphicsIO\" \"$jar_resolved\" \"\" \"\" \"\""
19390    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
19391        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
19392$(tail -n 1 conftestSharedChecker.java.output)
19393EOF
19394        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
19395$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
19396        echo "yes" >&5
19397        # append the found file to the classpath to manage jar dependency
19398        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
19399    else
19400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19401$as_echo "no" >&6; }
19402      if test "" = "yes"; then
19403         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar freehep-graphicsio used by Freehep GraphicsIO (looking for package org.freehep.graphicsio.VectorGraphicsIO)" >&5
19404$as_echo "$as_me: WARNING: Could not find or use the Java package/jar freehep-graphicsio used by Freehep GraphicsIO (looking for package org.freehep.graphicsio.VectorGraphicsIO)" >&2;}
19405      else
19406          as_fn_error $? "Could not find or use the Java package/jar freehep-graphicsio used by Freehep GraphicsIO (looking for package org.freehep.graphicsio.VectorGraphicsIO)" "$LINENO" 5
19407      fi
19408    fi
19409    if test -f conftestSharedChecker.java.output; then
19410        rm conftestSharedChecker.java.output
19411    fi
19412
19413                    FREEHEP_GRAPHICSIO=$PACKAGE_JAR_FILE
19414
19415
19416                    # Freehep GraphicsIO EMF
19417
19418
19419
19420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking freehep-graphicsio-emf" >&5
19421$as_echo_n "checking freehep-graphicsio-emf... " >&6; }
19422    PACKAGE_JAR_FILE=
19423
19424    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
19425
19426    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'freehep-graphicsio-emf.jar' -or -name 'libfreehep-graphicsio-emf.jar' -or -name 'libfreehep-graphicsio-emf-java.jar' -or -name 'freehep-graphicsio-emf*.jar' \) 2>/dev/null |tr '\n' ':')."
19427
19428    if test ! -f conftestSharedChecker.class ; then
19429
19430    cat << \EOF > conftestSharedChecker.java
19431// #line 19431 "configure"
19432import java.util.regex.Pattern;
19433import java.io.File;
19434import java.io.IOException;
19435import java.lang.reflect.Field;
19436import java.lang.reflect.InvocationTargetException;
19437import java.lang.reflect.Method;
19438import java.net.URL;
19439import java.net.URLClassLoader;
19440import java.util.ArrayList;
19441
19442public class conftestSharedChecker {
19443
19444    /**
19445     * Required arguments :
19446     *  argv[0]: name of the jar package
19447     *  argv[1]: name of the class (with the package prefix)
19448     *  argv[2]: possible paths of the jar package (separated by ':')
19449     *
19450     * Optional arguments:
19451     *  argv[3]: field or method used to retrieve the version
19452     *  argv[4]: expected version
19453     *  argv[5]: String comparator :
19454     *      "="  for exact version
19455     */
19456    public static void main(String[] argv) {
19457        final String packageName = argv[0];
19458        final String className = argv[1];
19459        final String[] jarList = argv[2].split(":");
19460
19461        ArrayList<URL> found = new ArrayList<>();
19462        for(String jar : jarList)
19463        {
19464            try {
19465                File f = new File(jar);
19466                if (f.exists()) {
19467                    found.add(f.toURI().toURL());
19468                }
19469            } catch (IOException ex) {
19470                System.err.println(ex.toString());
19471            }
19472        }
19473
19474        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
19475        URL klassURL = null;
19476        Class<?> klass = null;
19477        try {
19478            String resourceName = className.replace(".", "/") + ".class";
19479            klassURL = localClassLoader.getResource(resourceName);
19480            klass = localClassLoader.loadClass(className);
19481        } catch (ClassNotFoundException ex) {
19482            System.err.println(className + " not found");
19483            System.exit(-1);
19484        }
19485
19486        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
19487        String path = pathURL.substring(pathURL.indexOf(':') + 1);
19488        System.err.println("found: " + path);
19489
19490        String version;
19491        if (!"".equals(argv[3])) {
19492            version = checkVersion(klass, argv);
19493        } else {
19494            version = klass.getPackage().getSpecificationVersion();
19495        }
19496
19497        System.out.println(path + " " + version);
19498    }
19499
19500    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
19501        final String versionMethod = argv[3];
19502        final String expected = argv[4];
19503        final String atLeastOrEqual;
19504        if (!"".equals(argv[5])) {
19505            atLeastOrEqual = argv[5];
19506        } else {
19507            atLeastOrEqual = "<=";
19508        }
19509
19510        String value = "";
19511        if (versionMethod.isEmpty()) {
19512            value = klass.getPackage().getSpecificationVersion();
19513            compareAndDisplay(atLeastOrEqual, expected, value);
19514            return value;
19515        }
19516
19517        try {
19518            try {
19519                Field field = klass.getField(versionMethod);
19520                value = String.valueOf(field.get(null));
19521                compareAndDisplay(atLeastOrEqual, expected, value);
19522            } catch (NoSuchFieldException fe) {
19523                Method method = null;
19524                try {
19525                    method = klass.getMethod(versionMethod);
19526                } catch (NoSuchMethodException ex) {
19527                    System.err.println(ex.toString());
19528                    System.exit(-3);
19529                }
19530
19531                try {
19532                    value = String.valueOf(method.invoke(null));
19533                    compareAndDisplay(atLeastOrEqual, expected, value);
19534                } catch (NullPointerException ex) {
19535                    value = String.valueOf(method.invoke(klass.newInstance()));
19536                    compareAndDisplay(atLeastOrEqual, expected, value);
19537                }
19538            }
19539        } catch (IllegalAccessException ex) {
19540            System.err.println(ex);
19541            System.exit(-2);
19542        } catch (InvocationTargetException ex) {
19543            System.err.println(ex);
19544            System.exit(-2);
19545        } catch (InstantiationException ex) {
19546            System.err.println(ex);
19547            System.exit(-2);
19548        }
19549        return value;
19550    }
19551
19552    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
19553        int cmp = compare(expected, value);
19554
19555        switch(atLeastOrEqual) {
19556            case ">":
19557                if (cmp > 0) {
19558                    return;
19559                } else {
19560                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19561                    System.exit(-4);
19562                }
19563            case "==":
19564                if (cmp == 0) {
19565                    return;
19566                } else {
19567                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19568                    System.exit(-4);
19569                }
19570            case "<=":
19571                if (cmp <= 0) {
19572                    return;
19573                } else {
19574                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19575                    System.exit(-4);
19576                }
19577            default:
19578                System.err.println("unable to compare with "+atLeastOrEqual);
19579                System.exit(-4);
19580        }
19581    }
19582
19583    private static int compare(String v1, String v2) {
19584        String s1 = normalisedVersion(v1);
19585        String s2 = normalisedVersion(v2);
19586
19587        System.err.println("compare: " + v1 + " normalised to " + s1);
19588        System.err.println("compare: " + v2 + " normalised to " + s2);
19589        return s1.compareTo(s2);
19590    }
19591
19592    private static String normalisedVersion(String version) {
19593        return normalisedVersion(version, ".", 4);
19594    }
19595
19596    private static String normalisedVersion(String version, String sep, int maxWidth) {
19597        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
19598        StringBuilder sb = new StringBuilder();
19599        for (String s : split) {
19600            sb.append(String.format("%" + maxWidth + 's', s));
19601        }
19602        return sb.toString();
19603    }
19604}
19605EOF
19606
19607    CLASSPATH=$ac_java_classpath
19608    export CLASSPATH
19609    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
19610    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
19611        echo "configure: conftestSharedChecker.class available" >&5
19612    else
19613        echo "configure: failed program was:" >&5
19614        cat conftestSharedChecker.java >&5
19615        echo "configure: CLASSPATH was $CLASSPATH" >&5
19616    fi
19617
19618    fi
19619
19620    CLASSPATH=$ac_java_classpath
19621    export CLASSPATH
19622    echo "CLASSPATH="$CLASSPATH >&5
19623    cmd="$JAVA conftestSharedChecker \"freehep-graphicsio-emf\" \"org.freehep.graphicsio.emf.EMFGraphics2D\" \"$jar_resolved\" \"\" \"\" \"\""
19624    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
19625        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
19626$(tail -n 1 conftestSharedChecker.java.output)
19627EOF
19628        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
19629$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
19630        echo "yes" >&5
19631        # append the found file to the classpath to manage jar dependency
19632        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
19633    else
19634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19635$as_echo "no" >&6; }
19636      if test "" = "yes"; then
19637         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar freehep-graphicsio-emf used by Freehep GraphicsIO EMF (looking for package org.freehep.graphicsio.emf.EMFGraphics2D)" >&5
19638$as_echo "$as_me: WARNING: Could not find or use the Java package/jar freehep-graphicsio-emf used by Freehep GraphicsIO EMF (looking for package org.freehep.graphicsio.emf.EMFGraphics2D)" >&2;}
19639      else
19640          as_fn_error $? "Could not find or use the Java package/jar freehep-graphicsio-emf used by Freehep GraphicsIO EMF (looking for package org.freehep.graphicsio.emf.EMFGraphics2D)" "$LINENO" 5
19641      fi
19642    fi
19643    if test -f conftestSharedChecker.java.output; then
19644        rm conftestSharedChecker.java.output
19645    fi
19646
19647                    FREEHEP_GRAPHICSIO_EMF=$PACKAGE_JAR_FILE
19648
19649
19650                    # Freehep IO
19651
19652
19653
19654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking freehep-io" >&5
19655$as_echo_n "checking freehep-io... " >&6; }
19656    PACKAGE_JAR_FILE=
19657
19658    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
19659
19660    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'freehep-io.jar' -or -name 'libfreehep-io.jar' -or -name 'libfreehep-io-java.jar' -or -name 'freehep-io*.jar' \) 2>/dev/null |tr '\n' ':')."
19661
19662    if test ! -f conftestSharedChecker.class ; then
19663
19664    cat << \EOF > conftestSharedChecker.java
19665// #line 19665 "configure"
19666import java.util.regex.Pattern;
19667import java.io.File;
19668import java.io.IOException;
19669import java.lang.reflect.Field;
19670import java.lang.reflect.InvocationTargetException;
19671import java.lang.reflect.Method;
19672import java.net.URL;
19673import java.net.URLClassLoader;
19674import java.util.ArrayList;
19675
19676public class conftestSharedChecker {
19677
19678    /**
19679     * Required arguments :
19680     *  argv[0]: name of the jar package
19681     *  argv[1]: name of the class (with the package prefix)
19682     *  argv[2]: possible paths of the jar package (separated by ':')
19683     *
19684     * Optional arguments:
19685     *  argv[3]: field or method used to retrieve the version
19686     *  argv[4]: expected version
19687     *  argv[5]: String comparator :
19688     *      "="  for exact version
19689     */
19690    public static void main(String[] argv) {
19691        final String packageName = argv[0];
19692        final String className = argv[1];
19693        final String[] jarList = argv[2].split(":");
19694
19695        ArrayList<URL> found = new ArrayList<>();
19696        for(String jar : jarList)
19697        {
19698            try {
19699                File f = new File(jar);
19700                if (f.exists()) {
19701                    found.add(f.toURI().toURL());
19702                }
19703            } catch (IOException ex) {
19704                System.err.println(ex.toString());
19705            }
19706        }
19707
19708        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
19709        URL klassURL = null;
19710        Class<?> klass = null;
19711        try {
19712            String resourceName = className.replace(".", "/") + ".class";
19713            klassURL = localClassLoader.getResource(resourceName);
19714            klass = localClassLoader.loadClass(className);
19715        } catch (ClassNotFoundException ex) {
19716            System.err.println(className + " not found");
19717            System.exit(-1);
19718        }
19719
19720        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
19721        String path = pathURL.substring(pathURL.indexOf(':') + 1);
19722        System.err.println("found: " + path);
19723
19724        String version;
19725        if (!"".equals(argv[3])) {
19726            version = checkVersion(klass, argv);
19727        } else {
19728            version = klass.getPackage().getSpecificationVersion();
19729        }
19730
19731        System.out.println(path + " " + version);
19732    }
19733
19734    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
19735        final String versionMethod = argv[3];
19736        final String expected = argv[4];
19737        final String atLeastOrEqual;
19738        if (!"".equals(argv[5])) {
19739            atLeastOrEqual = argv[5];
19740        } else {
19741            atLeastOrEqual = "<=";
19742        }
19743
19744        String value = "";
19745        if (versionMethod.isEmpty()) {
19746            value = klass.getPackage().getSpecificationVersion();
19747            compareAndDisplay(atLeastOrEqual, expected, value);
19748            return value;
19749        }
19750
19751        try {
19752            try {
19753                Field field = klass.getField(versionMethod);
19754                value = String.valueOf(field.get(null));
19755                compareAndDisplay(atLeastOrEqual, expected, value);
19756            } catch (NoSuchFieldException fe) {
19757                Method method = null;
19758                try {
19759                    method = klass.getMethod(versionMethod);
19760                } catch (NoSuchMethodException ex) {
19761                    System.err.println(ex.toString());
19762                    System.exit(-3);
19763                }
19764
19765                try {
19766                    value = String.valueOf(method.invoke(null));
19767                    compareAndDisplay(atLeastOrEqual, expected, value);
19768                } catch (NullPointerException ex) {
19769                    value = String.valueOf(method.invoke(klass.newInstance()));
19770                    compareAndDisplay(atLeastOrEqual, expected, value);
19771                }
19772            }
19773        } catch (IllegalAccessException ex) {
19774            System.err.println(ex);
19775            System.exit(-2);
19776        } catch (InvocationTargetException ex) {
19777            System.err.println(ex);
19778            System.exit(-2);
19779        } catch (InstantiationException ex) {
19780            System.err.println(ex);
19781            System.exit(-2);
19782        }
19783        return value;
19784    }
19785
19786    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
19787        int cmp = compare(expected, value);
19788
19789        switch(atLeastOrEqual) {
19790            case ">":
19791                if (cmp > 0) {
19792                    return;
19793                } else {
19794                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19795                    System.exit(-4);
19796                }
19797            case "==":
19798                if (cmp == 0) {
19799                    return;
19800                } else {
19801                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19802                    System.exit(-4);
19803                }
19804            case "<=":
19805                if (cmp <= 0) {
19806                    return;
19807                } else {
19808                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
19809                    System.exit(-4);
19810                }
19811            default:
19812                System.err.println("unable to compare with "+atLeastOrEqual);
19813                System.exit(-4);
19814        }
19815    }
19816
19817    private static int compare(String v1, String v2) {
19818        String s1 = normalisedVersion(v1);
19819        String s2 = normalisedVersion(v2);
19820
19821        System.err.println("compare: " + v1 + " normalised to " + s1);
19822        System.err.println("compare: " + v2 + " normalised to " + s2);
19823        return s1.compareTo(s2);
19824    }
19825
19826    private static String normalisedVersion(String version) {
19827        return normalisedVersion(version, ".", 4);
19828    }
19829
19830    private static String normalisedVersion(String version, String sep, int maxWidth) {
19831        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
19832        StringBuilder sb = new StringBuilder();
19833        for (String s : split) {
19834            sb.append(String.format("%" + maxWidth + 's', s));
19835        }
19836        return sb.toString();
19837    }
19838}
19839EOF
19840
19841    CLASSPATH=$ac_java_classpath
19842    export CLASSPATH
19843    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
19844    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
19845        echo "configure: conftestSharedChecker.class available" >&5
19846    else
19847        echo "configure: failed program was:" >&5
19848        cat conftestSharedChecker.java >&5
19849        echo "configure: CLASSPATH was $CLASSPATH" >&5
19850    fi
19851
19852    fi
19853
19854    CLASSPATH=$ac_java_classpath
19855    export CLASSPATH
19856    echo "CLASSPATH="$CLASSPATH >&5
19857    cmd="$JAVA conftestSharedChecker \"freehep-io\" \"org.freehep.util.io.XMLSequence\" \"$jar_resolved\" \"\" \"\" \"\""
19858    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
19859        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
19860$(tail -n 1 conftestSharedChecker.java.output)
19861EOF
19862        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
19863$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
19864        echo "yes" >&5
19865        # append the found file to the classpath to manage jar dependency
19866        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
19867    else
19868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19869$as_echo "no" >&6; }
19870      if test "" = "yes"; then
19871         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar freehep-io used by Freehep IO (looking for package org.freehep.util.io.XMLSequence)" >&5
19872$as_echo "$as_me: WARNING: Could not find or use the Java package/jar freehep-io used by Freehep IO (looking for package org.freehep.util.io.XMLSequence)" >&2;}
19873      else
19874          as_fn_error $? "Could not find or use the Java package/jar freehep-io used by Freehep IO (looking for package org.freehep.util.io.XMLSequence)" "$LINENO" 5
19875      fi
19876    fi
19877    if test -f conftestSharedChecker.java.output; then
19878        rm conftestSharedChecker.java.output
19879    fi
19880
19881                    FREEHEP_IO=$PACKAGE_JAR_FILE
19882
19883
19884                    # Freehep Util
19885
19886
19887
19888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking freehep-util" >&5
19889$as_echo_n "checking freehep-util... " >&6; }
19890    PACKAGE_JAR_FILE=
19891
19892    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
19893
19894    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'freehep-util.jar' -or -name 'libfreehep-util.jar' -or -name 'libfreehep-util-java.jar' -or -name 'freehep-util*.jar' \) 2>/dev/null |tr '\n' ':')."
19895
19896    if test ! -f conftestSharedChecker.class ; then
19897
19898    cat << \EOF > conftestSharedChecker.java
19899// #line 19899 "configure"
19900import java.util.regex.Pattern;
19901import java.io.File;
19902import java.io.IOException;
19903import java.lang.reflect.Field;
19904import java.lang.reflect.InvocationTargetException;
19905import java.lang.reflect.Method;
19906import java.net.URL;
19907import java.net.URLClassLoader;
19908import java.util.ArrayList;
19909
19910public class conftestSharedChecker {
19911
19912    /**
19913     * Required arguments :
19914     *  argv[0]: name of the jar package
19915     *  argv[1]: name of the class (with the package prefix)
19916     *  argv[2]: possible paths of the jar package (separated by ':')
19917     *
19918     * Optional arguments:
19919     *  argv[3]: field or method used to retrieve the version
19920     *  argv[4]: expected version
19921     *  argv[5]: String comparator :
19922     *      "="  for exact version
19923     */
19924    public static void main(String[] argv) {
19925        final String packageName = argv[0];
19926        final String className = argv[1];
19927        final String[] jarList = argv[2].split(":");
19928
19929        ArrayList<URL> found = new ArrayList<>();
19930        for(String jar : jarList)
19931        {
19932            try {
19933                File f = new File(jar);
19934                if (f.exists()) {
19935                    found.add(f.toURI().toURL());
19936                }
19937            } catch (IOException ex) {
19938                System.err.println(ex.toString());
19939            }
19940        }
19941
19942        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
19943        URL klassURL = null;
19944        Class<?> klass = null;
19945        try {
19946            String resourceName = className.replace(".", "/") + ".class";
19947            klassURL = localClassLoader.getResource(resourceName);
19948            klass = localClassLoader.loadClass(className);
19949        } catch (ClassNotFoundException ex) {
19950            System.err.println(className + " not found");
19951            System.exit(-1);
19952        }
19953
19954        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
19955        String path = pathURL.substring(pathURL.indexOf(':') + 1);
19956        System.err.println("found: " + path);
19957
19958        String version;
19959        if (!"".equals(argv[3])) {
19960            version = checkVersion(klass, argv);
19961        } else {
19962            version = klass.getPackage().getSpecificationVersion();
19963        }
19964
19965        System.out.println(path + " " + version);
19966    }
19967
19968    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
19969        final String versionMethod = argv[3];
19970        final String expected = argv[4];
19971        final String atLeastOrEqual;
19972        if (!"".equals(argv[5])) {
19973            atLeastOrEqual = argv[5];
19974        } else {
19975            atLeastOrEqual = "<=";
19976        }
19977
19978        String value = "";
19979        if (versionMethod.isEmpty()) {
19980            value = klass.getPackage().getSpecificationVersion();
19981            compareAndDisplay(atLeastOrEqual, expected, value);
19982            return value;
19983        }
19984
19985        try {
19986            try {
19987                Field field = klass.getField(versionMethod);
19988                value = String.valueOf(field.get(null));
19989                compareAndDisplay(atLeastOrEqual, expected, value);
19990            } catch (NoSuchFieldException fe) {
19991                Method method = null;
19992                try {
19993                    method = klass.getMethod(versionMethod);
19994                } catch (NoSuchMethodException ex) {
19995                    System.err.println(ex.toString());
19996                    System.exit(-3);
19997                }
19998
19999                try {
20000                    value = String.valueOf(method.invoke(null));
20001                    compareAndDisplay(atLeastOrEqual, expected, value);
20002                } catch (NullPointerException ex) {
20003                    value = String.valueOf(method.invoke(klass.newInstance()));
20004                    compareAndDisplay(atLeastOrEqual, expected, value);
20005                }
20006            }
20007        } catch (IllegalAccessException ex) {
20008            System.err.println(ex);
20009            System.exit(-2);
20010        } catch (InvocationTargetException ex) {
20011            System.err.println(ex);
20012            System.exit(-2);
20013        } catch (InstantiationException ex) {
20014            System.err.println(ex);
20015            System.exit(-2);
20016        }
20017        return value;
20018    }
20019
20020    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
20021        int cmp = compare(expected, value);
20022
20023        switch(atLeastOrEqual) {
20024            case ">":
20025                if (cmp > 0) {
20026                    return;
20027                } else {
20028                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20029                    System.exit(-4);
20030                }
20031            case "==":
20032                if (cmp == 0) {
20033                    return;
20034                } else {
20035                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20036                    System.exit(-4);
20037                }
20038            case "<=":
20039                if (cmp <= 0) {
20040                    return;
20041                } else {
20042                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20043                    System.exit(-4);
20044                }
20045            default:
20046                System.err.println("unable to compare with "+atLeastOrEqual);
20047                System.exit(-4);
20048        }
20049    }
20050
20051    private static int compare(String v1, String v2) {
20052        String s1 = normalisedVersion(v1);
20053        String s2 = normalisedVersion(v2);
20054
20055        System.err.println("compare: " + v1 + " normalised to " + s1);
20056        System.err.println("compare: " + v2 + " normalised to " + s2);
20057        return s1.compareTo(s2);
20058    }
20059
20060    private static String normalisedVersion(String version) {
20061        return normalisedVersion(version, ".", 4);
20062    }
20063
20064    private static String normalisedVersion(String version, String sep, int maxWidth) {
20065        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
20066        StringBuilder sb = new StringBuilder();
20067        for (String s : split) {
20068            sb.append(String.format("%" + maxWidth + 's', s));
20069        }
20070        return sb.toString();
20071    }
20072}
20073EOF
20074
20075    CLASSPATH=$ac_java_classpath
20076    export CLASSPATH
20077    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
20078    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
20079        echo "configure: conftestSharedChecker.class available" >&5
20080    else
20081        echo "configure: failed program was:" >&5
20082        cat conftestSharedChecker.java >&5
20083        echo "configure: CLASSPATH was $CLASSPATH" >&5
20084    fi
20085
20086    fi
20087
20088    CLASSPATH=$ac_java_classpath
20089    export CLASSPATH
20090    echo "CLASSPATH="$CLASSPATH >&5
20091    cmd="$JAVA conftestSharedChecker \"freehep-util\" \"org.freehep.util.StringUtilities\" \"$jar_resolved\" \"\" \"\" \"\""
20092    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
20093        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
20094$(tail -n 1 conftestSharedChecker.java.output)
20095EOF
20096        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
20097$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
20098        echo "yes" >&5
20099        # append the found file to the classpath to manage jar dependency
20100        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
20101    else
20102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20103$as_echo "no" >&6; }
20104      if test "" = "yes"; then
20105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar freehep-util used by Freehep Util (looking for package org.freehep.util.StringUtilities)" >&5
20106$as_echo "$as_me: WARNING: Could not find or use the Java package/jar freehep-util used by Freehep Util (looking for package org.freehep.util.StringUtilities)" >&2;}
20107      else
20108          as_fn_error $? "Could not find or use the Java package/jar freehep-util used by Freehep Util (looking for package org.freehep.util.StringUtilities)" "$LINENO" 5
20109      fi
20110    fi
20111    if test -f conftestSharedChecker.java.output; then
20112        rm conftestSharedChecker.java.output
20113    fi
20114
20115                    FREEHEP_UTIL=$PACKAGE_JAR_FILE
20116
20117                fi
20118
20119                # xml.apache.org SVG Library (under mandriva for example)
20120
20121
20122
20123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking batik-all" >&5
20124$as_echo_n "checking batik-all... " >&6; }
20125    PACKAGE_JAR_FILE=
20126
20127    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
20128
20129    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'batik-all.jar' -or -name 'libbatik-all.jar' -or -name 'libbatik-all-java.jar' -or -name 'batik-all.jar' \) 2>/dev/null |tr '\n' ':')."
20130
20131    if test ! -f conftestSharedChecker.class ; then
20132
20133    cat << \EOF > conftestSharedChecker.java
20134// #line 20134 "configure"
20135import java.util.regex.Pattern;
20136import java.io.File;
20137import java.io.IOException;
20138import java.lang.reflect.Field;
20139import java.lang.reflect.InvocationTargetException;
20140import java.lang.reflect.Method;
20141import java.net.URL;
20142import java.net.URLClassLoader;
20143import java.util.ArrayList;
20144
20145public class conftestSharedChecker {
20146
20147    /**
20148     * Required arguments :
20149     *  argv[0]: name of the jar package
20150     *  argv[1]: name of the class (with the package prefix)
20151     *  argv[2]: possible paths of the jar package (separated by ':')
20152     *
20153     * Optional arguments:
20154     *  argv[3]: field or method used to retrieve the version
20155     *  argv[4]: expected version
20156     *  argv[5]: String comparator :
20157     *      "="  for exact version
20158     */
20159    public static void main(String[] argv) {
20160        final String packageName = argv[0];
20161        final String className = argv[1];
20162        final String[] jarList = argv[2].split(":");
20163
20164        ArrayList<URL> found = new ArrayList<>();
20165        for(String jar : jarList)
20166        {
20167            try {
20168                File f = new File(jar);
20169                if (f.exists()) {
20170                    found.add(f.toURI().toURL());
20171                }
20172            } catch (IOException ex) {
20173                System.err.println(ex.toString());
20174            }
20175        }
20176
20177        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
20178        URL klassURL = null;
20179        Class<?> klass = null;
20180        try {
20181            String resourceName = className.replace(".", "/") + ".class";
20182            klassURL = localClassLoader.getResource(resourceName);
20183            klass = localClassLoader.loadClass(className);
20184        } catch (ClassNotFoundException ex) {
20185            System.err.println(className + " not found");
20186            System.exit(-1);
20187        }
20188
20189        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
20190        String path = pathURL.substring(pathURL.indexOf(':') + 1);
20191        System.err.println("found: " + path);
20192
20193        String version;
20194        if (!"".equals(argv[3])) {
20195            version = checkVersion(klass, argv);
20196        } else {
20197            version = klass.getPackage().getSpecificationVersion();
20198        }
20199
20200        System.out.println(path + " " + version);
20201    }
20202
20203    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
20204        final String versionMethod = argv[3];
20205        final String expected = argv[4];
20206        final String atLeastOrEqual;
20207        if (!"".equals(argv[5])) {
20208            atLeastOrEqual = argv[5];
20209        } else {
20210            atLeastOrEqual = "<=";
20211        }
20212
20213        String value = "";
20214        if (versionMethod.isEmpty()) {
20215            value = klass.getPackage().getSpecificationVersion();
20216            compareAndDisplay(atLeastOrEqual, expected, value);
20217            return value;
20218        }
20219
20220        try {
20221            try {
20222                Field field = klass.getField(versionMethod);
20223                value = String.valueOf(field.get(null));
20224                compareAndDisplay(atLeastOrEqual, expected, value);
20225            } catch (NoSuchFieldException fe) {
20226                Method method = null;
20227                try {
20228                    method = klass.getMethod(versionMethod);
20229                } catch (NoSuchMethodException ex) {
20230                    System.err.println(ex.toString());
20231                    System.exit(-3);
20232                }
20233
20234                try {
20235                    value = String.valueOf(method.invoke(null));
20236                    compareAndDisplay(atLeastOrEqual, expected, value);
20237                } catch (NullPointerException ex) {
20238                    value = String.valueOf(method.invoke(klass.newInstance()));
20239                    compareAndDisplay(atLeastOrEqual, expected, value);
20240                }
20241            }
20242        } catch (IllegalAccessException ex) {
20243            System.err.println(ex);
20244            System.exit(-2);
20245        } catch (InvocationTargetException ex) {
20246            System.err.println(ex);
20247            System.exit(-2);
20248        } catch (InstantiationException ex) {
20249            System.err.println(ex);
20250            System.exit(-2);
20251        }
20252        return value;
20253    }
20254
20255    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
20256        int cmp = compare(expected, value);
20257
20258        switch(atLeastOrEqual) {
20259            case ">":
20260                if (cmp > 0) {
20261                    return;
20262                } else {
20263                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20264                    System.exit(-4);
20265                }
20266            case "==":
20267                if (cmp == 0) {
20268                    return;
20269                } else {
20270                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20271                    System.exit(-4);
20272                }
20273            case "<=":
20274                if (cmp <= 0) {
20275                    return;
20276                } else {
20277                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20278                    System.exit(-4);
20279                }
20280            default:
20281                System.err.println("unable to compare with "+atLeastOrEqual);
20282                System.exit(-4);
20283        }
20284    }
20285
20286    private static int compare(String v1, String v2) {
20287        String s1 = normalisedVersion(v1);
20288        String s2 = normalisedVersion(v2);
20289
20290        System.err.println("compare: " + v1 + " normalised to " + s1);
20291        System.err.println("compare: " + v2 + " normalised to " + s2);
20292        return s1.compareTo(s2);
20293    }
20294
20295    private static String normalisedVersion(String version) {
20296        return normalisedVersion(version, ".", 4);
20297    }
20298
20299    private static String normalisedVersion(String version, String sep, int maxWidth) {
20300        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
20301        StringBuilder sb = new StringBuilder();
20302        for (String s : split) {
20303            sb.append(String.format("%" + maxWidth + 's', s));
20304        }
20305        return sb.toString();
20306    }
20307}
20308EOF
20309
20310    CLASSPATH=$ac_java_classpath
20311    export CLASSPATH
20312    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
20313    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
20314        echo "configure: conftestSharedChecker.class available" >&5
20315    else
20316        echo "configure: failed program was:" >&5
20317        cat conftestSharedChecker.java >&5
20318        echo "configure: CLASSPATH was $CLASSPATH" >&5
20319    fi
20320
20321    fi
20322
20323    CLASSPATH=$ac_java_classpath
20324    export CLASSPATH
20325    echo "CLASSPATH="$CLASSPATH >&5
20326    cmd="$JAVA conftestSharedChecker \"batik-all\" \"org.apache.batik.Version\" \"$jar_resolved\" \"getVersion\" \"1.8\" \"\""
20327    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
20328        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
20329$(tail -n 1 conftestSharedChecker.java.output)
20330EOF
20331        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
20332$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
20333        echo "yes" >&5
20334        # append the found file to the classpath to manage jar dependency
20335        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
20336    else
20337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20338$as_echo "no" >&6; }
20339      if test ""yes"" = "yes"; then
20340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar batik-all used by Apache SVG Library (looking for package org.apache.batik.Version)" >&5
20341$as_echo "$as_me: WARNING: Could not find or use the Java package/jar batik-all used by Apache SVG Library (looking for package org.apache.batik.Version)" >&2;}
20342      else
20343          as_fn_error $? "Could not find or use the Java package/jar batik-all used by Apache SVG Library (looking for package org.apache.batik.Version)" "$LINENO" 5
20344      fi
20345    fi
20346    if test -f conftestSharedChecker.java.output; then
20347        rm conftestSharedChecker.java.output
20348    fi
20349
20350                BATIK=$PACKAGE_JAR_FILE
20351
20352                if test -z "$BATIK"; then
20353                   # Other other distribs
20354
20355
20356
20357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking batik" >&5
20358$as_echo_n "checking batik... " >&6; }
20359    PACKAGE_JAR_FILE=
20360
20361    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
20362
20363    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'batik.jar' -or -name 'libbatik.jar' -or -name 'libbatik-java.jar' -or -name 'batik*.jar' \) 2>/dev/null |tr '\n' ':')."
20364
20365    if test ! -f conftestSharedChecker.class ; then
20366
20367    cat << \EOF > conftestSharedChecker.java
20368// #line 20368 "configure"
20369import java.util.regex.Pattern;
20370import java.io.File;
20371import java.io.IOException;
20372import java.lang.reflect.Field;
20373import java.lang.reflect.InvocationTargetException;
20374import java.lang.reflect.Method;
20375import java.net.URL;
20376import java.net.URLClassLoader;
20377import java.util.ArrayList;
20378
20379public class conftestSharedChecker {
20380
20381    /**
20382     * Required arguments :
20383     *  argv[0]: name of the jar package
20384     *  argv[1]: name of the class (with the package prefix)
20385     *  argv[2]: possible paths of the jar package (separated by ':')
20386     *
20387     * Optional arguments:
20388     *  argv[3]: field or method used to retrieve the version
20389     *  argv[4]: expected version
20390     *  argv[5]: String comparator :
20391     *      "="  for exact version
20392     */
20393    public static void main(String[] argv) {
20394        final String packageName = argv[0];
20395        final String className = argv[1];
20396        final String[] jarList = argv[2].split(":");
20397
20398        ArrayList<URL> found = new ArrayList<>();
20399        for(String jar : jarList)
20400        {
20401            try {
20402                File f = new File(jar);
20403                if (f.exists()) {
20404                    found.add(f.toURI().toURL());
20405                }
20406            } catch (IOException ex) {
20407                System.err.println(ex.toString());
20408            }
20409        }
20410
20411        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
20412        URL klassURL = null;
20413        Class<?> klass = null;
20414        try {
20415            String resourceName = className.replace(".", "/") + ".class";
20416            klassURL = localClassLoader.getResource(resourceName);
20417            klass = localClassLoader.loadClass(className);
20418        } catch (ClassNotFoundException ex) {
20419            System.err.println(className + " not found");
20420            System.exit(-1);
20421        }
20422
20423        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
20424        String path = pathURL.substring(pathURL.indexOf(':') + 1);
20425        System.err.println("found: " + path);
20426
20427        String version;
20428        if (!"".equals(argv[3])) {
20429            version = checkVersion(klass, argv);
20430        } else {
20431            version = klass.getPackage().getSpecificationVersion();
20432        }
20433
20434        System.out.println(path + " " + version);
20435    }
20436
20437    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
20438        final String versionMethod = argv[3];
20439        final String expected = argv[4];
20440        final String atLeastOrEqual;
20441        if (!"".equals(argv[5])) {
20442            atLeastOrEqual = argv[5];
20443        } else {
20444            atLeastOrEqual = "<=";
20445        }
20446
20447        String value = "";
20448        if (versionMethod.isEmpty()) {
20449            value = klass.getPackage().getSpecificationVersion();
20450            compareAndDisplay(atLeastOrEqual, expected, value);
20451            return value;
20452        }
20453
20454        try {
20455            try {
20456                Field field = klass.getField(versionMethod);
20457                value = String.valueOf(field.get(null));
20458                compareAndDisplay(atLeastOrEqual, expected, value);
20459            } catch (NoSuchFieldException fe) {
20460                Method method = null;
20461                try {
20462                    method = klass.getMethod(versionMethod);
20463                } catch (NoSuchMethodException ex) {
20464                    System.err.println(ex.toString());
20465                    System.exit(-3);
20466                }
20467
20468                try {
20469                    value = String.valueOf(method.invoke(null));
20470                    compareAndDisplay(atLeastOrEqual, expected, value);
20471                } catch (NullPointerException ex) {
20472                    value = String.valueOf(method.invoke(klass.newInstance()));
20473                    compareAndDisplay(atLeastOrEqual, expected, value);
20474                }
20475            }
20476        } catch (IllegalAccessException ex) {
20477            System.err.println(ex);
20478            System.exit(-2);
20479        } catch (InvocationTargetException ex) {
20480            System.err.println(ex);
20481            System.exit(-2);
20482        } catch (InstantiationException ex) {
20483            System.err.println(ex);
20484            System.exit(-2);
20485        }
20486        return value;
20487    }
20488
20489    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
20490        int cmp = compare(expected, value);
20491
20492        switch(atLeastOrEqual) {
20493            case ">":
20494                if (cmp > 0) {
20495                    return;
20496                } else {
20497                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20498                    System.exit(-4);
20499                }
20500            case "==":
20501                if (cmp == 0) {
20502                    return;
20503                } else {
20504                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20505                    System.exit(-4);
20506                }
20507            case "<=":
20508                if (cmp <= 0) {
20509                    return;
20510                } else {
20511                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20512                    System.exit(-4);
20513                }
20514            default:
20515                System.err.println("unable to compare with "+atLeastOrEqual);
20516                System.exit(-4);
20517        }
20518    }
20519
20520    private static int compare(String v1, String v2) {
20521        String s1 = normalisedVersion(v1);
20522        String s2 = normalisedVersion(v2);
20523
20524        System.err.println("compare: " + v1 + " normalised to " + s1);
20525        System.err.println("compare: " + v2 + " normalised to " + s2);
20526        return s1.compareTo(s2);
20527    }
20528
20529    private static String normalisedVersion(String version) {
20530        return normalisedVersion(version, ".", 4);
20531    }
20532
20533    private static String normalisedVersion(String version, String sep, int maxWidth) {
20534        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
20535        StringBuilder sb = new StringBuilder();
20536        for (String s : split) {
20537            sb.append(String.format("%" + maxWidth + 's', s));
20538        }
20539        return sb.toString();
20540    }
20541}
20542EOF
20543
20544    CLASSPATH=$ac_java_classpath
20545    export CLASSPATH
20546    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
20547    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
20548        echo "configure: conftestSharedChecker.class available" >&5
20549    else
20550        echo "configure: failed program was:" >&5
20551        cat conftestSharedChecker.java >&5
20552        echo "configure: CLASSPATH was $CLASSPATH" >&5
20553    fi
20554
20555    fi
20556
20557    CLASSPATH=$ac_java_classpath
20558    export CLASSPATH
20559    echo "CLASSPATH="$CLASSPATH >&5
20560    cmd="$JAVA conftestSharedChecker \"batik\" \"org.apache.batik.Version\" \"$jar_resolved\" \"getVersion\" \"1.8\" \"\""
20561    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
20562        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
20563$(tail -n 1 conftestSharedChecker.java.output)
20564EOF
20565        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
20566$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
20567        echo "yes" >&5
20568        # append the found file to the classpath to manage jar dependency
20569        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
20570    else
20571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20572$as_echo "no" >&6; }
20573      if test "" = "yes"; then
20574         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar batik used by Apache SVG Library (looking for package org.apache.batik.Version)" >&5
20575$as_echo "$as_me: WARNING: Could not find or use the Java package/jar batik used by Apache SVG Library (looking for package org.apache.batik.Version)" >&2;}
20576      else
20577          as_fn_error $? "Could not find or use the Java package/jar batik used by Apache SVG Library (looking for package org.apache.batik.Version)" "$LINENO" 5
20578      fi
20579    fi
20580    if test -f conftestSharedChecker.java.output; then
20581        rm conftestSharedChecker.java.output
20582    fi
20583
20584                   BATIK=$PACKAGE_JAR_FILE
20585                fi
20586
20587
20588                # Commons I/O library
20589
20590
20591
20592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking commons-io" >&5
20593$as_echo_n "checking commons-io... " >&6; }
20594    PACKAGE_JAR_FILE=
20595
20596    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
20597
20598    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'commons-io.jar' -or -name 'libcommons-io.jar' -or -name 'libcommons-io-java.jar' -or -name 'commons-io.jar' \) 2>/dev/null |tr '\n' ':')."
20599
20600    if test ! -f conftestSharedChecker.class ; then
20601
20602    cat << \EOF > conftestSharedChecker.java
20603// #line 20603 "configure"
20604import java.util.regex.Pattern;
20605import java.io.File;
20606import java.io.IOException;
20607import java.lang.reflect.Field;
20608import java.lang.reflect.InvocationTargetException;
20609import java.lang.reflect.Method;
20610import java.net.URL;
20611import java.net.URLClassLoader;
20612import java.util.ArrayList;
20613
20614public class conftestSharedChecker {
20615
20616    /**
20617     * Required arguments :
20618     *  argv[0]: name of the jar package
20619     *  argv[1]: name of the class (with the package prefix)
20620     *  argv[2]: possible paths of the jar package (separated by ':')
20621     *
20622     * Optional arguments:
20623     *  argv[3]: field or method used to retrieve the version
20624     *  argv[4]: expected version
20625     *  argv[5]: String comparator :
20626     *      "="  for exact version
20627     */
20628    public static void main(String[] argv) {
20629        final String packageName = argv[0];
20630        final String className = argv[1];
20631        final String[] jarList = argv[2].split(":");
20632
20633        ArrayList<URL> found = new ArrayList<>();
20634        for(String jar : jarList)
20635        {
20636            try {
20637                File f = new File(jar);
20638                if (f.exists()) {
20639                    found.add(f.toURI().toURL());
20640                }
20641            } catch (IOException ex) {
20642                System.err.println(ex.toString());
20643            }
20644        }
20645
20646        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
20647        URL klassURL = null;
20648        Class<?> klass = null;
20649        try {
20650            String resourceName = className.replace(".", "/") + ".class";
20651            klassURL = localClassLoader.getResource(resourceName);
20652            klass = localClassLoader.loadClass(className);
20653        } catch (ClassNotFoundException ex) {
20654            System.err.println(className + " not found");
20655            System.exit(-1);
20656        }
20657
20658        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
20659        String path = pathURL.substring(pathURL.indexOf(':') + 1);
20660        System.err.println("found: " + path);
20661
20662        String version;
20663        if (!"".equals(argv[3])) {
20664            version = checkVersion(klass, argv);
20665        } else {
20666            version = klass.getPackage().getSpecificationVersion();
20667        }
20668
20669        System.out.println(path + " " + version);
20670    }
20671
20672    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
20673        final String versionMethod = argv[3];
20674        final String expected = argv[4];
20675        final String atLeastOrEqual;
20676        if (!"".equals(argv[5])) {
20677            atLeastOrEqual = argv[5];
20678        } else {
20679            atLeastOrEqual = "<=";
20680        }
20681
20682        String value = "";
20683        if (versionMethod.isEmpty()) {
20684            value = klass.getPackage().getSpecificationVersion();
20685            compareAndDisplay(atLeastOrEqual, expected, value);
20686            return value;
20687        }
20688
20689        try {
20690            try {
20691                Field field = klass.getField(versionMethod);
20692                value = String.valueOf(field.get(null));
20693                compareAndDisplay(atLeastOrEqual, expected, value);
20694            } catch (NoSuchFieldException fe) {
20695                Method method = null;
20696                try {
20697                    method = klass.getMethod(versionMethod);
20698                } catch (NoSuchMethodException ex) {
20699                    System.err.println(ex.toString());
20700                    System.exit(-3);
20701                }
20702
20703                try {
20704                    value = String.valueOf(method.invoke(null));
20705                    compareAndDisplay(atLeastOrEqual, expected, value);
20706                } catch (NullPointerException ex) {
20707                    value = String.valueOf(method.invoke(klass.newInstance()));
20708                    compareAndDisplay(atLeastOrEqual, expected, value);
20709                }
20710            }
20711        } catch (IllegalAccessException ex) {
20712            System.err.println(ex);
20713            System.exit(-2);
20714        } catch (InvocationTargetException ex) {
20715            System.err.println(ex);
20716            System.exit(-2);
20717        } catch (InstantiationException ex) {
20718            System.err.println(ex);
20719            System.exit(-2);
20720        }
20721        return value;
20722    }
20723
20724    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
20725        int cmp = compare(expected, value);
20726
20727        switch(atLeastOrEqual) {
20728            case ">":
20729                if (cmp > 0) {
20730                    return;
20731                } else {
20732                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20733                    System.exit(-4);
20734                }
20735            case "==":
20736                if (cmp == 0) {
20737                    return;
20738                } else {
20739                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20740                    System.exit(-4);
20741                }
20742            case "<=":
20743                if (cmp <= 0) {
20744                    return;
20745                } else {
20746                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20747                    System.exit(-4);
20748                }
20749            default:
20750                System.err.println("unable to compare with "+atLeastOrEqual);
20751                System.exit(-4);
20752        }
20753    }
20754
20755    private static int compare(String v1, String v2) {
20756        String s1 = normalisedVersion(v1);
20757        String s2 = normalisedVersion(v2);
20758
20759        System.err.println("compare: " + v1 + " normalised to " + s1);
20760        System.err.println("compare: " + v2 + " normalised to " + s2);
20761        return s1.compareTo(s2);
20762    }
20763
20764    private static String normalisedVersion(String version) {
20765        return normalisedVersion(version, ".", 4);
20766    }
20767
20768    private static String normalisedVersion(String version, String sep, int maxWidth) {
20769        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
20770        StringBuilder sb = new StringBuilder();
20771        for (String s : split) {
20772            sb.append(String.format("%" + maxWidth + 's', s));
20773        }
20774        return sb.toString();
20775    }
20776}
20777EOF
20778
20779    CLASSPATH=$ac_java_classpath
20780    export CLASSPATH
20781    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
20782    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
20783        echo "configure: conftestSharedChecker.class available" >&5
20784    else
20785        echo "configure: failed program was:" >&5
20786        cat conftestSharedChecker.java >&5
20787        echo "configure: CLASSPATH was $CLASSPATH" >&5
20788    fi
20789
20790    fi
20791
20792    CLASSPATH=$ac_java_classpath
20793    export CLASSPATH
20794    echo "CLASSPATH="$CLASSPATH >&5
20795    cmd="$JAVA conftestSharedChecker \"commons-io\" \"org.apache.commons.io.output.CountingOutputStream\" \"$jar_resolved\" \"\" \"\" \"\""
20796    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
20797        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
20798$(tail -n 1 conftestSharedChecker.java.output)
20799EOF
20800        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
20801$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
20802        echo "yes" >&5
20803        # append the found file to the classpath to manage jar dependency
20804        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
20805    else
20806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20807$as_echo "no" >&6; }
20808      if test "" = "yes"; then
20809         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar commons-io used by Commons I/O library (looking for package org.apache.commons.io.output.CountingOutputStream)" >&5
20810$as_echo "$as_me: WARNING: Could not find or use the Java package/jar commons-io used by Commons I/O library (looking for package org.apache.commons.io.output.CountingOutputStream)" >&2;}
20811      else
20812          as_fn_error $? "Could not find or use the Java package/jar commons-io used by Commons I/O library (looking for package org.apache.commons.io.output.CountingOutputStream)" "$LINENO" 5
20813      fi
20814    fi
20815    if test -f conftestSharedChecker.java.output; then
20816        rm conftestSharedChecker.java.output
20817    fi
20818
20819                COMMONS_IO=$PACKAGE_JAR_FILE
20820
20821
20822                # XML graphics common
20823
20824
20825
20826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking xmlgraphics-commons" >&5
20827$as_echo_n "checking xmlgraphics-commons... " >&6; }
20828    PACKAGE_JAR_FILE=
20829
20830    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
20831
20832    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'xmlgraphics-commons.jar' -or -name 'libxmlgraphics-commons.jar' -or -name 'libxmlgraphics-commons-java.jar' -or -name 'xmlgraphics-commons.jar' \) 2>/dev/null |tr '\n' ':')."
20833
20834    if test ! -f conftestSharedChecker.class ; then
20835
20836    cat << \EOF > conftestSharedChecker.java
20837// #line 20837 "configure"
20838import java.util.regex.Pattern;
20839import java.io.File;
20840import java.io.IOException;
20841import java.lang.reflect.Field;
20842import java.lang.reflect.InvocationTargetException;
20843import java.lang.reflect.Method;
20844import java.net.URL;
20845import java.net.URLClassLoader;
20846import java.util.ArrayList;
20847
20848public class conftestSharedChecker {
20849
20850    /**
20851     * Required arguments :
20852     *  argv[0]: name of the jar package
20853     *  argv[1]: name of the class (with the package prefix)
20854     *  argv[2]: possible paths of the jar package (separated by ':')
20855     *
20856     * Optional arguments:
20857     *  argv[3]: field or method used to retrieve the version
20858     *  argv[4]: expected version
20859     *  argv[5]: String comparator :
20860     *      "="  for exact version
20861     */
20862    public static void main(String[] argv) {
20863        final String packageName = argv[0];
20864        final String className = argv[1];
20865        final String[] jarList = argv[2].split(":");
20866
20867        ArrayList<URL> found = new ArrayList<>();
20868        for(String jar : jarList)
20869        {
20870            try {
20871                File f = new File(jar);
20872                if (f.exists()) {
20873                    found.add(f.toURI().toURL());
20874                }
20875            } catch (IOException ex) {
20876                System.err.println(ex.toString());
20877            }
20878        }
20879
20880        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
20881        URL klassURL = null;
20882        Class<?> klass = null;
20883        try {
20884            String resourceName = className.replace(".", "/") + ".class";
20885            klassURL = localClassLoader.getResource(resourceName);
20886            klass = localClassLoader.loadClass(className);
20887        } catch (ClassNotFoundException ex) {
20888            System.err.println(className + " not found");
20889            System.exit(-1);
20890        }
20891
20892        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
20893        String path = pathURL.substring(pathURL.indexOf(':') + 1);
20894        System.err.println("found: " + path);
20895
20896        String version;
20897        if (!"".equals(argv[3])) {
20898            version = checkVersion(klass, argv);
20899        } else {
20900            version = klass.getPackage().getSpecificationVersion();
20901        }
20902
20903        System.out.println(path + " " + version);
20904    }
20905
20906    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
20907        final String versionMethod = argv[3];
20908        final String expected = argv[4];
20909        final String atLeastOrEqual;
20910        if (!"".equals(argv[5])) {
20911            atLeastOrEqual = argv[5];
20912        } else {
20913            atLeastOrEqual = "<=";
20914        }
20915
20916        String value = "";
20917        if (versionMethod.isEmpty()) {
20918            value = klass.getPackage().getSpecificationVersion();
20919            compareAndDisplay(atLeastOrEqual, expected, value);
20920            return value;
20921        }
20922
20923        try {
20924            try {
20925                Field field = klass.getField(versionMethod);
20926                value = String.valueOf(field.get(null));
20927                compareAndDisplay(atLeastOrEqual, expected, value);
20928            } catch (NoSuchFieldException fe) {
20929                Method method = null;
20930                try {
20931                    method = klass.getMethod(versionMethod);
20932                } catch (NoSuchMethodException ex) {
20933                    System.err.println(ex.toString());
20934                    System.exit(-3);
20935                }
20936
20937                try {
20938                    value = String.valueOf(method.invoke(null));
20939                    compareAndDisplay(atLeastOrEqual, expected, value);
20940                } catch (NullPointerException ex) {
20941                    value = String.valueOf(method.invoke(klass.newInstance()));
20942                    compareAndDisplay(atLeastOrEqual, expected, value);
20943                }
20944            }
20945        } catch (IllegalAccessException ex) {
20946            System.err.println(ex);
20947            System.exit(-2);
20948        } catch (InvocationTargetException ex) {
20949            System.err.println(ex);
20950            System.exit(-2);
20951        } catch (InstantiationException ex) {
20952            System.err.println(ex);
20953            System.exit(-2);
20954        }
20955        return value;
20956    }
20957
20958    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
20959        int cmp = compare(expected, value);
20960
20961        switch(atLeastOrEqual) {
20962            case ">":
20963                if (cmp > 0) {
20964                    return;
20965                } else {
20966                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20967                    System.exit(-4);
20968                }
20969            case "==":
20970                if (cmp == 0) {
20971                    return;
20972                } else {
20973                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20974                    System.exit(-4);
20975                }
20976            case "<=":
20977                if (cmp <= 0) {
20978                    return;
20979                } else {
20980                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
20981                    System.exit(-4);
20982                }
20983            default:
20984                System.err.println("unable to compare with "+atLeastOrEqual);
20985                System.exit(-4);
20986        }
20987    }
20988
20989    private static int compare(String v1, String v2) {
20990        String s1 = normalisedVersion(v1);
20991        String s2 = normalisedVersion(v2);
20992
20993        System.err.println("compare: " + v1 + " normalised to " + s1);
20994        System.err.println("compare: " + v2 + " normalised to " + s2);
20995        return s1.compareTo(s2);
20996    }
20997
20998    private static String normalisedVersion(String version) {
20999        return normalisedVersion(version, ".", 4);
21000    }
21001
21002    private static String normalisedVersion(String version, String sep, int maxWidth) {
21003        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
21004        StringBuilder sb = new StringBuilder();
21005        for (String s : split) {
21006            sb.append(String.format("%" + maxWidth + 's', s));
21007        }
21008        return sb.toString();
21009    }
21010}
21011EOF
21012
21013    CLASSPATH=$ac_java_classpath
21014    export CLASSPATH
21015    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
21016    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
21017        echo "configure: conftestSharedChecker.class available" >&5
21018    else
21019        echo "configure: failed program was:" >&5
21020        cat conftestSharedChecker.java >&5
21021        echo "configure: CLASSPATH was $CLASSPATH" >&5
21022    fi
21023
21024    fi
21025
21026    CLASSPATH=$ac_java_classpath
21027    export CLASSPATH
21028    echo "CLASSPATH="$CLASSPATH >&5
21029    cmd="$JAVA conftestSharedChecker \"xmlgraphics-commons\" \"org.apache.xmlgraphics.util.Service\" \"$jar_resolved\" \"\" \"\" \"\""
21030    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
21031        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
21032$(tail -n 1 conftestSharedChecker.java.output)
21033EOF
21034        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
21035$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
21036        echo "yes" >&5
21037        # append the found file to the classpath to manage jar dependency
21038        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
21039    else
21040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21041$as_echo "no" >&6; }
21042      if test "" = "yes"; then
21043         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar xmlgraphics-commons used by Commons graphics library (looking for package org.apache.xmlgraphics.util.Service)" >&5
21044$as_echo "$as_me: WARNING: Could not find or use the Java package/jar xmlgraphics-commons used by Commons graphics library (looking for package org.apache.xmlgraphics.util.Service)" >&2;}
21045      else
21046          as_fn_error $? "Could not find or use the Java package/jar xmlgraphics-commons used by Commons graphics library (looking for package org.apache.xmlgraphics.util.Service)" "$LINENO" 5
21047      fi
21048    fi
21049    if test -f conftestSharedChecker.java.output; then
21050        rm conftestSharedChecker.java.output
21051    fi
21052
21053                XMLGRAPHICS_COMMONS=$PACKAGE_JAR_FILE
21054
21055
21056                # Avalon Framework (PDF)
21057
21058
21059
21060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking avalon-framework" >&5
21061$as_echo_n "checking avalon-framework... " >&6; }
21062    PACKAGE_JAR_FILE=
21063
21064    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
21065
21066    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'avalon-framework.jar' -or -name 'libavalon-framework.jar' -or -name 'libavalon-framework-java.jar' -or -name 'avalon-framework*.jar' \) 2>/dev/null |tr '\n' ':')."
21067
21068    if test ! -f conftestSharedChecker.class ; then
21069
21070    cat << \EOF > conftestSharedChecker.java
21071// #line 21071 "configure"
21072import java.util.regex.Pattern;
21073import java.io.File;
21074import java.io.IOException;
21075import java.lang.reflect.Field;
21076import java.lang.reflect.InvocationTargetException;
21077import java.lang.reflect.Method;
21078import java.net.URL;
21079import java.net.URLClassLoader;
21080import java.util.ArrayList;
21081
21082public class conftestSharedChecker {
21083
21084    /**
21085     * Required arguments :
21086     *  argv[0]: name of the jar package
21087     *  argv[1]: name of the class (with the package prefix)
21088     *  argv[2]: possible paths of the jar package (separated by ':')
21089     *
21090     * Optional arguments:
21091     *  argv[3]: field or method used to retrieve the version
21092     *  argv[4]: expected version
21093     *  argv[5]: String comparator :
21094     *      "="  for exact version
21095     */
21096    public static void main(String[] argv) {
21097        final String packageName = argv[0];
21098        final String className = argv[1];
21099        final String[] jarList = argv[2].split(":");
21100
21101        ArrayList<URL> found = new ArrayList<>();
21102        for(String jar : jarList)
21103        {
21104            try {
21105                File f = new File(jar);
21106                if (f.exists()) {
21107                    found.add(f.toURI().toURL());
21108                }
21109            } catch (IOException ex) {
21110                System.err.println(ex.toString());
21111            }
21112        }
21113
21114        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
21115        URL klassURL = null;
21116        Class<?> klass = null;
21117        try {
21118            String resourceName = className.replace(".", "/") + ".class";
21119            klassURL = localClassLoader.getResource(resourceName);
21120            klass = localClassLoader.loadClass(className);
21121        } catch (ClassNotFoundException ex) {
21122            System.err.println(className + " not found");
21123            System.exit(-1);
21124        }
21125
21126        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
21127        String path = pathURL.substring(pathURL.indexOf(':') + 1);
21128        System.err.println("found: " + path);
21129
21130        String version;
21131        if (!"".equals(argv[3])) {
21132            version = checkVersion(klass, argv);
21133        } else {
21134            version = klass.getPackage().getSpecificationVersion();
21135        }
21136
21137        System.out.println(path + " " + version);
21138    }
21139
21140    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
21141        final String versionMethod = argv[3];
21142        final String expected = argv[4];
21143        final String atLeastOrEqual;
21144        if (!"".equals(argv[5])) {
21145            atLeastOrEqual = argv[5];
21146        } else {
21147            atLeastOrEqual = "<=";
21148        }
21149
21150        String value = "";
21151        if (versionMethod.isEmpty()) {
21152            value = klass.getPackage().getSpecificationVersion();
21153            compareAndDisplay(atLeastOrEqual, expected, value);
21154            return value;
21155        }
21156
21157        try {
21158            try {
21159                Field field = klass.getField(versionMethod);
21160                value = String.valueOf(field.get(null));
21161                compareAndDisplay(atLeastOrEqual, expected, value);
21162            } catch (NoSuchFieldException fe) {
21163                Method method = null;
21164                try {
21165                    method = klass.getMethod(versionMethod);
21166                } catch (NoSuchMethodException ex) {
21167                    System.err.println(ex.toString());
21168                    System.exit(-3);
21169                }
21170
21171                try {
21172                    value = String.valueOf(method.invoke(null));
21173                    compareAndDisplay(atLeastOrEqual, expected, value);
21174                } catch (NullPointerException ex) {
21175                    value = String.valueOf(method.invoke(klass.newInstance()));
21176                    compareAndDisplay(atLeastOrEqual, expected, value);
21177                }
21178            }
21179        } catch (IllegalAccessException ex) {
21180            System.err.println(ex);
21181            System.exit(-2);
21182        } catch (InvocationTargetException ex) {
21183            System.err.println(ex);
21184            System.exit(-2);
21185        } catch (InstantiationException ex) {
21186            System.err.println(ex);
21187            System.exit(-2);
21188        }
21189        return value;
21190    }
21191
21192    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
21193        int cmp = compare(expected, value);
21194
21195        switch(atLeastOrEqual) {
21196            case ">":
21197                if (cmp > 0) {
21198                    return;
21199                } else {
21200                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21201                    System.exit(-4);
21202                }
21203            case "==":
21204                if (cmp == 0) {
21205                    return;
21206                } else {
21207                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21208                    System.exit(-4);
21209                }
21210            case "<=":
21211                if (cmp <= 0) {
21212                    return;
21213                } else {
21214                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21215                    System.exit(-4);
21216                }
21217            default:
21218                System.err.println("unable to compare with "+atLeastOrEqual);
21219                System.exit(-4);
21220        }
21221    }
21222
21223    private static int compare(String v1, String v2) {
21224        String s1 = normalisedVersion(v1);
21225        String s2 = normalisedVersion(v2);
21226
21227        System.err.println("compare: " + v1 + " normalised to " + s1);
21228        System.err.println("compare: " + v2 + " normalised to " + s2);
21229        return s1.compareTo(s2);
21230    }
21231
21232    private static String normalisedVersion(String version) {
21233        return normalisedVersion(version, ".", 4);
21234    }
21235
21236    private static String normalisedVersion(String version, String sep, int maxWidth) {
21237        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
21238        StringBuilder sb = new StringBuilder();
21239        for (String s : split) {
21240            sb.append(String.format("%" + maxWidth + 's', s));
21241        }
21242        return sb.toString();
21243    }
21244}
21245EOF
21246
21247    CLASSPATH=$ac_java_classpath
21248    export CLASSPATH
21249    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
21250    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
21251        echo "configure: conftestSharedChecker.class available" >&5
21252    else
21253        echo "configure: failed program was:" >&5
21254        cat conftestSharedChecker.java >&5
21255        echo "configure: CLASSPATH was $CLASSPATH" >&5
21256    fi
21257
21258    fi
21259
21260    CLASSPATH=$ac_java_classpath
21261    export CLASSPATH
21262    echo "CLASSPATH="$CLASSPATH >&5
21263    cmd="$JAVA conftestSharedChecker \"avalon-framework\" \"org.apache.avalon.framework.configuration.ConfigurationException\" \"$jar_resolved\" \"\" \"\" \"\""
21264    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
21265        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
21266$(tail -n 1 conftestSharedChecker.java.output)
21267EOF
21268        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
21269$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
21270        echo "yes" >&5
21271        # append the found file to the classpath to manage jar dependency
21272        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
21273    else
21274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21275$as_echo "no" >&6; }
21276      if test "" = "yes"; then
21277         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar avalon-framework used by Common framework for Java server application (looking for package org.apache.avalon.framework.configuration.ConfigurationException)" >&5
21278$as_echo "$as_me: WARNING: Could not find or use the Java package/jar avalon-framework used by Common framework for Java server application (looking for package org.apache.avalon.framework.configuration.ConfigurationException)" >&2;}
21279      else
21280          as_fn_error $? "Could not find or use the Java package/jar avalon-framework used by Common framework for Java server application (looking for package org.apache.avalon.framework.configuration.ConfigurationException)" "$LINENO" 5
21281      fi
21282    fi
21283    if test -f conftestSharedChecker.java.output; then
21284        rm conftestSharedChecker.java.output
21285    fi
21286
21287                AVALON_FRAMEWORK=$PACKAGE_JAR_FILE
21288
21289
21290                # XML API EXT (conversion of a SVG => PNG)
21291
21292
21293
21294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking xml-apis-ext" >&5
21295$as_echo_n "checking xml-apis-ext... " >&6; }
21296    PACKAGE_JAR_FILE=
21297
21298    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
21299
21300    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'xml-apis-ext.jar' -or -name 'libxml-apis-ext.jar' -or -name 'libxml-apis-ext-java.jar' -or -name 'xml-apis-ext*.jar' \) 2>/dev/null |tr '\n' ':')."
21301
21302    if test ! -f conftestSharedChecker.class ; then
21303
21304    cat << \EOF > conftestSharedChecker.java
21305// #line 21305 "configure"
21306import java.util.regex.Pattern;
21307import java.io.File;
21308import java.io.IOException;
21309import java.lang.reflect.Field;
21310import java.lang.reflect.InvocationTargetException;
21311import java.lang.reflect.Method;
21312import java.net.URL;
21313import java.net.URLClassLoader;
21314import java.util.ArrayList;
21315
21316public class conftestSharedChecker {
21317
21318    /**
21319     * Required arguments :
21320     *  argv[0]: name of the jar package
21321     *  argv[1]: name of the class (with the package prefix)
21322     *  argv[2]: possible paths of the jar package (separated by ':')
21323     *
21324     * Optional arguments:
21325     *  argv[3]: field or method used to retrieve the version
21326     *  argv[4]: expected version
21327     *  argv[5]: String comparator :
21328     *      "="  for exact version
21329     */
21330    public static void main(String[] argv) {
21331        final String packageName = argv[0];
21332        final String className = argv[1];
21333        final String[] jarList = argv[2].split(":");
21334
21335        ArrayList<URL> found = new ArrayList<>();
21336        for(String jar : jarList)
21337        {
21338            try {
21339                File f = new File(jar);
21340                if (f.exists()) {
21341                    found.add(f.toURI().toURL());
21342                }
21343            } catch (IOException ex) {
21344                System.err.println(ex.toString());
21345            }
21346        }
21347
21348        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
21349        URL klassURL = null;
21350        Class<?> klass = null;
21351        try {
21352            String resourceName = className.replace(".", "/") + ".class";
21353            klassURL = localClassLoader.getResource(resourceName);
21354            klass = localClassLoader.loadClass(className);
21355        } catch (ClassNotFoundException ex) {
21356            System.err.println(className + " not found");
21357            System.exit(-1);
21358        }
21359
21360        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
21361        String path = pathURL.substring(pathURL.indexOf(':') + 1);
21362        System.err.println("found: " + path);
21363
21364        String version;
21365        if (!"".equals(argv[3])) {
21366            version = checkVersion(klass, argv);
21367        } else {
21368            version = klass.getPackage().getSpecificationVersion();
21369        }
21370
21371        System.out.println(path + " " + version);
21372    }
21373
21374    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
21375        final String versionMethod = argv[3];
21376        final String expected = argv[4];
21377        final String atLeastOrEqual;
21378        if (!"".equals(argv[5])) {
21379            atLeastOrEqual = argv[5];
21380        } else {
21381            atLeastOrEqual = "<=";
21382        }
21383
21384        String value = "";
21385        if (versionMethod.isEmpty()) {
21386            value = klass.getPackage().getSpecificationVersion();
21387            compareAndDisplay(atLeastOrEqual, expected, value);
21388            return value;
21389        }
21390
21391        try {
21392            try {
21393                Field field = klass.getField(versionMethod);
21394                value = String.valueOf(field.get(null));
21395                compareAndDisplay(atLeastOrEqual, expected, value);
21396            } catch (NoSuchFieldException fe) {
21397                Method method = null;
21398                try {
21399                    method = klass.getMethod(versionMethod);
21400                } catch (NoSuchMethodException ex) {
21401                    System.err.println(ex.toString());
21402                    System.exit(-3);
21403                }
21404
21405                try {
21406                    value = String.valueOf(method.invoke(null));
21407                    compareAndDisplay(atLeastOrEqual, expected, value);
21408                } catch (NullPointerException ex) {
21409                    value = String.valueOf(method.invoke(klass.newInstance()));
21410                    compareAndDisplay(atLeastOrEqual, expected, value);
21411                }
21412            }
21413        } catch (IllegalAccessException ex) {
21414            System.err.println(ex);
21415            System.exit(-2);
21416        } catch (InvocationTargetException ex) {
21417            System.err.println(ex);
21418            System.exit(-2);
21419        } catch (InstantiationException ex) {
21420            System.err.println(ex);
21421            System.exit(-2);
21422        }
21423        return value;
21424    }
21425
21426    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
21427        int cmp = compare(expected, value);
21428
21429        switch(atLeastOrEqual) {
21430            case ">":
21431                if (cmp > 0) {
21432                    return;
21433                } else {
21434                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21435                    System.exit(-4);
21436                }
21437            case "==":
21438                if (cmp == 0) {
21439                    return;
21440                } else {
21441                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21442                    System.exit(-4);
21443                }
21444            case "<=":
21445                if (cmp <= 0) {
21446                    return;
21447                } else {
21448                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21449                    System.exit(-4);
21450                }
21451            default:
21452                System.err.println("unable to compare with "+atLeastOrEqual);
21453                System.exit(-4);
21454        }
21455    }
21456
21457    private static int compare(String v1, String v2) {
21458        String s1 = normalisedVersion(v1);
21459        String s2 = normalisedVersion(v2);
21460
21461        System.err.println("compare: " + v1 + " normalised to " + s1);
21462        System.err.println("compare: " + v2 + " normalised to " + s2);
21463        return s1.compareTo(s2);
21464    }
21465
21466    private static String normalisedVersion(String version) {
21467        return normalisedVersion(version, ".", 4);
21468    }
21469
21470    private static String normalisedVersion(String version, String sep, int maxWidth) {
21471        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
21472        StringBuilder sb = new StringBuilder();
21473        for (String s : split) {
21474            sb.append(String.format("%" + maxWidth + 's', s));
21475        }
21476        return sb.toString();
21477    }
21478}
21479EOF
21480
21481    CLASSPATH=$ac_java_classpath
21482    export CLASSPATH
21483    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
21484    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
21485        echo "configure: conftestSharedChecker.class available" >&5
21486    else
21487        echo "configure: failed program was:" >&5
21488        cat conftestSharedChecker.java >&5
21489        echo "configure: CLASSPATH was $CLASSPATH" >&5
21490    fi
21491
21492    fi
21493
21494    CLASSPATH=$ac_java_classpath
21495    export CLASSPATH
21496    echo "CLASSPATH="$CLASSPATH >&5
21497    cmd="$JAVA conftestSharedChecker \"xml-apis-ext\" \"org.w3c.dom.svg.SVGDocument\" \"$jar_resolved\" \"\" \"\" \"\""
21498    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
21499        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
21500$(tail -n 1 conftestSharedChecker.java.output)
21501EOF
21502        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
21503$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
21504        echo "yes" >&5
21505        # append the found file to the classpath to manage jar dependency
21506        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
21507    else
21508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21509$as_echo "no" >&6; }
21510      if test ""yes"" = "yes"; then
21511         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar xml-apis-ext used by XML Commons external code (looking for package org.w3c.dom.svg.SVGDocument)" >&5
21512$as_echo "$as_me: WARNING: Could not find or use the Java package/jar xml-apis-ext used by XML Commons external code (looking for package org.w3c.dom.svg.SVGDocument)" >&2;}
21513      else
21514          as_fn_error $? "Could not find or use the Java package/jar xml-apis-ext used by XML Commons external code (looking for package org.w3c.dom.svg.SVGDocument)" "$LINENO" 5
21515      fi
21516    fi
21517    if test -f conftestSharedChecker.java.output; then
21518        rm conftestSharedChecker.java.output
21519    fi
21520
21521                XML_APIS_EXT=$PACKAGE_JAR_FILE
21522
21523                if test -z "$XML_APIS_EXT"; then
21524                    # Other other distribs (Ex: Fedora/Redhat)
21525
21526
21527
21528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking xml-commons-apis-ext" >&5
21529$as_echo_n "checking xml-commons-apis-ext... " >&6; }
21530    PACKAGE_JAR_FILE=
21531
21532    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
21533
21534    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'xml-commons-apis-ext.jar' -or -name 'libxml-commons-apis-ext.jar' -or -name 'libxml-commons-apis-ext-java.jar' -or -name 'xml-commons-apis-ext*.jar' \) 2>/dev/null |tr '\n' ':')."
21535
21536    if test ! -f conftestSharedChecker.class ; then
21537
21538    cat << \EOF > conftestSharedChecker.java
21539// #line 21539 "configure"
21540import java.util.regex.Pattern;
21541import java.io.File;
21542import java.io.IOException;
21543import java.lang.reflect.Field;
21544import java.lang.reflect.InvocationTargetException;
21545import java.lang.reflect.Method;
21546import java.net.URL;
21547import java.net.URLClassLoader;
21548import java.util.ArrayList;
21549
21550public class conftestSharedChecker {
21551
21552    /**
21553     * Required arguments :
21554     *  argv[0]: name of the jar package
21555     *  argv[1]: name of the class (with the package prefix)
21556     *  argv[2]: possible paths of the jar package (separated by ':')
21557     *
21558     * Optional arguments:
21559     *  argv[3]: field or method used to retrieve the version
21560     *  argv[4]: expected version
21561     *  argv[5]: String comparator :
21562     *      "="  for exact version
21563     */
21564    public static void main(String[] argv) {
21565        final String packageName = argv[0];
21566        final String className = argv[1];
21567        final String[] jarList = argv[2].split(":");
21568
21569        ArrayList<URL> found = new ArrayList<>();
21570        for(String jar : jarList)
21571        {
21572            try {
21573                File f = new File(jar);
21574                if (f.exists()) {
21575                    found.add(f.toURI().toURL());
21576                }
21577            } catch (IOException ex) {
21578                System.err.println(ex.toString());
21579            }
21580        }
21581
21582        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
21583        URL klassURL = null;
21584        Class<?> klass = null;
21585        try {
21586            String resourceName = className.replace(".", "/") + ".class";
21587            klassURL = localClassLoader.getResource(resourceName);
21588            klass = localClassLoader.loadClass(className);
21589        } catch (ClassNotFoundException ex) {
21590            System.err.println(className + " not found");
21591            System.exit(-1);
21592        }
21593
21594        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
21595        String path = pathURL.substring(pathURL.indexOf(':') + 1);
21596        System.err.println("found: " + path);
21597
21598        String version;
21599        if (!"".equals(argv[3])) {
21600            version = checkVersion(klass, argv);
21601        } else {
21602            version = klass.getPackage().getSpecificationVersion();
21603        }
21604
21605        System.out.println(path + " " + version);
21606    }
21607
21608    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
21609        final String versionMethod = argv[3];
21610        final String expected = argv[4];
21611        final String atLeastOrEqual;
21612        if (!"".equals(argv[5])) {
21613            atLeastOrEqual = argv[5];
21614        } else {
21615            atLeastOrEqual = "<=";
21616        }
21617
21618        String value = "";
21619        if (versionMethod.isEmpty()) {
21620            value = klass.getPackage().getSpecificationVersion();
21621            compareAndDisplay(atLeastOrEqual, expected, value);
21622            return value;
21623        }
21624
21625        try {
21626            try {
21627                Field field = klass.getField(versionMethod);
21628                value = String.valueOf(field.get(null));
21629                compareAndDisplay(atLeastOrEqual, expected, value);
21630            } catch (NoSuchFieldException fe) {
21631                Method method = null;
21632                try {
21633                    method = klass.getMethod(versionMethod);
21634                } catch (NoSuchMethodException ex) {
21635                    System.err.println(ex.toString());
21636                    System.exit(-3);
21637                }
21638
21639                try {
21640                    value = String.valueOf(method.invoke(null));
21641                    compareAndDisplay(atLeastOrEqual, expected, value);
21642                } catch (NullPointerException ex) {
21643                    value = String.valueOf(method.invoke(klass.newInstance()));
21644                    compareAndDisplay(atLeastOrEqual, expected, value);
21645                }
21646            }
21647        } catch (IllegalAccessException ex) {
21648            System.err.println(ex);
21649            System.exit(-2);
21650        } catch (InvocationTargetException ex) {
21651            System.err.println(ex);
21652            System.exit(-2);
21653        } catch (InstantiationException ex) {
21654            System.err.println(ex);
21655            System.exit(-2);
21656        }
21657        return value;
21658    }
21659
21660    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
21661        int cmp = compare(expected, value);
21662
21663        switch(atLeastOrEqual) {
21664            case ">":
21665                if (cmp > 0) {
21666                    return;
21667                } else {
21668                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21669                    System.exit(-4);
21670                }
21671            case "==":
21672                if (cmp == 0) {
21673                    return;
21674                } else {
21675                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21676                    System.exit(-4);
21677                }
21678            case "<=":
21679                if (cmp <= 0) {
21680                    return;
21681                } else {
21682                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21683                    System.exit(-4);
21684                }
21685            default:
21686                System.err.println("unable to compare with "+atLeastOrEqual);
21687                System.exit(-4);
21688        }
21689    }
21690
21691    private static int compare(String v1, String v2) {
21692        String s1 = normalisedVersion(v1);
21693        String s2 = normalisedVersion(v2);
21694
21695        System.err.println("compare: " + v1 + " normalised to " + s1);
21696        System.err.println("compare: " + v2 + " normalised to " + s2);
21697        return s1.compareTo(s2);
21698    }
21699
21700    private static String normalisedVersion(String version) {
21701        return normalisedVersion(version, ".", 4);
21702    }
21703
21704    private static String normalisedVersion(String version, String sep, int maxWidth) {
21705        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
21706        StringBuilder sb = new StringBuilder();
21707        for (String s : split) {
21708            sb.append(String.format("%" + maxWidth + 's', s));
21709        }
21710        return sb.toString();
21711    }
21712}
21713EOF
21714
21715    CLASSPATH=$ac_java_classpath
21716    export CLASSPATH
21717    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
21718    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
21719        echo "configure: conftestSharedChecker.class available" >&5
21720    else
21721        echo "configure: failed program was:" >&5
21722        cat conftestSharedChecker.java >&5
21723        echo "configure: CLASSPATH was $CLASSPATH" >&5
21724    fi
21725
21726    fi
21727
21728    CLASSPATH=$ac_java_classpath
21729    export CLASSPATH
21730    echo "CLASSPATH="$CLASSPATH >&5
21731    cmd="$JAVA conftestSharedChecker \"xml-commons-apis-ext\" \"org.w3c.dom.svg.SVGDocument\" \"$jar_resolved\" \"\" \"\" \"\""
21732    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
21733        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
21734$(tail -n 1 conftestSharedChecker.java.output)
21735EOF
21736        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
21737$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
21738        echo "yes" >&5
21739        # append the found file to the classpath to manage jar dependency
21740        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
21741    else
21742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21743$as_echo "no" >&6; }
21744      if test "" = "yes"; then
21745         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar xml-commons-apis-ext used by XML Commons external code (looking for package org.w3c.dom.svg.SVGDocument)" >&5
21746$as_echo "$as_me: WARNING: Could not find or use the Java package/jar xml-commons-apis-ext used by XML Commons external code (looking for package org.w3c.dom.svg.SVGDocument)" >&2;}
21747      else
21748          as_fn_error $? "Could not find or use the Java package/jar xml-commons-apis-ext used by XML Commons external code (looking for package org.w3c.dom.svg.SVGDocument)" "$LINENO" 5
21749      fi
21750    fi
21751    if test -f conftestSharedChecker.java.output; then
21752        rm conftestSharedChecker.java.output
21753    fi
21754
21755                    XML_APIS_EXT=$PACKAGE_JAR_FILE
21756                fi
21757
21758
21759                ################ END Mandatory for graphic_export features #####
21760
21761
21762                # Logging (flexdock dep)
21763
21764
21765
21766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking commons-logging" >&5
21767$as_echo_n "checking commons-logging... " >&6; }
21768    PACKAGE_JAR_FILE=
21769
21770    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
21771
21772    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'commons-logging.jar' -or -name 'libcommons-logging.jar' -or -name 'libcommons-logging-java.jar' -or -name 'commons-logging.jar' \) 2>/dev/null |tr '\n' ':')."
21773
21774    if test ! -f conftestSharedChecker.class ; then
21775
21776    cat << \EOF > conftestSharedChecker.java
21777// #line 21777 "configure"
21778import java.util.regex.Pattern;
21779import java.io.File;
21780import java.io.IOException;
21781import java.lang.reflect.Field;
21782import java.lang.reflect.InvocationTargetException;
21783import java.lang.reflect.Method;
21784import java.net.URL;
21785import java.net.URLClassLoader;
21786import java.util.ArrayList;
21787
21788public class conftestSharedChecker {
21789
21790    /**
21791     * Required arguments :
21792     *  argv[0]: name of the jar package
21793     *  argv[1]: name of the class (with the package prefix)
21794     *  argv[2]: possible paths of the jar package (separated by ':')
21795     *
21796     * Optional arguments:
21797     *  argv[3]: field or method used to retrieve the version
21798     *  argv[4]: expected version
21799     *  argv[5]: String comparator :
21800     *      "="  for exact version
21801     */
21802    public static void main(String[] argv) {
21803        final String packageName = argv[0];
21804        final String className = argv[1];
21805        final String[] jarList = argv[2].split(":");
21806
21807        ArrayList<URL> found = new ArrayList<>();
21808        for(String jar : jarList)
21809        {
21810            try {
21811                File f = new File(jar);
21812                if (f.exists()) {
21813                    found.add(f.toURI().toURL());
21814                }
21815            } catch (IOException ex) {
21816                System.err.println(ex.toString());
21817            }
21818        }
21819
21820        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
21821        URL klassURL = null;
21822        Class<?> klass = null;
21823        try {
21824            String resourceName = className.replace(".", "/") + ".class";
21825            klassURL = localClassLoader.getResource(resourceName);
21826            klass = localClassLoader.loadClass(className);
21827        } catch (ClassNotFoundException ex) {
21828            System.err.println(className + " not found");
21829            System.exit(-1);
21830        }
21831
21832        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
21833        String path = pathURL.substring(pathURL.indexOf(':') + 1);
21834        System.err.println("found: " + path);
21835
21836        String version;
21837        if (!"".equals(argv[3])) {
21838            version = checkVersion(klass, argv);
21839        } else {
21840            version = klass.getPackage().getSpecificationVersion();
21841        }
21842
21843        System.out.println(path + " " + version);
21844    }
21845
21846    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
21847        final String versionMethod = argv[3];
21848        final String expected = argv[4];
21849        final String atLeastOrEqual;
21850        if (!"".equals(argv[5])) {
21851            atLeastOrEqual = argv[5];
21852        } else {
21853            atLeastOrEqual = "<=";
21854        }
21855
21856        String value = "";
21857        if (versionMethod.isEmpty()) {
21858            value = klass.getPackage().getSpecificationVersion();
21859            compareAndDisplay(atLeastOrEqual, expected, value);
21860            return value;
21861        }
21862
21863        try {
21864            try {
21865                Field field = klass.getField(versionMethod);
21866                value = String.valueOf(field.get(null));
21867                compareAndDisplay(atLeastOrEqual, expected, value);
21868            } catch (NoSuchFieldException fe) {
21869                Method method = null;
21870                try {
21871                    method = klass.getMethod(versionMethod);
21872                } catch (NoSuchMethodException ex) {
21873                    System.err.println(ex.toString());
21874                    System.exit(-3);
21875                }
21876
21877                try {
21878                    value = String.valueOf(method.invoke(null));
21879                    compareAndDisplay(atLeastOrEqual, expected, value);
21880                } catch (NullPointerException ex) {
21881                    value = String.valueOf(method.invoke(klass.newInstance()));
21882                    compareAndDisplay(atLeastOrEqual, expected, value);
21883                }
21884            }
21885        } catch (IllegalAccessException ex) {
21886            System.err.println(ex);
21887            System.exit(-2);
21888        } catch (InvocationTargetException ex) {
21889            System.err.println(ex);
21890            System.exit(-2);
21891        } catch (InstantiationException ex) {
21892            System.err.println(ex);
21893            System.exit(-2);
21894        }
21895        return value;
21896    }
21897
21898    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
21899        int cmp = compare(expected, value);
21900
21901        switch(atLeastOrEqual) {
21902            case ">":
21903                if (cmp > 0) {
21904                    return;
21905                } else {
21906                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21907                    System.exit(-4);
21908                }
21909            case "==":
21910                if (cmp == 0) {
21911                    return;
21912                } else {
21913                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21914                    System.exit(-4);
21915                }
21916            case "<=":
21917                if (cmp <= 0) {
21918                    return;
21919                } else {
21920                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
21921                    System.exit(-4);
21922                }
21923            default:
21924                System.err.println("unable to compare with "+atLeastOrEqual);
21925                System.exit(-4);
21926        }
21927    }
21928
21929    private static int compare(String v1, String v2) {
21930        String s1 = normalisedVersion(v1);
21931        String s2 = normalisedVersion(v2);
21932
21933        System.err.println("compare: " + v1 + " normalised to " + s1);
21934        System.err.println("compare: " + v2 + " normalised to " + s2);
21935        return s1.compareTo(s2);
21936    }
21937
21938    private static String normalisedVersion(String version) {
21939        return normalisedVersion(version, ".", 4);
21940    }
21941
21942    private static String normalisedVersion(String version, String sep, int maxWidth) {
21943        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
21944        StringBuilder sb = new StringBuilder();
21945        for (String s : split) {
21946            sb.append(String.format("%" + maxWidth + 's', s));
21947        }
21948        return sb.toString();
21949    }
21950}
21951EOF
21952
21953    CLASSPATH=$ac_java_classpath
21954    export CLASSPATH
21955    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
21956    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
21957        echo "configure: conftestSharedChecker.class available" >&5
21958    else
21959        echo "configure: failed program was:" >&5
21960        cat conftestSharedChecker.java >&5
21961        echo "configure: CLASSPATH was $CLASSPATH" >&5
21962    fi
21963
21964    fi
21965
21966    CLASSPATH=$ac_java_classpath
21967    export CLASSPATH
21968    echo "CLASSPATH="$CLASSPATH >&5
21969    cmd="$JAVA conftestSharedChecker \"commons-logging\" \"org.apache.commons.logging.LogFactory\" \"$jar_resolved\" \"\" \"\" \"\""
21970    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
21971        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
21972$(tail -n 1 conftestSharedChecker.java.output)
21973EOF
21974        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
21975$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
21976        echo "yes" >&5
21977        # append the found file to the classpath to manage jar dependency
21978        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
21979    else
21980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21981$as_echo "no" >&6; }
21982      if test "" = "yes"; then
21983         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar commons-logging used by Apache logging (looking for package org.apache.commons.logging.LogFactory)" >&5
21984$as_echo "$as_me: WARNING: Could not find or use the Java package/jar commons-logging used by Apache logging (looking for package org.apache.commons.logging.LogFactory)" >&2;}
21985      else
21986          as_fn_error $? "Could not find or use the Java package/jar commons-logging used by Apache logging (looking for package org.apache.commons.logging.LogFactory)" "$LINENO" 5
21987      fi
21988    fi
21989    if test -f conftestSharedChecker.java.output; then
21990        rm conftestSharedChecker.java.output
21991    fi
21992
21993                COMMONS_LOGGING=$PACKAGE_JAR_FILE
21994
21995
21996                # JLaTeXMath
21997
21998
21999
22000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jlatexmath" >&5
22001$as_echo_n "checking jlatexmath... " >&6; }
22002    PACKAGE_JAR_FILE=
22003
22004    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
22005
22006    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jlatexmath.jar' -or -name 'libjlatexmath.jar' -or -name 'libjlatexmath-java.jar' -or -name 'jlatexmath.jar' \) 2>/dev/null |tr '\n' ':')."
22007
22008    if test ! -f conftestSharedChecker.class ; then
22009
22010    cat << \EOF > conftestSharedChecker.java
22011// #line 22011 "configure"
22012import java.util.regex.Pattern;
22013import java.io.File;
22014import java.io.IOException;
22015import java.lang.reflect.Field;
22016import java.lang.reflect.InvocationTargetException;
22017import java.lang.reflect.Method;
22018import java.net.URL;
22019import java.net.URLClassLoader;
22020import java.util.ArrayList;
22021
22022public class conftestSharedChecker {
22023
22024    /**
22025     * Required arguments :
22026     *  argv[0]: name of the jar package
22027     *  argv[1]: name of the class (with the package prefix)
22028     *  argv[2]: possible paths of the jar package (separated by ':')
22029     *
22030     * Optional arguments:
22031     *  argv[3]: field or method used to retrieve the version
22032     *  argv[4]: expected version
22033     *  argv[5]: String comparator :
22034     *      "="  for exact version
22035     */
22036    public static void main(String[] argv) {
22037        final String packageName = argv[0];
22038        final String className = argv[1];
22039        final String[] jarList = argv[2].split(":");
22040
22041        ArrayList<URL> found = new ArrayList<>();
22042        for(String jar : jarList)
22043        {
22044            try {
22045                File f = new File(jar);
22046                if (f.exists()) {
22047                    found.add(f.toURI().toURL());
22048                }
22049            } catch (IOException ex) {
22050                System.err.println(ex.toString());
22051            }
22052        }
22053
22054        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
22055        URL klassURL = null;
22056        Class<?> klass = null;
22057        try {
22058            String resourceName = className.replace(".", "/") + ".class";
22059            klassURL = localClassLoader.getResource(resourceName);
22060            klass = localClassLoader.loadClass(className);
22061        } catch (ClassNotFoundException ex) {
22062            System.err.println(className + " not found");
22063            System.exit(-1);
22064        }
22065
22066        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
22067        String path = pathURL.substring(pathURL.indexOf(':') + 1);
22068        System.err.println("found: " + path);
22069
22070        String version;
22071        if (!"".equals(argv[3])) {
22072            version = checkVersion(klass, argv);
22073        } else {
22074            version = klass.getPackage().getSpecificationVersion();
22075        }
22076
22077        System.out.println(path + " " + version);
22078    }
22079
22080    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
22081        final String versionMethod = argv[3];
22082        final String expected = argv[4];
22083        final String atLeastOrEqual;
22084        if (!"".equals(argv[5])) {
22085            atLeastOrEqual = argv[5];
22086        } else {
22087            atLeastOrEqual = "<=";
22088        }
22089
22090        String value = "";
22091        if (versionMethod.isEmpty()) {
22092            value = klass.getPackage().getSpecificationVersion();
22093            compareAndDisplay(atLeastOrEqual, expected, value);
22094            return value;
22095        }
22096
22097        try {
22098            try {
22099                Field field = klass.getField(versionMethod);
22100                value = String.valueOf(field.get(null));
22101                compareAndDisplay(atLeastOrEqual, expected, value);
22102            } catch (NoSuchFieldException fe) {
22103                Method method = null;
22104                try {
22105                    method = klass.getMethod(versionMethod);
22106                } catch (NoSuchMethodException ex) {
22107                    System.err.println(ex.toString());
22108                    System.exit(-3);
22109                }
22110
22111                try {
22112                    value = String.valueOf(method.invoke(null));
22113                    compareAndDisplay(atLeastOrEqual, expected, value);
22114                } catch (NullPointerException ex) {
22115                    value = String.valueOf(method.invoke(klass.newInstance()));
22116                    compareAndDisplay(atLeastOrEqual, expected, value);
22117                }
22118            }
22119        } catch (IllegalAccessException ex) {
22120            System.err.println(ex);
22121            System.exit(-2);
22122        } catch (InvocationTargetException ex) {
22123            System.err.println(ex);
22124            System.exit(-2);
22125        } catch (InstantiationException ex) {
22126            System.err.println(ex);
22127            System.exit(-2);
22128        }
22129        return value;
22130    }
22131
22132    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
22133        int cmp = compare(expected, value);
22134
22135        switch(atLeastOrEqual) {
22136            case ">":
22137                if (cmp > 0) {
22138                    return;
22139                } else {
22140                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22141                    System.exit(-4);
22142                }
22143            case "==":
22144                if (cmp == 0) {
22145                    return;
22146                } else {
22147                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22148                    System.exit(-4);
22149                }
22150            case "<=":
22151                if (cmp <= 0) {
22152                    return;
22153                } else {
22154                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22155                    System.exit(-4);
22156                }
22157            default:
22158                System.err.println("unable to compare with "+atLeastOrEqual);
22159                System.exit(-4);
22160        }
22161    }
22162
22163    private static int compare(String v1, String v2) {
22164        String s1 = normalisedVersion(v1);
22165        String s2 = normalisedVersion(v2);
22166
22167        System.err.println("compare: " + v1 + " normalised to " + s1);
22168        System.err.println("compare: " + v2 + " normalised to " + s2);
22169        return s1.compareTo(s2);
22170    }
22171
22172    private static String normalisedVersion(String version) {
22173        return normalisedVersion(version, ".", 4);
22174    }
22175
22176    private static String normalisedVersion(String version, String sep, int maxWidth) {
22177        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
22178        StringBuilder sb = new StringBuilder();
22179        for (String s : split) {
22180            sb.append(String.format("%" + maxWidth + 's', s));
22181        }
22182        return sb.toString();
22183    }
22184}
22185EOF
22186
22187    CLASSPATH=$ac_java_classpath
22188    export CLASSPATH
22189    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
22190    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
22191        echo "configure: conftestSharedChecker.class available" >&5
22192    else
22193        echo "configure: failed program was:" >&5
22194        cat conftestSharedChecker.java >&5
22195        echo "configure: CLASSPATH was $CLASSPATH" >&5
22196    fi
22197
22198    fi
22199
22200    CLASSPATH=$ac_java_classpath
22201    export CLASSPATH
22202    echo "CLASSPATH="$CLASSPATH >&5
22203    cmd="$JAVA conftestSharedChecker \"jlatexmath\" \"org.scilab.forge.jlatexmath.TeXFormula\" \"$jar_resolved\" \"VERSION\" \"1.0.3\" \"\""
22204    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
22205        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
22206$(tail -n 1 conftestSharedChecker.java.output)
22207EOF
22208        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
22209$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
22210        echo "yes" >&5
22211        # append the found file to the classpath to manage jar dependency
22212        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
22213    else
22214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22215$as_echo "no" >&6; }
22216      if test "" = "yes"; then
22217         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jlatexmath used by LaTex Rendering (looking for package org.scilab.forge.jlatexmath.TeXFormula)" >&5
22218$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jlatexmath used by LaTex Rendering (looking for package org.scilab.forge.jlatexmath.TeXFormula)" >&2;}
22219      else
22220          as_fn_error $? "Could not find or use the Java package/jar jlatexmath used by LaTex Rendering (looking for package org.scilab.forge.jlatexmath.TeXFormula)" "$LINENO" 5
22221      fi
22222    fi
22223    if test -f conftestSharedChecker.java.output; then
22224        rm conftestSharedChecker.java.output
22225    fi
22226
22227                JLATEXMATH=$PACKAGE_JAR_FILE
22228
22229
22230                # JLaTeXMath FOP
22231
22232
22233
22234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking jlatexmath-fop" >&5
22235$as_echo_n "checking jlatexmath-fop... " >&6; }
22236    PACKAGE_JAR_FILE=
22237
22238    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
22239
22240    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'jlatexmath-fop.jar' -or -name 'libjlatexmath-fop.jar' -or -name 'libjlatexmath-fop-java.jar' -or -name 'jlatexmath-fop.jar' \) 2>/dev/null |tr '\n' ':')."
22241
22242    if test ! -f conftestSharedChecker.class ; then
22243
22244    cat << \EOF > conftestSharedChecker.java
22245// #line 22245 "configure"
22246import java.util.regex.Pattern;
22247import java.io.File;
22248import java.io.IOException;
22249import java.lang.reflect.Field;
22250import java.lang.reflect.InvocationTargetException;
22251import java.lang.reflect.Method;
22252import java.net.URL;
22253import java.net.URLClassLoader;
22254import java.util.ArrayList;
22255
22256public class conftestSharedChecker {
22257
22258    /**
22259     * Required arguments :
22260     *  argv[0]: name of the jar package
22261     *  argv[1]: name of the class (with the package prefix)
22262     *  argv[2]: possible paths of the jar package (separated by ':')
22263     *
22264     * Optional arguments:
22265     *  argv[3]: field or method used to retrieve the version
22266     *  argv[4]: expected version
22267     *  argv[5]: String comparator :
22268     *      "="  for exact version
22269     */
22270    public static void main(String[] argv) {
22271        final String packageName = argv[0];
22272        final String className = argv[1];
22273        final String[] jarList = argv[2].split(":");
22274
22275        ArrayList<URL> found = new ArrayList<>();
22276        for(String jar : jarList)
22277        {
22278            try {
22279                File f = new File(jar);
22280                if (f.exists()) {
22281                    found.add(f.toURI().toURL());
22282                }
22283            } catch (IOException ex) {
22284                System.err.println(ex.toString());
22285            }
22286        }
22287
22288        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
22289        URL klassURL = null;
22290        Class<?> klass = null;
22291        try {
22292            String resourceName = className.replace(".", "/") + ".class";
22293            klassURL = localClassLoader.getResource(resourceName);
22294            klass = localClassLoader.loadClass(className);
22295        } catch (ClassNotFoundException ex) {
22296            System.err.println(className + " not found");
22297            System.exit(-1);
22298        }
22299
22300        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
22301        String path = pathURL.substring(pathURL.indexOf(':') + 1);
22302        System.err.println("found: " + path);
22303
22304        String version;
22305        if (!"".equals(argv[3])) {
22306            version = checkVersion(klass, argv);
22307        } else {
22308            version = klass.getPackage().getSpecificationVersion();
22309        }
22310
22311        System.out.println(path + " " + version);
22312    }
22313
22314    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
22315        final String versionMethod = argv[3];
22316        final String expected = argv[4];
22317        final String atLeastOrEqual;
22318        if (!"".equals(argv[5])) {
22319            atLeastOrEqual = argv[5];
22320        } else {
22321            atLeastOrEqual = "<=";
22322        }
22323
22324        String value = "";
22325        if (versionMethod.isEmpty()) {
22326            value = klass.getPackage().getSpecificationVersion();
22327            compareAndDisplay(atLeastOrEqual, expected, value);
22328            return value;
22329        }
22330
22331        try {
22332            try {
22333                Field field = klass.getField(versionMethod);
22334                value = String.valueOf(field.get(null));
22335                compareAndDisplay(atLeastOrEqual, expected, value);
22336            } catch (NoSuchFieldException fe) {
22337                Method method = null;
22338                try {
22339                    method = klass.getMethod(versionMethod);
22340                } catch (NoSuchMethodException ex) {
22341                    System.err.println(ex.toString());
22342                    System.exit(-3);
22343                }
22344
22345                try {
22346                    value = String.valueOf(method.invoke(null));
22347                    compareAndDisplay(atLeastOrEqual, expected, value);
22348                } catch (NullPointerException ex) {
22349                    value = String.valueOf(method.invoke(klass.newInstance()));
22350                    compareAndDisplay(atLeastOrEqual, expected, value);
22351                }
22352            }
22353        } catch (IllegalAccessException ex) {
22354            System.err.println(ex);
22355            System.exit(-2);
22356        } catch (InvocationTargetException ex) {
22357            System.err.println(ex);
22358            System.exit(-2);
22359        } catch (InstantiationException ex) {
22360            System.err.println(ex);
22361            System.exit(-2);
22362        }
22363        return value;
22364    }
22365
22366    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
22367        int cmp = compare(expected, value);
22368
22369        switch(atLeastOrEqual) {
22370            case ">":
22371                if (cmp > 0) {
22372                    return;
22373                } else {
22374                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22375                    System.exit(-4);
22376                }
22377            case "==":
22378                if (cmp == 0) {
22379                    return;
22380                } else {
22381                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22382                    System.exit(-4);
22383                }
22384            case "<=":
22385                if (cmp <= 0) {
22386                    return;
22387                } else {
22388                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22389                    System.exit(-4);
22390                }
22391            default:
22392                System.err.println("unable to compare with "+atLeastOrEqual);
22393                System.exit(-4);
22394        }
22395    }
22396
22397    private static int compare(String v1, String v2) {
22398        String s1 = normalisedVersion(v1);
22399        String s2 = normalisedVersion(v2);
22400
22401        System.err.println("compare: " + v1 + " normalised to " + s1);
22402        System.err.println("compare: " + v2 + " normalised to " + s2);
22403        return s1.compareTo(s2);
22404    }
22405
22406    private static String normalisedVersion(String version) {
22407        return normalisedVersion(version, ".", 4);
22408    }
22409
22410    private static String normalisedVersion(String version, String sep, int maxWidth) {
22411        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
22412        StringBuilder sb = new StringBuilder();
22413        for (String s : split) {
22414            sb.append(String.format("%" + maxWidth + 's', s));
22415        }
22416        return sb.toString();
22417    }
22418}
22419EOF
22420
22421    CLASSPATH=$ac_java_classpath
22422    export CLASSPATH
22423    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
22424    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
22425        echo "configure: conftestSharedChecker.class available" >&5
22426    else
22427        echo "configure: failed program was:" >&5
22428        cat conftestSharedChecker.java >&5
22429        echo "configure: CLASSPATH was $CLASSPATH" >&5
22430    fi
22431
22432    fi
22433
22434    CLASSPATH=$ac_java_classpath
22435    export CLASSPATH
22436    echo "CLASSPATH="$CLASSPATH >&5
22437    cmd="$JAVA conftestSharedChecker \"jlatexmath-fop\" \"org.scilab.forge.jlatexmath.fop.JLaTeXMathObj\" \"$jar_resolved\" \"\" \"\" \"\""
22438    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
22439        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
22440$(tail -n 1 conftestSharedChecker.java.output)
22441EOF
22442        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
22443$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
22444        echo "yes" >&5
22445        # append the found file to the classpath to manage jar dependency
22446        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
22447    else
22448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22449$as_echo "no" >&6; }
22450      if test "" = "yes"; then
22451         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar jlatexmath-fop used by LaTex Rendering - FOP plugin (looking for package org.scilab.forge.jlatexmath.fop.JLaTeXMathObj)" >&5
22452$as_echo "$as_me: WARNING: Could not find or use the Java package/jar jlatexmath-fop used by LaTex Rendering - FOP plugin (looking for package org.scilab.forge.jlatexmath.fop.JLaTeXMathObj)" >&2;}
22453      else
22454          as_fn_error $? "Could not find or use the Java package/jar jlatexmath-fop used by LaTex Rendering - FOP plugin (looking for package org.scilab.forge.jlatexmath.fop.JLaTeXMathObj)" "$LINENO" 5
22455      fi
22456    fi
22457    if test -f conftestSharedChecker.java.output; then
22458        rm conftestSharedChecker.java.output
22459    fi
22460
22461                JLATEXMATH_FOP=$PACKAGE_JAR_FILE
22462
22463
22464
22465$as_echo "#define WITH_GUI /**/" >>confdefs.h
22466
22467
22468        fi
22469
22470        # Checkstyle (code checking)
22471
22472
22473
22474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking checkstyle" >&5
22475$as_echo_n "checking checkstyle... " >&6; }
22476    PACKAGE_JAR_FILE=
22477
22478    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
22479
22480    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'checkstyle.jar' -or -name 'libcheckstyle.jar' -or -name 'libcheckstyle-java.jar' -or -name 'checkstyle*.jar' \) 2>/dev/null |tr '\n' ':')."
22481
22482    if test ! -f conftestSharedChecker.class ; then
22483
22484    cat << \EOF > conftestSharedChecker.java
22485// #line 22485 "configure"
22486import java.util.regex.Pattern;
22487import java.io.File;
22488import java.io.IOException;
22489import java.lang.reflect.Field;
22490import java.lang.reflect.InvocationTargetException;
22491import java.lang.reflect.Method;
22492import java.net.URL;
22493import java.net.URLClassLoader;
22494import java.util.ArrayList;
22495
22496public class conftestSharedChecker {
22497
22498    /**
22499     * Required arguments :
22500     *  argv[0]: name of the jar package
22501     *  argv[1]: name of the class (with the package prefix)
22502     *  argv[2]: possible paths of the jar package (separated by ':')
22503     *
22504     * Optional arguments:
22505     *  argv[3]: field or method used to retrieve the version
22506     *  argv[4]: expected version
22507     *  argv[5]: String comparator :
22508     *      "="  for exact version
22509     */
22510    public static void main(String[] argv) {
22511        final String packageName = argv[0];
22512        final String className = argv[1];
22513        final String[] jarList = argv[2].split(":");
22514
22515        ArrayList<URL> found = new ArrayList<>();
22516        for(String jar : jarList)
22517        {
22518            try {
22519                File f = new File(jar);
22520                if (f.exists()) {
22521                    found.add(f.toURI().toURL());
22522                }
22523            } catch (IOException ex) {
22524                System.err.println(ex.toString());
22525            }
22526        }
22527
22528        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
22529        URL klassURL = null;
22530        Class<?> klass = null;
22531        try {
22532            String resourceName = className.replace(".", "/") + ".class";
22533            klassURL = localClassLoader.getResource(resourceName);
22534            klass = localClassLoader.loadClass(className);
22535        } catch (ClassNotFoundException ex) {
22536            System.err.println(className + " not found");
22537            System.exit(-1);
22538        }
22539
22540        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
22541        String path = pathURL.substring(pathURL.indexOf(':') + 1);
22542        System.err.println("found: " + path);
22543
22544        String version;
22545        if (!"".equals(argv[3])) {
22546            version = checkVersion(klass, argv);
22547        } else {
22548            version = klass.getPackage().getSpecificationVersion();
22549        }
22550
22551        System.out.println(path + " " + version);
22552    }
22553
22554    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
22555        final String versionMethod = argv[3];
22556        final String expected = argv[4];
22557        final String atLeastOrEqual;
22558        if (!"".equals(argv[5])) {
22559            atLeastOrEqual = argv[5];
22560        } else {
22561            atLeastOrEqual = "<=";
22562        }
22563
22564        String value = "";
22565        if (versionMethod.isEmpty()) {
22566            value = klass.getPackage().getSpecificationVersion();
22567            compareAndDisplay(atLeastOrEqual, expected, value);
22568            return value;
22569        }
22570
22571        try {
22572            try {
22573                Field field = klass.getField(versionMethod);
22574                value = String.valueOf(field.get(null));
22575                compareAndDisplay(atLeastOrEqual, expected, value);
22576            } catch (NoSuchFieldException fe) {
22577                Method method = null;
22578                try {
22579                    method = klass.getMethod(versionMethod);
22580                } catch (NoSuchMethodException ex) {
22581                    System.err.println(ex.toString());
22582                    System.exit(-3);
22583                }
22584
22585                try {
22586                    value = String.valueOf(method.invoke(null));
22587                    compareAndDisplay(atLeastOrEqual, expected, value);
22588                } catch (NullPointerException ex) {
22589                    value = String.valueOf(method.invoke(klass.newInstance()));
22590                    compareAndDisplay(atLeastOrEqual, expected, value);
22591                }
22592            }
22593        } catch (IllegalAccessException ex) {
22594            System.err.println(ex);
22595            System.exit(-2);
22596        } catch (InvocationTargetException ex) {
22597            System.err.println(ex);
22598            System.exit(-2);
22599        } catch (InstantiationException ex) {
22600            System.err.println(ex);
22601            System.exit(-2);
22602        }
22603        return value;
22604    }
22605
22606    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
22607        int cmp = compare(expected, value);
22608
22609        switch(atLeastOrEqual) {
22610            case ">":
22611                if (cmp > 0) {
22612                    return;
22613                } else {
22614                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22615                    System.exit(-4);
22616                }
22617            case "==":
22618                if (cmp == 0) {
22619                    return;
22620                } else {
22621                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22622                    System.exit(-4);
22623                }
22624            case "<=":
22625                if (cmp <= 0) {
22626                    return;
22627                } else {
22628                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22629                    System.exit(-4);
22630                }
22631            default:
22632                System.err.println("unable to compare with "+atLeastOrEqual);
22633                System.exit(-4);
22634        }
22635    }
22636
22637    private static int compare(String v1, String v2) {
22638        String s1 = normalisedVersion(v1);
22639        String s2 = normalisedVersion(v2);
22640
22641        System.err.println("compare: " + v1 + " normalised to " + s1);
22642        System.err.println("compare: " + v2 + " normalised to " + s2);
22643        return s1.compareTo(s2);
22644    }
22645
22646    private static String normalisedVersion(String version) {
22647        return normalisedVersion(version, ".", 4);
22648    }
22649
22650    private static String normalisedVersion(String version, String sep, int maxWidth) {
22651        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
22652        StringBuilder sb = new StringBuilder();
22653        for (String s : split) {
22654            sb.append(String.format("%" + maxWidth + 's', s));
22655        }
22656        return sb.toString();
22657    }
22658}
22659EOF
22660
22661    CLASSPATH=$ac_java_classpath
22662    export CLASSPATH
22663    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
22664    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
22665        echo "configure: conftestSharedChecker.class available" >&5
22666    else
22667        echo "configure: failed program was:" >&5
22668        cat conftestSharedChecker.java >&5
22669        echo "configure: CLASSPATH was $CLASSPATH" >&5
22670    fi
22671
22672    fi
22673
22674    CLASSPATH=$ac_java_classpath
22675    export CLASSPATH
22676    echo "CLASSPATH="$CLASSPATH >&5
22677    cmd="$JAVA conftestSharedChecker \"checkstyle\" \"com.puppycrawl.tools.checkstyle.CheckStyleTask\" \"$jar_resolved\" \"\" \"\" \"\""
22678    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
22679        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
22680$(tail -n 1 conftestSharedChecker.java.output)
22681EOF
22682        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
22683$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
22684        echo "yes" >&5
22685        # append the found file to the classpath to manage jar dependency
22686        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
22687    else
22688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22689$as_echo "no" >&6; }
22690      if test ""yes"" = "yes"; then
22691         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar checkstyle used by Checkstyle - code checking (looking for package com.puppycrawl.tools.checkstyle.CheckStyleTask)" >&5
22692$as_echo "$as_me: WARNING: Could not find or use the Java package/jar checkstyle used by Checkstyle - code checking (looking for package com.puppycrawl.tools.checkstyle.CheckStyleTask)" >&2;}
22693      else
22694          as_fn_error $? "Could not find or use the Java package/jar checkstyle used by Checkstyle - code checking (looking for package com.puppycrawl.tools.checkstyle.CheckStyleTask)" "$LINENO" 5
22695      fi
22696    fi
22697    if test -f conftestSharedChecker.java.output; then
22698        rm conftestSharedChecker.java.output
22699    fi
22700
22701        CHECKSTYLE=$PACKAGE_JAR_FILE
22702
22703
22704        # Commons beanutils (dependency of checkstyle)
22705
22706
22707
22708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking commons-beanutils" >&5
22709$as_echo_n "checking commons-beanutils... " >&6; }
22710    PACKAGE_JAR_FILE=
22711
22712    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
22713
22714    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'commons-beanutils.jar' -or -name 'libcommons-beanutils.jar' -or -name 'libcommons-beanutils-java.jar' -or -name 'commons-beanutils*.jar' \) 2>/dev/null |tr '\n' ':')."
22715
22716    if test ! -f conftestSharedChecker.class ; then
22717
22718    cat << \EOF > conftestSharedChecker.java
22719// #line 22719 "configure"
22720import java.util.regex.Pattern;
22721import java.io.File;
22722import java.io.IOException;
22723import java.lang.reflect.Field;
22724import java.lang.reflect.InvocationTargetException;
22725import java.lang.reflect.Method;
22726import java.net.URL;
22727import java.net.URLClassLoader;
22728import java.util.ArrayList;
22729
22730public class conftestSharedChecker {
22731
22732    /**
22733     * Required arguments :
22734     *  argv[0]: name of the jar package
22735     *  argv[1]: name of the class (with the package prefix)
22736     *  argv[2]: possible paths of the jar package (separated by ':')
22737     *
22738     * Optional arguments:
22739     *  argv[3]: field or method used to retrieve the version
22740     *  argv[4]: expected version
22741     *  argv[5]: String comparator :
22742     *      "="  for exact version
22743     */
22744    public static void main(String[] argv) {
22745        final String packageName = argv[0];
22746        final String className = argv[1];
22747        final String[] jarList = argv[2].split(":");
22748
22749        ArrayList<URL> found = new ArrayList<>();
22750        for(String jar : jarList)
22751        {
22752            try {
22753                File f = new File(jar);
22754                if (f.exists()) {
22755                    found.add(f.toURI().toURL());
22756                }
22757            } catch (IOException ex) {
22758                System.err.println(ex.toString());
22759            }
22760        }
22761
22762        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
22763        URL klassURL = null;
22764        Class<?> klass = null;
22765        try {
22766            String resourceName = className.replace(".", "/") + ".class";
22767            klassURL = localClassLoader.getResource(resourceName);
22768            klass = localClassLoader.loadClass(className);
22769        } catch (ClassNotFoundException ex) {
22770            System.err.println(className + " not found");
22771            System.exit(-1);
22772        }
22773
22774        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
22775        String path = pathURL.substring(pathURL.indexOf(':') + 1);
22776        System.err.println("found: " + path);
22777
22778        String version;
22779        if (!"".equals(argv[3])) {
22780            version = checkVersion(klass, argv);
22781        } else {
22782            version = klass.getPackage().getSpecificationVersion();
22783        }
22784
22785        System.out.println(path + " " + version);
22786    }
22787
22788    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
22789        final String versionMethod = argv[3];
22790        final String expected = argv[4];
22791        final String atLeastOrEqual;
22792        if (!"".equals(argv[5])) {
22793            atLeastOrEqual = argv[5];
22794        } else {
22795            atLeastOrEqual = "<=";
22796        }
22797
22798        String value = "";
22799        if (versionMethod.isEmpty()) {
22800            value = klass.getPackage().getSpecificationVersion();
22801            compareAndDisplay(atLeastOrEqual, expected, value);
22802            return value;
22803        }
22804
22805        try {
22806            try {
22807                Field field = klass.getField(versionMethod);
22808                value = String.valueOf(field.get(null));
22809                compareAndDisplay(atLeastOrEqual, expected, value);
22810            } catch (NoSuchFieldException fe) {
22811                Method method = null;
22812                try {
22813                    method = klass.getMethod(versionMethod);
22814                } catch (NoSuchMethodException ex) {
22815                    System.err.println(ex.toString());
22816                    System.exit(-3);
22817                }
22818
22819                try {
22820                    value = String.valueOf(method.invoke(null));
22821                    compareAndDisplay(atLeastOrEqual, expected, value);
22822                } catch (NullPointerException ex) {
22823                    value = String.valueOf(method.invoke(klass.newInstance()));
22824                    compareAndDisplay(atLeastOrEqual, expected, value);
22825                }
22826            }
22827        } catch (IllegalAccessException ex) {
22828            System.err.println(ex);
22829            System.exit(-2);
22830        } catch (InvocationTargetException ex) {
22831            System.err.println(ex);
22832            System.exit(-2);
22833        } catch (InstantiationException ex) {
22834            System.err.println(ex);
22835            System.exit(-2);
22836        }
22837        return value;
22838    }
22839
22840    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
22841        int cmp = compare(expected, value);
22842
22843        switch(atLeastOrEqual) {
22844            case ">":
22845                if (cmp > 0) {
22846                    return;
22847                } else {
22848                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22849                    System.exit(-4);
22850                }
22851            case "==":
22852                if (cmp == 0) {
22853                    return;
22854                } else {
22855                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22856                    System.exit(-4);
22857                }
22858            case "<=":
22859                if (cmp <= 0) {
22860                    return;
22861                } else {
22862                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
22863                    System.exit(-4);
22864                }
22865            default:
22866                System.err.println("unable to compare with "+atLeastOrEqual);
22867                System.exit(-4);
22868        }
22869    }
22870
22871    private static int compare(String v1, String v2) {
22872        String s1 = normalisedVersion(v1);
22873        String s2 = normalisedVersion(v2);
22874
22875        System.err.println("compare: " + v1 + " normalised to " + s1);
22876        System.err.println("compare: " + v2 + " normalised to " + s2);
22877        return s1.compareTo(s2);
22878    }
22879
22880    private static String normalisedVersion(String version) {
22881        return normalisedVersion(version, ".", 4);
22882    }
22883
22884    private static String normalisedVersion(String version, String sep, int maxWidth) {
22885        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
22886        StringBuilder sb = new StringBuilder();
22887        for (String s : split) {
22888            sb.append(String.format("%" + maxWidth + 's', s));
22889        }
22890        return sb.toString();
22891    }
22892}
22893EOF
22894
22895    CLASSPATH=$ac_java_classpath
22896    export CLASSPATH
22897    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
22898    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
22899        echo "configure: conftestSharedChecker.class available" >&5
22900    else
22901        echo "configure: failed program was:" >&5
22902        cat conftestSharedChecker.java >&5
22903        echo "configure: CLASSPATH was $CLASSPATH" >&5
22904    fi
22905
22906    fi
22907
22908    CLASSPATH=$ac_java_classpath
22909    export CLASSPATH
22910    echo "CLASSPATH="$CLASSPATH >&5
22911    cmd="$JAVA conftestSharedChecker \"commons-beanutils\" \"org.apache.commons.beanutils.Converter\" \"$jar_resolved\" \"\" \"\" \"\""
22912    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
22913        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
22914$(tail -n 1 conftestSharedChecker.java.output)
22915EOF
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
22917$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
22918        echo "yes" >&5
22919        # append the found file to the classpath to manage jar dependency
22920        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
22921    else
22922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22923$as_echo "no" >&6; }
22924      if test ""yes"" = "yes"; then
22925         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar commons-beanutils used by Bean utility (looking for package org.apache.commons.beanutils.Converter)" >&5
22926$as_echo "$as_me: WARNING: Could not find or use the Java package/jar commons-beanutils used by Bean utility (looking for package org.apache.commons.beanutils.Converter)" >&2;}
22927      else
22928          as_fn_error $? "Could not find or use the Java package/jar commons-beanutils used by Bean utility (looking for package org.apache.commons.beanutils.Converter)" "$LINENO" 5
22929      fi
22930    fi
22931    if test -f conftestSharedChecker.java.output; then
22932        rm conftestSharedChecker.java.output
22933    fi
22934
22935        COMMONS_BEANUTILS=$PACKAGE_JAR_FILE
22936
22937
22938        # antlr (dependency of checkstyle)
22939
22940
22941
22942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking antlr" >&5
22943$as_echo_n "checking antlr... " >&6; }
22944    PACKAGE_JAR_FILE=
22945
22946    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
22947
22948    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'antlr.jar' -or -name 'libantlr.jar' -or -name 'libantlr-java.jar' -or -name 'antlr*.jar' \) 2>/dev/null |tr '\n' ':')."
22949
22950    if test ! -f conftestSharedChecker.class ; then
22951
22952    cat << \EOF > conftestSharedChecker.java
22953// #line 22953 "configure"
22954import java.util.regex.Pattern;
22955import java.io.File;
22956import java.io.IOException;
22957import java.lang.reflect.Field;
22958import java.lang.reflect.InvocationTargetException;
22959import java.lang.reflect.Method;
22960import java.net.URL;
22961import java.net.URLClassLoader;
22962import java.util.ArrayList;
22963
22964public class conftestSharedChecker {
22965
22966    /**
22967     * Required arguments :
22968     *  argv[0]: name of the jar package
22969     *  argv[1]: name of the class (with the package prefix)
22970     *  argv[2]: possible paths of the jar package (separated by ':')
22971     *
22972     * Optional arguments:
22973     *  argv[3]: field or method used to retrieve the version
22974     *  argv[4]: expected version
22975     *  argv[5]: String comparator :
22976     *      "="  for exact version
22977     */
22978    public static void main(String[] argv) {
22979        final String packageName = argv[0];
22980        final String className = argv[1];
22981        final String[] jarList = argv[2].split(":");
22982
22983        ArrayList<URL> found = new ArrayList<>();
22984        for(String jar : jarList)
22985        {
22986            try {
22987                File f = new File(jar);
22988                if (f.exists()) {
22989                    found.add(f.toURI().toURL());
22990                }
22991            } catch (IOException ex) {
22992                System.err.println(ex.toString());
22993            }
22994        }
22995
22996        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
22997        URL klassURL = null;
22998        Class<?> klass = null;
22999        try {
23000            String resourceName = className.replace(".", "/") + ".class";
23001            klassURL = localClassLoader.getResource(resourceName);
23002            klass = localClassLoader.loadClass(className);
23003        } catch (ClassNotFoundException ex) {
23004            System.err.println(className + " not found");
23005            System.exit(-1);
23006        }
23007
23008        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
23009        String path = pathURL.substring(pathURL.indexOf(':') + 1);
23010        System.err.println("found: " + path);
23011
23012        String version;
23013        if (!"".equals(argv[3])) {
23014            version = checkVersion(klass, argv);
23015        } else {
23016            version = klass.getPackage().getSpecificationVersion();
23017        }
23018
23019        System.out.println(path + " " + version);
23020    }
23021
23022    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
23023        final String versionMethod = argv[3];
23024        final String expected = argv[4];
23025        final String atLeastOrEqual;
23026        if (!"".equals(argv[5])) {
23027            atLeastOrEqual = argv[5];
23028        } else {
23029            atLeastOrEqual = "<=";
23030        }
23031
23032        String value = "";
23033        if (versionMethod.isEmpty()) {
23034            value = klass.getPackage().getSpecificationVersion();
23035            compareAndDisplay(atLeastOrEqual, expected, value);
23036            return value;
23037        }
23038
23039        try {
23040            try {
23041                Field field = klass.getField(versionMethod);
23042                value = String.valueOf(field.get(null));
23043                compareAndDisplay(atLeastOrEqual, expected, value);
23044            } catch (NoSuchFieldException fe) {
23045                Method method = null;
23046                try {
23047                    method = klass.getMethod(versionMethod);
23048                } catch (NoSuchMethodException ex) {
23049                    System.err.println(ex.toString());
23050                    System.exit(-3);
23051                }
23052
23053                try {
23054                    value = String.valueOf(method.invoke(null));
23055                    compareAndDisplay(atLeastOrEqual, expected, value);
23056                } catch (NullPointerException ex) {
23057                    value = String.valueOf(method.invoke(klass.newInstance()));
23058                    compareAndDisplay(atLeastOrEqual, expected, value);
23059                }
23060            }
23061        } catch (IllegalAccessException ex) {
23062            System.err.println(ex);
23063            System.exit(-2);
23064        } catch (InvocationTargetException ex) {
23065            System.err.println(ex);
23066            System.exit(-2);
23067        } catch (InstantiationException ex) {
23068            System.err.println(ex);
23069            System.exit(-2);
23070        }
23071        return value;
23072    }
23073
23074    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
23075        int cmp = compare(expected, value);
23076
23077        switch(atLeastOrEqual) {
23078            case ">":
23079                if (cmp > 0) {
23080                    return;
23081                } else {
23082                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23083                    System.exit(-4);
23084                }
23085            case "==":
23086                if (cmp == 0) {
23087                    return;
23088                } else {
23089                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23090                    System.exit(-4);
23091                }
23092            case "<=":
23093                if (cmp <= 0) {
23094                    return;
23095                } else {
23096                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23097                    System.exit(-4);
23098                }
23099            default:
23100                System.err.println("unable to compare with "+atLeastOrEqual);
23101                System.exit(-4);
23102        }
23103    }
23104
23105    private static int compare(String v1, String v2) {
23106        String s1 = normalisedVersion(v1);
23107        String s2 = normalisedVersion(v2);
23108
23109        System.err.println("compare: " + v1 + " normalised to " + s1);
23110        System.err.println("compare: " + v2 + " normalised to " + s2);
23111        return s1.compareTo(s2);
23112    }
23113
23114    private static String normalisedVersion(String version) {
23115        return normalisedVersion(version, ".", 4);
23116    }
23117
23118    private static String normalisedVersion(String version, String sep, int maxWidth) {
23119        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
23120        StringBuilder sb = new StringBuilder();
23121        for (String s : split) {
23122            sb.append(String.format("%" + maxWidth + 's', s));
23123        }
23124        return sb.toString();
23125    }
23126}
23127EOF
23128
23129    CLASSPATH=$ac_java_classpath
23130    export CLASSPATH
23131    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
23132    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
23133        echo "configure: conftestSharedChecker.class available" >&5
23134    else
23135        echo "configure: failed program was:" >&5
23136        cat conftestSharedChecker.java >&5
23137        echo "configure: CLASSPATH was $CLASSPATH" >&5
23138    fi
23139
23140    fi
23141
23142    CLASSPATH=$ac_java_classpath
23143    export CLASSPATH
23144    echo "CLASSPATH="$CLASSPATH >&5
23145    cmd="$JAVA conftestSharedChecker \"antlr\" \"antlr.TokenStreamException\" \"$jar_resolved\" \"\" \"\" \"\""
23146    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
23147        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
23148$(tail -n 1 conftestSharedChecker.java.output)
23149EOF
23150        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
23151$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
23152        echo "yes" >&5
23153        # append the found file to the classpath to manage jar dependency
23154        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
23155    else
23156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23157$as_echo "no" >&6; }
23158      if test ""yes"" = "yes"; then
23159         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar antlr used by language tool for constructing recognizers (looking for package antlr.TokenStreamException)" >&5
23160$as_echo "$as_me: WARNING: Could not find or use the Java package/jar antlr used by language tool for constructing recognizers (looking for package antlr.TokenStreamException)" >&2;}
23161      else
23162          as_fn_error $? "Could not find or use the Java package/jar antlr used by language tool for constructing recognizers (looking for package antlr.TokenStreamException)" "$LINENO" 5
23163      fi
23164    fi
23165    if test -f conftestSharedChecker.java.output; then
23166        rm conftestSharedChecker.java.output
23167    fi
23168
23169        ANTLR=$PACKAGE_JAR_FILE
23170
23171
23172        # Junit 4 (java unitary test)
23173
23174
23175
23176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking junit4" >&5
23177$as_echo_n "checking junit4... " >&6; }
23178    PACKAGE_JAR_FILE=
23179
23180    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
23181
23182    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'junit4.jar' -or -name 'libjunit4.jar' -or -name 'libjunit4-java.jar' -or -name 'junit4*.jar' \) 2>/dev/null |tr '\n' ':')."
23183
23184    if test ! -f conftestSharedChecker.class ; then
23185
23186    cat << \EOF > conftestSharedChecker.java
23187// #line 23187 "configure"
23188import java.util.regex.Pattern;
23189import java.io.File;
23190import java.io.IOException;
23191import java.lang.reflect.Field;
23192import java.lang.reflect.InvocationTargetException;
23193import java.lang.reflect.Method;
23194import java.net.URL;
23195import java.net.URLClassLoader;
23196import java.util.ArrayList;
23197
23198public class conftestSharedChecker {
23199
23200    /**
23201     * Required arguments :
23202     *  argv[0]: name of the jar package
23203     *  argv[1]: name of the class (with the package prefix)
23204     *  argv[2]: possible paths of the jar package (separated by ':')
23205     *
23206     * Optional arguments:
23207     *  argv[3]: field or method used to retrieve the version
23208     *  argv[4]: expected version
23209     *  argv[5]: String comparator :
23210     *      "="  for exact version
23211     */
23212    public static void main(String[] argv) {
23213        final String packageName = argv[0];
23214        final String className = argv[1];
23215        final String[] jarList = argv[2].split(":");
23216
23217        ArrayList<URL> found = new ArrayList<>();
23218        for(String jar : jarList)
23219        {
23220            try {
23221                File f = new File(jar);
23222                if (f.exists()) {
23223                    found.add(f.toURI().toURL());
23224                }
23225            } catch (IOException ex) {
23226                System.err.println(ex.toString());
23227            }
23228        }
23229
23230        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
23231        URL klassURL = null;
23232        Class<?> klass = null;
23233        try {
23234            String resourceName = className.replace(".", "/") + ".class";
23235            klassURL = localClassLoader.getResource(resourceName);
23236            klass = localClassLoader.loadClass(className);
23237        } catch (ClassNotFoundException ex) {
23238            System.err.println(className + " not found");
23239            System.exit(-1);
23240        }
23241
23242        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
23243        String path = pathURL.substring(pathURL.indexOf(':') + 1);
23244        System.err.println("found: " + path);
23245
23246        String version;
23247        if (!"".equals(argv[3])) {
23248            version = checkVersion(klass, argv);
23249        } else {
23250            version = klass.getPackage().getSpecificationVersion();
23251        }
23252
23253        System.out.println(path + " " + version);
23254    }
23255
23256    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
23257        final String versionMethod = argv[3];
23258        final String expected = argv[4];
23259        final String atLeastOrEqual;
23260        if (!"".equals(argv[5])) {
23261            atLeastOrEqual = argv[5];
23262        } else {
23263            atLeastOrEqual = "<=";
23264        }
23265
23266        String value = "";
23267        if (versionMethod.isEmpty()) {
23268            value = klass.getPackage().getSpecificationVersion();
23269            compareAndDisplay(atLeastOrEqual, expected, value);
23270            return value;
23271        }
23272
23273        try {
23274            try {
23275                Field field = klass.getField(versionMethod);
23276                value = String.valueOf(field.get(null));
23277                compareAndDisplay(atLeastOrEqual, expected, value);
23278            } catch (NoSuchFieldException fe) {
23279                Method method = null;
23280                try {
23281                    method = klass.getMethod(versionMethod);
23282                } catch (NoSuchMethodException ex) {
23283                    System.err.println(ex.toString());
23284                    System.exit(-3);
23285                }
23286
23287                try {
23288                    value = String.valueOf(method.invoke(null));
23289                    compareAndDisplay(atLeastOrEqual, expected, value);
23290                } catch (NullPointerException ex) {
23291                    value = String.valueOf(method.invoke(klass.newInstance()));
23292                    compareAndDisplay(atLeastOrEqual, expected, value);
23293                }
23294            }
23295        } catch (IllegalAccessException ex) {
23296            System.err.println(ex);
23297            System.exit(-2);
23298        } catch (InvocationTargetException ex) {
23299            System.err.println(ex);
23300            System.exit(-2);
23301        } catch (InstantiationException ex) {
23302            System.err.println(ex);
23303            System.exit(-2);
23304        }
23305        return value;
23306    }
23307
23308    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
23309        int cmp = compare(expected, value);
23310
23311        switch(atLeastOrEqual) {
23312            case ">":
23313                if (cmp > 0) {
23314                    return;
23315                } else {
23316                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23317                    System.exit(-4);
23318                }
23319            case "==":
23320                if (cmp == 0) {
23321                    return;
23322                } else {
23323                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23324                    System.exit(-4);
23325                }
23326            case "<=":
23327                if (cmp <= 0) {
23328                    return;
23329                } else {
23330                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23331                    System.exit(-4);
23332                }
23333            default:
23334                System.err.println("unable to compare with "+atLeastOrEqual);
23335                System.exit(-4);
23336        }
23337    }
23338
23339    private static int compare(String v1, String v2) {
23340        String s1 = normalisedVersion(v1);
23341        String s2 = normalisedVersion(v2);
23342
23343        System.err.println("compare: " + v1 + " normalised to " + s1);
23344        System.err.println("compare: " + v2 + " normalised to " + s2);
23345        return s1.compareTo(s2);
23346    }
23347
23348    private static String normalisedVersion(String version) {
23349        return normalisedVersion(version, ".", 4);
23350    }
23351
23352    private static String normalisedVersion(String version, String sep, int maxWidth) {
23353        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
23354        StringBuilder sb = new StringBuilder();
23355        for (String s : split) {
23356            sb.append(String.format("%" + maxWidth + 's', s));
23357        }
23358        return sb.toString();
23359    }
23360}
23361EOF
23362
23363    CLASSPATH=$ac_java_classpath
23364    export CLASSPATH
23365    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
23366    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
23367        echo "configure: conftestSharedChecker.class available" >&5
23368    else
23369        echo "configure: failed program was:" >&5
23370        cat conftestSharedChecker.java >&5
23371        echo "configure: CLASSPATH was $CLASSPATH" >&5
23372    fi
23373
23374    fi
23375
23376    CLASSPATH=$ac_java_classpath
23377    export CLASSPATH
23378    echo "CLASSPATH="$CLASSPATH >&5
23379    cmd="$JAVA conftestSharedChecker \"junit4\" \"org.junit.Assert\" \"$jar_resolved\" \"\" \"\" \"\""
23380    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
23381        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
23382$(tail -n 1 conftestSharedChecker.java.output)
23383EOF
23384        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
23385$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
23386        echo "yes" >&5
23387        # append the found file to the classpath to manage jar dependency
23388        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
23389    else
23390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23391$as_echo "no" >&6; }
23392      if test ""yes"" = "yes"; then
23393         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar junit4 used by Junit4 - Unit tests (looking for package org.junit.Assert)" >&5
23394$as_echo "$as_me: WARNING: Could not find or use the Java package/jar junit4 used by Junit4 - Unit tests (looking for package org.junit.Assert)" >&2;}
23395      else
23396          as_fn_error $? "Could not find or use the Java package/jar junit4 used by Junit4 - Unit tests (looking for package org.junit.Assert)" "$LINENO" 5
23397      fi
23398    fi
23399    if test -f conftestSharedChecker.java.output; then
23400        rm conftestSharedChecker.java.output
23401    fi
23402
23403        if test -z "$PACKAGE_JAR_FILE"; then
23404
23405
23406
23407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking junit" >&5
23408$as_echo_n "checking junit... " >&6; }
23409    PACKAGE_JAR_FILE=
23410
23411    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
23412
23413    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'junit.jar' -or -name 'libjunit.jar' -or -name 'libjunit-java.jar' -or -name 'junit*.jar' \) 2>/dev/null |tr '\n' ':')."
23414
23415    if test ! -f conftestSharedChecker.class ; then
23416
23417    cat << \EOF > conftestSharedChecker.java
23418// #line 23418 "configure"
23419import java.util.regex.Pattern;
23420import java.io.File;
23421import java.io.IOException;
23422import java.lang.reflect.Field;
23423import java.lang.reflect.InvocationTargetException;
23424import java.lang.reflect.Method;
23425import java.net.URL;
23426import java.net.URLClassLoader;
23427import java.util.ArrayList;
23428
23429public class conftestSharedChecker {
23430
23431    /**
23432     * Required arguments :
23433     *  argv[0]: name of the jar package
23434     *  argv[1]: name of the class (with the package prefix)
23435     *  argv[2]: possible paths of the jar package (separated by ':')
23436     *
23437     * Optional arguments:
23438     *  argv[3]: field or method used to retrieve the version
23439     *  argv[4]: expected version
23440     *  argv[5]: String comparator :
23441     *      "="  for exact version
23442     */
23443    public static void main(String[] argv) {
23444        final String packageName = argv[0];
23445        final String className = argv[1];
23446        final String[] jarList = argv[2].split(":");
23447
23448        ArrayList<URL> found = new ArrayList<>();
23449        for(String jar : jarList)
23450        {
23451            try {
23452                File f = new File(jar);
23453                if (f.exists()) {
23454                    found.add(f.toURI().toURL());
23455                }
23456            } catch (IOException ex) {
23457                System.err.println(ex.toString());
23458            }
23459        }
23460
23461        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
23462        URL klassURL = null;
23463        Class<?> klass = null;
23464        try {
23465            String resourceName = className.replace(".", "/") + ".class";
23466            klassURL = localClassLoader.getResource(resourceName);
23467            klass = localClassLoader.loadClass(className);
23468        } catch (ClassNotFoundException ex) {
23469            System.err.println(className + " not found");
23470            System.exit(-1);
23471        }
23472
23473        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
23474        String path = pathURL.substring(pathURL.indexOf(':') + 1);
23475        System.err.println("found: " + path);
23476
23477        String version;
23478        if (!"".equals(argv[3])) {
23479            version = checkVersion(klass, argv);
23480        } else {
23481            version = klass.getPackage().getSpecificationVersion();
23482        }
23483
23484        System.out.println(path + " " + version);
23485    }
23486
23487    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
23488        final String versionMethod = argv[3];
23489        final String expected = argv[4];
23490        final String atLeastOrEqual;
23491        if (!"".equals(argv[5])) {
23492            atLeastOrEqual = argv[5];
23493        } else {
23494            atLeastOrEqual = "<=";
23495        }
23496
23497        String value = "";
23498        if (versionMethod.isEmpty()) {
23499            value = klass.getPackage().getSpecificationVersion();
23500            compareAndDisplay(atLeastOrEqual, expected, value);
23501            return value;
23502        }
23503
23504        try {
23505            try {
23506                Field field = klass.getField(versionMethod);
23507                value = String.valueOf(field.get(null));
23508                compareAndDisplay(atLeastOrEqual, expected, value);
23509            } catch (NoSuchFieldException fe) {
23510                Method method = null;
23511                try {
23512                    method = klass.getMethod(versionMethod);
23513                } catch (NoSuchMethodException ex) {
23514                    System.err.println(ex.toString());
23515                    System.exit(-3);
23516                }
23517
23518                try {
23519                    value = String.valueOf(method.invoke(null));
23520                    compareAndDisplay(atLeastOrEqual, expected, value);
23521                } catch (NullPointerException ex) {
23522                    value = String.valueOf(method.invoke(klass.newInstance()));
23523                    compareAndDisplay(atLeastOrEqual, expected, value);
23524                }
23525            }
23526        } catch (IllegalAccessException ex) {
23527            System.err.println(ex);
23528            System.exit(-2);
23529        } catch (InvocationTargetException ex) {
23530            System.err.println(ex);
23531            System.exit(-2);
23532        } catch (InstantiationException ex) {
23533            System.err.println(ex);
23534            System.exit(-2);
23535        }
23536        return value;
23537    }
23538
23539    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
23540        int cmp = compare(expected, value);
23541
23542        switch(atLeastOrEqual) {
23543            case ">":
23544                if (cmp > 0) {
23545                    return;
23546                } else {
23547                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23548                    System.exit(-4);
23549                }
23550            case "==":
23551                if (cmp == 0) {
23552                    return;
23553                } else {
23554                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23555                    System.exit(-4);
23556                }
23557            case "<=":
23558                if (cmp <= 0) {
23559                    return;
23560                } else {
23561                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23562                    System.exit(-4);
23563                }
23564            default:
23565                System.err.println("unable to compare with "+atLeastOrEqual);
23566                System.exit(-4);
23567        }
23568    }
23569
23570    private static int compare(String v1, String v2) {
23571        String s1 = normalisedVersion(v1);
23572        String s2 = normalisedVersion(v2);
23573
23574        System.err.println("compare: " + v1 + " normalised to " + s1);
23575        System.err.println("compare: " + v2 + " normalised to " + s2);
23576        return s1.compareTo(s2);
23577    }
23578
23579    private static String normalisedVersion(String version) {
23580        return normalisedVersion(version, ".", 4);
23581    }
23582
23583    private static String normalisedVersion(String version, String sep, int maxWidth) {
23584        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
23585        StringBuilder sb = new StringBuilder();
23586        for (String s : split) {
23587            sb.append(String.format("%" + maxWidth + 's', s));
23588        }
23589        return sb.toString();
23590    }
23591}
23592EOF
23593
23594    CLASSPATH=$ac_java_classpath
23595    export CLASSPATH
23596    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
23597    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
23598        echo "configure: conftestSharedChecker.class available" >&5
23599    else
23600        echo "configure: failed program was:" >&5
23601        cat conftestSharedChecker.java >&5
23602        echo "configure: CLASSPATH was $CLASSPATH" >&5
23603    fi
23604
23605    fi
23606
23607    CLASSPATH=$ac_java_classpath
23608    export CLASSPATH
23609    echo "CLASSPATH="$CLASSPATH >&5
23610    cmd="$JAVA conftestSharedChecker \"junit\" \"org.junit.Assert\" \"$jar_resolved\" \"\" \"\" \"\""
23611    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
23612        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
23613$(tail -n 1 conftestSharedChecker.java.output)
23614EOF
23615        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
23616$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
23617        echo "yes" >&5
23618        # append the found file to the classpath to manage jar dependency
23619        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
23620    else
23621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23622$as_echo "no" >&6; }
23623      if test ""yes"" = "yes"; then
23624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar junit used by Junit4 -
23625Unit tests (looking for package org.junit.Assert)" >&5
23626$as_echo "$as_me: WARNING: Could not find or use the Java package/jar junit used by Junit4 -
23627Unit tests (looking for package org.junit.Assert)" >&2;}
23628      else
23629          as_fn_error $? "Could not find or use the Java package/jar junit used by Junit4 -
23630Unit tests (looking for package org.junit.Assert)" "$LINENO" 5
23631      fi
23632    fi
23633    if test -f conftestSharedChecker.java.output; then
23634        rm conftestSharedChecker.java.output
23635    fi
23636
23637        fi
23638        JUNIT4=$PACKAGE_JAR_FILE
23639
23640
23641        # hamcrest (junit4 dependency)
23642
23643
23644
23645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking hamcrest-all" >&5
23646$as_echo_n "checking hamcrest-all... " >&6; }
23647    PACKAGE_JAR_FILE=
23648
23649    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
23650
23651    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'hamcrest-all.jar' -or -name 'libhamcrest-all.jar' -or -name 'libhamcrest-all-java.jar' -or -name 'hamcrest-all*.jar' \) 2>/dev/null |tr '\n' ':')."
23652
23653    if test ! -f conftestSharedChecker.class ; then
23654
23655    cat << \EOF > conftestSharedChecker.java
23656// #line 23656 "configure"
23657import java.util.regex.Pattern;
23658import java.io.File;
23659import java.io.IOException;
23660import java.lang.reflect.Field;
23661import java.lang.reflect.InvocationTargetException;
23662import java.lang.reflect.Method;
23663import java.net.URL;
23664import java.net.URLClassLoader;
23665import java.util.ArrayList;
23666
23667public class conftestSharedChecker {
23668
23669    /**
23670     * Required arguments :
23671     *  argv[0]: name of the jar package
23672     *  argv[1]: name of the class (with the package prefix)
23673     *  argv[2]: possible paths of the jar package (separated by ':')
23674     *
23675     * Optional arguments:
23676     *  argv[3]: field or method used to retrieve the version
23677     *  argv[4]: expected version
23678     *  argv[5]: String comparator :
23679     *      "="  for exact version
23680     */
23681    public static void main(String[] argv) {
23682        final String packageName = argv[0];
23683        final String className = argv[1];
23684        final String[] jarList = argv[2].split(":");
23685
23686        ArrayList<URL> found = new ArrayList<>();
23687        for(String jar : jarList)
23688        {
23689            try {
23690                File f = new File(jar);
23691                if (f.exists()) {
23692                    found.add(f.toURI().toURL());
23693                }
23694            } catch (IOException ex) {
23695                System.err.println(ex.toString());
23696            }
23697        }
23698
23699        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
23700        URL klassURL = null;
23701        Class<?> klass = null;
23702        try {
23703            String resourceName = className.replace(".", "/") + ".class";
23704            klassURL = localClassLoader.getResource(resourceName);
23705            klass = localClassLoader.loadClass(className);
23706        } catch (ClassNotFoundException ex) {
23707            System.err.println(className + " not found");
23708            System.exit(-1);
23709        }
23710
23711        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
23712        String path = pathURL.substring(pathURL.indexOf(':') + 1);
23713        System.err.println("found: " + path);
23714
23715        String version;
23716        if (!"".equals(argv[3])) {
23717            version = checkVersion(klass, argv);
23718        } else {
23719            version = klass.getPackage().getSpecificationVersion();
23720        }
23721
23722        System.out.println(path + " " + version);
23723    }
23724
23725    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
23726        final String versionMethod = argv[3];
23727        final String expected = argv[4];
23728        final String atLeastOrEqual;
23729        if (!"".equals(argv[5])) {
23730            atLeastOrEqual = argv[5];
23731        } else {
23732            atLeastOrEqual = "<=";
23733        }
23734
23735        String value = "";
23736        if (versionMethod.isEmpty()) {
23737            value = klass.getPackage().getSpecificationVersion();
23738            compareAndDisplay(atLeastOrEqual, expected, value);
23739            return value;
23740        }
23741
23742        try {
23743            try {
23744                Field field = klass.getField(versionMethod);
23745                value = String.valueOf(field.get(null));
23746                compareAndDisplay(atLeastOrEqual, expected, value);
23747            } catch (NoSuchFieldException fe) {
23748                Method method = null;
23749                try {
23750                    method = klass.getMethod(versionMethod);
23751                } catch (NoSuchMethodException ex) {
23752                    System.err.println(ex.toString());
23753                    System.exit(-3);
23754                }
23755
23756                try {
23757                    value = String.valueOf(method.invoke(null));
23758                    compareAndDisplay(atLeastOrEqual, expected, value);
23759                } catch (NullPointerException ex) {
23760                    value = String.valueOf(method.invoke(klass.newInstance()));
23761                    compareAndDisplay(atLeastOrEqual, expected, value);
23762                }
23763            }
23764        } catch (IllegalAccessException ex) {
23765            System.err.println(ex);
23766            System.exit(-2);
23767        } catch (InvocationTargetException ex) {
23768            System.err.println(ex);
23769            System.exit(-2);
23770        } catch (InstantiationException ex) {
23771            System.err.println(ex);
23772            System.exit(-2);
23773        }
23774        return value;
23775    }
23776
23777    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
23778        int cmp = compare(expected, value);
23779
23780        switch(atLeastOrEqual) {
23781            case ">":
23782                if (cmp > 0) {
23783                    return;
23784                } else {
23785                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23786                    System.exit(-4);
23787                }
23788            case "==":
23789                if (cmp == 0) {
23790                    return;
23791                } else {
23792                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23793                    System.exit(-4);
23794                }
23795            case "<=":
23796                if (cmp <= 0) {
23797                    return;
23798                } else {
23799                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
23800                    System.exit(-4);
23801                }
23802            default:
23803                System.err.println("unable to compare with "+atLeastOrEqual);
23804                System.exit(-4);
23805        }
23806    }
23807
23808    private static int compare(String v1, String v2) {
23809        String s1 = normalisedVersion(v1);
23810        String s2 = normalisedVersion(v2);
23811
23812        System.err.println("compare: " + v1 + " normalised to " + s1);
23813        System.err.println("compare: " + v2 + " normalised to " + s2);
23814        return s1.compareTo(s2);
23815    }
23816
23817    private static String normalisedVersion(String version) {
23818        return normalisedVersion(version, ".", 4);
23819    }
23820
23821    private static String normalisedVersion(String version, String sep, int maxWidth) {
23822        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
23823        StringBuilder sb = new StringBuilder();
23824        for (String s : split) {
23825            sb.append(String.format("%" + maxWidth + 's', s));
23826        }
23827        return sb.toString();
23828    }
23829}
23830EOF
23831
23832    CLASSPATH=$ac_java_classpath
23833    export CLASSPATH
23834    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
23835    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
23836        echo "configure: conftestSharedChecker.class available" >&5
23837    else
23838        echo "configure: failed program was:" >&5
23839        cat conftestSharedChecker.java >&5
23840        echo "configure: CLASSPATH was $CLASSPATH" >&5
23841    fi
23842
23843    fi
23844
23845    CLASSPATH=$ac_java_classpath
23846    export CLASSPATH
23847    echo "CLASSPATH="$CLASSPATH >&5
23848    cmd="$JAVA conftestSharedChecker \"hamcrest-all\" \"org.hamcrest.core.IsNull\" \"$jar_resolved\" \"\" \"\" \"\""
23849    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
23850        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
23851$(tail -n 1 conftestSharedChecker.java.output)
23852EOF
23853        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
23854$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
23855        echo "yes" >&5
23856        # append the found file to the classpath to manage jar dependency
23857        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
23858    else
23859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23860$as_echo "no" >&6; }
23861      if test ""yes"" = "yes"; then
23862         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar hamcrest-all used by Hamcrest- library matchers (looking for package org.hamcrest.core.IsNull)" >&5
23863$as_echo "$as_me: WARNING: Could not find or use the Java package/jar hamcrest-all used by Hamcrest- library matchers (looking for package org.hamcrest.core.IsNull)" >&2;}
23864      else
23865          as_fn_error $? "Could not find or use the Java package/jar hamcrest-all used by Hamcrest- library matchers (looking for package org.hamcrest.core.IsNull)" "$LINENO" 5
23866      fi
23867    fi
23868    if test -f conftestSharedChecker.java.output; then
23869        rm conftestSharedChecker.java.output
23870    fi
23871
23872        if test -z "$PACKAGE_JAR_FILE"; then
23873
23874
23875
23876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking hamcrest/all" >&5
23877$as_echo_n "checking hamcrest/all... " >&6; }
23878    PACKAGE_JAR_FILE=
23879
23880    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
23881
23882    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'hamcrest/all.jar' -or -name 'libhamcrest/all.jar' -or -name 'libhamcrest/all-java.jar' -or -name 'hamcrest/all*.jar' \) 2>/dev/null |tr '\n' ':')."
23883
23884    if test ! -f conftestSharedChecker.class ; then
23885
23886    cat << \EOF > conftestSharedChecker.java
23887// #line 23887 "configure"
23888import java.util.regex.Pattern;
23889import java.io.File;
23890import java.io.IOException;
23891import java.lang.reflect.Field;
23892import java.lang.reflect.InvocationTargetException;
23893import java.lang.reflect.Method;
23894import java.net.URL;
23895import java.net.URLClassLoader;
23896import java.util.ArrayList;
23897
23898public class conftestSharedChecker {
23899
23900    /**
23901     * Required arguments :
23902     *  argv[0]: name of the jar package
23903     *  argv[1]: name of the class (with the package prefix)
23904     *  argv[2]: possible paths of the jar package (separated by ':')
23905     *
23906     * Optional arguments:
23907     *  argv[3]: field or method used to retrieve the version
23908     *  argv[4]: expected version
23909     *  argv[5]: String comparator :
23910     *      "="  for exact version
23911     */
23912    public static void main(String[] argv) {
23913        final String packageName = argv[0];
23914        final String className = argv[1];
23915        final String[] jarList = argv[2].split(":");
23916
23917        ArrayList<URL> found = new ArrayList<>();
23918        for(String jar : jarList)
23919        {
23920            try {
23921                File f = new File(jar);
23922                if (f.exists()) {
23923                    found.add(f.toURI().toURL());
23924                }
23925            } catch (IOException ex) {
23926                System.err.println(ex.toString());
23927            }
23928        }
23929
23930        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
23931        URL klassURL = null;
23932        Class<?> klass = null;
23933        try {
23934            String resourceName = className.replace(".", "/") + ".class";
23935            klassURL = localClassLoader.getResource(resourceName);
23936            klass = localClassLoader.loadClass(className);
23937        } catch (ClassNotFoundException ex) {
23938            System.err.println(className + " not found");
23939            System.exit(-1);
23940        }
23941
23942        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
23943        String path = pathURL.substring(pathURL.indexOf(':') + 1);
23944        System.err.println("found: " + path);
23945
23946        String version;
23947        if (!"".equals(argv[3])) {
23948            version = checkVersion(klass, argv);
23949        } else {
23950            version = klass.getPackage().getSpecificationVersion();
23951        }
23952
23953        System.out.println(path + " " + version);
23954    }
23955
23956    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
23957        final String versionMethod = argv[3];
23958        final String expected = argv[4];
23959        final String atLeastOrEqual;
23960        if (!"".equals(argv[5])) {
23961            atLeastOrEqual = argv[5];
23962        } else {
23963            atLeastOrEqual = "<=";
23964        }
23965
23966        String value = "";
23967        if (versionMethod.isEmpty()) {
23968            value = klass.getPackage().getSpecificationVersion();
23969            compareAndDisplay(atLeastOrEqual, expected, value);
23970            return value;
23971        }
23972
23973        try {
23974            try {
23975                Field field = klass.getField(versionMethod);
23976                value = String.valueOf(field.get(null));
23977                compareAndDisplay(atLeastOrEqual, expected, value);
23978            } catch (NoSuchFieldException fe) {
23979                Method method = null;
23980                try {
23981                    method = klass.getMethod(versionMethod);
23982                } catch (NoSuchMethodException ex) {
23983                    System.err.println(ex.toString());
23984                    System.exit(-3);
23985                }
23986
23987                try {
23988                    value = String.valueOf(method.invoke(null));
23989                    compareAndDisplay(atLeastOrEqual, expected, value);
23990                } catch (NullPointerException ex) {
23991                    value = String.valueOf(method.invoke(klass.newInstance()));
23992                    compareAndDisplay(atLeastOrEqual, expected, value);
23993                }
23994            }
23995        } catch (IllegalAccessException ex) {
23996            System.err.println(ex);
23997            System.exit(-2);
23998        } catch (InvocationTargetException ex) {
23999            System.err.println(ex);
24000            System.exit(-2);
24001        } catch (InstantiationException ex) {
24002            System.err.println(ex);
24003            System.exit(-2);
24004        }
24005        return value;
24006    }
24007
24008    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
24009        int cmp = compare(expected, value);
24010
24011        switch(atLeastOrEqual) {
24012            case ">":
24013                if (cmp > 0) {
24014                    return;
24015                } else {
24016                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24017                    System.exit(-4);
24018                }
24019            case "==":
24020                if (cmp == 0) {
24021                    return;
24022                } else {
24023                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24024                    System.exit(-4);
24025                }
24026            case "<=":
24027                if (cmp <= 0) {
24028                    return;
24029                } else {
24030                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24031                    System.exit(-4);
24032                }
24033            default:
24034                System.err.println("unable to compare with "+atLeastOrEqual);
24035                System.exit(-4);
24036        }
24037    }
24038
24039    private static int compare(String v1, String v2) {
24040        String s1 = normalisedVersion(v1);
24041        String s2 = normalisedVersion(v2);
24042
24043        System.err.println("compare: " + v1 + " normalised to " + s1);
24044        System.err.println("compare: " + v2 + " normalised to " + s2);
24045        return s1.compareTo(s2);
24046    }
24047
24048    private static String normalisedVersion(String version) {
24049        return normalisedVersion(version, ".", 4);
24050    }
24051
24052    private static String normalisedVersion(String version, String sep, int maxWidth) {
24053        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
24054        StringBuilder sb = new StringBuilder();
24055        for (String s : split) {
24056            sb.append(String.format("%" + maxWidth + 's', s));
24057        }
24058        return sb.toString();
24059    }
24060}
24061EOF
24062
24063    CLASSPATH=$ac_java_classpath
24064    export CLASSPATH
24065    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
24066    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
24067        echo "configure: conftestSharedChecker.class available" >&5
24068    else
24069        echo "configure: failed program was:" >&5
24070        cat conftestSharedChecker.java >&5
24071        echo "configure: CLASSPATH was $CLASSPATH" >&5
24072    fi
24073
24074    fi
24075
24076    CLASSPATH=$ac_java_classpath
24077    export CLASSPATH
24078    echo "CLASSPATH="$CLASSPATH >&5
24079    cmd="$JAVA conftestSharedChecker \"hamcrest/all\" \"org.hamcrest.core.IsNull\" \"$jar_resolved\" \"\" \"\" \"\""
24080    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
24081        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
24082$(tail -n 1 conftestSharedChecker.java.output)
24083EOF
24084        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
24085$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
24086        echo "yes" >&5
24087        # append the found file to the classpath to manage jar dependency
24088        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
24089    else
24090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24091$as_echo "no" >&6; }
24092      if test ""yes"" = "yes"; then
24093         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar hamcrest/all used by Hamcrest- library matchers (looking for package org.hamcrest.core.IsNull)" >&5
24094$as_echo "$as_me: WARNING: Could not find or use the Java package/jar hamcrest/all used by Hamcrest- library matchers (looking for package org.hamcrest.core.IsNull)" >&2;}
24095      else
24096          as_fn_error $? "Could not find or use the Java package/jar hamcrest/all used by Hamcrest- library matchers (looking for package org.hamcrest.core.IsNull)" "$LINENO" 5
24097      fi
24098    fi
24099    if test -f conftestSharedChecker.java.output; then
24100        rm conftestSharedChecker.java.output
24101    fi
24102
24103        fi
24104        HAMCREST=$PACKAGE_JAR_FILE
24105
24106
24107        # Cobertura (java code coverage)
24108
24109
24110
24111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cobertura" >&5
24112$as_echo_n "checking cobertura... " >&6; }
24113    PACKAGE_JAR_FILE=
24114
24115    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
24116
24117    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'cobertura.jar' -or -name 'libcobertura.jar' -or -name 'libcobertura-java.jar' -or -name 'cobertura*.jar' \) 2>/dev/null |tr '\n' ':')."
24118
24119    if test ! -f conftestSharedChecker.class ; then
24120
24121    cat << \EOF > conftestSharedChecker.java
24122// #line 24122 "configure"
24123import java.util.regex.Pattern;
24124import java.io.File;
24125import java.io.IOException;
24126import java.lang.reflect.Field;
24127import java.lang.reflect.InvocationTargetException;
24128import java.lang.reflect.Method;
24129import java.net.URL;
24130import java.net.URLClassLoader;
24131import java.util.ArrayList;
24132
24133public class conftestSharedChecker {
24134
24135    /**
24136     * Required arguments :
24137     *  argv[0]: name of the jar package
24138     *  argv[1]: name of the class (with the package prefix)
24139     *  argv[2]: possible paths of the jar package (separated by ':')
24140     *
24141     * Optional arguments:
24142     *  argv[3]: field or method used to retrieve the version
24143     *  argv[4]: expected version
24144     *  argv[5]: String comparator :
24145     *      "="  for exact version
24146     */
24147    public static void main(String[] argv) {
24148        final String packageName = argv[0];
24149        final String className = argv[1];
24150        final String[] jarList = argv[2].split(":");
24151
24152        ArrayList<URL> found = new ArrayList<>();
24153        for(String jar : jarList)
24154        {
24155            try {
24156                File f = new File(jar);
24157                if (f.exists()) {
24158                    found.add(f.toURI().toURL());
24159                }
24160            } catch (IOException ex) {
24161                System.err.println(ex.toString());
24162            }
24163        }
24164
24165        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
24166        URL klassURL = null;
24167        Class<?> klass = null;
24168        try {
24169            String resourceName = className.replace(".", "/") + ".class";
24170            klassURL = localClassLoader.getResource(resourceName);
24171            klass = localClassLoader.loadClass(className);
24172        } catch (ClassNotFoundException ex) {
24173            System.err.println(className + " not found");
24174            System.exit(-1);
24175        }
24176
24177        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
24178        String path = pathURL.substring(pathURL.indexOf(':') + 1);
24179        System.err.println("found: " + path);
24180
24181        String version;
24182        if (!"".equals(argv[3])) {
24183            version = checkVersion(klass, argv);
24184        } else {
24185            version = klass.getPackage().getSpecificationVersion();
24186        }
24187
24188        System.out.println(path + " " + version);
24189    }
24190
24191    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
24192        final String versionMethod = argv[3];
24193        final String expected = argv[4];
24194        final String atLeastOrEqual;
24195        if (!"".equals(argv[5])) {
24196            atLeastOrEqual = argv[5];
24197        } else {
24198            atLeastOrEqual = "<=";
24199        }
24200
24201        String value = "";
24202        if (versionMethod.isEmpty()) {
24203            value = klass.getPackage().getSpecificationVersion();
24204            compareAndDisplay(atLeastOrEqual, expected, value);
24205            return value;
24206        }
24207
24208        try {
24209            try {
24210                Field field = klass.getField(versionMethod);
24211                value = String.valueOf(field.get(null));
24212                compareAndDisplay(atLeastOrEqual, expected, value);
24213            } catch (NoSuchFieldException fe) {
24214                Method method = null;
24215                try {
24216                    method = klass.getMethod(versionMethod);
24217                } catch (NoSuchMethodException ex) {
24218                    System.err.println(ex.toString());
24219                    System.exit(-3);
24220                }
24221
24222                try {
24223                    value = String.valueOf(method.invoke(null));
24224                    compareAndDisplay(atLeastOrEqual, expected, value);
24225                } catch (NullPointerException ex) {
24226                    value = String.valueOf(method.invoke(klass.newInstance()));
24227                    compareAndDisplay(atLeastOrEqual, expected, value);
24228                }
24229            }
24230        } catch (IllegalAccessException ex) {
24231            System.err.println(ex);
24232            System.exit(-2);
24233        } catch (InvocationTargetException ex) {
24234            System.err.println(ex);
24235            System.exit(-2);
24236        } catch (InstantiationException ex) {
24237            System.err.println(ex);
24238            System.exit(-2);
24239        }
24240        return value;
24241    }
24242
24243    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
24244        int cmp = compare(expected, value);
24245
24246        switch(atLeastOrEqual) {
24247            case ">":
24248                if (cmp > 0) {
24249                    return;
24250                } else {
24251                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24252                    System.exit(-4);
24253                }
24254            case "==":
24255                if (cmp == 0) {
24256                    return;
24257                } else {
24258                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24259                    System.exit(-4);
24260                }
24261            case "<=":
24262                if (cmp <= 0) {
24263                    return;
24264                } else {
24265                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24266                    System.exit(-4);
24267                }
24268            default:
24269                System.err.println("unable to compare with "+atLeastOrEqual);
24270                System.exit(-4);
24271        }
24272    }
24273
24274    private static int compare(String v1, String v2) {
24275        String s1 = normalisedVersion(v1);
24276        String s2 = normalisedVersion(v2);
24277
24278        System.err.println("compare: " + v1 + " normalised to " + s1);
24279        System.err.println("compare: " + v2 + " normalised to " + s2);
24280        return s1.compareTo(s2);
24281    }
24282
24283    private static String normalisedVersion(String version) {
24284        return normalisedVersion(version, ".", 4);
24285    }
24286
24287    private static String normalisedVersion(String version, String sep, int maxWidth) {
24288        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
24289        StringBuilder sb = new StringBuilder();
24290        for (String s : split) {
24291            sb.append(String.format("%" + maxWidth + 's', s));
24292        }
24293        return sb.toString();
24294    }
24295}
24296EOF
24297
24298    CLASSPATH=$ac_java_classpath
24299    export CLASSPATH
24300    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
24301    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
24302        echo "configure: conftestSharedChecker.class available" >&5
24303    else
24304        echo "configure: failed program was:" >&5
24305        cat conftestSharedChecker.java >&5
24306        echo "configure: CLASSPATH was $CLASSPATH" >&5
24307    fi
24308
24309    fi
24310
24311    CLASSPATH=$ac_java_classpath
24312    export CLASSPATH
24313    echo "CLASSPATH="$CLASSPATH >&5
24314    cmd="$JAVA conftestSharedChecker \"cobertura\" \"net.sourceforge.cobertura.merge.Main\" \"$jar_resolved\" \"\" \"\" \"\""
24315    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
24316        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
24317$(tail -n 1 conftestSharedChecker.java.output)
24318EOF
24319        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
24320$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
24321        echo "yes" >&5
24322        # append the found file to the classpath to manage jar dependency
24323        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
24324    else
24325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24326$as_echo "no" >&6; }
24327      if test ""yes"" = "yes"; then
24328         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar cobertura used by cobertura - Java code coverage (looking for package net.sourceforge.cobertura.merge.Main)" >&5
24329$as_echo "$as_me: WARNING: Could not find or use the Java package/jar cobertura used by cobertura - Java code coverage (looking for package net.sourceforge.cobertura.merge.Main)" >&2;}
24330      else
24331          as_fn_error $? "Could not find or use the Java package/jar cobertura used by cobertura - Java code coverage (looking for package net.sourceforge.cobertura.merge.Main)" "$LINENO" 5
24332      fi
24333    fi
24334    if test -f conftestSharedChecker.java.output; then
24335        rm conftestSharedChecker.java.output
24336    fi
24337
24338        COBERTURA=$PACKAGE_JAR_FILE
24339
24340
24341        # ASM (a dependency of Cobertura)
24342
24343
24344
24345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking asm3" >&5
24346$as_echo_n "checking asm3... " >&6; }
24347    PACKAGE_JAR_FILE=
24348
24349    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
24350
24351    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'asm3.jar' -or -name 'libasm3.jar' -or -name 'libasm3-java.jar' -or -name 'asm3*.jar' \) 2>/dev/null |tr '\n' ':')."
24352
24353    if test ! -f conftestSharedChecker.class ; then
24354
24355    cat << \EOF > conftestSharedChecker.java
24356// #line 24356 "configure"
24357import java.util.regex.Pattern;
24358import java.io.File;
24359import java.io.IOException;
24360import java.lang.reflect.Field;
24361import java.lang.reflect.InvocationTargetException;
24362import java.lang.reflect.Method;
24363import java.net.URL;
24364import java.net.URLClassLoader;
24365import java.util.ArrayList;
24366
24367public class conftestSharedChecker {
24368
24369    /**
24370     * Required arguments :
24371     *  argv[0]: name of the jar package
24372     *  argv[1]: name of the class (with the package prefix)
24373     *  argv[2]: possible paths of the jar package (separated by ':')
24374     *
24375     * Optional arguments:
24376     *  argv[3]: field or method used to retrieve the version
24377     *  argv[4]: expected version
24378     *  argv[5]: String comparator :
24379     *      "="  for exact version
24380     */
24381    public static void main(String[] argv) {
24382        final String packageName = argv[0];
24383        final String className = argv[1];
24384        final String[] jarList = argv[2].split(":");
24385
24386        ArrayList<URL> found = new ArrayList<>();
24387        for(String jar : jarList)
24388        {
24389            try {
24390                File f = new File(jar);
24391                if (f.exists()) {
24392                    found.add(f.toURI().toURL());
24393                }
24394            } catch (IOException ex) {
24395                System.err.println(ex.toString());
24396            }
24397        }
24398
24399        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
24400        URL klassURL = null;
24401        Class<?> klass = null;
24402        try {
24403            String resourceName = className.replace(".", "/") + ".class";
24404            klassURL = localClassLoader.getResource(resourceName);
24405            klass = localClassLoader.loadClass(className);
24406        } catch (ClassNotFoundException ex) {
24407            System.err.println(className + " not found");
24408            System.exit(-1);
24409        }
24410
24411        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
24412        String path = pathURL.substring(pathURL.indexOf(':') + 1);
24413        System.err.println("found: " + path);
24414
24415        String version;
24416        if (!"".equals(argv[3])) {
24417            version = checkVersion(klass, argv);
24418        } else {
24419            version = klass.getPackage().getSpecificationVersion();
24420        }
24421
24422        System.out.println(path + " " + version);
24423    }
24424
24425    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
24426        final String versionMethod = argv[3];
24427        final String expected = argv[4];
24428        final String atLeastOrEqual;
24429        if (!"".equals(argv[5])) {
24430            atLeastOrEqual = argv[5];
24431        } else {
24432            atLeastOrEqual = "<=";
24433        }
24434
24435        String value = "";
24436        if (versionMethod.isEmpty()) {
24437            value = klass.getPackage().getSpecificationVersion();
24438            compareAndDisplay(atLeastOrEqual, expected, value);
24439            return value;
24440        }
24441
24442        try {
24443            try {
24444                Field field = klass.getField(versionMethod);
24445                value = String.valueOf(field.get(null));
24446                compareAndDisplay(atLeastOrEqual, expected, value);
24447            } catch (NoSuchFieldException fe) {
24448                Method method = null;
24449                try {
24450                    method = klass.getMethod(versionMethod);
24451                } catch (NoSuchMethodException ex) {
24452                    System.err.println(ex.toString());
24453                    System.exit(-3);
24454                }
24455
24456                try {
24457                    value = String.valueOf(method.invoke(null));
24458                    compareAndDisplay(atLeastOrEqual, expected, value);
24459                } catch (NullPointerException ex) {
24460                    value = String.valueOf(method.invoke(klass.newInstance()));
24461                    compareAndDisplay(atLeastOrEqual, expected, value);
24462                }
24463            }
24464        } catch (IllegalAccessException ex) {
24465            System.err.println(ex);
24466            System.exit(-2);
24467        } catch (InvocationTargetException ex) {
24468            System.err.println(ex);
24469            System.exit(-2);
24470        } catch (InstantiationException ex) {
24471            System.err.println(ex);
24472            System.exit(-2);
24473        }
24474        return value;
24475    }
24476
24477    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
24478        int cmp = compare(expected, value);
24479
24480        switch(atLeastOrEqual) {
24481            case ">":
24482                if (cmp > 0) {
24483                    return;
24484                } else {
24485                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24486                    System.exit(-4);
24487                }
24488            case "==":
24489                if (cmp == 0) {
24490                    return;
24491                } else {
24492                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24493                    System.exit(-4);
24494                }
24495            case "<=":
24496                if (cmp <= 0) {
24497                    return;
24498                } else {
24499                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24500                    System.exit(-4);
24501                }
24502            default:
24503                System.err.println("unable to compare with "+atLeastOrEqual);
24504                System.exit(-4);
24505        }
24506    }
24507
24508    private static int compare(String v1, String v2) {
24509        String s1 = normalisedVersion(v1);
24510        String s2 = normalisedVersion(v2);
24511
24512        System.err.println("compare: " + v1 + " normalised to " + s1);
24513        System.err.println("compare: " + v2 + " normalised to " + s2);
24514        return s1.compareTo(s2);
24515    }
24516
24517    private static String normalisedVersion(String version) {
24518        return normalisedVersion(version, ".", 4);
24519    }
24520
24521    private static String normalisedVersion(String version, String sep, int maxWidth) {
24522        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
24523        StringBuilder sb = new StringBuilder();
24524        for (String s : split) {
24525            sb.append(String.format("%" + maxWidth + 's', s));
24526        }
24527        return sb.toString();
24528    }
24529}
24530EOF
24531
24532    CLASSPATH=$ac_java_classpath
24533    export CLASSPATH
24534    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
24535    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
24536        echo "configure: conftestSharedChecker.class available" >&5
24537    else
24538        echo "configure: failed program was:" >&5
24539        cat conftestSharedChecker.java >&5
24540        echo "configure: CLASSPATH was $CLASSPATH" >&5
24541    fi
24542
24543    fi
24544
24545    CLASSPATH=$ac_java_classpath
24546    export CLASSPATH
24547    echo "CLASSPATH="$CLASSPATH >&5
24548    cmd="$JAVA conftestSharedChecker \"asm3\" \"org.objectweb.asm.Type\" \"$jar_resolved\" \"\" \"\" \"\""
24549    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
24550        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
24551$(tail -n 1 conftestSharedChecker.java.output)
24552EOF
24553        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
24554$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
24555        echo "yes" >&5
24556        # append the found file to the classpath to manage jar dependency
24557        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
24558    else
24559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24560$as_echo "no" >&6; }
24561      if test ""yes"" = "yes"; then
24562         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar asm3 used by Java bytecode manipulation (dep of cobertura) (looking for package org.objectweb.asm.Type)" >&5
24563$as_echo "$as_me: WARNING: Could not find or use the Java package/jar asm3 used by Java bytecode manipulation (dep of cobertura) (looking for package org.objectweb.asm.Type)" >&2;}
24564      else
24565          as_fn_error $? "Could not find or use the Java package/jar asm3 used by Java bytecode manipulation (dep of cobertura) (looking for package org.objectweb.asm.Type)" "$LINENO" 5
24566      fi
24567    fi
24568    if test -f conftestSharedChecker.java.output; then
24569        rm conftestSharedChecker.java.output
24570    fi
24571
24572        if test -z "$ASM3"; then
24573
24574
24575
24576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking asm" >&5
24577$as_echo_n "checking asm... " >&6; }
24578    PACKAGE_JAR_FILE=
24579
24580    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
24581
24582    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'asm.jar' -or -name 'libasm.jar' -or -name 'libasm-java.jar' -or -name 'asm*.jar' \) 2>/dev/null |tr '\n' ':')."
24583
24584    if test ! -f conftestSharedChecker.class ; then
24585
24586    cat << \EOF > conftestSharedChecker.java
24587// #line 24587 "configure"
24588import java.util.regex.Pattern;
24589import java.io.File;
24590import java.io.IOException;
24591import java.lang.reflect.Field;
24592import java.lang.reflect.InvocationTargetException;
24593import java.lang.reflect.Method;
24594import java.net.URL;
24595import java.net.URLClassLoader;
24596import java.util.ArrayList;
24597
24598public class conftestSharedChecker {
24599
24600    /**
24601     * Required arguments :
24602     *  argv[0]: name of the jar package
24603     *  argv[1]: name of the class (with the package prefix)
24604     *  argv[2]: possible paths of the jar package (separated by ':')
24605     *
24606     * Optional arguments:
24607     *  argv[3]: field or method used to retrieve the version
24608     *  argv[4]: expected version
24609     *  argv[5]: String comparator :
24610     *      "="  for exact version
24611     */
24612    public static void main(String[] argv) {
24613        final String packageName = argv[0];
24614        final String className = argv[1];
24615        final String[] jarList = argv[2].split(":");
24616
24617        ArrayList<URL> found = new ArrayList<>();
24618        for(String jar : jarList)
24619        {
24620            try {
24621                File f = new File(jar);
24622                if (f.exists()) {
24623                    found.add(f.toURI().toURL());
24624                }
24625            } catch (IOException ex) {
24626                System.err.println(ex.toString());
24627            }
24628        }
24629
24630        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
24631        URL klassURL = null;
24632        Class<?> klass = null;
24633        try {
24634            String resourceName = className.replace(".", "/") + ".class";
24635            klassURL = localClassLoader.getResource(resourceName);
24636            klass = localClassLoader.loadClass(className);
24637        } catch (ClassNotFoundException ex) {
24638            System.err.println(className + " not found");
24639            System.exit(-1);
24640        }
24641
24642        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
24643        String path = pathURL.substring(pathURL.indexOf(':') + 1);
24644        System.err.println("found: " + path);
24645
24646        String version;
24647        if (!"".equals(argv[3])) {
24648            version = checkVersion(klass, argv);
24649        } else {
24650            version = klass.getPackage().getSpecificationVersion();
24651        }
24652
24653        System.out.println(path + " " + version);
24654    }
24655
24656    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
24657        final String versionMethod = argv[3];
24658        final String expected = argv[4];
24659        final String atLeastOrEqual;
24660        if (!"".equals(argv[5])) {
24661            atLeastOrEqual = argv[5];
24662        } else {
24663            atLeastOrEqual = "<=";
24664        }
24665
24666        String value = "";
24667        if (versionMethod.isEmpty()) {
24668            value = klass.getPackage().getSpecificationVersion();
24669            compareAndDisplay(atLeastOrEqual, expected, value);
24670            return value;
24671        }
24672
24673        try {
24674            try {
24675                Field field = klass.getField(versionMethod);
24676                value = String.valueOf(field.get(null));
24677                compareAndDisplay(atLeastOrEqual, expected, value);
24678            } catch (NoSuchFieldException fe) {
24679                Method method = null;
24680                try {
24681                    method = klass.getMethod(versionMethod);
24682                } catch (NoSuchMethodException ex) {
24683                    System.err.println(ex.toString());
24684                    System.exit(-3);
24685                }
24686
24687                try {
24688                    value = String.valueOf(method.invoke(null));
24689                    compareAndDisplay(atLeastOrEqual, expected, value);
24690                } catch (NullPointerException ex) {
24691                    value = String.valueOf(method.invoke(klass.newInstance()));
24692                    compareAndDisplay(atLeastOrEqual, expected, value);
24693                }
24694            }
24695        } catch (IllegalAccessException ex) {
24696            System.err.println(ex);
24697            System.exit(-2);
24698        } catch (InvocationTargetException ex) {
24699            System.err.println(ex);
24700            System.exit(-2);
24701        } catch (InstantiationException ex) {
24702            System.err.println(ex);
24703            System.exit(-2);
24704        }
24705        return value;
24706    }
24707
24708    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
24709        int cmp = compare(expected, value);
24710
24711        switch(atLeastOrEqual) {
24712            case ">":
24713                if (cmp > 0) {
24714                    return;
24715                } else {
24716                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24717                    System.exit(-4);
24718                }
24719            case "==":
24720                if (cmp == 0) {
24721                    return;
24722                } else {
24723                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24724                    System.exit(-4);
24725                }
24726            case "<=":
24727                if (cmp <= 0) {
24728                    return;
24729                } else {
24730                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24731                    System.exit(-4);
24732                }
24733            default:
24734                System.err.println("unable to compare with "+atLeastOrEqual);
24735                System.exit(-4);
24736        }
24737    }
24738
24739    private static int compare(String v1, String v2) {
24740        String s1 = normalisedVersion(v1);
24741        String s2 = normalisedVersion(v2);
24742
24743        System.err.println("compare: " + v1 + " normalised to " + s1);
24744        System.err.println("compare: " + v2 + " normalised to " + s2);
24745        return s1.compareTo(s2);
24746    }
24747
24748    private static String normalisedVersion(String version) {
24749        return normalisedVersion(version, ".", 4);
24750    }
24751
24752    private static String normalisedVersion(String version, String sep, int maxWidth) {
24753        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
24754        StringBuilder sb = new StringBuilder();
24755        for (String s : split) {
24756            sb.append(String.format("%" + maxWidth + 's', s));
24757        }
24758        return sb.toString();
24759    }
24760}
24761EOF
24762
24763    CLASSPATH=$ac_java_classpath
24764    export CLASSPATH
24765    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
24766    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
24767        echo "configure: conftestSharedChecker.class available" >&5
24768    else
24769        echo "configure: failed program was:" >&5
24770        cat conftestSharedChecker.java >&5
24771        echo "configure: CLASSPATH was $CLASSPATH" >&5
24772    fi
24773
24774    fi
24775
24776    CLASSPATH=$ac_java_classpath
24777    export CLASSPATH
24778    echo "CLASSPATH="$CLASSPATH >&5
24779    cmd="$JAVA conftestSharedChecker \"asm\" \"org.objectweb.asm.Type\" \"$jar_resolved\" \"\" \"\" \"\""
24780    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
24781        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
24782$(tail -n 1 conftestSharedChecker.java.output)
24783EOF
24784        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
24785$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
24786        echo "yes" >&5
24787        # append the found file to the classpath to manage jar dependency
24788        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
24789    else
24790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24791$as_echo "no" >&6; }
24792      if test ""yes"" = "yes"; then
24793         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar asm used by Java bytecode manipulation (dep of cobertura) (looking for package org.objectweb.asm.Type)" >&5
24794$as_echo "$as_me: WARNING: Could not find or use the Java package/jar asm used by Java bytecode manipulation (dep of cobertura) (looking for package org.objectweb.asm.Type)" >&2;}
24795      else
24796          as_fn_error $? "Could not find or use the Java package/jar asm used by Java bytecode manipulation (dep of cobertura) (looking for package org.objectweb.asm.Type)" "$LINENO" 5
24797      fi
24798    fi
24799    if test -f conftestSharedChecker.java.output; then
24800        rm conftestSharedChecker.java.output
24801    fi
24802
24803        fi
24804        ASM3=$PACKAGE_JAR_FILE
24805
24806
24807
24808
24809
24810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking ecj" >&5
24811$as_echo_n "checking ecj... " >&6; }
24812    PACKAGE_JAR_FILE=
24813
24814    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
24815
24816    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'ecj.jar' -or -name 'libecj.jar' -or -name 'libecj-java.jar' -or -name 'ecj*.jar' \) 2>/dev/null |tr '\n' ':')."
24817
24818    if test ! -f conftestSharedChecker.class ; then
24819
24820    cat << \EOF > conftestSharedChecker.java
24821// #line 24821 "configure"
24822import java.util.regex.Pattern;
24823import java.io.File;
24824import java.io.IOException;
24825import java.lang.reflect.Field;
24826import java.lang.reflect.InvocationTargetException;
24827import java.lang.reflect.Method;
24828import java.net.URL;
24829import java.net.URLClassLoader;
24830import java.util.ArrayList;
24831
24832public class conftestSharedChecker {
24833
24834    /**
24835     * Required arguments :
24836     *  argv[0]: name of the jar package
24837     *  argv[1]: name of the class (with the package prefix)
24838     *  argv[2]: possible paths of the jar package (separated by ':')
24839     *
24840     * Optional arguments:
24841     *  argv[3]: field or method used to retrieve the version
24842     *  argv[4]: expected version
24843     *  argv[5]: String comparator :
24844     *      "="  for exact version
24845     */
24846    public static void main(String[] argv) {
24847        final String packageName = argv[0];
24848        final String className = argv[1];
24849        final String[] jarList = argv[2].split(":");
24850
24851        ArrayList<URL> found = new ArrayList<>();
24852        for(String jar : jarList)
24853        {
24854            try {
24855                File f = new File(jar);
24856                if (f.exists()) {
24857                    found.add(f.toURI().toURL());
24858                }
24859            } catch (IOException ex) {
24860                System.err.println(ex.toString());
24861            }
24862        }
24863
24864        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
24865        URL klassURL = null;
24866        Class<?> klass = null;
24867        try {
24868            String resourceName = className.replace(".", "/") + ".class";
24869            klassURL = localClassLoader.getResource(resourceName);
24870            klass = localClassLoader.loadClass(className);
24871        } catch (ClassNotFoundException ex) {
24872            System.err.println(className + " not found");
24873            System.exit(-1);
24874        }
24875
24876        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
24877        String path = pathURL.substring(pathURL.indexOf(':') + 1);
24878        System.err.println("found: " + path);
24879
24880        String version;
24881        if (!"".equals(argv[3])) {
24882            version = checkVersion(klass, argv);
24883        } else {
24884            version = klass.getPackage().getSpecificationVersion();
24885        }
24886
24887        System.out.println(path + " " + version);
24888    }
24889
24890    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
24891        final String versionMethod = argv[3];
24892        final String expected = argv[4];
24893        final String atLeastOrEqual;
24894        if (!"".equals(argv[5])) {
24895            atLeastOrEqual = argv[5];
24896        } else {
24897            atLeastOrEqual = "<=";
24898        }
24899
24900        String value = "";
24901        if (versionMethod.isEmpty()) {
24902            value = klass.getPackage().getSpecificationVersion();
24903            compareAndDisplay(atLeastOrEqual, expected, value);
24904            return value;
24905        }
24906
24907        try {
24908            try {
24909                Field field = klass.getField(versionMethod);
24910                value = String.valueOf(field.get(null));
24911                compareAndDisplay(atLeastOrEqual, expected, value);
24912            } catch (NoSuchFieldException fe) {
24913                Method method = null;
24914                try {
24915                    method = klass.getMethod(versionMethod);
24916                } catch (NoSuchMethodException ex) {
24917                    System.err.println(ex.toString());
24918                    System.exit(-3);
24919                }
24920
24921                try {
24922                    value = String.valueOf(method.invoke(null));
24923                    compareAndDisplay(atLeastOrEqual, expected, value);
24924                } catch (NullPointerException ex) {
24925                    value = String.valueOf(method.invoke(klass.newInstance()));
24926                    compareAndDisplay(atLeastOrEqual, expected, value);
24927                }
24928            }
24929        } catch (IllegalAccessException ex) {
24930            System.err.println(ex);
24931            System.exit(-2);
24932        } catch (InvocationTargetException ex) {
24933            System.err.println(ex);
24934            System.exit(-2);
24935        } catch (InstantiationException ex) {
24936            System.err.println(ex);
24937            System.exit(-2);
24938        }
24939        return value;
24940    }
24941
24942    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
24943        int cmp = compare(expected, value);
24944
24945        switch(atLeastOrEqual) {
24946            case ">":
24947                if (cmp > 0) {
24948                    return;
24949                } else {
24950                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24951                    System.exit(-4);
24952                }
24953            case "==":
24954                if (cmp == 0) {
24955                    return;
24956                } else {
24957                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24958                    System.exit(-4);
24959                }
24960            case "<=":
24961                if (cmp <= 0) {
24962                    return;
24963                } else {
24964                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
24965                    System.exit(-4);
24966                }
24967            default:
24968                System.err.println("unable to compare with "+atLeastOrEqual);
24969                System.exit(-4);
24970        }
24971    }
24972
24973    private static int compare(String v1, String v2) {
24974        String s1 = normalisedVersion(v1);
24975        String s2 = normalisedVersion(v2);
24976
24977        System.err.println("compare: " + v1 + " normalised to " + s1);
24978        System.err.println("compare: " + v2 + " normalised to " + s2);
24979        return s1.compareTo(s2);
24980    }
24981
24982    private static String normalisedVersion(String version) {
24983        return normalisedVersion(version, ".", 4);
24984    }
24985
24986    private static String normalisedVersion(String version, String sep, int maxWidth) {
24987        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
24988        StringBuilder sb = new StringBuilder();
24989        for (String s : split) {
24990            sb.append(String.format("%" + maxWidth + 's', s));
24991        }
24992        return sb.toString();
24993    }
24994}
24995EOF
24996
24997    CLASSPATH=$ac_java_classpath
24998    export CLASSPATH
24999    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
25000    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
25001        echo "configure: conftestSharedChecker.class available" >&5
25002    else
25003        echo "configure: failed program was:" >&5
25004        cat conftestSharedChecker.java >&5
25005        echo "configure: CLASSPATH was $CLASSPATH" >&5
25006    fi
25007
25008    fi
25009
25010    CLASSPATH=$ac_java_classpath
25011    export CLASSPATH
25012    echo "CLASSPATH="$CLASSPATH >&5
25013    cmd="$JAVA conftestSharedChecker \"ecj\" \"org.eclipse.jdt.core.compiler.batch.BatchCompiler\" \"$jar_resolved\" \"\" \"\" \"\""
25014    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
25015        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
25016$(tail -n 1 conftestSharedChecker.java.output)
25017EOF
25018        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
25019$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
25020        echo "yes" >&5
25021        # append the found file to the classpath to manage jar dependency
25022        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
25023    else
25024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25025$as_echo "no" >&6; }
25026      if test ""yes"" = "yes"; then
25027         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar ecj used by Eclipse Java compiler (looking for package org.eclipse.jdt.core.compiler.batch.BatchCompiler)" >&5
25028$as_echo "$as_me: WARNING: Could not find or use the Java package/jar ecj used by Eclipse Java compiler (looking for package org.eclipse.jdt.core.compiler.batch.BatchCompiler)" >&2;}
25029      else
25030          as_fn_error $? "Could not find or use the Java package/jar ecj used by Eclipse Java compiler (looking for package org.eclipse.jdt.core.compiler.batch.BatchCompiler)" "$LINENO" 5
25031      fi
25032    fi
25033    if test -f conftestSharedChecker.java.output; then
25034        rm conftestSharedChecker.java.output
25035    fi
25036
25037        ECJ=$PACKAGE_JAR_FILE
25038        if test -z "$ECJ"; then
25039           ECJ='$SCILAB/thirdparty/ecj.jar'
25040        fi
25041
25042
25043    else
25044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sun javac not found: I will not build the java interface" >&5
25045$as_echo "$as_me: WARNING: Sun javac not found: I will not build the java interface" >&2;}
25046        if test "$ac_java_jvm_name" != ""; then
25047            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We do not support $ac_java_jvm_name yet" >&5
25048$as_echo "$as_me: WARNING: We do not support $ac_java_jvm_name yet" >&2;}
25049        fi
25050    fi
25051
25052
25053
25054
25055
25056    if test "$enable_debug_java" = yes; then
25057        JAVAC_DEBUG="on"
25058    else
25059        JAVAC_DEBUG="off"
25060    fi
25061
25062
25063    if test "$enable_build_swig" != no -a "$enable_build_swig" != ""; then
25064
25065    SWIG_BIN="$enable_build_swig"
25066    if test -x "$SWIG_BIN"; then
25067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_BIN" >&5
25068$as_echo "$SWIG_BIN" >&6; }
25069    else
25070       # Extract the first word of "swig", so it can be a program name with args.
25071set dummy swig; ac_word=$2
25072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25073$as_echo_n "checking for $ac_word... " >&6; }
25074if ${ac_cv_path_SWIG_BIN+:} false; then :
25075  $as_echo_n "(cached) " >&6
25076else
25077  case $SWIG_BIN in
25078  [\\/]* | ?:[\\/]*)
25079  ac_cv_path_SWIG_BIN="$SWIG_BIN" # Let the user override the test with a path.
25080  ;;
25081  *)
25082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25083for as_dir in $PATH
25084do
25085  IFS=$as_save_IFS
25086  test -z "$as_dir" && as_dir=.
25087    for ac_exec_ext in '' $ac_executable_extensions; do
25088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25089    ac_cv_path_SWIG_BIN="$as_dir/$ac_word$ac_exec_ext"
25090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25091    break 2
25092  fi
25093done
25094  done
25095IFS=$as_save_IFS
25096
25097  ;;
25098esac
25099fi
25100SWIG_BIN=$ac_cv_path_SWIG_BIN
25101if test -n "$SWIG_BIN"; then
25102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_BIN" >&5
25103$as_echo "$SWIG_BIN" >&6; }
25104else
25105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25106$as_echo "no" >&6; }
25107fi
25108
25109
25110    fi
25111	if test -z "$SWIG_BIN" ; then
25112		as_fn_error $? "Cannot find swig. Please install it (package swig under Debian) or remove the option --enable-build-swig" "$LINENO" 5
25113	elif test -n "" ; then
25114		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
25115$as_echo_n "checking for SWIG version... " >&6; }
25116		swig_version=`$SWIG_BIN -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/g'`
25117		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
25118$as_echo "$swig_version" >&6; }
25119		if test -n "$swig_version" ; then
25120			# Calculate the required version number
25121                        swig_tmp=`echo  | sed 's/[^0-9]\+/ /g'`
25122                        swig_required_version=`echo $swig_tmp | awk '{print  1000000 *  +  1000 *  + }'`
25123
25124			# Calculate the available version number
25125                        swig_tmp=`echo $swig_version | sed 's/[^0-9]\+/ /g'`
25126                        swig_tmp=`echo $swig_tmp | awk '{print  1000000 *  +  1000 *  + }'`
25127
25128			if test $swig_required_version -gt $swig_tmp ; then
25129				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version  is required, you have $swig_version" >&5
25130$as_echo "$as_me: WARNING: SWIG version  is required, you have $swig_version" >&2;}
25131			fi
25132		else
25133			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
25134$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
25135		fi
25136		SWIG_RUNTIME_LIBS_DIR="${SWIG%/bin*}/lib"
25137		{ $as_echo "$as_me:${as_lineno-$LINENO}: SWIG runtime library directory is '$SWIG_RUNTIME_LIBS_DIR'" >&5
25138$as_echo "$as_me: SWIG runtime library directory is '$SWIG_RUNTIME_LIBS_DIR'" >&6;}
25139	fi
25140
25141
25142
25143
25144	SWIG_JAVA=" -java"
25145
25146
25147
25148	SWIG_SCILAB=" -scilab -nobuilder"
25149
25150
25151
25152
25153
25154    fi
25155
25156    # Giws is the equivalent of Swig developed by the Scilab team
25157    # in order to provide a wrapper to Java from C/C++
25158    if test "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
25159
25160# Checking Python in the current path... As Giws is not at all mandatory
25161# Python is not mandatory and we don't want to provide an additionnal option
25162# to the ./configure
25163   for ac_prog in python
25164do
25165  # Extract the first word of "$ac_prog", so it can be a program name with args.
25166set dummy $ac_prog; ac_word=$2
25167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25168$as_echo_n "checking for $ac_word... " >&6; }
25169if ${ac_cv_prog_PYTHON+:} false; then :
25170  $as_echo_n "(cached) " >&6
25171else
25172  if test -n "$PYTHON"; then
25173  ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
25174else
25175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25176for as_dir in $PATH
25177do
25178  IFS=$as_save_IFS
25179  test -z "$as_dir" && as_dir=.
25180    for ac_exec_ext in '' $ac_executable_extensions; do
25181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25182    ac_cv_prog_PYTHON="$ac_prog"
25183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25184    break 2
25185  fi
25186done
25187  done
25188IFS=$as_save_IFS
25189
25190fi
25191fi
25192PYTHON=$ac_cv_prog_PYTHON
25193if test -n "$PYTHON"; then
25194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
25195$as_echo "$PYTHON" >&6; }
25196else
25197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25198$as_echo "no" >&6; }
25199fi
25200
25201
25202  test -n "$PYTHON" && break
25203done
25204test -n "$PYTHON" || PYTHON="no"
25205
25206   if test "x$PYTHON" = "xno"; then
25207		as_fn_error $? "Giws needs Python" "$LINENO" 5
25208   fi
25209
25210## If the user is providing a path to the option
25211if test "$enable_build_giws" != 'yes' -a "$enable_build_giws" != 'no'; then
25212
25213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking giws" >&5
25214$as_echo_n "checking giws... " >&6; }
25215   GIWS_BIN="$enable_build_giws/giws"
25216   if test -f "$GIWS_BIN"; then
25217                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIWS_BIN" >&5
25218$as_echo "$GIWS_BIN" >&6; }
25219        else
25220                as_fn_error $? "Unable to find $GIWS_BIN. Please check the path you provided" "$LINENO" 5
25221		fi
25222else
25223# Looks for it in the path
25224   for ac_prog in giws
25225do
25226  # Extract the first word of "$ac_prog", so it can be a program name with args.
25227set dummy $ac_prog; ac_word=$2
25228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25229$as_echo_n "checking for $ac_word... " >&6; }
25230if ${ac_cv_prog_GIWS_BIN+:} false; then :
25231  $as_echo_n "(cached) " >&6
25232else
25233  if test -n "$GIWS_BIN"; then
25234  ac_cv_prog_GIWS_BIN="$GIWS_BIN" # Let the user override the test.
25235else
25236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25237for as_dir in $PATH
25238do
25239  IFS=$as_save_IFS
25240  test -z "$as_dir" && as_dir=.
25241    for ac_exec_ext in '' $ac_executable_extensions; do
25242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25243    ac_cv_prog_GIWS_BIN="$ac_prog"
25244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25245    break 2
25246  fi
25247done
25248  done
25249IFS=$as_save_IFS
25250
25251fi
25252fi
25253GIWS_BIN=$ac_cv_prog_GIWS_BIN
25254if test -n "$GIWS_BIN"; then
25255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIWS_BIN" >&5
25256$as_echo "$GIWS_BIN" >&6; }
25257else
25258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25259$as_echo "no" >&6; }
25260fi
25261
25262
25263  test -n "$GIWS_BIN" && break
25264done
25265test -n "$GIWS_BIN" || GIWS_BIN="no"
25266
25267   if test "x$GIWS_BIN" = "xno"; then
25268		as_fn_error $? "Could find giws in the PATH" "$LINENO" 5
25269   fi
25270fi
25271
25272if test -f $GIWS_BIN; then
25273   chmod +x $GIWS_BIN
25274fi
25275
25276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIWS version" >&5
25277$as_echo_n "checking for GIWS version... " >&6; }
25278giws_version=`$GIWS_BIN --version 2>&1 | grep 'GIWS' | sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/g'`
25279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $giws_version" >&5
25280$as_echo "$giws_version" >&6; }
25281if test -n "$giws_version" ; then
25282	# Calculate the required version number
25283    giws_tmp=`echo 1.3.0 | sed 's/[^0-9]\+/ /g'`
25284    giws_required_version=`echo $giws_tmp | awk '{print  1000000 * $ 1 +  1000 * $ 2 + $ 3}'`
25285
25286	# Calculate the available version number
25287    giws_tmp=`echo $giws_version | sed 's/[^0-9]\+/ /g'`
25288    giws_tmp=`echo $giws_tmp | awk '{print  1000000 * $ 1 +  1000 * $ 2 + $ 3}'`
25289
25290	if test $giws_required_version -gt $giws_tmp ; then
25291       as_fn_error $? "GIWS version 1.3.0 is required, $giws_version detected" "$LINENO" 5
25292    fi
25293else
25294	as_fn_error $? "cannot determine GIWS version" "$LINENO" 5
25295fi
25296
25297
25298
25299
25300    fi
25301
25302    fi # "$with_jdk" != no;
25303fi
25304
25305JAVA_ENABLE=yes
25306if test -z "$JAVAC"; then
25307    JAVA_ENABLE=no
25308fi
25309
25310
25311
25312# Xcos is not checked here because gui=no disables it
25313 if test "$with_jdk" != no -a \( "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no \); then
25314  NEED_JAVA_TRUE=
25315  NEED_JAVA_FALSE='#'
25316else
25317  NEED_JAVA_TRUE='#'
25318  NEED_JAVA_FALSE=
25319fi
25320
25321 if test "$with_jdk" != no -a "$with_gui" != no; then
25322  GUI_TRUE=
25323  GUI_FALSE='#'
25324else
25325  GUI_TRUE='#'
25326  GUI_FALSE=
25327fi
25328
25329 if test "$with_jdk" != no -a "$with_javasci" != no; then
25330  JAVASCI_TRUE=
25331  JAVASCI_FALSE='#'
25332else
25333  JAVASCI_TRUE='#'
25334  JAVASCI_FALSE=
25335fi
25336
25337 if test "$with_jdk" != no -a "$enable_build_swig" != no -a "$enable_build_swig" != ""; then
25338  SWIG_TRUE=
25339  SWIG_FALSE='#'
25340else
25341  SWIG_TRUE='#'
25342  SWIG_FALSE=
25343fi
25344
25345 if test "$with_jdk" != no -a "$enable_build_giws" != no -a "$enable_build_giws" != ""; then
25346  GIWS_TRUE=
25347  GIWS_FALSE='#'
25348else
25349  GIWS_TRUE='#'
25350  GIWS_FALSE=
25351fi
25352
25353
25354##############################################################
25355## GUI module
25356##############################################################
25357
25358GUI_ENABLE=no
25359
25360if test "$JAVA_ENABLE" != no; then
25361   GUI_ENABLE=yes
25362fi
25363
25364if test "$with_gui" != no; then
25365   GUI_ENABLE=yes
25366fi
25367
25368
25369
25370##############################################################
25371## test for functions in standard C library and C math library
25372##############################################################
25373
25374# Provided by unistd.h
25375for ac_func in dup2 getcwd getpagesize getpass
25376do :
25377  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25378ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25379if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25380  cat >>confdefs.h <<_ACEOF
25381#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25382_ACEOF
25383
25384fi
25385done
25386
25387for ac_func in rmdir
25388do :
25389  ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
25390if test "x$ac_cv_func_rmdir" = xyes; then :
25391  cat >>confdefs.h <<_ACEOF
25392#define HAVE_RMDIR 1
25393_ACEOF
25394
25395fi
25396done
25397
25398
25399# Provided by <regex.h>
25400for ac_func in regcomp
25401do :
25402  ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp"
25403if test "x$ac_cv_func_regcomp" = xyes; then :
25404  cat >>confdefs.h <<_ACEOF
25405#define HAVE_REGCOMP 1
25406_ACEOF
25407
25408fi
25409done
25410
25411
25412# Provided by stdlib.h
25413for ac_func in atexit putenv setenv
25414do :
25415  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25416ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25417if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25418  cat >>confdefs.h <<_ACEOF
25419#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25420_ACEOF
25421
25422fi
25423done
25424
25425
25426# Provided by String.h
25427for ac_func in bzero memmove memset strcasecmp strerror strchr strdup strpbrk strrchr strstr strtol
25428do :
25429  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25430ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25431if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25432  cat >>confdefs.h <<_ACEOF
25433#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25434_ACEOF
25435
25436fi
25437done
25438
25439
25440# Provided by select.h
25441for ac_func in select
25442do :
25443  ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
25444if test "x$ac_cv_func_select" = xyes; then :
25445  cat >>confdefs.h <<_ACEOF
25446#define HAVE_SELECT 1
25447_ACEOF
25448
25449fi
25450done
25451
25452
25453# Provided by pwd.h
25454for ac_func in endpwent
25455do :
25456  ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
25457if test "x$ac_cv_func_endpwent" = xyes; then :
25458  cat >>confdefs.h <<_ACEOF
25459#define HAVE_ENDPWENT 1
25460_ACEOF
25461
25462fi
25463done
25464
25465
25466# Provided by netdb.h
25467for ac_func in gethostbyaddr gethostbyname gethostname
25468do :
25469  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25470ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25471if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25472  cat >>confdefs.h <<_ACEOF
25473#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25474_ACEOF
25475
25476fi
25477done
25478
25479
25480# Provided by time.h
25481for ac_func in gettimeofday nanosleep
25482do :
25483  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25484ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25485if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25486  cat >>confdefs.h <<_ACEOF
25487#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25488_ACEOF
25489
25490fi
25491done
25492
25493
25494# Provided by ctype.h
25495for ac_func in isascii
25496do :
25497  ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii"
25498if test "x$ac_cv_func_isascii" = xyes; then :
25499  cat >>confdefs.h <<_ACEOF
25500#define HAVE_ISASCII 1
25501_ACEOF
25502
25503fi
25504done
25505
25506
25507# Provided by wctype.h
25508for ac_func in iswprint
25509do :
25510  ac_fn_c_check_func "$LINENO" "iswprint" "ac_cv_func_iswprint"
25511if test "x$ac_cv_func_iswprint" = xyes; then :
25512  cat >>confdefs.h <<_ACEOF
25513#define HAVE_ISWPRINT 1
25514_ACEOF
25515
25516fi
25517done
25518
25519
25520# Provided by types.h
25521for ac_func in mkdir
25522do :
25523  ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir"
25524if test "x$ac_cv_func_mkdir" = xyes; then :
25525  cat >>confdefs.h <<_ACEOF
25526#define HAVE_MKDIR 1
25527_ACEOF
25528
25529fi
25530done
25531
25532
25533# Provided by mman.h
25534for ac_func in munmap
25535do :
25536  ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap"
25537if test "x$ac_cv_func_munmap" = xyes; then :
25538  cat >>confdefs.h <<_ACEOF
25539#define HAVE_MUNMAP 1
25540_ACEOF
25541
25542fi
25543done
25544
25545
25546# Provided by signal.h
25547for ac_func in strsignal
25548do :
25549  ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
25550if test "x$ac_cv_func_strsignal" = xyes; then :
25551  cat >>confdefs.h <<_ACEOF
25552#define HAVE_STRSIGNAL 1
25553_ACEOF
25554
25555fi
25556done
25557
25558
25559
25560# Check of the libm (lib math). Macro provided by libtool.
25561save_LDFLAGS="$LDFLAGS"
25562LIBM=
25563case $host in
25564*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
25565  # These system don't have libm, or don't need it
25566  ;;
25567*-ncr-sysv4.3*)
25568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
25569$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
25570if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then :
25571  $as_echo_n "(cached) " >&6
25572else
25573  ac_check_lib_save_LIBS=$LIBS
25574LIBS="-lmw  $LIBS"
25575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25576/* end confdefs.h.  */
25577
25578/* Override any GCC internal prototype to avoid an error.
25579   Use char because int might match the return type of a GCC
25580   builtin and then its argument prototype would still apply.  */
25581#ifdef __cplusplus
25582extern "C"
25583#endif
25584char _mwvalidcheckl ();
25585int
25586main ()
25587{
25588return _mwvalidcheckl ();
25589  ;
25590  return 0;
25591}
25592_ACEOF
25593if ac_fn_c_try_link "$LINENO"; then :
25594  ac_cv_lib_mw__mwvalidcheckl=yes
25595else
25596  ac_cv_lib_mw__mwvalidcheckl=no
25597fi
25598rm -f core conftest.err conftest.$ac_objext \
25599    conftest$ac_exeext conftest.$ac_ext
25600LIBS=$ac_check_lib_save_LIBS
25601fi
25602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
25603$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
25604if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
25605  LIBM=-lmw
25606fi
25607
25608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
25609$as_echo_n "checking for cos in -lm... " >&6; }
25610if ${ac_cv_lib_m_cos+:} false; then :
25611  $as_echo_n "(cached) " >&6
25612else
25613  ac_check_lib_save_LIBS=$LIBS
25614LIBS="-lm  $LIBS"
25615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25616/* end confdefs.h.  */
25617
25618/* Override any GCC internal prototype to avoid an error.
25619   Use char because int might match the return type of a GCC
25620   builtin and then its argument prototype would still apply.  */
25621#ifdef __cplusplus
25622extern "C"
25623#endif
25624char cos ();
25625int
25626main ()
25627{
25628return cos ();
25629  ;
25630  return 0;
25631}
25632_ACEOF
25633if ac_fn_c_try_link "$LINENO"; then :
25634  ac_cv_lib_m_cos=yes
25635else
25636  ac_cv_lib_m_cos=no
25637fi
25638rm -f core conftest.err conftest.$ac_objext \
25639    conftest$ac_exeext conftest.$ac_ext
25640LIBS=$ac_check_lib_save_LIBS
25641fi
25642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
25643$as_echo "$ac_cv_lib_m_cos" >&6; }
25644if test "x$ac_cv_lib_m_cos" = xyes; then :
25645  LIBM="$LIBM -lm"
25646fi
25647
25648  ;;
25649*)
25650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
25651$as_echo_n "checking for cos in -lm... " >&6; }
25652if ${ac_cv_lib_m_cos+:} false; then :
25653  $as_echo_n "(cached) " >&6
25654else
25655  ac_check_lib_save_LIBS=$LIBS
25656LIBS="-lm  $LIBS"
25657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25658/* end confdefs.h.  */
25659
25660/* Override any GCC internal prototype to avoid an error.
25661   Use char because int might match the return type of a GCC
25662   builtin and then its argument prototype would still apply.  */
25663#ifdef __cplusplus
25664extern "C"
25665#endif
25666char cos ();
25667int
25668main ()
25669{
25670return cos ();
25671  ;
25672  return 0;
25673}
25674_ACEOF
25675if ac_fn_c_try_link "$LINENO"; then :
25676  ac_cv_lib_m_cos=yes
25677else
25678  ac_cv_lib_m_cos=no
25679fi
25680rm -f core conftest.err conftest.$ac_objext \
25681    conftest$ac_exeext conftest.$ac_ext
25682LIBS=$ac_check_lib_save_LIBS
25683fi
25684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
25685$as_echo "$ac_cv_lib_m_cos" >&6; }
25686if test "x$ac_cv_lib_m_cos" = xyes; then :
25687  LIBM=-lm
25688fi
25689
25690  ;;
25691esac
25692
25693
25694
25695# Provided by math.h
25696
25697LDFLAGS="$LDFLAGS $LIBM"
25698for ac_func in pow sqrt finite floor exp10 erf erfc isnan
25699do :
25700  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25701ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25702if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25703  cat >>confdefs.h <<_ACEOF
25704#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25705_ACEOF
25706
25707fi
25708done
25709
25710
25711### If isinf exists or not (used to not be the case under Solaris)
25712### See bug #4164
25713
25714$as_echo "#define HAVE_ISINF 1" >>confdefs.h
25715
25716ac_fn_c_check_func "$LINENO" "isinf" "ac_cv_func_isinf"
25717if test "x$ac_cv_func_isinf" = xyes; then :
25718
25719else
25720
25721
25722$as_echo "#define isinf(x) (!finite(x) && x==x)" >>confdefs.h
25723
25724
25725fi
25726
25727LIBS="$LIBS $LIBM"
25728LDFLAGS="$save_LDFLAGS"
25729
25730# Provided by regex.h
25731for ac_func in re_comp
25732do :
25733  ac_fn_c_check_func "$LINENO" "re_comp" "ac_cv_func_re_comp"
25734if test "x$ac_cv_func_re_comp" = xyes; then :
25735  cat >>confdefs.h <<_ACEOF
25736#define HAVE_RE_COMP 1
25737_ACEOF
25738
25739fi
25740done
25741
25742
25743# Provided by socket.h
25744for ac_func in socket
25745do :
25746  ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
25747if test "x$ac_cv_func_socket" = xyes; then :
25748  cat >>confdefs.h <<_ACEOF
25749#define HAVE_SOCKET 1
25750_ACEOF
25751
25752fi
25753done
25754
25755
25756# Provided by utsname.h
25757for ac_func in uname
25758do :
25759  ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
25760if test "x$ac_cv_func_uname" = xyes; then :
25761  cat >>confdefs.h <<_ACEOF
25762#define HAVE_UNAME 1
25763_ACEOF
25764
25765fi
25766done
25767
25768
25769# Provided by wtloop.c
25770for ac_func in setlocale
25771do :
25772  ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
25773if test "x$ac_cv_func_setlocale" = xyes; then :
25774  cat >>confdefs.h <<_ACEOF
25775#define HAVE_SETLOCALE 1
25776_ACEOF
25777
25778fi
25779done
25780
25781
25782# Function memcmp used in modules/fileio/src/c/xls.c
25783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
25784$as_echo_n "checking for working memcmp... " >&6; }
25785if ${ac_cv_func_memcmp_working+:} false; then :
25786  $as_echo_n "(cached) " >&6
25787else
25788  if test "$cross_compiling" = yes; then :
25789  ac_cv_func_memcmp_working=no
25790else
25791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25792/* end confdefs.h.  */
25793$ac_includes_default
25794int
25795main ()
25796{
25797
25798  /* Some versions of memcmp are not 8-bit clean.  */
25799  char c0 = '\100', c1 = '\200', c2 = '\201';
25800  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
25801    return 1;
25802
25803  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
25804     or more and with at least one buffer not starting on a 4-byte boundary.
25805     William Lewis provided this test program.   */
25806  {
25807    char foo[21];
25808    char bar[21];
25809    int i;
25810    for (i = 0; i < 4; i++)
25811      {
25812	char *a = foo + i;
25813	char *b = bar + i;
25814	strcpy (a, "--------01111111");
25815	strcpy (b, "--------10000000");
25816	if (memcmp (a, b, 16) >= 0)
25817	  return 1;
25818      }
25819    return 0;
25820  }
25821
25822  ;
25823  return 0;
25824}
25825_ACEOF
25826if ac_fn_c_try_run "$LINENO"; then :
25827  ac_cv_func_memcmp_working=yes
25828else
25829  ac_cv_func_memcmp_working=no
25830fi
25831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25832  conftest.$ac_objext conftest.beam conftest.$ac_ext
25833fi
25834
25835fi
25836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
25837$as_echo "$ac_cv_func_memcmp_working" >&6; }
25838test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
25839  *" memcmp.$ac_objext "* ) ;;
25840  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
25841 ;;
25842esac
25843
25844
25845
25846# function stat used in modules/core/src/c/link_std.c
25847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
25848$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
25849if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
25850  $as_echo_n "(cached) " >&6
25851else
25852  rm -f conftest.sym conftest.file
25853echo >conftest.file
25854if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
25855  if test "$cross_compiling" = yes; then :
25856  ac_cv_func_lstat_dereferences_slashed_symlink=no
25857else
25858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25859/* end confdefs.h.  */
25860$ac_includes_default
25861int
25862main ()
25863{
25864struct stat sbuf;
25865     /* Linux will dereference the symlink and fail, as required by POSIX.
25866	That is better in the sense that it means we will not
25867	have to compile and use the lstat wrapper.  */
25868     return lstat ("conftest.sym/", &sbuf) == 0;
25869  ;
25870  return 0;
25871}
25872_ACEOF
25873if ac_fn_c_try_run "$LINENO"; then :
25874  ac_cv_func_lstat_dereferences_slashed_symlink=yes
25875else
25876  ac_cv_func_lstat_dereferences_slashed_symlink=no
25877fi
25878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25879  conftest.$ac_objext conftest.beam conftest.$ac_ext
25880fi
25881
25882else
25883  # If the `ln -s' command failed, then we probably don't even
25884  # have an lstat function.
25885  ac_cv_func_lstat_dereferences_slashed_symlink=no
25886fi
25887rm -f conftest.sym conftest.file
25888
25889fi
25890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
25891$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
25892
25893test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
25894
25895cat >>confdefs.h <<_ACEOF
25896#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
25897_ACEOF
25898
25899
25900if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
25901  case " $LIBOBJS " in
25902  *" lstat.$ac_objext "* ) ;;
25903  *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
25904 ;;
25905esac
25906
25907fi
25908
25909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
25910$as_echo_n "checking whether stat accepts an empty string... " >&6; }
25911if ${ac_cv_func_stat_empty_string_bug+:} false; then :
25912  $as_echo_n "(cached) " >&6
25913else
25914  if test "$cross_compiling" = yes; then :
25915  ac_cv_func_stat_empty_string_bug=yes
25916else
25917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25918/* end confdefs.h.  */
25919$ac_includes_default
25920int
25921main ()
25922{
25923struct stat sbuf;
25924  return stat ("", &sbuf) == 0;
25925  ;
25926  return 0;
25927}
25928_ACEOF
25929if ac_fn_c_try_run "$LINENO"; then :
25930  ac_cv_func_stat_empty_string_bug=no
25931else
25932  ac_cv_func_stat_empty_string_bug=yes
25933fi
25934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25935  conftest.$ac_objext conftest.beam conftest.$ac_ext
25936fi
25937
25938fi
25939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
25940$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
25941if test $ac_cv_func_stat_empty_string_bug = yes; then
25942  case " $LIBOBJS " in
25943  *" stat.$ac_objext "* ) ;;
25944  *) LIBOBJS="$LIBOBJS stat.$ac_objext"
25945 ;;
25946esac
25947
25948
25949cat >>confdefs.h <<_ACEOF
25950#define HAVE_STAT_EMPTY_STRING_BUG 1
25951_ACEOF
25952
25953fi
25954
25955
25956# function strtod used in modules/core/src/c/getval.c
25957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
25958$as_echo_n "checking for working strtod... " >&6; }
25959if ${ac_cv_func_strtod+:} false; then :
25960  $as_echo_n "(cached) " >&6
25961else
25962  if test "$cross_compiling" = yes; then :
25963  ac_cv_func_strtod=no
25964else
25965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25966/* end confdefs.h.  */
25967
25968$ac_includes_default
25969#ifndef strtod
25970double strtod ();
25971#endif
25972int
25973main()
25974{
25975  {
25976    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
25977    char *string = " +69";
25978    char *term;
25979    double value;
25980    value = strtod (string, &term);
25981    if (value != 69 || term != (string + 4))
25982      return 1;
25983  }
25984
25985  {
25986    /* Under Solaris 2.4, strtod returns the wrong value for the
25987       terminating character under some conditions.  */
25988    char *string = "NaN";
25989    char *term;
25990    strtod (string, &term);
25991    if (term != string && *(term - 1) == 0)
25992      return 1;
25993  }
25994  return 0;
25995}
25996
25997_ACEOF
25998if ac_fn_c_try_run "$LINENO"; then :
25999  ac_cv_func_strtod=yes
26000else
26001  ac_cv_func_strtod=no
26002fi
26003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26004  conftest.$ac_objext conftest.beam conftest.$ac_ext
26005fi
26006
26007fi
26008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
26009$as_echo "$ac_cv_func_strtod" >&6; }
26010if test $ac_cv_func_strtod = no; then
26011  case " $LIBOBJS " in
26012  *" strtod.$ac_objext "* ) ;;
26013  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
26014 ;;
26015esac
26016
26017ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
26018if test "x$ac_cv_func_pow" = xyes; then :
26019
26020fi
26021
26022if test $ac_cv_func_pow = no; then
26023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
26024$as_echo_n "checking for pow in -lm... " >&6; }
26025if ${ac_cv_lib_m_pow+:} false; then :
26026  $as_echo_n "(cached) " >&6
26027else
26028  ac_check_lib_save_LIBS=$LIBS
26029LIBS="-lm  $LIBS"
26030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26031/* end confdefs.h.  */
26032
26033/* Override any GCC internal prototype to avoid an error.
26034   Use char because int might match the return type of a GCC
26035   builtin and then its argument prototype would still apply.  */
26036#ifdef __cplusplus
26037extern "C"
26038#endif
26039char pow ();
26040int
26041main ()
26042{
26043return pow ();
26044  ;
26045  return 0;
26046}
26047_ACEOF
26048if ac_fn_c_try_link "$LINENO"; then :
26049  ac_cv_lib_m_pow=yes
26050else
26051  ac_cv_lib_m_pow=no
26052fi
26053rm -f core conftest.err conftest.$ac_objext \
26054    conftest$ac_exeext conftest.$ac_ext
26055LIBS=$ac_check_lib_save_LIBS
26056fi
26057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
26058$as_echo "$ac_cv_lib_m_pow" >&6; }
26059if test "x$ac_cv_lib_m_pow" = xyes; then :
26060  POW_LIB=-lm
26061else
26062  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
26063$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
26064fi
26065
26066fi
26067
26068fi
26069
26070
26071########################
26072## test for header files
26073########################
26074
26075for ac_header in limits.h values.h
26076do :
26077  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26078ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26079if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26080  cat >>confdefs.h <<_ACEOF
26081#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26082_ACEOF
26083
26084fi
26085
26086done
26087
26088
26089for ac_header in fcntl.h float.h libintl.h locale.h malloc.h netdb.h netinet/in.h nlist.h sgtty.h stddef.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/utsname.h syslog.h term.h termcap.h termio.h termios.h wchar.h wctype.h time.h
26090do :
26091  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26092ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26093if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26094  cat >>confdefs.h <<_ACEOF
26095#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26096_ACEOF
26097
26098fi
26099
26100done
26101
26102
26103# check header dirent
26104ac_header_dirent=no
26105for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
26106  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
26107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
26108$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
26109if eval \${$as_ac_Header+:} false; then :
26110  $as_echo_n "(cached) " >&6
26111else
26112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26113/* end confdefs.h.  */
26114#include <sys/types.h>
26115#include <$ac_hdr>
26116
26117int
26118main ()
26119{
26120if ((DIR *) 0)
26121return 0;
26122  ;
26123  return 0;
26124}
26125_ACEOF
26126if ac_fn_c_try_compile "$LINENO"; then :
26127  eval "$as_ac_Header=yes"
26128else
26129  eval "$as_ac_Header=no"
26130fi
26131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26132fi
26133eval ac_res=\$$as_ac_Header
26134	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26135$as_echo "$ac_res" >&6; }
26136if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26137  cat >>confdefs.h <<_ACEOF
26138#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
26139_ACEOF
26140
26141ac_header_dirent=$ac_hdr; break
26142fi
26143
26144done
26145# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
26146if test $ac_header_dirent = dirent.h; then
26147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
26148$as_echo_n "checking for library containing opendir... " >&6; }
26149if ${ac_cv_search_opendir+:} false; then :
26150  $as_echo_n "(cached) " >&6
26151else
26152  ac_func_search_save_LIBS=$LIBS
26153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26154/* end confdefs.h.  */
26155
26156/* Override any GCC internal prototype to avoid an error.
26157   Use char because int might match the return type of a GCC
26158   builtin and then its argument prototype would still apply.  */
26159#ifdef __cplusplus
26160extern "C"
26161#endif
26162char opendir ();
26163int
26164main ()
26165{
26166return opendir ();
26167  ;
26168  return 0;
26169}
26170_ACEOF
26171for ac_lib in '' dir; do
26172  if test -z "$ac_lib"; then
26173    ac_res="none required"
26174  else
26175    ac_res=-l$ac_lib
26176    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26177  fi
26178  if ac_fn_c_try_link "$LINENO"; then :
26179  ac_cv_search_opendir=$ac_res
26180fi
26181rm -f core conftest.err conftest.$ac_objext \
26182    conftest$ac_exeext
26183  if ${ac_cv_search_opendir+:} false; then :
26184  break
26185fi
26186done
26187if ${ac_cv_search_opendir+:} false; then :
26188
26189else
26190  ac_cv_search_opendir=no
26191fi
26192rm conftest.$ac_ext
26193LIBS=$ac_func_search_save_LIBS
26194fi
26195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
26196$as_echo "$ac_cv_search_opendir" >&6; }
26197ac_res=$ac_cv_search_opendir
26198if test "$ac_res" != no; then :
26199  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26200
26201fi
26202
26203else
26204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
26205$as_echo_n "checking for library containing opendir... " >&6; }
26206if ${ac_cv_search_opendir+:} false; then :
26207  $as_echo_n "(cached) " >&6
26208else
26209  ac_func_search_save_LIBS=$LIBS
26210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26211/* end confdefs.h.  */
26212
26213/* Override any GCC internal prototype to avoid an error.
26214   Use char because int might match the return type of a GCC
26215   builtin and then its argument prototype would still apply.  */
26216#ifdef __cplusplus
26217extern "C"
26218#endif
26219char opendir ();
26220int
26221main ()
26222{
26223return opendir ();
26224  ;
26225  return 0;
26226}
26227_ACEOF
26228for ac_lib in '' x; do
26229  if test -z "$ac_lib"; then
26230    ac_res="none required"
26231  else
26232    ac_res=-l$ac_lib
26233    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26234  fi
26235  if ac_fn_c_try_link "$LINENO"; then :
26236  ac_cv_search_opendir=$ac_res
26237fi
26238rm -f core conftest.err conftest.$ac_objext \
26239    conftest$ac_exeext
26240  if ${ac_cv_search_opendir+:} false; then :
26241  break
26242fi
26243done
26244if ${ac_cv_search_opendir+:} false; then :
26245
26246else
26247  ac_cv_search_opendir=no
26248fi
26249rm conftest.$ac_ext
26250LIBS=$ac_func_search_save_LIBS
26251fi
26252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
26253$as_echo "$ac_cv_search_opendir" >&6; }
26254ac_res=$ac_cv_search_opendir
26255if test "$ac_res" != no; then :
26256  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26257
26258fi
26259
26260fi
26261
26262
26263# static struct timeval defined or not | used in modules/core/src/c/timer.c
26264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
26265$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
26266if ${ac_cv_header_time+:} false; then :
26267  $as_echo_n "(cached) " >&6
26268else
26269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26270/* end confdefs.h.  */
26271#include <sys/types.h>
26272#include <sys/time.h>
26273#include <time.h>
26274
26275int
26276main ()
26277{
26278if ((struct tm *) 0)
26279return 0;
26280  ;
26281  return 0;
26282}
26283_ACEOF
26284if ac_fn_c_try_compile "$LINENO"; then :
26285  ac_cv_header_time=yes
26286else
26287  ac_cv_header_time=no
26288fi
26289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26290fi
26291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
26292$as_echo "$ac_cv_header_time" >&6; }
26293if test $ac_cv_header_time = yes; then
26294
26295$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
26296
26297fi
26298
26299
26300# check if the specific header is available or not | used in modules/core/src/c/link_SYSV.c
26301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
26302$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
26303if ${ac_cv_header_sys_wait_h+:} false; then :
26304  $as_echo_n "(cached) " >&6
26305else
26306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26307/* end confdefs.h.  */
26308#include <sys/types.h>
26309#include <sys/wait.h>
26310#ifndef WEXITSTATUS
26311# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
26312#endif
26313#ifndef WIFEXITED
26314# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
26315#endif
26316
26317int
26318main ()
26319{
26320  int s;
26321  wait (&s);
26322  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
26323  ;
26324  return 0;
26325}
26326_ACEOF
26327if ac_fn_c_try_compile "$LINENO"; then :
26328  ac_cv_header_sys_wait_h=yes
26329else
26330  ac_cv_header_sys_wait_h=no
26331fi
26332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26333fi
26334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
26335$as_echo "$ac_cv_header_sys_wait_h" >&6; }
26336if test $ac_cv_header_sys_wait_h = yes; then
26337
26338$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
26339
26340fi
26341
26342
26343
26344#######################
26345## Test for structures ##
26346#######################
26347ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
26348if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
26349
26350cat >>confdefs.h <<_ACEOF
26351#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
26352_ACEOF
26353
26354
26355fi
26356
26357ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
26358if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
26359
26360cat >>confdefs.h <<_ACEOF
26361#define HAVE_STRUCT_STAT_ST_RDEV 1
26362_ACEOF
26363
26364
26365fi
26366
26367
26368
26369#######################
26370## MISC Test
26371#######################
26372
26373# gettext.  See http://www.gnu.org/software/hello/manual/gettext/AM_005fGNU_005fGETTEXT.html
26374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
26375$as_echo_n "checking for a sed that does not truncate output... " >&6; }
26376if ${ac_cv_path_SED+:} false; then :
26377  $as_echo_n "(cached) " >&6
26378else
26379            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
26380     for ac_i in 1 2 3 4 5 6 7; do
26381       ac_script="$ac_script$as_nl$ac_script"
26382     done
26383     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
26384     { ac_script=; unset ac_script;}
26385     if test -z "$SED"; then
26386  ac_path_SED_found=false
26387  # Loop through the user's path and test for each of PROGNAME-LIST
26388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26389for as_dir in $PATH
26390do
26391  IFS=$as_save_IFS
26392  test -z "$as_dir" && as_dir=.
26393    for ac_prog in sed gsed; do
26394    for ac_exec_ext in '' $ac_executable_extensions; do
26395      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
26396      as_fn_executable_p "$ac_path_SED" || continue
26397# Check for GNU ac_path_SED and select it if it is found.
26398  # Check for GNU $ac_path_SED
26399case `"$ac_path_SED" --version 2>&1` in
26400*GNU*)
26401  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
26402*)
26403  ac_count=0
26404  $as_echo_n 0123456789 >"conftest.in"
26405  while :
26406  do
26407    cat "conftest.in" "conftest.in" >"conftest.tmp"
26408    mv "conftest.tmp" "conftest.in"
26409    cp "conftest.in" "conftest.nl"
26410    $as_echo '' >> "conftest.nl"
26411    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
26412    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
26413    as_fn_arith $ac_count + 1 && ac_count=$as_val
26414    if test $ac_count -gt ${ac_path_SED_max-0}; then
26415      # Best one so far, save it but keep looking for a better one
26416      ac_cv_path_SED="$ac_path_SED"
26417      ac_path_SED_max=$ac_count
26418    fi
26419    # 10*(2^10) chars as input seems more than enough
26420    test $ac_count -gt 10 && break
26421  done
26422  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
26423esac
26424
26425      $ac_path_SED_found && break 3
26426    done
26427  done
26428  done
26429IFS=$as_save_IFS
26430  if test -z "$ac_cv_path_SED"; then
26431    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
26432  fi
26433else
26434  ac_cv_path_SED=$SED
26435fi
26436
26437fi
26438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
26439$as_echo "$ac_cv_path_SED" >&6; }
26440 SED="$ac_cv_path_SED"
26441  rm -f conftest.sed
26442
26443
26444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
26445$as_echo_n "checking whether NLS is requested... " >&6; }
26446    # Check whether --enable-nls was given.
26447if test "${enable_nls+set}" = set; then :
26448  enableval=$enable_nls; USE_NLS=$enableval
26449else
26450  USE_NLS=yes
26451fi
26452
26453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
26454$as_echo "$USE_NLS" >&6; }
26455
26456
26457
26458
26459      GETTEXT_MACRO_VERSION=0.19
26460
26461
26462
26463
26464# Prepare PATH_SEPARATOR.
26465# The user is always right.
26466if test "${PATH_SEPARATOR+set}" != set; then
26467  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
26468  # contains only /bin. Note that ksh looks also at the FPATH variable,
26469  # so we have to set that as well for the test.
26470  PATH_SEPARATOR=:
26471  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
26472    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
26473           || PATH_SEPARATOR=';'
26474       }
26475fi
26476
26477# Find out how to test for executable files. Don't use a zero-byte file,
26478# as systems may use methods other than mode bits to determine executability.
26479cat >conf$$.file <<_ASEOF
26480#! /bin/sh
26481exit 0
26482_ASEOF
26483chmod +x conf$$.file
26484if test -x conf$$.file >/dev/null 2>&1; then
26485  ac_executable_p="test -x"
26486else
26487  ac_executable_p="test -f"
26488fi
26489rm -f conf$$.file
26490
26491# Extract the first word of "msgfmt", so it can be a program name with args.
26492set dummy msgfmt; ac_word=$2
26493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26494$as_echo_n "checking for $ac_word... " >&6; }
26495if ${ac_cv_path_MSGFMT+:} false; then :
26496  $as_echo_n "(cached) " >&6
26497else
26498  case "$MSGFMT" in
26499  [\\/]* | ?:[\\/]*)
26500    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
26501    ;;
26502  *)
26503    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
26504    for ac_dir in $PATH; do
26505      IFS="$ac_save_IFS"
26506      test -z "$ac_dir" && ac_dir=.
26507      for ac_exec_ext in '' $ac_executable_extensions; do
26508        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
26509          echo "$as_me: trying $ac_dir/$ac_word..." >&5
26510          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
26511     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
26512            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
26513            break 2
26514          fi
26515        fi
26516      done
26517    done
26518    IFS="$ac_save_IFS"
26519  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
26520    ;;
26521esac
26522fi
26523MSGFMT="$ac_cv_path_MSGFMT"
26524if test "$MSGFMT" != ":"; then
26525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
26526$as_echo "$MSGFMT" >&6; }
26527else
26528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26529$as_echo "no" >&6; }
26530fi
26531
26532  # Extract the first word of "gmsgfmt", so it can be a program name with args.
26533set dummy gmsgfmt; ac_word=$2
26534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26535$as_echo_n "checking for $ac_word... " >&6; }
26536if ${ac_cv_path_GMSGFMT+:} false; then :
26537  $as_echo_n "(cached) " >&6
26538else
26539  case $GMSGFMT in
26540  [\\/]* | ?:[\\/]*)
26541  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
26542  ;;
26543  *)
26544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26545for as_dir in $PATH
26546do
26547  IFS=$as_save_IFS
26548  test -z "$as_dir" && as_dir=.
26549    for ac_exec_ext in '' $ac_executable_extensions; do
26550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26551    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
26552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26553    break 2
26554  fi
26555done
26556  done
26557IFS=$as_save_IFS
26558
26559  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
26560  ;;
26561esac
26562fi
26563GMSGFMT=$ac_cv_path_GMSGFMT
26564if test -n "$GMSGFMT"; then
26565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
26566$as_echo "$GMSGFMT" >&6; }
26567else
26568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26569$as_echo "no" >&6; }
26570fi
26571
26572
26573
26574    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
26575    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
26576    *) MSGFMT_015=$MSGFMT ;;
26577  esac
26578
26579  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
26580    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
26581    *) GMSGFMT_015=$GMSGFMT ;;
26582  esac
26583
26584
26585
26586# Prepare PATH_SEPARATOR.
26587# The user is always right.
26588if test "${PATH_SEPARATOR+set}" != set; then
26589  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
26590  # contains only /bin. Note that ksh looks also at the FPATH variable,
26591  # so we have to set that as well for the test.
26592  PATH_SEPARATOR=:
26593  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
26594    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
26595           || PATH_SEPARATOR=';'
26596       }
26597fi
26598
26599# Find out how to test for executable files. Don't use a zero-byte file,
26600# as systems may use methods other than mode bits to determine executability.
26601cat >conf$$.file <<_ASEOF
26602#! /bin/sh
26603exit 0
26604_ASEOF
26605chmod +x conf$$.file
26606if test -x conf$$.file >/dev/null 2>&1; then
26607  ac_executable_p="test -x"
26608else
26609  ac_executable_p="test -f"
26610fi
26611rm -f conf$$.file
26612
26613# Extract the first word of "xgettext", so it can be a program name with args.
26614set dummy xgettext; ac_word=$2
26615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26616$as_echo_n "checking for $ac_word... " >&6; }
26617if ${ac_cv_path_XGETTEXT+:} false; then :
26618  $as_echo_n "(cached) " >&6
26619else
26620  case "$XGETTEXT" in
26621  [\\/]* | ?:[\\/]*)
26622    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
26623    ;;
26624  *)
26625    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
26626    for ac_dir in $PATH; do
26627      IFS="$ac_save_IFS"
26628      test -z "$ac_dir" && ac_dir=.
26629      for ac_exec_ext in '' $ac_executable_extensions; do
26630        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
26631          echo "$as_me: trying $ac_dir/$ac_word..." >&5
26632          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
26633     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
26634            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
26635            break 2
26636          fi
26637        fi
26638      done
26639    done
26640    IFS="$ac_save_IFS"
26641  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
26642    ;;
26643esac
26644fi
26645XGETTEXT="$ac_cv_path_XGETTEXT"
26646if test "$XGETTEXT" != ":"; then
26647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
26648$as_echo "$XGETTEXT" >&6; }
26649else
26650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26651$as_echo "no" >&6; }
26652fi
26653
26654    rm -f messages.po
26655
26656    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
26657    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
26658    *) XGETTEXT_015=$XGETTEXT ;;
26659  esac
26660
26661
26662
26663# Prepare PATH_SEPARATOR.
26664# The user is always right.
26665if test "${PATH_SEPARATOR+set}" != set; then
26666  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
26667  # contains only /bin. Note that ksh looks also at the FPATH variable,
26668  # so we have to set that as well for the test.
26669  PATH_SEPARATOR=:
26670  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
26671    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
26672           || PATH_SEPARATOR=';'
26673       }
26674fi
26675
26676# Find out how to test for executable files. Don't use a zero-byte file,
26677# as systems may use methods other than mode bits to determine executability.
26678cat >conf$$.file <<_ASEOF
26679#! /bin/sh
26680exit 0
26681_ASEOF
26682chmod +x conf$$.file
26683if test -x conf$$.file >/dev/null 2>&1; then
26684  ac_executable_p="test -x"
26685else
26686  ac_executable_p="test -f"
26687fi
26688rm -f conf$$.file
26689
26690# Extract the first word of "msgmerge", so it can be a program name with args.
26691set dummy msgmerge; ac_word=$2
26692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26693$as_echo_n "checking for $ac_word... " >&6; }
26694if ${ac_cv_path_MSGMERGE+:} false; then :
26695  $as_echo_n "(cached) " >&6
26696else
26697  case "$MSGMERGE" in
26698  [\\/]* | ?:[\\/]*)
26699    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
26700    ;;
26701  *)
26702    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
26703    for ac_dir in $PATH; do
26704      IFS="$ac_save_IFS"
26705      test -z "$ac_dir" && ac_dir=.
26706      for ac_exec_ext in '' $ac_executable_extensions; do
26707        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
26708          echo "$as_me: trying $ac_dir/$ac_word..." >&5
26709          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
26710            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
26711            break 2
26712          fi
26713        fi
26714      done
26715    done
26716    IFS="$ac_save_IFS"
26717  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
26718    ;;
26719esac
26720fi
26721MSGMERGE="$ac_cv_path_MSGMERGE"
26722if test "$MSGMERGE" != ":"; then
26723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
26724$as_echo "$MSGMERGE" >&6; }
26725else
26726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26727$as_echo "no" >&6; }
26728fi
26729
26730
26731        test -n "$localedir" || localedir='${datadir}/locale'
26732
26733
26734    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
26735
26736
26737  ac_config_commands="$ac_config_commands po-directories"
26738
26739
26740
26741      if test "X$prefix" = "XNONE"; then
26742    acl_final_prefix="$ac_default_prefix"
26743  else
26744    acl_final_prefix="$prefix"
26745  fi
26746  if test "X$exec_prefix" = "XNONE"; then
26747    acl_final_exec_prefix='${prefix}'
26748  else
26749    acl_final_exec_prefix="$exec_prefix"
26750  fi
26751  acl_save_prefix="$prefix"
26752  prefix="$acl_final_prefix"
26753  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
26754  prefix="$acl_save_prefix"
26755
26756
26757
26758  acl_libdirstem=lib
26759  acl_libdirstem2=
26760  case "$host_os" in
26761    solaris*)
26762                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
26763$as_echo_n "checking for 64-bit host... " >&6; }
26764if ${gl_cv_solaris_64bit+:} false; then :
26765  $as_echo_n "(cached) " >&6
26766else
26767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26768/* end confdefs.h.  */
26769
26770#ifdef _LP64
26771sixtyfour bits
26772#endif
26773
26774_ACEOF
26775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26776  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
26777  gl_cv_solaris_64bit=yes
26778else
26779  gl_cv_solaris_64bit=no
26780fi
26781rm -f conftest*
26782
26783
26784fi
26785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
26786$as_echo "$gl_cv_solaris_64bit" >&6; }
26787      if test $gl_cv_solaris_64bit = yes; then
26788        acl_libdirstem=lib/64
26789        case "$host_cpu" in
26790          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
26791          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
26792        esac
26793      fi
26794      ;;
26795    *)
26796      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
26797      if test -n "$searchpath"; then
26798        acl_save_IFS="${IFS= 	}"; IFS=":"
26799        for searchdir in $searchpath; do
26800          if test -d "$searchdir"; then
26801            case "$searchdir" in
26802              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
26803              */../ | */.. )
26804                # Better ignore directories of this form. They are misleading.
26805                ;;
26806              *) searchdir=`cd "$searchdir" && pwd`
26807                 case "$searchdir" in
26808                   */lib64 ) acl_libdirstem=lib64 ;;
26809                 esac ;;
26810            esac
26811          fi
26812        done
26813        IFS="$acl_save_IFS"
26814      fi
26815      ;;
26816  esac
26817  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830    use_additional=yes
26831
26832  acl_save_prefix="$prefix"
26833  prefix="$acl_final_prefix"
26834  acl_save_exec_prefix="$exec_prefix"
26835  exec_prefix="$acl_final_exec_prefix"
26836
26837    eval additional_includedir=\"$includedir\"
26838    eval additional_libdir=\"$libdir\"
26839
26840  exec_prefix="$acl_save_exec_prefix"
26841  prefix="$acl_save_prefix"
26842
26843
26844# Check whether --with-libiconv-prefix was given.
26845if test "${with_libiconv_prefix+set}" = set; then :
26846  withval=$with_libiconv_prefix;
26847    if test "X$withval" = "Xno"; then
26848      use_additional=no
26849    else
26850      if test "X$withval" = "X"; then
26851
26852  acl_save_prefix="$prefix"
26853  prefix="$acl_final_prefix"
26854  acl_save_exec_prefix="$exec_prefix"
26855  exec_prefix="$acl_final_exec_prefix"
26856
26857          eval additional_includedir=\"$includedir\"
26858          eval additional_libdir=\"$libdir\"
26859
26860  exec_prefix="$acl_save_exec_prefix"
26861  prefix="$acl_save_prefix"
26862
26863      else
26864        additional_includedir="$withval/include"
26865        additional_libdir="$withval/$acl_libdirstem"
26866        if test "$acl_libdirstem2" != "$acl_libdirstem" \
26867           && ! test -d "$withval/$acl_libdirstem"; then
26868          additional_libdir="$withval/$acl_libdirstem2"
26869        fi
26870      fi
26871    fi
26872
26873fi
26874
26875      LIBICONV=
26876  LTLIBICONV=
26877  INCICONV=
26878  LIBICONV_PREFIX=
26879      HAVE_LIBICONV=
26880  rpathdirs=
26881  ltrpathdirs=
26882  names_already_handled=
26883  names_next_round='iconv '
26884  while test -n "$names_next_round"; do
26885    names_this_round="$names_next_round"
26886    names_next_round=
26887    for name in $names_this_round; do
26888      already_handled=
26889      for n in $names_already_handled; do
26890        if test "$n" = "$name"; then
26891          already_handled=yes
26892          break
26893        fi
26894      done
26895      if test -z "$already_handled"; then
26896        names_already_handled="$names_already_handled $name"
26897                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
26898        eval value=\"\$HAVE_LIB$uppername\"
26899        if test -n "$value"; then
26900          if test "$value" = yes; then
26901            eval value=\"\$LIB$uppername\"
26902            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
26903            eval value=\"\$LTLIB$uppername\"
26904            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
26905          else
26906                                    :
26907          fi
26908        else
26909                              found_dir=
26910          found_la=
26911          found_so=
26912          found_a=
26913          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
26914          if test -n "$acl_shlibext"; then
26915            shrext=".$acl_shlibext"             # typically: shrext=.so
26916          else
26917            shrext=
26918          fi
26919          if test $use_additional = yes; then
26920            dir="$additional_libdir"
26921                                    if test -n "$acl_shlibext"; then
26922              if test -f "$dir/$libname$shrext"; then
26923                found_dir="$dir"
26924                found_so="$dir/$libname$shrext"
26925              else
26926                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
26927                  ver=`(cd "$dir" && \
26928                        for f in "$libname$shrext".*; do echo "$f"; done \
26929                        | sed -e "s,^$libname$shrext\\\\.,," \
26930                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
26931                        | sed 1q ) 2>/dev/null`
26932                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
26933                    found_dir="$dir"
26934                    found_so="$dir/$libname$shrext.$ver"
26935                  fi
26936                else
26937                  eval library_names=\"$acl_library_names_spec\"
26938                  for f in $library_names; do
26939                    if test -f "$dir/$f"; then
26940                      found_dir="$dir"
26941                      found_so="$dir/$f"
26942                      break
26943                    fi
26944                  done
26945                fi
26946              fi
26947            fi
26948                        if test "X$found_dir" = "X"; then
26949              if test -f "$dir/$libname.$acl_libext"; then
26950                found_dir="$dir"
26951                found_a="$dir/$libname.$acl_libext"
26952              fi
26953            fi
26954            if test "X$found_dir" != "X"; then
26955              if test -f "$dir/$libname.la"; then
26956                found_la="$dir/$libname.la"
26957              fi
26958            fi
26959          fi
26960          if test "X$found_dir" = "X"; then
26961            for x in $LDFLAGS $LTLIBICONV; do
26962
26963  acl_save_prefix="$prefix"
26964  prefix="$acl_final_prefix"
26965  acl_save_exec_prefix="$exec_prefix"
26966  exec_prefix="$acl_final_exec_prefix"
26967  eval x=\"$x\"
26968  exec_prefix="$acl_save_exec_prefix"
26969  prefix="$acl_save_prefix"
26970
26971              case "$x" in
26972                -L*)
26973                  dir=`echo "X$x" | sed -e 's/^X-L//'`
26974                                    if test -n "$acl_shlibext"; then
26975                    if test -f "$dir/$libname$shrext"; then
26976                      found_dir="$dir"
26977                      found_so="$dir/$libname$shrext"
26978                    else
26979                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
26980                        ver=`(cd "$dir" && \
26981                              for f in "$libname$shrext".*; do echo "$f"; done \
26982                              | sed -e "s,^$libname$shrext\\\\.,," \
26983                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
26984                              | sed 1q ) 2>/dev/null`
26985                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
26986                          found_dir="$dir"
26987                          found_so="$dir/$libname$shrext.$ver"
26988                        fi
26989                      else
26990                        eval library_names=\"$acl_library_names_spec\"
26991                        for f in $library_names; do
26992                          if test -f "$dir/$f"; then
26993                            found_dir="$dir"
26994                            found_so="$dir/$f"
26995                            break
26996                          fi
26997                        done
26998                      fi
26999                    fi
27000                  fi
27001                                    if test "X$found_dir" = "X"; then
27002                    if test -f "$dir/$libname.$acl_libext"; then
27003                      found_dir="$dir"
27004                      found_a="$dir/$libname.$acl_libext"
27005                    fi
27006                  fi
27007                  if test "X$found_dir" != "X"; then
27008                    if test -f "$dir/$libname.la"; then
27009                      found_la="$dir/$libname.la"
27010                    fi
27011                  fi
27012                  ;;
27013              esac
27014              if test "X$found_dir" != "X"; then
27015                break
27016              fi
27017            done
27018          fi
27019          if test "X$found_dir" != "X"; then
27020                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
27021            if test "X$found_so" != "X"; then
27022                                                        if test "$enable_rpath" = no \
27023                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
27024                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
27025                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
27026              else
27027                                                                                haveit=
27028                for x in $ltrpathdirs; do
27029                  if test "X$x" = "X$found_dir"; then
27030                    haveit=yes
27031                    break
27032                  fi
27033                done
27034                if test -z "$haveit"; then
27035                  ltrpathdirs="$ltrpathdirs $found_dir"
27036                fi
27037                                if test "$acl_hardcode_direct" = yes; then
27038                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
27039                else
27040                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
27041                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
27042                                                            haveit=
27043                    for x in $rpathdirs; do
27044                      if test "X$x" = "X$found_dir"; then
27045                        haveit=yes
27046                        break
27047                      fi
27048                    done
27049                    if test -z "$haveit"; then
27050                      rpathdirs="$rpathdirs $found_dir"
27051                    fi
27052                  else
27053                                                                                haveit=
27054                    for x in $LDFLAGS $LIBICONV; do
27055
27056  acl_save_prefix="$prefix"
27057  prefix="$acl_final_prefix"
27058  acl_save_exec_prefix="$exec_prefix"
27059  exec_prefix="$acl_final_exec_prefix"
27060  eval x=\"$x\"
27061  exec_prefix="$acl_save_exec_prefix"
27062  prefix="$acl_save_prefix"
27063
27064                      if test "X$x" = "X-L$found_dir"; then
27065                        haveit=yes
27066                        break
27067                      fi
27068                    done
27069                    if test -z "$haveit"; then
27070                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
27071                    fi
27072                    if test "$acl_hardcode_minus_L" != no; then
27073                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
27074                    else
27075                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
27076                    fi
27077                  fi
27078                fi
27079              fi
27080            else
27081              if test "X$found_a" != "X"; then
27082                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
27083              else
27084                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
27085              fi
27086            fi
27087                        additional_includedir=
27088            case "$found_dir" in
27089              */$acl_libdirstem | */$acl_libdirstem/)
27090                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
27091                if test "$name" = 'iconv'; then
27092                  LIBICONV_PREFIX="$basedir"
27093                fi
27094                additional_includedir="$basedir/include"
27095                ;;
27096              */$acl_libdirstem2 | */$acl_libdirstem2/)
27097                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
27098                if test "$name" = 'iconv'; then
27099                  LIBICONV_PREFIX="$basedir"
27100                fi
27101                additional_includedir="$basedir/include"
27102                ;;
27103            esac
27104            if test "X$additional_includedir" != "X"; then
27105                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
27106                haveit=
27107                if test "X$additional_includedir" = "X/usr/local/include"; then
27108                  if test -n "$GCC"; then
27109                    case $host_os in
27110                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
27111                    esac
27112                  fi
27113                fi
27114                if test -z "$haveit"; then
27115                  for x in $CPPFLAGS $INCICONV; do
27116
27117  acl_save_prefix="$prefix"
27118  prefix="$acl_final_prefix"
27119  acl_save_exec_prefix="$exec_prefix"
27120  exec_prefix="$acl_final_exec_prefix"
27121  eval x=\"$x\"
27122  exec_prefix="$acl_save_exec_prefix"
27123  prefix="$acl_save_prefix"
27124
27125                    if test "X$x" = "X-I$additional_includedir"; then
27126                      haveit=yes
27127                      break
27128                    fi
27129                  done
27130                  if test -z "$haveit"; then
27131                    if test -d "$additional_includedir"; then
27132                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
27133                    fi
27134                  fi
27135                fi
27136              fi
27137            fi
27138                        if test -n "$found_la"; then
27139                                                        save_libdir="$libdir"
27140              case "$found_la" in
27141                */* | *\\*) . "$found_la" ;;
27142                *) . "./$found_la" ;;
27143              esac
27144              libdir="$save_libdir"
27145                            for dep in $dependency_libs; do
27146                case "$dep" in
27147                  -L*)
27148                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
27149                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
27150                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
27151                      haveit=
27152                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
27153                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
27154                        if test -n "$GCC"; then
27155                          case $host_os in
27156                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
27157                          esac
27158                        fi
27159                      fi
27160                      if test -z "$haveit"; then
27161                        haveit=
27162                        for x in $LDFLAGS $LIBICONV; do
27163
27164  acl_save_prefix="$prefix"
27165  prefix="$acl_final_prefix"
27166  acl_save_exec_prefix="$exec_prefix"
27167  exec_prefix="$acl_final_exec_prefix"
27168  eval x=\"$x\"
27169  exec_prefix="$acl_save_exec_prefix"
27170  prefix="$acl_save_prefix"
27171
27172                          if test "X$x" = "X-L$additional_libdir"; then
27173                            haveit=yes
27174                            break
27175                          fi
27176                        done
27177                        if test -z "$haveit"; then
27178                          if test -d "$additional_libdir"; then
27179                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
27180                          fi
27181                        fi
27182                        haveit=
27183                        for x in $LDFLAGS $LTLIBICONV; do
27184
27185  acl_save_prefix="$prefix"
27186  prefix="$acl_final_prefix"
27187  acl_save_exec_prefix="$exec_prefix"
27188  exec_prefix="$acl_final_exec_prefix"
27189  eval x=\"$x\"
27190  exec_prefix="$acl_save_exec_prefix"
27191  prefix="$acl_save_prefix"
27192
27193                          if test "X$x" = "X-L$additional_libdir"; then
27194                            haveit=yes
27195                            break
27196                          fi
27197                        done
27198                        if test -z "$haveit"; then
27199                          if test -d "$additional_libdir"; then
27200                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
27201                          fi
27202                        fi
27203                      fi
27204                    fi
27205                    ;;
27206                  -R*)
27207                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
27208                    if test "$enable_rpath" != no; then
27209                                                                  haveit=
27210                      for x in $rpathdirs; do
27211                        if test "X$x" = "X$dir"; then
27212                          haveit=yes
27213                          break
27214                        fi
27215                      done
27216                      if test -z "$haveit"; then
27217                        rpathdirs="$rpathdirs $dir"
27218                      fi
27219                                                                  haveit=
27220                      for x in $ltrpathdirs; do
27221                        if test "X$x" = "X$dir"; then
27222                          haveit=yes
27223                          break
27224                        fi
27225                      done
27226                      if test -z "$haveit"; then
27227                        ltrpathdirs="$ltrpathdirs $dir"
27228                      fi
27229                    fi
27230                    ;;
27231                  -l*)
27232                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
27233                    ;;
27234                  *.la)
27235                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
27236                    ;;
27237                  *)
27238                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
27239                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
27240                    ;;
27241                esac
27242              done
27243            fi
27244          else
27245                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
27246            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
27247          fi
27248        fi
27249      fi
27250    done
27251  done
27252  if test "X$rpathdirs" != "X"; then
27253    if test -n "$acl_hardcode_libdir_separator"; then
27254                        alldirs=
27255      for found_dir in $rpathdirs; do
27256        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
27257      done
27258            acl_save_libdir="$libdir"
27259      libdir="$alldirs"
27260      eval flag=\"$acl_hardcode_libdir_flag_spec\"
27261      libdir="$acl_save_libdir"
27262      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
27263    else
27264            for found_dir in $rpathdirs; do
27265        acl_save_libdir="$libdir"
27266        libdir="$found_dir"
27267        eval flag=\"$acl_hardcode_libdir_flag_spec\"
27268        libdir="$acl_save_libdir"
27269        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
27270      done
27271    fi
27272  fi
27273  if test "X$ltrpathdirs" != "X"; then
27274            for found_dir in $ltrpathdirs; do
27275      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
27276    done
27277  fi
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
27310$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
27311if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
27312  $as_echo_n "(cached) " >&6
27313else
27314  gt_save_LIBS="$LIBS"
27315     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
27316     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27317/* end confdefs.h.  */
27318#include <CoreFoundation/CFPreferences.h>
27319int
27320main ()
27321{
27322CFPreferencesCopyAppValue(NULL, NULL)
27323  ;
27324  return 0;
27325}
27326_ACEOF
27327if ac_fn_c_try_link "$LINENO"; then :
27328  gt_cv_func_CFPreferencesCopyAppValue=yes
27329else
27330  gt_cv_func_CFPreferencesCopyAppValue=no
27331fi
27332rm -f core conftest.err conftest.$ac_objext \
27333    conftest$ac_exeext conftest.$ac_ext
27334     LIBS="$gt_save_LIBS"
27335fi
27336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
27337$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
27338  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
27339
27340$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
27341
27342  fi
27343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
27344$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
27345if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
27346  $as_echo_n "(cached) " >&6
27347else
27348  gt_save_LIBS="$LIBS"
27349     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
27350     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27351/* end confdefs.h.  */
27352#include <CoreFoundation/CFLocale.h>
27353int
27354main ()
27355{
27356CFLocaleCopyCurrent();
27357  ;
27358  return 0;
27359}
27360_ACEOF
27361if ac_fn_c_try_link "$LINENO"; then :
27362  gt_cv_func_CFLocaleCopyCurrent=yes
27363else
27364  gt_cv_func_CFLocaleCopyCurrent=no
27365fi
27366rm -f core conftest.err conftest.$ac_objext \
27367    conftest$ac_exeext conftest.$ac_ext
27368     LIBS="$gt_save_LIBS"
27369fi
27370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
27371$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
27372  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
27373
27374$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
27375
27376  fi
27377  INTL_MACOSX_LIBS=
27378  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
27379    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
27380  fi
27381
27382
27383
27384
27385
27386
27387  LIBINTL=
27388  LTLIBINTL=
27389  POSUB=
27390
27391    case " $gt_needs " in
27392    *" need-formatstring-macros "*) gt_api_version=3 ;;
27393    *" need-ngettext "*) gt_api_version=2 ;;
27394    *) gt_api_version=1 ;;
27395  esac
27396  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
27397  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
27398
27399    if test "$USE_NLS" = "yes"; then
27400    gt_use_preinstalled_gnugettext=no
27401
27402
27403        if test $gt_api_version -ge 3; then
27404          gt_revision_test_code='
27405#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
27406#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
27407#endif
27408typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
27409'
27410        else
27411          gt_revision_test_code=
27412        fi
27413        if test $gt_api_version -ge 2; then
27414          gt_expression_test_code=' + * ngettext ("", "", 0)'
27415        else
27416          gt_expression_test_code=
27417        fi
27418
27419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
27420$as_echo_n "checking for GNU gettext in libc... " >&6; }
27421if eval \${$gt_func_gnugettext_libc+:} false; then :
27422  $as_echo_n "(cached) " >&6
27423else
27424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27425/* end confdefs.h.  */
27426
27427#include <libintl.h>
27428#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
27429extern int _nl_msg_cat_cntr;
27430extern int *_nl_domain_bindings;
27431#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
27432#else
27433#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
27434#endif
27435$gt_revision_test_code
27436
27437int
27438main ()
27439{
27440
27441bindtextdomain ("", "");
27442return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
27443
27444  ;
27445  return 0;
27446}
27447_ACEOF
27448if ac_fn_c_try_link "$LINENO"; then :
27449  eval "$gt_func_gnugettext_libc=yes"
27450else
27451  eval "$gt_func_gnugettext_libc=no"
27452fi
27453rm -f core conftest.err conftest.$ac_objext \
27454    conftest$ac_exeext conftest.$ac_ext
27455fi
27456eval ac_res=\$$gt_func_gnugettext_libc
27457	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27458$as_echo "$ac_res" >&6; }
27459
27460        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
27461
27462
27463
27464
27465
27466          am_save_CPPFLAGS="$CPPFLAGS"
27467
27468  for element in $INCICONV; do
27469    haveit=
27470    for x in $CPPFLAGS; do
27471
27472  acl_save_prefix="$prefix"
27473  prefix="$acl_final_prefix"
27474  acl_save_exec_prefix="$exec_prefix"
27475  exec_prefix="$acl_final_exec_prefix"
27476  eval x=\"$x\"
27477  exec_prefix="$acl_save_exec_prefix"
27478  prefix="$acl_save_prefix"
27479
27480      if test "X$x" = "X$element"; then
27481        haveit=yes
27482        break
27483      fi
27484    done
27485    if test -z "$haveit"; then
27486      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
27487    fi
27488  done
27489
27490
27491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
27492$as_echo_n "checking for iconv... " >&6; }
27493if ${am_cv_func_iconv+:} false; then :
27494  $as_echo_n "(cached) " >&6
27495else
27496
27497    am_cv_func_iconv="no, consider installing GNU libiconv"
27498    am_cv_lib_iconv=no
27499    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27500/* end confdefs.h.  */
27501
27502#include <stdlib.h>
27503#include <iconv.h>
27504
27505int
27506main ()
27507{
27508iconv_t cd = iconv_open("","");
27509           iconv(cd,NULL,NULL,NULL,NULL);
27510           iconv_close(cd);
27511  ;
27512  return 0;
27513}
27514_ACEOF
27515if ac_fn_c_try_link "$LINENO"; then :
27516  am_cv_func_iconv=yes
27517fi
27518rm -f core conftest.err conftest.$ac_objext \
27519    conftest$ac_exeext conftest.$ac_ext
27520    if test "$am_cv_func_iconv" != yes; then
27521      am_save_LIBS="$LIBS"
27522      LIBS="$LIBS $LIBICONV"
27523      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27524/* end confdefs.h.  */
27525
27526#include <stdlib.h>
27527#include <iconv.h>
27528
27529int
27530main ()
27531{
27532iconv_t cd = iconv_open("","");
27533             iconv(cd,NULL,NULL,NULL,NULL);
27534             iconv_close(cd);
27535  ;
27536  return 0;
27537}
27538_ACEOF
27539if ac_fn_c_try_link "$LINENO"; then :
27540  am_cv_lib_iconv=yes
27541        am_cv_func_iconv=yes
27542fi
27543rm -f core conftest.err conftest.$ac_objext \
27544    conftest$ac_exeext conftest.$ac_ext
27545      LIBS="$am_save_LIBS"
27546    fi
27547
27548fi
27549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
27550$as_echo "$am_cv_func_iconv" >&6; }
27551  if test "$am_cv_func_iconv" = yes; then
27552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
27553$as_echo_n "checking for working iconv... " >&6; }
27554if ${am_cv_func_iconv_works+:} false; then :
27555  $as_echo_n "(cached) " >&6
27556else
27557
27558                  am_save_LIBS="$LIBS"
27559      if test $am_cv_lib_iconv = yes; then
27560        LIBS="$LIBS $LIBICONV"
27561      fi
27562      am_cv_func_iconv_works=no
27563      for ac_iconv_const in '' 'const'; do
27564        if test "$cross_compiling" = yes; then :
27565  case "$host_os" in
27566             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
27567             *)            am_cv_func_iconv_works="guessing yes" ;;
27568           esac
27569else
27570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27571/* end confdefs.h.  */
27572
27573#include <iconv.h>
27574#include <string.h>
27575
27576#ifndef ICONV_CONST
27577# define ICONV_CONST $ac_iconv_const
27578#endif
27579
27580int
27581main ()
27582{
27583int result = 0;
27584  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
27585     returns.  */
27586  {
27587    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
27588    if (cd_utf8_to_88591 != (iconv_t)(-1))
27589      {
27590        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
27591        char buf[10];
27592        ICONV_CONST char *inptr = input;
27593        size_t inbytesleft = strlen (input);
27594        char *outptr = buf;
27595        size_t outbytesleft = sizeof (buf);
27596        size_t res = iconv (cd_utf8_to_88591,
27597                            &inptr, &inbytesleft,
27598                            &outptr, &outbytesleft);
27599        if (res == 0)
27600          result |= 1;
27601        iconv_close (cd_utf8_to_88591);
27602      }
27603  }
27604  /* Test against Solaris 10 bug: Failures are not distinguishable from
27605     successful returns.  */
27606  {
27607    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
27608    if (cd_ascii_to_88591 != (iconv_t)(-1))
27609      {
27610        static ICONV_CONST char input[] = "\263";
27611        char buf[10];
27612        ICONV_CONST char *inptr = input;
27613        size_t inbytesleft = strlen (input);
27614        char *outptr = buf;
27615        size_t outbytesleft = sizeof (buf);
27616        size_t res = iconv (cd_ascii_to_88591,
27617                            &inptr, &inbytesleft,
27618                            &outptr, &outbytesleft);
27619        if (res == 0)
27620          result |= 2;
27621        iconv_close (cd_ascii_to_88591);
27622      }
27623  }
27624  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
27625  {
27626    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
27627    if (cd_88591_to_utf8 != (iconv_t)(-1))
27628      {
27629        static ICONV_CONST char input[] = "\304";
27630        static char buf[2] = { (char)0xDE, (char)0xAD };
27631        ICONV_CONST char *inptr = input;
27632        size_t inbytesleft = 1;
27633        char *outptr = buf;
27634        size_t outbytesleft = 1;
27635        size_t res = iconv (cd_88591_to_utf8,
27636                            &inptr, &inbytesleft,
27637                            &outptr, &outbytesleft);
27638        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
27639          result |= 4;
27640        iconv_close (cd_88591_to_utf8);
27641      }
27642  }
27643#if 0 /* This bug could be worked around by the caller.  */
27644  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
27645  {
27646    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
27647    if (cd_88591_to_utf8 != (iconv_t)(-1))
27648      {
27649        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
27650        char buf[50];
27651        ICONV_CONST char *inptr = input;
27652        size_t inbytesleft = strlen (input);
27653        char *outptr = buf;
27654        size_t outbytesleft = sizeof (buf);
27655        size_t res = iconv (cd_88591_to_utf8,
27656                            &inptr, &inbytesleft,
27657                            &outptr, &outbytesleft);
27658        if ((int)res > 0)
27659          result |= 8;
27660        iconv_close (cd_88591_to_utf8);
27661      }
27662  }
27663#endif
27664  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
27665     provided.  */
27666  if (/* Try standardized names.  */
27667      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
27668      /* Try IRIX, OSF/1 names.  */
27669      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
27670      /* Try AIX names.  */
27671      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
27672      /* Try HP-UX names.  */
27673      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
27674    result |= 16;
27675  return result;
27676
27677  ;
27678  return 0;
27679}
27680_ACEOF
27681if ac_fn_c_try_run "$LINENO"; then :
27682  am_cv_func_iconv_works=yes
27683fi
27684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27685  conftest.$ac_objext conftest.beam conftest.$ac_ext
27686fi
27687
27688        test "$am_cv_func_iconv_works" = no || break
27689      done
27690      LIBS="$am_save_LIBS"
27691
27692fi
27693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
27694$as_echo "$am_cv_func_iconv_works" >&6; }
27695    case "$am_cv_func_iconv_works" in
27696      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
27697      *)   am_func_iconv=yes ;;
27698    esac
27699  else
27700    am_func_iconv=no am_cv_lib_iconv=no
27701  fi
27702  if test "$am_func_iconv" = yes; then
27703
27704$as_echo "#define HAVE_ICONV 1" >>confdefs.h
27705
27706  fi
27707  if test "$am_cv_lib_iconv" = yes; then
27708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
27709$as_echo_n "checking how to link with libiconv... " >&6; }
27710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
27711$as_echo "$LIBICONV" >&6; }
27712  else
27713            CPPFLAGS="$am_save_CPPFLAGS"
27714    LIBICONV=
27715    LTLIBICONV=
27716  fi
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728    use_additional=yes
27729
27730  acl_save_prefix="$prefix"
27731  prefix="$acl_final_prefix"
27732  acl_save_exec_prefix="$exec_prefix"
27733  exec_prefix="$acl_final_exec_prefix"
27734
27735    eval additional_includedir=\"$includedir\"
27736    eval additional_libdir=\"$libdir\"
27737
27738  exec_prefix="$acl_save_exec_prefix"
27739  prefix="$acl_save_prefix"
27740
27741
27742# Check whether --with-libintl-prefix was given.
27743if test "${with_libintl_prefix+set}" = set; then :
27744  withval=$with_libintl_prefix;
27745    if test "X$withval" = "Xno"; then
27746      use_additional=no
27747    else
27748      if test "X$withval" = "X"; then
27749
27750  acl_save_prefix="$prefix"
27751  prefix="$acl_final_prefix"
27752  acl_save_exec_prefix="$exec_prefix"
27753  exec_prefix="$acl_final_exec_prefix"
27754
27755          eval additional_includedir=\"$includedir\"
27756          eval additional_libdir=\"$libdir\"
27757
27758  exec_prefix="$acl_save_exec_prefix"
27759  prefix="$acl_save_prefix"
27760
27761      else
27762        additional_includedir="$withval/include"
27763        additional_libdir="$withval/$acl_libdirstem"
27764        if test "$acl_libdirstem2" != "$acl_libdirstem" \
27765           && ! test -d "$withval/$acl_libdirstem"; then
27766          additional_libdir="$withval/$acl_libdirstem2"
27767        fi
27768      fi
27769    fi
27770
27771fi
27772
27773      LIBINTL=
27774  LTLIBINTL=
27775  INCINTL=
27776  LIBINTL_PREFIX=
27777      HAVE_LIBINTL=
27778  rpathdirs=
27779  ltrpathdirs=
27780  names_already_handled=
27781  names_next_round='intl '
27782  while test -n "$names_next_round"; do
27783    names_this_round="$names_next_round"
27784    names_next_round=
27785    for name in $names_this_round; do
27786      already_handled=
27787      for n in $names_already_handled; do
27788        if test "$n" = "$name"; then
27789          already_handled=yes
27790          break
27791        fi
27792      done
27793      if test -z "$already_handled"; then
27794        names_already_handled="$names_already_handled $name"
27795                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
27796        eval value=\"\$HAVE_LIB$uppername\"
27797        if test -n "$value"; then
27798          if test "$value" = yes; then
27799            eval value=\"\$LIB$uppername\"
27800            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
27801            eval value=\"\$LTLIB$uppername\"
27802            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
27803          else
27804                                    :
27805          fi
27806        else
27807                              found_dir=
27808          found_la=
27809          found_so=
27810          found_a=
27811          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
27812          if test -n "$acl_shlibext"; then
27813            shrext=".$acl_shlibext"             # typically: shrext=.so
27814          else
27815            shrext=
27816          fi
27817          if test $use_additional = yes; then
27818            dir="$additional_libdir"
27819                                    if test -n "$acl_shlibext"; then
27820              if test -f "$dir/$libname$shrext"; then
27821                found_dir="$dir"
27822                found_so="$dir/$libname$shrext"
27823              else
27824                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
27825                  ver=`(cd "$dir" && \
27826                        for f in "$libname$shrext".*; do echo "$f"; done \
27827                        | sed -e "s,^$libname$shrext\\\\.,," \
27828                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
27829                        | sed 1q ) 2>/dev/null`
27830                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
27831                    found_dir="$dir"
27832                    found_so="$dir/$libname$shrext.$ver"
27833                  fi
27834                else
27835                  eval library_names=\"$acl_library_names_spec\"
27836                  for f in $library_names; do
27837                    if test -f "$dir/$f"; then
27838                      found_dir="$dir"
27839                      found_so="$dir/$f"
27840                      break
27841                    fi
27842                  done
27843                fi
27844              fi
27845            fi
27846                        if test "X$found_dir" = "X"; then
27847              if test -f "$dir/$libname.$acl_libext"; then
27848                found_dir="$dir"
27849                found_a="$dir/$libname.$acl_libext"
27850              fi
27851            fi
27852            if test "X$found_dir" != "X"; then
27853              if test -f "$dir/$libname.la"; then
27854                found_la="$dir/$libname.la"
27855              fi
27856            fi
27857          fi
27858          if test "X$found_dir" = "X"; then
27859            for x in $LDFLAGS $LTLIBINTL; do
27860
27861  acl_save_prefix="$prefix"
27862  prefix="$acl_final_prefix"
27863  acl_save_exec_prefix="$exec_prefix"
27864  exec_prefix="$acl_final_exec_prefix"
27865  eval x=\"$x\"
27866  exec_prefix="$acl_save_exec_prefix"
27867  prefix="$acl_save_prefix"
27868
27869              case "$x" in
27870                -L*)
27871                  dir=`echo "X$x" | sed -e 's/^X-L//'`
27872                                    if test -n "$acl_shlibext"; then
27873                    if test -f "$dir/$libname$shrext"; then
27874                      found_dir="$dir"
27875                      found_so="$dir/$libname$shrext"
27876                    else
27877                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
27878                        ver=`(cd "$dir" && \
27879                              for f in "$libname$shrext".*; do echo "$f"; done \
27880                              | sed -e "s,^$libname$shrext\\\\.,," \
27881                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
27882                              | sed 1q ) 2>/dev/null`
27883                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
27884                          found_dir="$dir"
27885                          found_so="$dir/$libname$shrext.$ver"
27886                        fi
27887                      else
27888                        eval library_names=\"$acl_library_names_spec\"
27889                        for f in $library_names; do
27890                          if test -f "$dir/$f"; then
27891                            found_dir="$dir"
27892                            found_so="$dir/$f"
27893                            break
27894                          fi
27895                        done
27896                      fi
27897                    fi
27898                  fi
27899                                    if test "X$found_dir" = "X"; then
27900                    if test -f "$dir/$libname.$acl_libext"; then
27901                      found_dir="$dir"
27902                      found_a="$dir/$libname.$acl_libext"
27903                    fi
27904                  fi
27905                  if test "X$found_dir" != "X"; then
27906                    if test -f "$dir/$libname.la"; then
27907                      found_la="$dir/$libname.la"
27908                    fi
27909                  fi
27910                  ;;
27911              esac
27912              if test "X$found_dir" != "X"; then
27913                break
27914              fi
27915            done
27916          fi
27917          if test "X$found_dir" != "X"; then
27918                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
27919            if test "X$found_so" != "X"; then
27920                                                        if test "$enable_rpath" = no \
27921                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
27922                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
27923                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
27924              else
27925                                                                                haveit=
27926                for x in $ltrpathdirs; do
27927                  if test "X$x" = "X$found_dir"; then
27928                    haveit=yes
27929                    break
27930                  fi
27931                done
27932                if test -z "$haveit"; then
27933                  ltrpathdirs="$ltrpathdirs $found_dir"
27934                fi
27935                                if test "$acl_hardcode_direct" = yes; then
27936                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
27937                else
27938                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
27939                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
27940                                                            haveit=
27941                    for x in $rpathdirs; do
27942                      if test "X$x" = "X$found_dir"; then
27943                        haveit=yes
27944                        break
27945                      fi
27946                    done
27947                    if test -z "$haveit"; then
27948                      rpathdirs="$rpathdirs $found_dir"
27949                    fi
27950                  else
27951                                                                                haveit=
27952                    for x in $LDFLAGS $LIBINTL; do
27953
27954  acl_save_prefix="$prefix"
27955  prefix="$acl_final_prefix"
27956  acl_save_exec_prefix="$exec_prefix"
27957  exec_prefix="$acl_final_exec_prefix"
27958  eval x=\"$x\"
27959  exec_prefix="$acl_save_exec_prefix"
27960  prefix="$acl_save_prefix"
27961
27962                      if test "X$x" = "X-L$found_dir"; then
27963                        haveit=yes
27964                        break
27965                      fi
27966                    done
27967                    if test -z "$haveit"; then
27968                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
27969                    fi
27970                    if test "$acl_hardcode_minus_L" != no; then
27971                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
27972                    else
27973                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
27974                    fi
27975                  fi
27976                fi
27977              fi
27978            else
27979              if test "X$found_a" != "X"; then
27980                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
27981              else
27982                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
27983              fi
27984            fi
27985                        additional_includedir=
27986            case "$found_dir" in
27987              */$acl_libdirstem | */$acl_libdirstem/)
27988                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
27989                if test "$name" = 'intl'; then
27990                  LIBINTL_PREFIX="$basedir"
27991                fi
27992                additional_includedir="$basedir/include"
27993                ;;
27994              */$acl_libdirstem2 | */$acl_libdirstem2/)
27995                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
27996                if test "$name" = 'intl'; then
27997                  LIBINTL_PREFIX="$basedir"
27998                fi
27999                additional_includedir="$basedir/include"
28000                ;;
28001            esac
28002            if test "X$additional_includedir" != "X"; then
28003                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
28004                haveit=
28005                if test "X$additional_includedir" = "X/usr/local/include"; then
28006                  if test -n "$GCC"; then
28007                    case $host_os in
28008                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
28009                    esac
28010                  fi
28011                fi
28012                if test -z "$haveit"; then
28013                  for x in $CPPFLAGS $INCINTL; do
28014
28015  acl_save_prefix="$prefix"
28016  prefix="$acl_final_prefix"
28017  acl_save_exec_prefix="$exec_prefix"
28018  exec_prefix="$acl_final_exec_prefix"
28019  eval x=\"$x\"
28020  exec_prefix="$acl_save_exec_prefix"
28021  prefix="$acl_save_prefix"
28022
28023                    if test "X$x" = "X-I$additional_includedir"; then
28024                      haveit=yes
28025                      break
28026                    fi
28027                  done
28028                  if test -z "$haveit"; then
28029                    if test -d "$additional_includedir"; then
28030                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
28031                    fi
28032                  fi
28033                fi
28034              fi
28035            fi
28036                        if test -n "$found_la"; then
28037                                                        save_libdir="$libdir"
28038              case "$found_la" in
28039                */* | *\\*) . "$found_la" ;;
28040                *) . "./$found_la" ;;
28041              esac
28042              libdir="$save_libdir"
28043                            for dep in $dependency_libs; do
28044                case "$dep" in
28045                  -L*)
28046                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
28047                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
28048                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
28049                      haveit=
28050                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
28051                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
28052                        if test -n "$GCC"; then
28053                          case $host_os in
28054                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
28055                          esac
28056                        fi
28057                      fi
28058                      if test -z "$haveit"; then
28059                        haveit=
28060                        for x in $LDFLAGS $LIBINTL; do
28061
28062  acl_save_prefix="$prefix"
28063  prefix="$acl_final_prefix"
28064  acl_save_exec_prefix="$exec_prefix"
28065  exec_prefix="$acl_final_exec_prefix"
28066  eval x=\"$x\"
28067  exec_prefix="$acl_save_exec_prefix"
28068  prefix="$acl_save_prefix"
28069
28070                          if test "X$x" = "X-L$additional_libdir"; then
28071                            haveit=yes
28072                            break
28073                          fi
28074                        done
28075                        if test -z "$haveit"; then
28076                          if test -d "$additional_libdir"; then
28077                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
28078                          fi
28079                        fi
28080                        haveit=
28081                        for x in $LDFLAGS $LTLIBINTL; do
28082
28083  acl_save_prefix="$prefix"
28084  prefix="$acl_final_prefix"
28085  acl_save_exec_prefix="$exec_prefix"
28086  exec_prefix="$acl_final_exec_prefix"
28087  eval x=\"$x\"
28088  exec_prefix="$acl_save_exec_prefix"
28089  prefix="$acl_save_prefix"
28090
28091                          if test "X$x" = "X-L$additional_libdir"; then
28092                            haveit=yes
28093                            break
28094                          fi
28095                        done
28096                        if test -z "$haveit"; then
28097                          if test -d "$additional_libdir"; then
28098                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
28099                          fi
28100                        fi
28101                      fi
28102                    fi
28103                    ;;
28104                  -R*)
28105                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
28106                    if test "$enable_rpath" != no; then
28107                                                                  haveit=
28108                      for x in $rpathdirs; do
28109                        if test "X$x" = "X$dir"; then
28110                          haveit=yes
28111                          break
28112                        fi
28113                      done
28114                      if test -z "$haveit"; then
28115                        rpathdirs="$rpathdirs $dir"
28116                      fi
28117                                                                  haveit=
28118                      for x in $ltrpathdirs; do
28119                        if test "X$x" = "X$dir"; then
28120                          haveit=yes
28121                          break
28122                        fi
28123                      done
28124                      if test -z "$haveit"; then
28125                        ltrpathdirs="$ltrpathdirs $dir"
28126                      fi
28127                    fi
28128                    ;;
28129                  -l*)
28130                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
28131                    ;;
28132                  *.la)
28133                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
28134                    ;;
28135                  *)
28136                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
28137                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
28138                    ;;
28139                esac
28140              done
28141            fi
28142          else
28143                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
28144            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
28145          fi
28146        fi
28147      fi
28148    done
28149  done
28150  if test "X$rpathdirs" != "X"; then
28151    if test -n "$acl_hardcode_libdir_separator"; then
28152                        alldirs=
28153      for found_dir in $rpathdirs; do
28154        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
28155      done
28156            acl_save_libdir="$libdir"
28157      libdir="$alldirs"
28158      eval flag=\"$acl_hardcode_libdir_flag_spec\"
28159      libdir="$acl_save_libdir"
28160      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
28161    else
28162            for found_dir in $rpathdirs; do
28163        acl_save_libdir="$libdir"
28164        libdir="$found_dir"
28165        eval flag=\"$acl_hardcode_libdir_flag_spec\"
28166        libdir="$acl_save_libdir"
28167        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
28168      done
28169    fi
28170  fi
28171  if test "X$ltrpathdirs" != "X"; then
28172            for found_dir in $ltrpathdirs; do
28173      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
28174    done
28175  fi
28176
28177
28178
28179
28180
28181
28182          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
28183$as_echo_n "checking for GNU gettext in libintl... " >&6; }
28184if eval \${$gt_func_gnugettext_libintl+:} false; then :
28185  $as_echo_n "(cached) " >&6
28186else
28187  gt_save_CPPFLAGS="$CPPFLAGS"
28188            CPPFLAGS="$CPPFLAGS $INCINTL"
28189            gt_save_LIBS="$LIBS"
28190            LIBS="$LIBS $LIBINTL"
28191                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28192/* end confdefs.h.  */
28193
28194#include <libintl.h>
28195#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
28196extern int _nl_msg_cat_cntr;
28197extern
28198#ifdef __cplusplus
28199"C"
28200#endif
28201const char *_nl_expand_alias (const char *);
28202#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
28203#else
28204#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
28205#endif
28206$gt_revision_test_code
28207
28208int
28209main ()
28210{
28211
28212bindtextdomain ("", "");
28213return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
28214
28215  ;
28216  return 0;
28217}
28218_ACEOF
28219if ac_fn_c_try_link "$LINENO"; then :
28220  eval "$gt_func_gnugettext_libintl=yes"
28221else
28222  eval "$gt_func_gnugettext_libintl=no"
28223fi
28224rm -f core conftest.err conftest.$ac_objext \
28225    conftest$ac_exeext conftest.$ac_ext
28226                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
28227              LIBS="$LIBS $LIBICONV"
28228              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28229/* end confdefs.h.  */
28230
28231#include <libintl.h>
28232#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
28233extern int _nl_msg_cat_cntr;
28234extern
28235#ifdef __cplusplus
28236"C"
28237#endif
28238const char *_nl_expand_alias (const char *);
28239#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
28240#else
28241#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
28242#endif
28243$gt_revision_test_code
28244
28245int
28246main ()
28247{
28248
28249bindtextdomain ("", "");
28250return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
28251
28252  ;
28253  return 0;
28254}
28255_ACEOF
28256if ac_fn_c_try_link "$LINENO"; then :
28257  LIBINTL="$LIBINTL $LIBICONV"
28258                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
28259                 eval "$gt_func_gnugettext_libintl=yes"
28260
28261fi
28262rm -f core conftest.err conftest.$ac_objext \
28263    conftest$ac_exeext conftest.$ac_ext
28264            fi
28265            CPPFLAGS="$gt_save_CPPFLAGS"
28266            LIBS="$gt_save_LIBS"
28267fi
28268eval ac_res=\$$gt_func_gnugettext_libintl
28269	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28270$as_echo "$ac_res" >&6; }
28271        fi
28272
28273                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
28274           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
28275                && test "$PACKAGE" != gettext-runtime \
28276                && test "$PACKAGE" != gettext-tools; }; then
28277          gt_use_preinstalled_gnugettext=yes
28278        else
28279                    LIBINTL=
28280          LTLIBINTL=
28281          INCINTL=
28282        fi
28283
28284
28285
28286    if test -n "$INTL_MACOSX_LIBS"; then
28287      if test "$gt_use_preinstalled_gnugettext" = "yes" \
28288         || test "$nls_cv_use_gnu_gettext" = "yes"; then
28289                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
28290        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
28291      fi
28292    fi
28293
28294    if test "$gt_use_preinstalled_gnugettext" = "yes" \
28295       || test "$nls_cv_use_gnu_gettext" = "yes"; then
28296
28297$as_echo "#define ENABLE_NLS 1" >>confdefs.h
28298
28299    else
28300      USE_NLS=no
28301    fi
28302  fi
28303
28304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
28305$as_echo_n "checking whether to use NLS... " >&6; }
28306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
28307$as_echo "$USE_NLS" >&6; }
28308  if test "$USE_NLS" = "yes"; then
28309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
28310$as_echo_n "checking where the gettext function comes from... " >&6; }
28311    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
28312      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
28313        gt_source="external libintl"
28314      else
28315        gt_source="libc"
28316      fi
28317    else
28318      gt_source="included intl directory"
28319    fi
28320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
28321$as_echo "$gt_source" >&6; }
28322  fi
28323
28324  if test "$USE_NLS" = "yes"; then
28325
28326    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
28327      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
28328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
28329$as_echo_n "checking how to link with libintl... " >&6; }
28330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
28331$as_echo "$LIBINTL" >&6; }
28332
28333  for element in $INCINTL; do
28334    haveit=
28335    for x in $CPPFLAGS; do
28336
28337  acl_save_prefix="$prefix"
28338  prefix="$acl_final_prefix"
28339  acl_save_exec_prefix="$exec_prefix"
28340  exec_prefix="$acl_final_exec_prefix"
28341  eval x=\"$x\"
28342  exec_prefix="$acl_save_exec_prefix"
28343  prefix="$acl_save_prefix"
28344
28345      if test "X$x" = "X$element"; then
28346        haveit=yes
28347        break
28348      fi
28349    done
28350    if test -z "$haveit"; then
28351      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
28352    fi
28353  done
28354
28355      fi
28356
28357
28358$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
28359
28360
28361$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
28362
28363    fi
28364
28365        POSUB=po
28366  fi
28367
28368
28369
28370    INTLLIBS="$LIBINTL"
28371
28372
28373
28374
28375
28376
28377
28378
28379# function closedir used in modules/metanet/src/c/files.c
28380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
28381$as_echo_n "checking whether closedir returns void... " >&6; }
28382if ${ac_cv_func_closedir_void+:} false; then :
28383  $as_echo_n "(cached) " >&6
28384else
28385  if test "$cross_compiling" = yes; then :
28386  ac_cv_func_closedir_void=yes
28387else
28388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28389/* end confdefs.h.  */
28390$ac_includes_default
28391#include <$ac_header_dirent>
28392#ifndef __cplusplus
28393int closedir ();
28394#endif
28395
28396int
28397main ()
28398{
28399return closedir (opendir (".")) != 0;
28400  ;
28401  return 0;
28402}
28403_ACEOF
28404if ac_fn_c_try_run "$LINENO"; then :
28405  ac_cv_func_closedir_void=no
28406else
28407  ac_cv_func_closedir_void=yes
28408fi
28409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28410  conftest.$ac_objext conftest.beam conftest.$ac_ext
28411fi
28412
28413fi
28414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
28415$as_echo "$ac_cv_func_closedir_void" >&6; }
28416if test $ac_cv_func_closedir_void = yes; then
28417
28418$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
28419
28420fi
28421
28422
28423# Signals used in modules/core/src/c/realmain.c
28424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
28425$as_echo_n "checking return type of signal handlers... " >&6; }
28426if ${ac_cv_type_signal+:} false; then :
28427  $as_echo_n "(cached) " >&6
28428else
28429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28430/* end confdefs.h.  */
28431#include <sys/types.h>
28432#include <signal.h>
28433
28434int
28435main ()
28436{
28437return *(signal (0, 0)) (0) == 1;
28438  ;
28439  return 0;
28440}
28441_ACEOF
28442if ac_fn_c_try_compile "$LINENO"; then :
28443  ac_cv_type_signal=int
28444else
28445  ac_cv_type_signal=void
28446fi
28447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28448fi
28449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
28450$as_echo "$ac_cv_type_signal" >&6; }
28451
28452cat >>confdefs.h <<_ACEOF
28453#define RETSIGTYPE $ac_cv_type_signal
28454_ACEOF
28455
28456
28457
28458# struct tm used in modules/core/src/c/history.c
28459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
28460$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
28461if ${ac_cv_struct_tm+:} false; then :
28462  $as_echo_n "(cached) " >&6
28463else
28464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28465/* end confdefs.h.  */
28466#include <sys/types.h>
28467#include <time.h>
28468
28469int
28470main ()
28471{
28472struct tm tm;
28473				     int *p = &tm.tm_sec;
28474				     return !p;
28475  ;
28476  return 0;
28477}
28478_ACEOF
28479if ac_fn_c_try_compile "$LINENO"; then :
28480  ac_cv_struct_tm=time.h
28481else
28482  ac_cv_struct_tm=sys/time.h
28483fi
28484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28485fi
28486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
28487$as_echo "$ac_cv_struct_tm" >&6; }
28488if test $ac_cv_struct_tm = sys/time.h; then
28489
28490$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
28491
28492fi
28493
28494
28495# st_blocks in the struct in modules/io/sci_gateway/c/intfilestat.c
28496ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
28497if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
28498
28499cat >>confdefs.h <<_ACEOF
28500#define HAVE_STRUCT_STAT_ST_BLOCKS 1
28501_ACEOF
28502
28503
28504$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
28505
28506else
28507  case " $LIBOBJS " in
28508  *" fileblocks.$ac_objext "* ) ;;
28509  *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
28510 ;;
28511esac
28512
28513fi
28514
28515
28516
28517
28518##################
28519## termcap library
28520##################
28521
28522# some systems may have a system curses implementation as well as ncurses
28523# installed.  We need to be consistent in making sure we get the correct
28524# library to go with the correct header and also provide a way for the user
28525# to have some control over which is picked when both are available.
28526#
28527# For now, just check for -lcurses and then -lncurses.  The user control
28528# may need to be revisited
28529
28530TERMCAP_LIB=no
28531
28532# Various observations:
28533#
28534#  ncurses
28535#    - installs ncurses.h and possibly curses.h as a link to ncurses.h
28536#    - installs -lncurses.
28537#    - need to include term.h for tgetent() but tgetent() is in -lncurses.a
28538#
28539# curses as found in NetBSD-4 and NetBSD-5
28540#    - installs curses.h
28541#    - need to include termcap.h and link with -ltermcap for tgetent()
28542#
28543
28544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurses" >&5
28545$as_echo_n "checking for main in -lcurses... " >&6; }
28546if ${ac_cv_lib_curses_main+:} false; then :
28547  $as_echo_n "(cached) " >&6
28548else
28549  ac_check_lib_save_LIBS=$LIBS
28550LIBS="-lcurses  $LIBS"
28551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28552/* end confdefs.h.  */
28553
28554
28555int
28556main ()
28557{
28558return main ();
28559  ;
28560  return 0;
28561}
28562_ACEOF
28563if ac_fn_c_try_link "$LINENO"; then :
28564  ac_cv_lib_curses_main=yes
28565else
28566  ac_cv_lib_curses_main=no
28567fi
28568rm -f core conftest.err conftest.$ac_objext \
28569    conftest$ac_exeext conftest.$ac_ext
28570LIBS=$ac_check_lib_save_LIBS
28571fi
28572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_main" >&5
28573$as_echo "$ac_cv_lib_curses_main" >&6; }
28574if test "x$ac_cv_lib_curses_main" = xyes; then :
28575  cat >>confdefs.h <<_ACEOF
28576#define HAVE_LIBCURSES 1
28577_ACEOF
28578
28579  LIBS="-lcurses $LIBS"
28580
28581fi
28582
28583if test $ac_cv_lib_curses_main = no ; then
28584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lncurses" >&5
28585$as_echo_n "checking for main in -lncurses... " >&6; }
28586if ${ac_cv_lib_ncurses_main+:} false; then :
28587  $as_echo_n "(cached) " >&6
28588else
28589  ac_check_lib_save_LIBS=$LIBS
28590LIBS="-lncurses  $LIBS"
28591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28592/* end confdefs.h.  */
28593
28594
28595int
28596main ()
28597{
28598return main ();
28599  ;
28600  return 0;
28601}
28602_ACEOF
28603if ac_fn_c_try_link "$LINENO"; then :
28604  ac_cv_lib_ncurses_main=yes
28605else
28606  ac_cv_lib_ncurses_main=no
28607fi
28608rm -f core conftest.err conftest.$ac_objext \
28609    conftest$ac_exeext conftest.$ac_ext
28610LIBS=$ac_check_lib_save_LIBS
28611fi
28612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_main" >&5
28613$as_echo "$ac_cv_lib_ncurses_main" >&6; }
28614if test "x$ac_cv_lib_ncurses_main" = xyes; then :
28615  cat >>confdefs.h <<_ACEOF
28616#define HAVE_LIBNCURSES 1
28617_ACEOF
28618
28619  LIBS="-lncurses $LIBS"
28620
28621fi
28622
28623fi
28624
28625# make sure we have what we need for tgetent
28626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
28627$as_echo_n "checking for library containing tgetent... " >&6; }
28628if ${ac_cv_search_tgetent+:} false; then :
28629  $as_echo_n "(cached) " >&6
28630else
28631  ac_func_search_save_LIBS=$LIBS
28632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28633/* end confdefs.h.  */
28634
28635/* Override any GCC internal prototype to avoid an error.
28636   Use char because int might match the return type of a GCC
28637   builtin and then its argument prototype would still apply.  */
28638#ifdef __cplusplus
28639extern "C"
28640#endif
28641char tgetent ();
28642int
28643main ()
28644{
28645return tgetent ();
28646  ;
28647  return 0;
28648}
28649_ACEOF
28650for ac_lib in '' termcap; do
28651  if test -z "$ac_lib"; then
28652    ac_res="none required"
28653  else
28654    ac_res=-l$ac_lib
28655    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28656  fi
28657  if ac_fn_c_try_link "$LINENO"; then :
28658  ac_cv_search_tgetent=$ac_res
28659fi
28660rm -f core conftest.err conftest.$ac_objext \
28661    conftest$ac_exeext
28662  if ${ac_cv_search_tgetent+:} false; then :
28663  break
28664fi
28665done
28666if ${ac_cv_search_tgetent+:} false; then :
28667
28668else
28669  ac_cv_search_tgetent=no
28670fi
28671rm conftest.$ac_ext
28672LIBS=$ac_func_search_save_LIBS
28673fi
28674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
28675$as_echo "$ac_cv_search_tgetent" >&6; }
28676ac_res=$ac_cv_search_tgetent
28677if test "$ac_res" != no; then :
28678  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28679
28680fi
28681
28682
28683for ac_header in ncurses.h curses.h
28684do :
28685  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28686ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28687if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28688  cat >>confdefs.h <<_ACEOF
28689#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28690_ACEOF
28691
28692fi
28693
28694done
28695
28696
28697if test "x$ac_cv_lib_curses_main" = "xyes" -o "x$ac_cv_lib_ncurses_main" = "xyes" ; then
28698
28699$as_echo "#define HAVE_TERMCAP /**/" >>confdefs.h
28700
28701else
28702 as_fn_error $? "No termcap library detected. Please install ncurses dev library (or termcap library)" "$LINENO" 5
28703fi
28704
28705##################
28706## other libraries
28707##################
28708
28709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
28710$as_echo_n "checking for dlopen in -ldl... " >&6; }
28711if ${ac_cv_lib_dl_dlopen+:} false; then :
28712  $as_echo_n "(cached) " >&6
28713else
28714  ac_check_lib_save_LIBS=$LIBS
28715LIBS="-ldl  $LIBS"
28716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28717/* end confdefs.h.  */
28718
28719/* Override any GCC internal prototype to avoid an error.
28720   Use char because int might match the return type of a GCC
28721   builtin and then its argument prototype would still apply.  */
28722#ifdef __cplusplus
28723extern "C"
28724#endif
28725char dlopen ();
28726int
28727main ()
28728{
28729return dlopen ();
28730  ;
28731  return 0;
28732}
28733_ACEOF
28734if ac_fn_c_try_link "$LINENO"; then :
28735  ac_cv_lib_dl_dlopen=yes
28736else
28737  ac_cv_lib_dl_dlopen=no
28738fi
28739rm -f core conftest.err conftest.$ac_objext \
28740    conftest$ac_exeext conftest.$ac_ext
28741LIBS=$ac_check_lib_save_LIBS
28742fi
28743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
28744$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
28745if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
28746  cat >>confdefs.h <<_ACEOF
28747#define HAVE_LIBDL 1
28748_ACEOF
28749
28750  LIBS="-ldl $LIBS"
28751
28752fi
28753
28754
28755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5
28756$as_echo_n "checking for library containing pthread_join... " >&6; }
28757if ${ac_cv_search_pthread_join+:} false; then :
28758  $as_echo_n "(cached) " >&6
28759else
28760  ac_func_search_save_LIBS=$LIBS
28761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28762/* end confdefs.h.  */
28763
28764/* Override any GCC internal prototype to avoid an error.
28765   Use char because int might match the return type of a GCC
28766   builtin and then its argument prototype would still apply.  */
28767#ifdef __cplusplus
28768extern "C"
28769#endif
28770char pthread_join ();
28771int
28772main ()
28773{
28774return pthread_join ();
28775  ;
28776  return 0;
28777}
28778_ACEOF
28779for ac_lib in '' pthread; do
28780  if test -z "$ac_lib"; then
28781    ac_res="none required"
28782  else
28783    ac_res=-l$ac_lib
28784    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28785  fi
28786  if ac_fn_c_try_link "$LINENO"; then :
28787  ac_cv_search_pthread_join=$ac_res
28788fi
28789rm -f core conftest.err conftest.$ac_objext \
28790    conftest$ac_exeext
28791  if ${ac_cv_search_pthread_join+:} false; then :
28792  break
28793fi
28794done
28795if ${ac_cv_search_pthread_join+:} false; then :
28796
28797else
28798  ac_cv_search_pthread_join=no
28799fi
28800rm conftest.$ac_ext
28801LIBS=$ac_func_search_save_LIBS
28802fi
28803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_join" >&5
28804$as_echo "$ac_cv_search_pthread_join" >&6; }
28805ac_res=$ac_cv_search_pthread_join
28806if test "$ac_res" != no; then :
28807  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28808
28809fi
28810
28811
28812#################
28813## FFTW
28814#################
28815
28816
28817# Check whether --with-fftw was given.
28818if test "${with_fftw+set}" = set; then :
28819  withval=$with_fftw;
28820fi
28821
28822
28823FFTW_ENABLE=no
28824if test "$with_fftw" != no; then
28825
28826
28827
28828# Check whether --with-fftw_include was given.
28829if test "${with_fftw_include+set}" = set; then :
28830  withval=$with_fftw_include; with_fftw_include=$withval
28831else
28832  with_fftw_include='yes'
28833
28834fi
28835
28836
28837
28838# Check whether --with-fftw_library was given.
28839if test "${with_fftw_library+set}" = set; then :
28840  withval=$with_fftw_library; with_fftw_library=$withval
28841else
28842  with_fftw_library='yes'
28843
28844fi
28845
28846
28847if test "x$with_fftw_include" != "xyes"; then
28848	save_CFLAGS="$CFLAGS"
28849	CFLAGS="-I$with_fftw_include"
28850	ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
28851if test "x$ac_cv_header_fftw3_h" = xyes; then :
28852  FFTW3_CFLAGS="$CFLAGS"
28853else
28854  as_fn_error $? "Cannot find headers (fftw3.h) of the library FFTW in $with_fftw_include. Please install the dev package (Debian : libfftw3-dev)" "$LINENO" 5
28855
28856fi
28857
28858
28859	CFLAGS="$save_CFLAGS"
28860else
28861    if $WITH_DEVTOOLS; then # Scilab thirdparties
28862        FFTW3_CFLAGS="-I$DEVTOOLS_INCDIR"
28863    else
28864        ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
28865if test "x$ac_cv_header_fftw3_h" = xyes; then :
28866  FFTW3_CFLAGS=""
28867else
28868  as_fn_error $? "Cannot find headers (fftw3.h) of the library fftw. Please install the dev package (Debian : libfftw3-dev)" "$LINENO" 5
28869fi
28870
28871
28872    fi
28873fi
28874
28875
28876# --with-fftw-library set then check in this dir
28877if test "x$with_fftw_library" != "xyes"; then
28878    save_LIBS="$LIBS"
28879    LIBS="-L$with_fftw_library -lfftw3"
28880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_plan_dft_r2c in -lfftw3" >&5
28881$as_echo_n "checking for fftw_plan_dft_r2c in -lfftw3... " >&6; }
28882if ${ac_cv_lib_fftw3_fftw_plan_dft_r2c+:} false; then :
28883  $as_echo_n "(cached) " >&6
28884else
28885  ac_check_lib_save_LIBS=$LIBS
28886LIBS="-lfftw3  $LIBS"
28887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28888/* end confdefs.h.  */
28889
28890/* Override any GCC internal prototype to avoid an error.
28891   Use char because int might match the return type of a GCC
28892   builtin and then its argument prototype would still apply.  */
28893#ifdef __cplusplus
28894extern "C"
28895#endif
28896char fftw_plan_dft_r2c ();
28897int
28898main ()
28899{
28900return fftw_plan_dft_r2c ();
28901  ;
28902  return 0;
28903}
28904_ACEOF
28905if ac_fn_c_try_link "$LINENO"; then :
28906  ac_cv_lib_fftw3_fftw_plan_dft_r2c=yes
28907else
28908  ac_cv_lib_fftw3_fftw_plan_dft_r2c=no
28909fi
28910rm -f core conftest.err conftest.$ac_objext \
28911    conftest$ac_exeext conftest.$ac_ext
28912LIBS=$ac_check_lib_save_LIBS
28913fi
28914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_plan_dft_r2c" >&5
28915$as_echo "$ac_cv_lib_fftw3_fftw_plan_dft_r2c" >&6; }
28916if test "x$ac_cv_lib_fftw3_fftw_plan_dft_r2c" = xyes; then :
28917  FFTW3_LIB="-L$with_fftw_library -lfftw3"
28918else
28919  as_fn_error $? "libfftw3 : library missing. (Cannot find symbol fftw_plan_dft_r2c) in $with_fftw_library. Check if libfftw3 is installed and if the version is correct" "$LINENO" 5
28920
28921fi
28922
28923    LIBS="$save_LIBS"
28924else
28925    save_LIBS="$LIBS"
28926    if $WITH_DEVTOOLS; then # Scilab thirdparties
28927        FFTW3_LIB="-L$DEVTOOLS_LIBDIR -lfftw3"
28928    else
28929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_plan_dft_r2c in -lfftw3" >&5
28930$as_echo_n "checking for fftw_plan_dft_r2c in -lfftw3... " >&6; }
28931if ${ac_cv_lib_fftw3_fftw_plan_dft_r2c+:} false; then :
28932  $as_echo_n "(cached) " >&6
28933else
28934  ac_check_lib_save_LIBS=$LIBS
28935LIBS="-lfftw3  $LIBS"
28936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28937/* end confdefs.h.  */
28938
28939/* Override any GCC internal prototype to avoid an error.
28940   Use char because int might match the return type of a GCC
28941   builtin and then its argument prototype would still apply.  */
28942#ifdef __cplusplus
28943extern "C"
28944#endif
28945char fftw_plan_dft_r2c ();
28946int
28947main ()
28948{
28949return fftw_plan_dft_r2c ();
28950  ;
28951  return 0;
28952}
28953_ACEOF
28954if ac_fn_c_try_link "$LINENO"; then :
28955  ac_cv_lib_fftw3_fftw_plan_dft_r2c=yes
28956else
28957  ac_cv_lib_fftw3_fftw_plan_dft_r2c=no
28958fi
28959rm -f core conftest.err conftest.$ac_objext \
28960    conftest$ac_exeext conftest.$ac_ext
28961LIBS=$ac_check_lib_save_LIBS
28962fi
28963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_plan_dft_r2c" >&5
28964$as_echo "$ac_cv_lib_fftw3_fftw_plan_dft_r2c" >&6; }
28965if test "x$ac_cv_lib_fftw3_fftw_plan_dft_r2c" = xyes; then :
28966  FFTW3_LIB="-lfftw3"
28967else
28968  as_fn_error $? "libfftw3 : library missing. (Cannot find symbol fftw_plan_dft_r2c). Check if libfftw3 is installed and if the version is correct" "$LINENO" 5
28969
28970fi
28971
28972    fi
28973    LIBS="$save_LIBS"
28974fi
28975
28976
28977$as_echo "#define WITH_FFTW /**/" >>confdefs.h
28978
28979
28980
28981   FFTW_ENABLE=yes
28982fi
28983
28984
28985 if test "$with_fftw" != no; then
28986  FFTW_TRUE=
28987  FFTW_FALSE='#'
28988else
28989  FFTW_TRUE='#'
28990  FFTW_FALSE=
28991fi
28992
28993
28994
28995#################
28996## EIGEN
28997#################
28998
28999ac_ext=cpp
29000ac_cpp='$CXXCPP $CPPFLAGS'
29001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
29005$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
29006if test -z "$CXXCPP"; then
29007  if ${ac_cv_prog_CXXCPP+:} false; then :
29008  $as_echo_n "(cached) " >&6
29009else
29010      # Double quotes because CXXCPP needs to be expanded
29011    for CXXCPP in "$CXX -E" "/lib/cpp"
29012    do
29013      ac_preproc_ok=false
29014for ac_cxx_preproc_warn_flag in '' yes
29015do
29016  # Use a header file that comes with gcc, so configuring glibc
29017  # with a fresh cross-compiler works.
29018  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29019  # <limits.h> exists even on freestanding compilers.
29020  # On the NeXT, cc -E runs the code through the compiler's parser,
29021  # not just through cpp. "Syntax error" is here to catch this case.
29022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29023/* end confdefs.h.  */
29024#ifdef __STDC__
29025# include <limits.h>
29026#else
29027# include <assert.h>
29028#endif
29029		     Syntax error
29030_ACEOF
29031if ac_fn_cxx_try_cpp "$LINENO"; then :
29032
29033else
29034  # Broken: fails on valid input.
29035continue
29036fi
29037rm -f conftest.err conftest.i conftest.$ac_ext
29038
29039  # OK, works on sane cases.  Now check whether nonexistent headers
29040  # can be detected and how.
29041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29042/* end confdefs.h.  */
29043#include <ac_nonexistent.h>
29044_ACEOF
29045if ac_fn_cxx_try_cpp "$LINENO"; then :
29046  # Broken: success on invalid input.
29047continue
29048else
29049  # Passes both tests.
29050ac_preproc_ok=:
29051break
29052fi
29053rm -f conftest.err conftest.i conftest.$ac_ext
29054
29055done
29056# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
29057rm -f conftest.i conftest.err conftest.$ac_ext
29058if $ac_preproc_ok; then :
29059  break
29060fi
29061
29062    done
29063    ac_cv_prog_CXXCPP=$CXXCPP
29064
29065fi
29066  CXXCPP=$ac_cv_prog_CXXCPP
29067else
29068  ac_cv_prog_CXXCPP=$CXXCPP
29069fi
29070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
29071$as_echo "$CXXCPP" >&6; }
29072ac_preproc_ok=false
29073for ac_cxx_preproc_warn_flag in '' yes
29074do
29075  # Use a header file that comes with gcc, so configuring glibc
29076  # with a fresh cross-compiler works.
29077  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29078  # <limits.h> exists even on freestanding compilers.
29079  # On the NeXT, cc -E runs the code through the compiler's parser,
29080  # not just through cpp. "Syntax error" is here to catch this case.
29081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29082/* end confdefs.h.  */
29083#ifdef __STDC__
29084# include <limits.h>
29085#else
29086# include <assert.h>
29087#endif
29088		     Syntax error
29089_ACEOF
29090if ac_fn_cxx_try_cpp "$LINENO"; then :
29091
29092else
29093  # Broken: fails on valid input.
29094continue
29095fi
29096rm -f conftest.err conftest.i conftest.$ac_ext
29097
29098  # OK, works on sane cases.  Now check whether nonexistent headers
29099  # can be detected and how.
29100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29101/* end confdefs.h.  */
29102#include <ac_nonexistent.h>
29103_ACEOF
29104if ac_fn_cxx_try_cpp "$LINENO"; then :
29105  # Broken: success on invalid input.
29106continue
29107else
29108  # Passes both tests.
29109ac_preproc_ok=:
29110break
29111fi
29112rm -f conftest.err conftest.i conftest.$ac_ext
29113
29114done
29115# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
29116rm -f conftest.i conftest.err conftest.$ac_ext
29117if $ac_preproc_ok; then :
29118
29119else
29120  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29122as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
29123See \`config.log' for more details" "$LINENO" 5; }
29124fi
29125
29126ac_ext=cpp
29127ac_cpp='$CXXCPP $CPPFLAGS'
29128ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29129ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29130ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29131
29132
29133
29134ac_ext=cpp
29135ac_cpp='$CXXCPP $CPPFLAGS'
29136ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29137ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29138ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29139
29140
29141
29142# Check whether --with-eigen_include was given.
29143if test "${with_eigen_include+set}" = set; then :
29144  withval=$with_eigen_include; with_eigen_include=$withval
29145else
29146  with_eigen_include='yes'
29147
29148fi
29149
29150
29151
29152save_CPPFLAGS="$CPPFLAGS"
29153
29154if test "x$with_eigen_include" != "xyes"; then
29155    CPPFLAGS="-I$with_eigen_include"
29156    ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
29157if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
29158  EIGEN_CPPFLAGS="$CPPFLAGS"
29159else
29160  as_fn_error $? "Cannot find headers (Eigen/Sparse) of the library EIGEN in $with_eigen_include. Please install the dev package (Debian : libeigen3-dev)" "$LINENO" 5
29161
29162fi
29163
29164
29165    PATH_TO_EIGEN=$with_eigen_include
29166else
29167    if $WITH_DEVTOOLS; then # Scilab thirparties
29168        CPPFLAGS="-I$DEVTOOLS_INCDIR"
29169        ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
29170if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
29171  EIGEN_CPPFLAGS="$CPPFLAGS"
29172else
29173  as_fn_error $? "Cannot find headers (Eigen/Sparse) of the library EIGEN in $with_eigen_include. Please install the dev package (Debian : libeigen3-dev)" "$LINENO" 5
29174
29175fi
29176
29177
29178        PATH_TO_EIGEN=$DEVTOOLS_INCDIR
29179    else
29180        ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
29181if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
29182  EIGEN_CPPFLAGS=""
29183else
29184         $as_unset ac_cv_header_Eigen_Sparse
29185                    CPPFLAGS="-I/usr/include/eigen3/"
29186                    ac_fn_cxx_check_header_mongrel "$LINENO" "Eigen/Sparse" "ac_cv_header_Eigen_Sparse" "$ac_includes_default"
29187if test "x$ac_cv_header_Eigen_Sparse" = xyes; then :
29188  EIGEN_CPPFLAGS=$CPPFLAGS
29189else
29190  as_fn_error $? "Cannot find headers (Eigen/Sparse) of the library eigen. Please install the dev package (Debian : libeigen3-dev)" "$LINENO" 5
29191
29192fi
29193
29194
29195
29196fi
29197
29198
29199        PATH_TO_EIGEN="/usr/include/eigen3/"
29200    fi
29201fi
29202CPPFLAGS="$save_CPPFLAGS"
29203
29204CHK_EIGEN_WORLD=3
29205CHK_EIGEN_MAJOR=3
29206CHK_EIGEN_MINOR=2
29207
29208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later" >&5
29209$as_echo_n "checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later... " >&6; }
29210cat > conftest.$ac_ext <<EOF
29211#line 29211 "configure"
29212#include "confdefs.h"
29213
29214#include "$PATH_TO_EIGEN/Eigen/Sparse"
29215#if EIGEN_VERSION_AT_LEAST(3,3,2)
29216EIGEN_VERSION_OK
29217#endif
29218
29219EOF
29220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29221  grep "EIGEN_VERSION_OK" >/dev/null 2>&1; then
29222  rm -rf conftest*
29223  \
29224EIGEN_VERSION_OK=1
29225else
29226  rm -rf conftest*
29227  \
29228EIGEN_VERSION_OK=0
29229fi
29230rm -f conftest*
29231
29232if test $EIGEN_VERSION_OK = 0; then
29233   as_fn_error $? "Version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR of Eigen expected (at least)" "$LINENO" 5
29234else
29235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29236$as_echo "yes" >&6; }
29237fi
29238
29239
29240
29241$as_echo "#define WITH_EIGEN /**/" >>confdefs.h
29242
29243ac_ext=c
29244ac_cpp='$CPP $CPPFLAGS'
29245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29247ac_compiler_gnu=$ac_cv_c_compiler_gnu
29248
29249
29250
29251
29252#################
29253## MPI
29254#################
29255
29256# Disable by default the build of MPI:
29257# * It is hard to package
29258# * People are administrating cluster know about rebuilding packages
29259# * They use their own MPI library
29260
29261# Check whether --with-mpi was given.
29262if test "${with_mpi+set}" = set; then :
29263  withval=$with_mpi;
29264fi
29265
29266
29267MPI_ENABLE=no
29268if test "$with_mpi" == yes; then
29269
29270		for ac_prog in mpicc
29271do
29272  # Extract the first word of "$ac_prog", so it can be a program name with args.
29273set dummy $ac_prog; ac_word=$2
29274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29275$as_echo_n "checking for $ac_word... " >&6; }
29276if ${ac_cv_prog_OPENMPI_CC+:} false; then :
29277  $as_echo_n "(cached) " >&6
29278else
29279  if test -n "$OPENMPI_CC"; then
29280  ac_cv_prog_OPENMPI_CC="$OPENMPI_CC" # Let the user override the test.
29281else
29282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29283for as_dir in $PATH
29284do
29285  IFS=$as_save_IFS
29286  test -z "$as_dir" && as_dir=.
29287    for ac_exec_ext in '' $ac_executable_extensions; do
29288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29289    ac_cv_prog_OPENMPI_CC="$ac_prog"
29290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29291    break 2
29292  fi
29293done
29294  done
29295IFS=$as_save_IFS
29296
29297fi
29298fi
29299OPENMPI_CC=$ac_cv_prog_OPENMPI_CC
29300if test -n "$OPENMPI_CC"; then
29301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENMPI_CC" >&5
29302$as_echo "$OPENMPI_CC" >&6; }
29303else
29304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29305$as_echo "no" >&6; }
29306fi
29307
29308
29309  test -n "$OPENMPI_CC" && break
29310done
29311test -n "$OPENMPI_CC" || OPENMPI_CC="no"
29312
29313		if test "x$MPICC" = "xno"; then
29314				as_fn_error $? "Unable to find mpicc in the path. Please check your installation of openmpi (example : openmpi & openmpi-dev with Debian)" "$LINENO" 5
29315		fi
29316		for ac_prog in mpicxx
29317do
29318  # Extract the first word of "$ac_prog", so it can be a program name with args.
29319set dummy $ac_prog; ac_word=$2
29320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29321$as_echo_n "checking for $ac_word... " >&6; }
29322if ${ac_cv_prog_OPENMPI_CXX+:} false; then :
29323  $as_echo_n "(cached) " >&6
29324else
29325  if test -n "$OPENMPI_CXX"; then
29326  ac_cv_prog_OPENMPI_CXX="$OPENMPI_CXX" # Let the user override the test.
29327else
29328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29329for as_dir in $PATH
29330do
29331  IFS=$as_save_IFS
29332  test -z "$as_dir" && as_dir=.
29333    for ac_exec_ext in '' $ac_executable_extensions; do
29334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29335    ac_cv_prog_OPENMPI_CXX="$ac_prog"
29336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29337    break 2
29338  fi
29339done
29340  done
29341IFS=$as_save_IFS
29342
29343fi
29344fi
29345OPENMPI_CXX=$ac_cv_prog_OPENMPI_CXX
29346if test -n "$OPENMPI_CXX"; then
29347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENMPI_CXX" >&5
29348$as_echo "$OPENMPI_CXX" >&6; }
29349else
29350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29351$as_echo "no" >&6; }
29352fi
29353
29354
29355  test -n "$OPENMPI_CXX" && break
29356done
29357test -n "$OPENMPI_CXX" || OPENMPI_CXX="no"
29358
29359		if test "x$MPICXX" = "xno"; then
29360				as_fn_error $? "Unable to find mpicxx in the path. Please check your installation of openmpi (example : openmpi & openmpi-dev with Debian)" "$LINENO" 5
29361		fi
29362saved_cflags=$CFLAGS
29363saved_cxxflags=$CXXFLAGS
29364saved_LIBS="$LIBS"
29365
29366CFLAGS=`$OPENMPI_CC --showme:compile`
29367CXXFLAGS=`$OPENMPI_CXX --showme:compile`
29368LIBS=`$OPENMPI_CC --showme:link`
29369
29370ac_fn_c_check_header_mongrel "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default"
29371if test "x$ac_cv_header_mpi_h" = xyes; then :
29372  OPENMPI_CFLAGS=$CFLAGS; OPENMPI_CXXFLAGS=$CXXFLAGS
29373else
29374  as_fn_error $? "Cannot find headers of the library OpenMPI. Please install the dev package (Debian : openmpi-dev)" "$LINENO" 5
29375fi
29376
29377
29378
29379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
29380$as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
29381if ${ac_cv_lib_mpi_MPI_Init+:} false; then :
29382  $as_echo_n "(cached) " >&6
29383else
29384  ac_check_lib_save_LIBS=$LIBS
29385LIBS="-lmpi  $LIBS"
29386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29387/* end confdefs.h.  */
29388
29389/* Override any GCC internal prototype to avoid an error.
29390   Use char because int might match the return type of a GCC
29391   builtin and then its argument prototype would still apply.  */
29392#ifdef __cplusplus
29393extern "C"
29394#endif
29395char MPI_Init ();
29396int
29397main ()
29398{
29399return MPI_Init ();
29400  ;
29401  return 0;
29402}
29403_ACEOF
29404if ac_fn_c_try_link "$LINENO"; then :
29405  ac_cv_lib_mpi_MPI_Init=yes
29406else
29407  ac_cv_lib_mpi_MPI_Init=no
29408fi
29409rm -f core conftest.err conftest.$ac_objext \
29410    conftest$ac_exeext conftest.$ac_ext
29411LIBS=$ac_check_lib_save_LIBS
29412fi
29413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
29414$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
29415if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then :
29416  OPENMPI_LIBS=$LIBS
29417else
29418  as_fn_error $? "openmpi : library missing. (Cannot find symbol MPI_Init in -lmpi). Check if OpenMPI is installed" "$LINENO" 5
29419
29420fi
29421
29422
29423
29424$as_echo "#define ENABLE_MPI /**/" >>confdefs.h
29425
29426
29427LIBS="$saved_LIBS"
29428CFLAGS=$saved_cflags
29429CXXFLAGS=$saved_cppflags
29430
29431
29432
29433
29434
29435
29436   # We will have to detect other implementation of OpenMPI
29437   MPI_ENABLE=yes
29438fi
29439
29440
29441 if test "$with_mpi" == yes; then
29442  MPI_TRUE=
29443  MPI_FALSE='#'
29444else
29445  MPI_TRUE='#'
29446  MPI_FALSE=
29447fi
29448
29449
29450#################
29451## OpenMP
29452#################
29453
29454
29455# Check whether --with-openmp was given.
29456if test "${with_openmp+set}" = set; then :
29457  withval=$with_openmp;
29458fi
29459
29460
29461OPENMP_ENABLE=no
29462if test "$with_openmp" != no; then
29463#   AC_OPENMP
29464    OPENMP_CFLAGS="-fopenmp"
29465    OPENMP_CXXFLAGS="-fopenmp"
29466    OPENMP_LIBS="-lgomp"
29467
29468    for ac_header in omp.h
29469do :
29470  ac_fn_c_check_header_mongrel "$LINENO" "omp.h" "ac_cv_header_omp_h" "$ac_includes_default"
29471if test "x$ac_cv_header_omp_h" = xyes; then :
29472  cat >>confdefs.h <<_ACEOF
29473#define HAVE_OMP_H 1
29474_ACEOF
29475
29476else
29477  as_fn_error $? "Could not find omp.h" "$LINENO" 5
29478fi
29479
29480done
29481
29482
29483    OPENMP_ENABLE=yes
29484fi
29485
29486
29487
29488
29489
29490 if test "$with_openmp" != no; then
29491  OPENMP_TRUE=
29492  OPENMP_FALSE='#'
29493else
29494  OPENMP_TRUE='#'
29495  OPENMP_FALSE=
29496fi
29497
29498
29499
29500#######################
29501## Test for libxml
29502#######################
29503
29504
29505
29506
29507# Check whether --with-libxml2 was given.
29508if test "${with_libxml2+set}" = set; then :
29509  withval=$with_libxml2; with_libxml2=$withval
29510else
29511  with_libxml2='yes'
29512
29513fi
29514
29515
29516if test "$with_libxml2" != 'yes' -a "$with_libxml2" != 'no'; then
29517    # Look if xml-config xml2_config (which provides cflags and ldflags) is available
29518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking libxml2, for xml-config" >&5
29519$as_echo_n "checking libxml2, for xml-config... " >&6; }
29520    XML_CONFIG="$with_libxml2/bin/xml2-config"
29521    if test -x "$XML_CONFIG"; then
29522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_CONFIG" >&5
29523$as_echo "$XML_CONFIG" >&6; }
29524    else
29525        as_fn_error $? "Unable to find $XML_CONFIG. Please check the path you provided" "$LINENO" 5
29526    fi
29527else
29528    if $WITH_DEVTOOLS; then # Scilab thirparties
29529        XML_CONFIG="$DEVTOOLS_BINDIR/xml2-config"
29530    else
29531        for ac_prog in xml2-config
29532do
29533  # Extract the first word of "$ac_prog", so it can be a program name with args.
29534set dummy $ac_prog; ac_word=$2
29535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29536$as_echo_n "checking for $ac_word... " >&6; }
29537if ${ac_cv_prog_XML_CONFIG+:} false; then :
29538  $as_echo_n "(cached) " >&6
29539else
29540  if test -n "$XML_CONFIG"; then
29541  ac_cv_prog_XML_CONFIG="$XML_CONFIG" # Let the user override the test.
29542else
29543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29544for as_dir in $PATH
29545do
29546  IFS=$as_save_IFS
29547  test -z "$as_dir" && as_dir=.
29548    for ac_exec_ext in '' $ac_executable_extensions; do
29549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29550    ac_cv_prog_XML_CONFIG="$ac_prog"
29551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29552    break 2
29553  fi
29554done
29555  done
29556IFS=$as_save_IFS
29557
29558fi
29559fi
29560XML_CONFIG=$ac_cv_prog_XML_CONFIG
29561if test -n "$XML_CONFIG"; then
29562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_CONFIG" >&5
29563$as_echo "$XML_CONFIG" >&6; }
29564else
29565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29566$as_echo "no" >&6; }
29567fi
29568
29569
29570  test -n "$XML_CONFIG" && break
29571done
29572test -n "$XML_CONFIG" || XML_CONFIG="no"
29573
29574    fi
29575    if test "x$XML_CONFIG" = "xno"; then
29576        as_fn_error $? "Unable to find xml2-config in the path. Please check your installation of libxml2" "$LINENO" 5
29577    fi
29578fi
29579saved_cflags=$CFLAGS
29580saved_LIBS="$LIBS"
29581
29582XML_FLAGS=`$XML_CONFIG --cflags`
29583XML_LIBS=`$XML_CONFIG --libs`
29584XML_VERSION=`$XML_CONFIG --version`
29585
29586CFLAGS="$CFLAGS $XML_FLAGS"
29587LIBS="$LIBS $XML_LIBS"
29588
29589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlReaderForFile in -lxml2" >&5
29590$as_echo_n "checking for xmlReaderForFile in -lxml2... " >&6; }
29591if ${ac_cv_lib_xml2_xmlReaderForFile+:} false; then :
29592  $as_echo_n "(cached) " >&6
29593else
29594  ac_check_lib_save_LIBS=$LIBS
29595LIBS="-lxml2  $LIBS"
29596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29597/* end confdefs.h.  */
29598
29599/* Override any GCC internal prototype to avoid an error.
29600   Use char because int might match the return type of a GCC
29601   builtin and then its argument prototype would still apply.  */
29602#ifdef __cplusplus
29603extern "C"
29604#endif
29605char xmlReaderForFile ();
29606int
29607main ()
29608{
29609return xmlReaderForFile ();
29610  ;
29611  return 0;
29612}
29613_ACEOF
29614if ac_fn_c_try_link "$LINENO"; then :
29615  ac_cv_lib_xml2_xmlReaderForFile=yes
29616else
29617  ac_cv_lib_xml2_xmlReaderForFile=no
29618fi
29619rm -f core conftest.err conftest.$ac_objext \
29620    conftest$ac_exeext conftest.$ac_ext
29621LIBS=$ac_check_lib_save_LIBS
29622fi
29623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlReaderForFile" >&5
29624$as_echo "$ac_cv_lib_xml2_xmlReaderForFile" >&6; }
29625if test "x$ac_cv_lib_xml2_xmlReaderForFile" = xyes; then :
29626  cat >>confdefs.h <<_ACEOF
29627#define HAVE_LIBXML2 1
29628_ACEOF
29629
29630  LIBS="-lxml2 $LIBS"
29631
29632else
29633  as_fn_error $? "libxml2 : library missing. (Cannot find symbol xmlReaderForFile). Check if libxml2 is installed and if the version is correct" "$LINENO" 5
29634
29635fi
29636
29637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlBufferDetach in -lxml2" >&5
29638$as_echo_n "checking for xmlBufferDetach in -lxml2... " >&6; }
29639if ${ac_cv_lib_xml2_xmlBufferDetach+:} false; then :
29640  $as_echo_n "(cached) " >&6
29641else
29642  ac_check_lib_save_LIBS=$LIBS
29643LIBS="-lxml2  $LIBS"
29644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29645/* end confdefs.h.  */
29646
29647/* Override any GCC internal prototype to avoid an error.
29648   Use char because int might match the return type of a GCC
29649   builtin and then its argument prototype would still apply.  */
29650#ifdef __cplusplus
29651extern "C"
29652#endif
29653char xmlBufferDetach ();
29654int
29655main ()
29656{
29657return xmlBufferDetach ();
29658  ;
29659  return 0;
29660}
29661_ACEOF
29662if ac_fn_c_try_link "$LINENO"; then :
29663  ac_cv_lib_xml2_xmlBufferDetach=yes
29664else
29665  ac_cv_lib_xml2_xmlBufferDetach=no
29666fi
29667rm -f core conftest.err conftest.$ac_objext \
29668    conftest$ac_exeext conftest.$ac_ext
29669LIBS=$ac_check_lib_save_LIBS
29670fi
29671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlBufferDetach" >&5
29672$as_echo "$ac_cv_lib_xml2_xmlBufferDetach" >&6; }
29673if test "x$ac_cv_lib_xml2_xmlBufferDetach" = xyes; then :
29674  cat >>confdefs.h <<_ACEOF
29675#define HAVE_LIBXML2 1
29676_ACEOF
29677
29678  LIBS="-lxml2 $LIBS"
29679
29680else
29681  as_fn_error $? "libxml2 : library missing. (Cannot find symbol xmlBufferDetach). Check if libxml2 is installed and if the version is correct" "$LINENO" 5
29682
29683fi
29684
29685
29686#AC_CHECK_HEADERS([libxml/xmlreader.h])
29687#AC_CHECK_HEADERS([libxml/parser.h])
29688#AC_CHECK_HEADERS([libxml/tree.h])
29689
29690#AC_CHECK_HEADERS([libxml/xpath.h])
29691#AC_CHECK_HEADERS([libxml/xpathInternals.h])
29692
29693CFLAGS=$saved_cflags
29694LIBS="$saved_LIBS"
29695
29696
29697
29698
29699
29700
29701cat >>confdefs.h <<_ACEOF
29702#define LIBXML_FLAGS "$XML_FLAGS"
29703_ACEOF
29704
29705
29706cat >>confdefs.h <<_ACEOF
29707#define LIBXML_LIBS "$XML_LIBS"
29708_ACEOF
29709
29710
29711#CFLAGS="$CFLAGS $XML_FLAGS"
29712#AC_CHECK_LIB(xml2,xmlInitParserCtxt,,[AC_MSG_ERROR([libxml2 : library missing])])
29713
29714
29715#AC_CHECK_HEADERS([libxml/tree.h],,[AC_MSG_ERROR([libxml2 : library missing missing])])
29716
29717# Gets compilation and library flags
29718
29719
29720#######################
29721## Test for gettext
29722#######################
29723
29724ALL_LINGUAS="en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ"
29725ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP ru_RU"
29726
29727# Check whether --enable-build-localization was given.
29728if test "${enable_build_localization+set}" = set; then :
29729  enableval=$enable_build_localization;
29730fi
29731
29732BUILD_LOCALIZATION_ENABLE=no
29733
29734if test "$enable_build_localization" != no; then
29735
29736
29737
29738   for ac_func in bind_textdomain_codeset
29739do :
29740  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
29741if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
29742  cat >>confdefs.h <<_ACEOF
29743#define HAVE_BIND_TEXTDOMAIN_CODESET 1
29744_ACEOF
29745
29746fi
29747done
29748
29749
29750   # Extract the first word of "msgcat", so it can be a program name with args.
29751set dummy msgcat; ac_word=$2
29752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29753$as_echo_n "checking for $ac_word... " >&6; }
29754if ${ac_cv_path_MSGCAT+:} false; then :
29755  $as_echo_n "(cached) " >&6
29756else
29757  case $MSGCAT in
29758  [\\/]* | ?:[\\/]*)
29759  ac_cv_path_MSGCAT="$MSGCAT" # Let the user override the test with a path.
29760  ;;
29761  *)
29762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29763for as_dir in $PATH
29764do
29765  IFS=$as_save_IFS
29766  test -z "$as_dir" && as_dir=.
29767    for ac_exec_ext in '' $ac_executable_extensions; do
29768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29769    ac_cv_path_MSGCAT="$as_dir/$ac_word$ac_exec_ext"
29770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29771    break 2
29772  fi
29773done
29774  done
29775IFS=$as_save_IFS
29776
29777  test -z "$ac_cv_path_MSGCAT" && ac_cv_path_MSGCAT="no"
29778  ;;
29779esac
29780fi
29781MSGCAT=$ac_cv_path_MSGCAT
29782if test -n "$MSGCAT"; then
29783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGCAT" >&5
29784$as_echo "$MSGCAT" >&6; }
29785else
29786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29787$as_echo "no" >&6; }
29788fi
29789
29790
29791#   AC_PATH_PROG(MSGFMT, msgfmt, no)
29792#   AC_PATH_PROG(XGETTEXT, xgettext, no)
29793
29794   if test x$MSGFMT = xno; then
29795      as_fn_error $? "The msgfmt command is required to build Scilab.  If it is installed on your system, ensure that it is in your path.  If it is not, install GNU gettext to continue or use the option --disable-build-localization " "$LINENO" 5
29796      fi
29797    if test x$MSGCAT = xno; then
29798      as_fn_error $? "The msgcat command is required to build Scilab.  If it is installed on your system, ensure that it is in your path.  If it is not, install GNU gettext to continue or use the option --disable-build-localization " "$LINENO" 5
29799    fi
29800    BUILD_LOCALIZATION_ENABLE=yes
29801fi
29802 if test "$BUILD_LOCALIZATION_ENABLE" = yes; then
29803  GENERATE_LOCALIZATION_FILES_TRUE=
29804  GENERATE_LOCALIZATION_FILES_FALSE='#'
29805else
29806  GENERATE_LOCALIZATION_FILES_TRUE='#'
29807  GENERATE_LOCALIZATION_FILES_FALSE=
29808fi
29809
29810
29811#######################
29812## Test for blas/Atlas and lapack
29813#######################
29814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if BLAS, ATLAS or MKL is available" >&5
29815$as_echo_n "checking if BLAS, ATLAS or MKL is available... " >&6; }
29816echo ""
29817ac_ext=f
29818ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
29819ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29820ac_compiler_gnu=$ac_cv_f77_compiler_gnu
29821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5
29822$as_echo_n "checking how to get verbose linking output from $F77... " >&6; }
29823if ${ac_cv_prog_f77_v+:} false; then :
29824  $as_echo_n "(cached) " >&6
29825else
29826  cat > conftest.$ac_ext <<_ACEOF
29827      program main
29828
29829      end
29830_ACEOF
29831if ac_fn_f77_try_compile "$LINENO"; then :
29832  ac_cv_prog_f77_v=
29833# Try some options frequently used verbose output
29834for ac_verb in -v -verbose --verbose -V -\#\#\#; do
29835  cat > conftest.$ac_ext <<_ACEOF
29836      program main
29837
29838      end
29839_ACEOF
29840
29841# Compile and link our simple test program by passing a flag (argument
29842# 1 to this macro) to the Fortran compiler in order to get
29843# "verbose" output that we can then parse for the Fortran linker
29844# flags.
29845ac_save_FFLAGS=$FFLAGS
29846FFLAGS="$FFLAGS $ac_verb"
29847eval "set x $ac_link"
29848shift
29849$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
29850# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
29851# LIBRARY_PATH; skip all such settings.
29852ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
29853  sed '/^Driving:/d; /^Configured with:/d;
29854      '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
29855$as_echo "$ac_f77_v_output" >&5
29856FFLAGS=$ac_save_FFLAGS
29857
29858rm -rf conftest*
29859
29860# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
29861# /foo, /bar, and /baz are search directories for the Fortran linker.
29862# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
29863ac_f77_v_output="`echo $ac_f77_v_output |
29864	grep 'LPATH is:' |
29865	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"
29866
29867# FIXME: we keep getting bitten by quoted arguments; a more general fix
29868#        that detects unbalanced quotes in FLIBS should be implemented
29869#        and (ugh) tested at some point.
29870case $ac_f77_v_output in
29871  # With xlf replace commas with spaces,
29872  # and remove "-link" and closing parenthesis.
29873  *xlfentry*)
29874    ac_f77_v_output=`echo $ac_f77_v_output |
29875      sed '
29876        s/,/ /g
29877        s/ -link / /g
29878        s/) *$//
29879      '
29880    ` ;;
29881
29882  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
29883  # $LIBS confuse us, and the libraries appear later in the output anyway).
29884  *mGLOB_options_string*)
29885    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
29886
29887  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
29888  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
29889  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
29890  *-cmdline\ * | *-ignore\ * | *-def\ *)
29891    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
29892	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
29893	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
29894	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
29895
29896  # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
29897  *fort77*f2c*gcc*)
29898    ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n '
29899        /:[	 ]\+Running[	 ]\{1,\}"gcc"/{
29900          /"-c"/d
29901          /[.]c"*/d
29902          s/^.*"gcc"/"gcc"/
29903          s/"//gp
29904        }'` ;;
29905
29906  # If we are using Cray Fortran then delete quotes.
29907  *cft90*)
29908    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
29909esac
29910
29911
29912  # look for -l* and *.a constructs in the output
29913  for ac_arg in $ac_f77_v_output; do
29914     case $ac_arg in
29915	[\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
29916	  ac_cv_prog_f77_v=$ac_verb
29917	  break 2 ;;
29918     esac
29919  done
29920done
29921if test -z "$ac_cv_prog_f77_v"; then
29922   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5
29923$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
29924fi
29925else
29926  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
29927$as_echo "$as_me: WARNING: compilation failed" >&2;}
29928fi
29929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29930
29931fi
29932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5
29933$as_echo "$ac_cv_prog_f77_v" >&6; }
29934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5
29935$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; }
29936if ${ac_cv_f77_libs+:} false; then :
29937  $as_echo_n "(cached) " >&6
29938else
29939  if test "x$FLIBS" != "x"; then
29940  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
29941else
29942
29943cat > conftest.$ac_ext <<_ACEOF
29944      program main
29945
29946      end
29947_ACEOF
29948
29949# Compile and link our simple test program by passing a flag (argument
29950# 1 to this macro) to the Fortran compiler in order to get
29951# "verbose" output that we can then parse for the Fortran linker
29952# flags.
29953ac_save_FFLAGS=$FFLAGS
29954FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
29955eval "set x $ac_link"
29956shift
29957$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
29958# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
29959# LIBRARY_PATH; skip all such settings.
29960ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
29961  sed '/^Driving:/d; /^Configured with:/d;
29962      '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
29963$as_echo "$ac_f77_v_output" >&5
29964FFLAGS=$ac_save_FFLAGS
29965
29966rm -rf conftest*
29967
29968# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
29969# /foo, /bar, and /baz are search directories for the Fortran linker.
29970# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
29971ac_f77_v_output="`echo $ac_f77_v_output |
29972	grep 'LPATH is:' |
29973	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"
29974
29975# FIXME: we keep getting bitten by quoted arguments; a more general fix
29976#        that detects unbalanced quotes in FLIBS should be implemented
29977#        and (ugh) tested at some point.
29978case $ac_f77_v_output in
29979  # With xlf replace commas with spaces,
29980  # and remove "-link" and closing parenthesis.
29981  *xlfentry*)
29982    ac_f77_v_output=`echo $ac_f77_v_output |
29983      sed '
29984        s/,/ /g
29985        s/ -link / /g
29986        s/) *$//
29987      '
29988    ` ;;
29989
29990  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
29991  # $LIBS confuse us, and the libraries appear later in the output anyway).
29992  *mGLOB_options_string*)
29993    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
29994
29995  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
29996  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
29997  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
29998  *-cmdline\ * | *-ignore\ * | *-def\ *)
29999    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
30000	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
30001	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
30002	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
30003
30004  # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
30005  *fort77*f2c*gcc*)
30006    ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n '
30007        /:[	 ]\+Running[	 ]\{1,\}"gcc"/{
30008          /"-c"/d
30009          /[.]c"*/d
30010          s/^.*"gcc"/"gcc"/
30011          s/"//gp
30012        }'` ;;
30013
30014  # If we are using Cray Fortran then delete quotes.
30015  *cft90*)
30016    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
30017esac
30018
30019
30020
30021ac_cv_f77_libs=
30022
30023# Save positional arguments (if any)
30024ac_save_positional="$@"
30025
30026set X $ac_f77_v_output
30027while test $# != 1; do
30028  shift
30029  ac_arg=$1
30030  case $ac_arg in
30031	[\\/]*.a | ?:[\\/]*.a)
30032	    ac_exists=false
30033  for ac_i in $ac_cv_f77_libs; do
30034    if test x"$ac_arg" = x"$ac_i"; then
30035      ac_exists=true
30036      break
30037    fi
30038  done
30039
30040  if test x"$ac_exists" = xtrue; then :
30041
30042else
30043  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
30044fi
30045	  ;;
30046	-bI:*)
30047	    ac_exists=false
30048  for ac_i in $ac_cv_f77_libs; do
30049    if test x"$ac_arg" = x"$ac_i"; then
30050      ac_exists=true
30051      break
30052    fi
30053  done
30054
30055  if test x"$ac_exists" = xtrue; then :
30056
30057else
30058  if test "$ac_compiler_gnu" = yes; then
30059  for ac_link_opt in $ac_arg; do
30060    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
30061  done
30062else
30063  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
30064fi
30065fi
30066	  ;;
30067	  # Ignore these flags.
30068	-lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
30069	  |-LANG:=* | -LIST:* | -LNO:* | -link)
30070	  ;;
30071	-lkernel32)
30072	  case $host_os in
30073	  *cygwin*) ;;
30074	  *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
30075	    ;;
30076	  esac
30077	  ;;
30078	-[LRuYz])
30079	  # These flags, when seen by themselves, take an argument.
30080	  # We remove the space between option and argument and re-iterate
30081	  # unless we find an empty arg or a new option (starting with -)
30082	  case $2 in
30083	     "" | -*);;
30084	     *)
30085		ac_arg="$ac_arg$2"
30086		shift; shift
30087		set X $ac_arg "$@"
30088		;;
30089	  esac
30090	  ;;
30091	-YP,*)
30092	  for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
30093	      ac_exists=false
30094  for ac_i in $ac_cv_f77_libs; do
30095    if test x"$ac_j" = x"$ac_i"; then
30096      ac_exists=true
30097      break
30098    fi
30099  done
30100
30101  if test x"$ac_exists" = xtrue; then :
30102
30103else
30104  ac_arg="$ac_arg $ac_j"
30105			       ac_cv_f77_libs="$ac_cv_f77_libs $ac_j"
30106fi
30107	  done
30108	  ;;
30109	-[lLR]*)
30110	    ac_exists=false
30111  for ac_i in $ac_cv_f77_libs; do
30112    if test x"$ac_arg" = x"$ac_i"; then
30113      ac_exists=true
30114      break
30115    fi
30116  done
30117
30118  if test x"$ac_exists" = xtrue; then :
30119
30120else
30121  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
30122fi
30123	  ;;
30124	-zallextract*| -zdefaultextract)
30125	  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
30126	  ;;
30127	  # Ignore everything else.
30128  esac
30129done
30130# restore positional arguments
30131set X $ac_save_positional; shift
30132
30133# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
30134# then we insist that the "run path" must be an absolute path (i.e. it
30135# must begin with a "/").
30136case `(uname -sr) 2>/dev/null` in
30137   "SunOS 5"*)
30138      ac_ld_run_path=`$as_echo "$ac_f77_v_output" |
30139			sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
30140      test "x$ac_ld_run_path" != x &&
30141	if test "$ac_compiler_gnu" = yes; then
30142  for ac_link_opt in $ac_ld_run_path; do
30143    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
30144  done
30145else
30146  ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path"
30147fi
30148      ;;
30149esac
30150fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
30151
30152fi
30153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5
30154$as_echo "$ac_cv_f77_libs" >&6; }
30155FLIBS="$ac_cv_f77_libs"
30156
30157
30158ac_ext=c
30159ac_cpp='$CPP $CPPFLAGS'
30160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30162ac_compiler_gnu=$ac_cv_c_compiler_gnu
30163
30164ac_ext=f
30165ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30166ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30167ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30168
30169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5
30170$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; }
30171if ${ac_cv_f77_dummy_main+:} false; then :
30172  $as_echo_n "(cached) " >&6
30173else
30174  ac_f77_dm_save_LIBS=$LIBS
30175 LIBS="$LIBS $FLIBS"
30176 ac_fortran_dm_var=F77_DUMMY_MAIN
30177 ac_ext=c
30178ac_cpp='$CPP $CPPFLAGS'
30179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30181ac_compiler_gnu=$ac_cv_c_compiler_gnu
30182
30183 # First, try linking without a dummy main:
30184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30185/* end confdefs.h.  */
30186
30187#ifdef F77_DUMMY_MAIN
30188
30189#  ifdef __cplusplus
30190     extern "C"
30191#  endif
30192   int F77_DUMMY_MAIN() { return 1; }
30193
30194#endif
30195int
30196main ()
30197{
30198
30199  ;
30200  return 0;
30201}
30202_ACEOF
30203if ac_fn_c_try_link "$LINENO"; then :
30204  ac_cv_fortran_dummy_main=none
30205else
30206  ac_cv_fortran_dummy_main=unknown
30207fi
30208rm -f core conftest.err conftest.$ac_objext \
30209    conftest$ac_exeext conftest.$ac_ext
30210
30211 if test $ac_cv_fortran_dummy_main = unknown; then
30212   for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
30213     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30214/* end confdefs.h.  */
30215#define $ac_fortran_dm_var $ac_func
30216#ifdef F77_DUMMY_MAIN
30217
30218#  ifdef __cplusplus
30219     extern "C"
30220#  endif
30221   int F77_DUMMY_MAIN() { return 1; }
30222
30223#endif
30224int
30225main ()
30226{
30227
30228  ;
30229  return 0;
30230}
30231_ACEOF
30232if ac_fn_c_try_link "$LINENO"; then :
30233  ac_cv_fortran_dummy_main=$ac_func; break
30234fi
30235rm -f core conftest.err conftest.$ac_objext \
30236    conftest$ac_exeext conftest.$ac_ext
30237   done
30238 fi
30239 ac_ext=f
30240ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30241ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30242ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30243 ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main
30244 rm -rf conftest*
30245 LIBS=$ac_f77_dm_save_LIBS
30246
30247fi
30248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5
30249$as_echo "$ac_cv_f77_dummy_main" >&6; }
30250F77_DUMMY_MAIN=$ac_cv_f77_dummy_main
30251if test "$F77_DUMMY_MAIN" != unknown; then :
30252  if test $F77_DUMMY_MAIN != none; then
30253
30254cat >>confdefs.h <<_ACEOF
30255#define F77_DUMMY_MAIN $F77_DUMMY_MAIN
30256_ACEOF
30257
30258  if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
30259
30260$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h
30261
30262  fi
30263fi
30264else
30265  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30267as_fn_error $? "linking to Fortran libraries from C fails
30268See \`config.log' for more details" "$LINENO" 5; }
30269fi
30270
30271ac_ext=c
30272ac_cpp='$CPP $CPPFLAGS'
30273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30275ac_compiler_gnu=$ac_cv_c_compiler_gnu
30276
30277ac_ext=f
30278ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30279ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30280ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5
30282$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; }
30283if ${ac_cv_f77_mangling+:} false; then :
30284  $as_echo_n "(cached) " >&6
30285else
30286  cat > conftest.$ac_ext <<_ACEOF
30287      subroutine foobar()
30288      return
30289      end
30290      subroutine foo_bar()
30291      return
30292      end
30293_ACEOF
30294if ac_fn_f77_try_compile "$LINENO"; then :
30295  mv conftest.$ac_objext cfortran_test.$ac_objext
30296
30297  ac_save_LIBS=$LIBS
30298  LIBS="cfortran_test.$ac_objext $LIBS $FLIBS"
30299
30300  ac_ext=c
30301ac_cpp='$CPP $CPPFLAGS'
30302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30304ac_compiler_gnu=$ac_cv_c_compiler_gnu
30305  ac_success=no
30306  for ac_foobar in foobar FOOBAR; do
30307    for ac_underscore in "" "_"; do
30308      ac_func="$ac_foobar$ac_underscore"
30309      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30310/* end confdefs.h.  */
30311
30312/* Override any GCC internal prototype to avoid an error.
30313   Use char because int might match the return type of a GCC
30314   builtin and then its argument prototype would still apply.  */
30315#ifdef __cplusplus
30316extern "C"
30317#endif
30318char $ac_func ();
30319#ifdef F77_DUMMY_MAIN
30320
30321#  ifdef __cplusplus
30322     extern "C"
30323#  endif
30324   int F77_DUMMY_MAIN() { return 1; }
30325
30326#endif
30327int
30328main ()
30329{
30330return $ac_func ();
30331  ;
30332  return 0;
30333}
30334_ACEOF
30335if ac_fn_c_try_link "$LINENO"; then :
30336  ac_success=yes; break 2
30337fi
30338rm -f core conftest.err conftest.$ac_objext \
30339    conftest$ac_exeext conftest.$ac_ext
30340    done
30341  done
30342  ac_ext=f
30343ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30344ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30345ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30346
30347  if test "$ac_success" = "yes"; then
30348     case $ac_foobar in
30349	foobar)
30350	   ac_case=lower
30351	   ac_foo_bar=foo_bar
30352	   ;;
30353	FOOBAR)
30354	   ac_case=upper
30355	   ac_foo_bar=FOO_BAR
30356	   ;;
30357     esac
30358
30359     ac_ext=c
30360ac_cpp='$CPP $CPPFLAGS'
30361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30363ac_compiler_gnu=$ac_cv_c_compiler_gnu
30364     ac_success_extra=no
30365     for ac_extra in "" "_"; do
30366	ac_func="$ac_foo_bar$ac_underscore$ac_extra"
30367	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30368/* end confdefs.h.  */
30369
30370/* Override any GCC internal prototype to avoid an error.
30371   Use char because int might match the return type of a GCC
30372   builtin and then its argument prototype would still apply.  */
30373#ifdef __cplusplus
30374extern "C"
30375#endif
30376char $ac_func ();
30377#ifdef F77_DUMMY_MAIN
30378
30379#  ifdef __cplusplus
30380     extern "C"
30381#  endif
30382   int F77_DUMMY_MAIN() { return 1; }
30383
30384#endif
30385int
30386main ()
30387{
30388return $ac_func ();
30389  ;
30390  return 0;
30391}
30392_ACEOF
30393if ac_fn_c_try_link "$LINENO"; then :
30394  ac_success_extra=yes; break
30395fi
30396rm -f core conftest.err conftest.$ac_objext \
30397    conftest$ac_exeext conftest.$ac_ext
30398     done
30399     ac_ext=f
30400ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30401ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30402ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30403
30404     if test "$ac_success_extra" = "yes"; then
30405	ac_cv_f77_mangling="$ac_case case"
30406	if test -z "$ac_underscore"; then
30407	   ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore"
30408	else
30409	   ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore"
30410	fi
30411	if test -z "$ac_extra"; then
30412	   ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore"
30413	else
30414	   ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore"
30415	fi
30416      else
30417	ac_cv_f77_mangling="unknown"
30418      fi
30419  else
30420     ac_cv_f77_mangling="unknown"
30421  fi
30422
30423  LIBS=$ac_save_LIBS
30424  rm -rf conftest*
30425  rm -f cfortran_test*
30426else
30427  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30429as_fn_error $? "cannot compile a simple Fortran program
30430See \`config.log' for more details" "$LINENO" 5; }
30431fi
30432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30433
30434fi
30435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5
30436$as_echo "$ac_cv_f77_mangling" >&6; }
30437
30438ac_ext=c
30439ac_cpp='$CPP $CPPFLAGS'
30440ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30441ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30442ac_compiler_gnu=$ac_cv_c_compiler_gnu
30443
30444
30445
30446
30447acx_blas_ok=no
30448acx_blas_save_LIBS="$LIBS"
30449
30450
30451# Check whether --with-blas-library was given.
30452if test "${with_blas_library+set}" = set; then :
30453  withval=$with_blas_library;
30454fi
30455
30456saved_ldflags="$LDFLAGS"
30457
30458
30459if test "$with_blas_library" != no -a "$with_blas_library" != ""; then
30460LDFLAGS="$LDFLAGS -L$with_blas_library"
30461fi
30462
30463# Get fortran linker names of BLAS functions to check for.
30464ac_ext=f
30465ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30466ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30467ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30468case $ac_cv_f77_mangling in
30469  upper*) ac_val="SGEMM" ;;
30470  lower*) ac_val="sgemm" ;;
30471  *)      ac_val="unknown" ;;
30472esac
30473case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac
30474
30475sgemm="$ac_val"
30476
30477ac_ext=c
30478ac_cpp='$CPP $CPPFLAGS'
30479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30481ac_compiler_gnu=$ac_cv_c_compiler_gnu
30482
30483ac_ext=f
30484ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
30485ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30486ac_compiler_gnu=$ac_cv_f77_compiler_gnu
30487case $ac_cv_f77_mangling in
30488  upper*) ac_val="DGEMM" ;;
30489  lower*) ac_val="dgemm" ;;
30490  *)      ac_val="unknown" ;;
30491esac
30492case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac
30493
30494dgemm="$ac_val"
30495
30496ac_ext=c
30497ac_cpp='$CPP $CPPFLAGS'
30498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30500ac_compiler_gnu=$ac_cv_c_compiler_gnu
30501
30502
30503LIBS="$LIBS $FLIBS"
30504
30505# First, check BLAS_LIBS environment variable
30506if test $acx_blas_ok = no; then
30507    if test "x$BLAS_LIBS" != x; then
30508        save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in $BLAS_LIBS" >&5
30510$as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; }
30511        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30512/* end confdefs.h.  */
30513
30514/* Override any GCC internal prototype to avoid an error.
30515   Use char because int might match the return type of a GCC
30516   builtin and then its argument prototype would still apply.  */
30517#ifdef __cplusplus
30518extern "C"
30519#endif
30520char $sgemm ();
30521#ifdef F77_DUMMY_MAIN
30522
30523#  ifdef __cplusplus
30524     extern "C"
30525#  endif
30526   int F77_DUMMY_MAIN() { return 1; }
30527
30528#endif
30529int
30530main ()
30531{
30532return $sgemm ();
30533  ;
30534  return 0;
30535}
30536_ACEOF
30537if ac_fn_c_try_link "$LINENO"; then :
30538  acx_blas_ok=yes; BLAS_TYPE="Using BLAS_LIBS environment variable"
30539else
30540  BLAS_LIBS=""
30541fi
30542rm -f core conftest.err conftest.$ac_objext \
30543    conftest$ac_exeext conftest.$ac_ext
30544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5
30545$as_echo "$acx_blas_ok" >&6; }
30546        LIBS="$save_LIBS"
30547    elif $WITH_DEVTOOLS; then # Scilab thirdparties
30548        BLAS_LIBS="-L$DEVTOOLS_LIBDIR -lblas"
30549        BLAS_TYPE="Generic Blas (thirdparties)"
30550        acx_blas_ok=yes
30551    fi
30552fi
30553
30554# BLAS linked to by default?  (happens on some supercomputers)
30555if test $acx_blas_ok = no; then
30556	save_LIBS="$LIBS"; LIBS="$LIBS"
30557	as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh`
30558ac_fn_c_check_func "$LINENO" "$sgemm" "$as_ac_var"
30559if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
30560  acx_blas_ok=yes; BLAS_TYPE="Linked"
30561fi
30562
30563	LIBS="$save_LIBS"
30564fi
30565
30566# BLAS in OpenBlas library (http://www.openblas.net/)
30567if test $acx_blas_ok = no; then
30568	as_ac_Lib=`$as_echo "ac_cv_lib_openblas_$sgemm" | $as_tr_sh`
30569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lopenblas" >&5
30570$as_echo_n "checking for $sgemm in -lopenblas... " >&6; }
30571if eval \${$as_ac_Lib+:} false; then :
30572  $as_echo_n "(cached) " >&6
30573else
30574  ac_check_lib_save_LIBS=$LIBS
30575LIBS="-lopenblas  $LIBS"
30576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30577/* end confdefs.h.  */
30578
30579/* Override any GCC internal prototype to avoid an error.
30580   Use char because int might match the return type of a GCC
30581   builtin and then its argument prototype would still apply.  */
30582#ifdef __cplusplus
30583extern "C"
30584#endif
30585char $sgemm ();
30586#ifdef F77_DUMMY_MAIN
30587
30588#  ifdef __cplusplus
30589     extern "C"
30590#  endif
30591   int F77_DUMMY_MAIN() { return 1; }
30592
30593#endif
30594int
30595main ()
30596{
30597return $sgemm ();
30598  ;
30599  return 0;
30600}
30601_ACEOF
30602if ac_fn_c_try_link "$LINENO"; then :
30603  eval "$as_ac_Lib=yes"
30604else
30605  eval "$as_ac_Lib=no"
30606fi
30607rm -f core conftest.err conftest.$ac_objext \
30608    conftest$ac_exeext conftest.$ac_ext
30609LIBS=$ac_check_lib_save_LIBS
30610fi
30611eval ac_res=\$$as_ac_Lib
30612	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30613$as_echo "$ac_res" >&6; }
30614if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30615  acx_blas_ok=yes; BLAS_TYPE="OpenBLAS"; BLAS_LIBS="-lopenblas"
30616fi
30617
30618fi
30619
30620# BLAS in ATLAS library (http://math-atlas.sourceforge.net/)
30621if test $acx_blas_ok = no; then
30622
30623pkg_failed=no
30624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLAS" >&5
30625$as_echo_n "checking for BLAS... " >&6; }
30626
30627if test -n "$PKG_CONFIG"; then
30628    if test -n "$BLAS_CFLAGS"; then
30629        pkg_cv_BLAS_CFLAGS="$BLAS_CFLAGS"
30630    else
30631        if test -n "$PKG_CONFIG" && \
30632    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"atlas\""; } >&5
30633  ($PKG_CONFIG --exists --print-errors "atlas") 2>&5
30634  ac_status=$?
30635  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30636  test $ac_status = 0; }; then
30637  pkg_cv_BLAS_CFLAGS=`$PKG_CONFIG --cflags "atlas" 2>/dev/null`
30638else
30639  pkg_failed=yes
30640fi
30641    fi
30642else
30643	pkg_failed=untried
30644fi
30645if test -n "$PKG_CONFIG"; then
30646    if test -n "$BLAS_LIBS"; then
30647        pkg_cv_BLAS_LIBS="$BLAS_LIBS"
30648    else
30649        if test -n "$PKG_CONFIG" && \
30650    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"atlas\""; } >&5
30651  ($PKG_CONFIG --exists --print-errors "atlas") 2>&5
30652  ac_status=$?
30653  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30654  test $ac_status = 0; }; then
30655  pkg_cv_BLAS_LIBS=`$PKG_CONFIG --libs "atlas" 2>/dev/null`
30656else
30657  pkg_failed=yes
30658fi
30659    fi
30660else
30661	pkg_failed=untried
30662fi
30663
30664
30665
30666if test $pkg_failed = yes; then
30667
30668if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30669        _pkg_short_errors_supported=yes
30670else
30671        _pkg_short_errors_supported=no
30672fi
30673        if test $_pkg_short_errors_supported = yes; then
30674	        BLAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "atlas"`
30675        else
30676	        BLAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "atlas"`
30677        fi
30678	# Put the nasty error message in config.log where it belongs
30679	echo "$BLAS_PKG_ERRORS" >&5
30680
30681	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30682$as_echo "no" >&6; }
30683                acx_blas_ok=no
30684elif test $pkg_failed = untried; then
30685	acx_blas_ok=no
30686else
30687	BLAS_CFLAGS=$pkg_cv_BLAS_CFLAGS
30688	BLAS_LIBS=$pkg_cv_BLAS_LIBS
30689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30690$as_echo "yes" >&6; }
30691	acx_blas_ok=yes; BLAS_TYPE="Atlas"
30692fi
30693fi
30694if test $acx_blas_ok = no; then
30695	as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh`
30696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lf77blas" >&5
30697$as_echo_n "checking for $sgemm in -lf77blas... " >&6; }
30698if eval \${$as_ac_Lib+:} false; then :
30699  $as_echo_n "(cached) " >&6
30700else
30701  ac_check_lib_save_LIBS=$LIBS
30702LIBS="-lf77blas  $LIBS"
30703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30704/* end confdefs.h.  */
30705
30706/* Override any GCC internal prototype to avoid an error.
30707   Use char because int might match the return type of a GCC
30708   builtin and then its argument prototype would still apply.  */
30709#ifdef __cplusplus
30710extern "C"
30711#endif
30712char $sgemm ();
30713#ifdef F77_DUMMY_MAIN
30714
30715#  ifdef __cplusplus
30716     extern "C"
30717#  endif
30718   int F77_DUMMY_MAIN() { return 1; }
30719
30720#endif
30721int
30722main ()
30723{
30724return $sgemm ();
30725  ;
30726  return 0;
30727}
30728_ACEOF
30729if ac_fn_c_try_link "$LINENO"; then :
30730  eval "$as_ac_Lib=yes"
30731else
30732  eval "$as_ac_Lib=no"
30733fi
30734rm -f core conftest.err conftest.$ac_objext \
30735    conftest$ac_exeext conftest.$ac_ext
30736LIBS=$ac_check_lib_save_LIBS
30737fi
30738eval ac_res=\$$as_ac_Lib
30739	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30740$as_echo "$ac_res" >&6; }
30741if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30742  acx_blas_ok=yes; BLAS_TYPE="Atlas"; BLAS_LIBS="-lf77blas"
30743else
30744
30745		as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh`
30746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lf77blas" >&5
30747$as_echo_n "checking for $sgemm in -lf77blas... " >&6; }
30748if eval \${$as_ac_Lib+:} false; then :
30749  $as_echo_n "(cached) " >&6
30750else
30751  ac_check_lib_save_LIBS=$LIBS
30752LIBS="-lf77blas -latlas $LIBS"
30753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30754/* end confdefs.h.  */
30755
30756/* Override any GCC internal prototype to avoid an error.
30757   Use char because int might match the return type of a GCC
30758   builtin and then its argument prototype would still apply.  */
30759#ifdef __cplusplus
30760extern "C"
30761#endif
30762char $sgemm ();
30763#ifdef F77_DUMMY_MAIN
30764
30765#  ifdef __cplusplus
30766     extern "C"
30767#  endif
30768   int F77_DUMMY_MAIN() { return 1; }
30769
30770#endif
30771int
30772main ()
30773{
30774return $sgemm ();
30775  ;
30776  return 0;
30777}
30778_ACEOF
30779if ac_fn_c_try_link "$LINENO"; then :
30780  eval "$as_ac_Lib=yes"
30781else
30782  eval "$as_ac_Lib=no"
30783fi
30784rm -f core conftest.err conftest.$ac_objext \
30785    conftest$ac_exeext conftest.$ac_ext
30786LIBS=$ac_check_lib_save_LIBS
30787fi
30788eval ac_res=\$$as_ac_Lib
30789	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30790$as_echo "$ac_res" >&6; }
30791if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30792  acx_blas_ok=yes; BLAS_TYPE="Atlas"; BLAS_LIBS="-lf77blas -latlas"
30793fi
30794
30795fi
30796
30797fi
30798
30799# BLAS in Intel MKL libraries (http://software.intel.com/en-us/articles/a-new-linking-model-single-dynamic-library-mkl_rt-since-intel-mkl-103)
30800if test $acx_blas_ok = no; then
30801	as_ac_Lib=`$as_echo "ac_cv_lib_mkl_rt_$sgemm" | $as_tr_sh`
30802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lmkl_rt" >&5
30803$as_echo_n "checking for $sgemm in -lmkl_rt... " >&6; }
30804if eval \${$as_ac_Lib+:} false; then :
30805  $as_echo_n "(cached) " >&6
30806else
30807  ac_check_lib_save_LIBS=$LIBS
30808LIBS="-lmkl_rt  $LIBS"
30809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30810/* end confdefs.h.  */
30811
30812/* Override any GCC internal prototype to avoid an error.
30813   Use char because int might match the return type of a GCC
30814   builtin and then its argument prototype would still apply.  */
30815#ifdef __cplusplus
30816extern "C"
30817#endif
30818char $sgemm ();
30819#ifdef F77_DUMMY_MAIN
30820
30821#  ifdef __cplusplus
30822     extern "C"
30823#  endif
30824   int F77_DUMMY_MAIN() { return 1; }
30825
30826#endif
30827int
30828main ()
30829{
30830return $sgemm ();
30831  ;
30832  return 0;
30833}
30834_ACEOF
30835if ac_fn_c_try_link "$LINENO"; then :
30836  eval "$as_ac_Lib=yes"
30837else
30838  eval "$as_ac_Lib=no"
30839fi
30840rm -f core conftest.err conftest.$ac_objext \
30841    conftest$ac_exeext conftest.$ac_ext
30842LIBS=$ac_check_lib_save_LIBS
30843fi
30844eval ac_res=\$$as_ac_Lib
30845	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30846$as_echo "$ac_res" >&6; }
30847if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30848  acx_blas_ok=yes; BLAS_TYPE="MKL"; BLAS_LIBS="-lmkl_rt"
30849fi
30850
30851fi
30852
30853# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
30854if test $acx_blas_ok = no; then
30855	as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh`
30856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5
30857$as_echo_n "checking for $sgemm in -lblas... " >&6; }
30858if eval \${$as_ac_Lib+:} false; then :
30859  $as_echo_n "(cached) " >&6
30860else
30861  ac_check_lib_save_LIBS=$LIBS
30862LIBS="-lblas  $LIBS"
30863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30864/* end confdefs.h.  */
30865
30866/* Override any GCC internal prototype to avoid an error.
30867   Use char because int might match the return type of a GCC
30868   builtin and then its argument prototype would still apply.  */
30869#ifdef __cplusplus
30870extern "C"
30871#endif
30872char $sgemm ();
30873#ifdef F77_DUMMY_MAIN
30874
30875#  ifdef __cplusplus
30876     extern "C"
30877#  endif
30878   int F77_DUMMY_MAIN() { return 1; }
30879
30880#endif
30881int
30882main ()
30883{
30884return $sgemm ();
30885  ;
30886  return 0;
30887}
30888_ACEOF
30889if ac_fn_c_try_link "$LINENO"; then :
30890  eval "$as_ac_Lib=yes"
30891else
30892  eval "$as_ac_Lib=no"
30893fi
30894rm -f core conftest.err conftest.$ac_objext \
30895    conftest$ac_exeext conftest.$ac_ext
30896LIBS=$ac_check_lib_save_LIBS
30897fi
30898eval ac_res=\$$as_ac_Lib
30899	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30900$as_echo "$ac_res" >&6; }
30901if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30902  as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh`
30903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dgemm in -ldgemm" >&5
30904$as_echo_n "checking for $dgemm in -ldgemm... " >&6; }
30905if eval \${$as_ac_Lib+:} false; then :
30906  $as_echo_n "(cached) " >&6
30907else
30908  ac_check_lib_save_LIBS=$LIBS
30909LIBS="-ldgemm -lblas $LIBS"
30910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30911/* end confdefs.h.  */
30912
30913/* Override any GCC internal prototype to avoid an error.
30914   Use char because int might match the return type of a GCC
30915   builtin and then its argument prototype would still apply.  */
30916#ifdef __cplusplus
30917extern "C"
30918#endif
30919char $dgemm ();
30920#ifdef F77_DUMMY_MAIN
30921
30922#  ifdef __cplusplus
30923     extern "C"
30924#  endif
30925   int F77_DUMMY_MAIN() { return 1; }
30926
30927#endif
30928int
30929main ()
30930{
30931return $dgemm ();
30932  ;
30933  return 0;
30934}
30935_ACEOF
30936if ac_fn_c_try_link "$LINENO"; then :
30937  eval "$as_ac_Lib=yes"
30938else
30939  eval "$as_ac_Lib=no"
30940fi
30941rm -f core conftest.err conftest.$ac_objext \
30942    conftest$ac_exeext conftest.$ac_ext
30943LIBS=$ac_check_lib_save_LIBS
30944fi
30945eval ac_res=\$$as_ac_Lib
30946	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30947$as_echo "$ac_res" >&6; }
30948if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30949  as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh`
30950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsgemm" >&5
30951$as_echo_n "checking for $sgemm in -lsgemm... " >&6; }
30952if eval \${$as_ac_Lib+:} false; then :
30953  $as_echo_n "(cached) " >&6
30954else
30955  ac_check_lib_save_LIBS=$LIBS
30956LIBS="-lsgemm -lblas $LIBS"
30957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30958/* end confdefs.h.  */
30959
30960/* Override any GCC internal prototype to avoid an error.
30961   Use char because int might match the return type of a GCC
30962   builtin and then its argument prototype would still apply.  */
30963#ifdef __cplusplus
30964extern "C"
30965#endif
30966char $sgemm ();
30967#ifdef F77_DUMMY_MAIN
30968
30969#  ifdef __cplusplus
30970     extern "C"
30971#  endif
30972   int F77_DUMMY_MAIN() { return 1; }
30973
30974#endif
30975int
30976main ()
30977{
30978return $sgemm ();
30979  ;
30980  return 0;
30981}
30982_ACEOF
30983if ac_fn_c_try_link "$LINENO"; then :
30984  eval "$as_ac_Lib=yes"
30985else
30986  eval "$as_ac_Lib=no"
30987fi
30988rm -f core conftest.err conftest.$ac_objext \
30989    conftest$ac_exeext conftest.$ac_ext
30990LIBS=$ac_check_lib_save_LIBS
30991fi
30992eval ac_res=\$$as_ac_Lib
30993	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30994$as_echo "$ac_res" >&6; }
30995if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
30996  acx_blas_ok=yes; BLAS_TYPE="PhiPACK"; BLAS_LIBS="-lsgemm -ldgemm -lblas"
30997fi
30998
30999fi
31000
31001fi
31002
31003fi
31004
31005# BLAS in Alpha CXML library?
31006if test $acx_blas_ok = no; then
31007	as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh`
31008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcxml" >&5
31009$as_echo_n "checking for $sgemm in -lcxml... " >&6; }
31010if eval \${$as_ac_Lib+:} false; then :
31011  $as_echo_n "(cached) " >&6
31012else
31013  ac_check_lib_save_LIBS=$LIBS
31014LIBS="-lcxml  $LIBS"
31015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31016/* end confdefs.h.  */
31017
31018/* Override any GCC internal prototype to avoid an error.
31019   Use char because int might match the return type of a GCC
31020   builtin and then its argument prototype would still apply.  */
31021#ifdef __cplusplus
31022extern "C"
31023#endif
31024char $sgemm ();
31025#ifdef F77_DUMMY_MAIN
31026
31027#  ifdef __cplusplus
31028     extern "C"
31029#  endif
31030   int F77_DUMMY_MAIN() { return 1; }
31031
31032#endif
31033int
31034main ()
31035{
31036return $sgemm ();
31037  ;
31038  return 0;
31039}
31040_ACEOF
31041if ac_fn_c_try_link "$LINENO"; then :
31042  eval "$as_ac_Lib=yes"
31043else
31044  eval "$as_ac_Lib=no"
31045fi
31046rm -f core conftest.err conftest.$ac_objext \
31047    conftest$ac_exeext conftest.$ac_ext
31048LIBS=$ac_check_lib_save_LIBS
31049fi
31050eval ac_res=\$$as_ac_Lib
31051	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31052$as_echo "$ac_res" >&6; }
31053if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31054  acx_blas_ok=yes;BLAS_TYPE="Alpha CXML"; BLAS_LIBS="-lcxml"
31055fi
31056
31057fi
31058
31059# BLAS in Alpha DXML library? (now called CXML, see above)
31060if test $acx_blas_ok = no; then
31061	as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh`
31062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -ldxml" >&5
31063$as_echo_n "checking for $sgemm in -ldxml... " >&6; }
31064if eval \${$as_ac_Lib+:} false; then :
31065  $as_echo_n "(cached) " >&6
31066else
31067  ac_check_lib_save_LIBS=$LIBS
31068LIBS="-ldxml  $LIBS"
31069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31070/* end confdefs.h.  */
31071
31072/* Override any GCC internal prototype to avoid an error.
31073   Use char because int might match the return type of a GCC
31074   builtin and then its argument prototype would still apply.  */
31075#ifdef __cplusplus
31076extern "C"
31077#endif
31078char $sgemm ();
31079#ifdef F77_DUMMY_MAIN
31080
31081#  ifdef __cplusplus
31082     extern "C"
31083#  endif
31084   int F77_DUMMY_MAIN() { return 1; }
31085
31086#endif
31087int
31088main ()
31089{
31090return $sgemm ();
31091  ;
31092  return 0;
31093}
31094_ACEOF
31095if ac_fn_c_try_link "$LINENO"; then :
31096  eval "$as_ac_Lib=yes"
31097else
31098  eval "$as_ac_Lib=no"
31099fi
31100rm -f core conftest.err conftest.$ac_objext \
31101    conftest$ac_exeext conftest.$ac_ext
31102LIBS=$ac_check_lib_save_LIBS
31103fi
31104eval ac_res=\$$as_ac_Lib
31105	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31106$as_echo "$ac_res" >&6; }
31107if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31108  acx_blas_ok=yes;BLAS_TYPE="Alpha DXML"; BLAS_LIBS="-ldxml"
31109fi
31110
31111fi
31112
31113# BLAS in Sun Performance library?
31114if test $acx_blas_ok = no; then
31115	if test "x$GCC" != xyes; then # only works with Sun CC
31116		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5
31117$as_echo_n "checking for acosp in -lsunmath... " >&6; }
31118if ${ac_cv_lib_sunmath_acosp+:} false; then :
31119  $as_echo_n "(cached) " >&6
31120else
31121  ac_check_lib_save_LIBS=$LIBS
31122LIBS="-lsunmath  $LIBS"
31123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31124/* end confdefs.h.  */
31125
31126/* Override any GCC internal prototype to avoid an error.
31127   Use char because int might match the return type of a GCC
31128   builtin and then its argument prototype would still apply.  */
31129#ifdef __cplusplus
31130extern "C"
31131#endif
31132char acosp ();
31133#ifdef F77_DUMMY_MAIN
31134
31135#  ifdef __cplusplus
31136     extern "C"
31137#  endif
31138   int F77_DUMMY_MAIN() { return 1; }
31139
31140#endif
31141int
31142main ()
31143{
31144return acosp ();
31145  ;
31146  return 0;
31147}
31148_ACEOF
31149if ac_fn_c_try_link "$LINENO"; then :
31150  ac_cv_lib_sunmath_acosp=yes
31151else
31152  ac_cv_lib_sunmath_acosp=no
31153fi
31154rm -f core conftest.err conftest.$ac_objext \
31155    conftest$ac_exeext conftest.$ac_ext
31156LIBS=$ac_check_lib_save_LIBS
31157fi
31158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5
31159$as_echo "$ac_cv_lib_sunmath_acosp" >&6; }
31160if test "x$ac_cv_lib_sunmath_acosp" = xyes; then :
31161  as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh`
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lsunperf" >&5
31163$as_echo_n "checking for $sgemm in -lsunperf... " >&6; }
31164if eval \${$as_ac_Lib+:} false; then :
31165  $as_echo_n "(cached) " >&6
31166else
31167  ac_check_lib_save_LIBS=$LIBS
31168LIBS="-lsunperf -lsunmath $LIBS"
31169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31170/* end confdefs.h.  */
31171
31172/* Override any GCC internal prototype to avoid an error.
31173   Use char because int might match the return type of a GCC
31174   builtin and then its argument prototype would still apply.  */
31175#ifdef __cplusplus
31176extern "C"
31177#endif
31178char $sgemm ();
31179#ifdef F77_DUMMY_MAIN
31180
31181#  ifdef __cplusplus
31182     extern "C"
31183#  endif
31184   int F77_DUMMY_MAIN() { return 1; }
31185
31186#endif
31187int
31188main ()
31189{
31190return $sgemm ();
31191  ;
31192  return 0;
31193}
31194_ACEOF
31195if ac_fn_c_try_link "$LINENO"; then :
31196  eval "$as_ac_Lib=yes"
31197else
31198  eval "$as_ac_Lib=no"
31199fi
31200rm -f core conftest.err conftest.$ac_objext \
31201    conftest$ac_exeext conftest.$ac_ext
31202LIBS=$ac_check_lib_save_LIBS
31203fi
31204eval ac_res=\$$as_ac_Lib
31205	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31206$as_echo "$ac_res" >&6; }
31207if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31208  BLAS_LIBS="-xlic_lib=sunperf -lsunmath";
31209								BLAS_TYPE="Sun Performance library";
31210                                 acx_blas_ok=yes
31211fi
31212
31213fi
31214
31215	fi
31216fi
31217
31218# BLAS in SCSL library?  (SGI/Cray Scientific Library)
31219if test $acx_blas_ok = no; then
31220	as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh`
31221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lscs" >&5
31222$as_echo_n "checking for $sgemm in -lscs... " >&6; }
31223if eval \${$as_ac_Lib+:} false; then :
31224  $as_echo_n "(cached) " >&6
31225else
31226  ac_check_lib_save_LIBS=$LIBS
31227LIBS="-lscs  $LIBS"
31228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31229/* end confdefs.h.  */
31230
31231/* Override any GCC internal prototype to avoid an error.
31232   Use char because int might match the return type of a GCC
31233   builtin and then its argument prototype would still apply.  */
31234#ifdef __cplusplus
31235extern "C"
31236#endif
31237char $sgemm ();
31238#ifdef F77_DUMMY_MAIN
31239
31240#  ifdef __cplusplus
31241     extern "C"
31242#  endif
31243   int F77_DUMMY_MAIN() { return 1; }
31244
31245#endif
31246int
31247main ()
31248{
31249return $sgemm ();
31250  ;
31251  return 0;
31252}
31253_ACEOF
31254if ac_fn_c_try_link "$LINENO"; then :
31255  eval "$as_ac_Lib=yes"
31256else
31257  eval "$as_ac_Lib=no"
31258fi
31259rm -f core conftest.err conftest.$ac_objext \
31260    conftest$ac_exeext conftest.$ac_ext
31261LIBS=$ac_check_lib_save_LIBS
31262fi
31263eval ac_res=\$$as_ac_Lib
31264	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31265$as_echo "$ac_res" >&6; }
31266if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31267  acx_blas_ok=yes; BLAS_TYPE="SCSL"; BLAS_LIBS="-lscs"
31268fi
31269
31270fi
31271
31272# BLAS in SGIMATH library?
31273if test $acx_blas_ok = no; then
31274	as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh`
31275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcomplib.sgimath" >&5
31276$as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; }
31277if eval \${$as_ac_Lib+:} false; then :
31278  $as_echo_n "(cached) " >&6
31279else
31280  ac_check_lib_save_LIBS=$LIBS
31281LIBS="-lcomplib.sgimath  $LIBS"
31282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31283/* end confdefs.h.  */
31284
31285/* Override any GCC internal prototype to avoid an error.
31286   Use char because int might match the return type of a GCC
31287   builtin and then its argument prototype would still apply.  */
31288#ifdef __cplusplus
31289extern "C"
31290#endif
31291char $sgemm ();
31292#ifdef F77_DUMMY_MAIN
31293
31294#  ifdef __cplusplus
31295     extern "C"
31296#  endif
31297   int F77_DUMMY_MAIN() { return 1; }
31298
31299#endif
31300int
31301main ()
31302{
31303return $sgemm ();
31304  ;
31305  return 0;
31306}
31307_ACEOF
31308if ac_fn_c_try_link "$LINENO"; then :
31309  eval "$as_ac_Lib=yes"
31310else
31311  eval "$as_ac_Lib=no"
31312fi
31313rm -f core conftest.err conftest.$ac_objext \
31314    conftest$ac_exeext conftest.$ac_ext
31315LIBS=$ac_check_lib_save_LIBS
31316fi
31317eval ac_res=\$$as_ac_Lib
31318	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31319$as_echo "$ac_res" >&6; }
31320if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31321  acx_blas_ok=yes; BLAS_TYPE="SGIMATH"; BLAS_LIBS="-lcomplib.sgimath"
31322fi
31323
31324fi
31325
31326# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
31327if test $acx_blas_ok = no; then
31328	as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh`
31329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5
31330$as_echo_n "checking for $sgemm in -lblas... " >&6; }
31331if eval \${$as_ac_Lib+:} false; then :
31332  $as_echo_n "(cached) " >&6
31333else
31334  ac_check_lib_save_LIBS=$LIBS
31335LIBS="-lblas  $LIBS"
31336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31337/* end confdefs.h.  */
31338
31339/* Override any GCC internal prototype to avoid an error.
31340   Use char because int might match the return type of a GCC
31341   builtin and then its argument prototype would still apply.  */
31342#ifdef __cplusplus
31343extern "C"
31344#endif
31345char $sgemm ();
31346#ifdef F77_DUMMY_MAIN
31347
31348#  ifdef __cplusplus
31349     extern "C"
31350#  endif
31351   int F77_DUMMY_MAIN() { return 1; }
31352
31353#endif
31354int
31355main ()
31356{
31357return $sgemm ();
31358  ;
31359  return 0;
31360}
31361_ACEOF
31362if ac_fn_c_try_link "$LINENO"; then :
31363  eval "$as_ac_Lib=yes"
31364else
31365  eval "$as_ac_Lib=no"
31366fi
31367rm -f core conftest.err conftest.$ac_objext \
31368    conftest$ac_exeext conftest.$ac_ext
31369LIBS=$ac_check_lib_save_LIBS
31370fi
31371eval ac_res=\$$as_ac_Lib
31372	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31373$as_echo "$ac_res" >&6; }
31374if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31375  as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh`
31376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lessl" >&5
31377$as_echo_n "checking for $sgemm in -lessl... " >&6; }
31378if eval \${$as_ac_Lib+:} false; then :
31379  $as_echo_n "(cached) " >&6
31380else
31381  ac_check_lib_save_LIBS=$LIBS
31382LIBS="-lessl -lblas $FLIBS $LIBS"
31383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31384/* end confdefs.h.  */
31385
31386/* Override any GCC internal prototype to avoid an error.
31387   Use char because int might match the return type of a GCC
31388   builtin and then its argument prototype would still apply.  */
31389#ifdef __cplusplus
31390extern "C"
31391#endif
31392char $sgemm ();
31393#ifdef F77_DUMMY_MAIN
31394
31395#  ifdef __cplusplus
31396     extern "C"
31397#  endif
31398   int F77_DUMMY_MAIN() { return 1; }
31399
31400#endif
31401int
31402main ()
31403{
31404return $sgemm ();
31405  ;
31406  return 0;
31407}
31408_ACEOF
31409if ac_fn_c_try_link "$LINENO"; then :
31410  eval "$as_ac_Lib=yes"
31411else
31412  eval "$as_ac_Lib=no"
31413fi
31414rm -f core conftest.err conftest.$ac_objext \
31415    conftest$ac_exeext conftest.$ac_ext
31416LIBS=$ac_check_lib_save_LIBS
31417fi
31418eval ac_res=\$$as_ac_Lib
31419	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31420$as_echo "$ac_res" >&6; }
31421if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31422  acx_blas_ok=yes; BLAS_TYPE="IBM ESSL"; BLAS_LIBS="-lessl -lblas"
31423fi
31424
31425fi
31426
31427fi
31428
31429# Generic BLAS library?
31430if test $acx_blas_ok = no; then
31431	as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh`
31432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5
31433$as_echo_n "checking for $sgemm in -lblas... " >&6; }
31434if eval \${$as_ac_Lib+:} false; then :
31435  $as_echo_n "(cached) " >&6
31436else
31437  ac_check_lib_save_LIBS=$LIBS
31438LIBS="-lblas  $LIBS"
31439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31440/* end confdefs.h.  */
31441
31442/* Override any GCC internal prototype to avoid an error.
31443   Use char because int might match the return type of a GCC
31444   builtin and then its argument prototype would still apply.  */
31445#ifdef __cplusplus
31446extern "C"
31447#endif
31448char $sgemm ();
31449#ifdef F77_DUMMY_MAIN
31450
31451#  ifdef __cplusplus
31452     extern "C"
31453#  endif
31454   int F77_DUMMY_MAIN() { return 1; }
31455
31456#endif
31457int
31458main ()
31459{
31460return $sgemm ();
31461  ;
31462  return 0;
31463}
31464_ACEOF
31465if ac_fn_c_try_link "$LINENO"; then :
31466  eval "$as_ac_Lib=yes"
31467else
31468  eval "$as_ac_Lib=no"
31469fi
31470rm -f core conftest.err conftest.$ac_objext \
31471    conftest$ac_exeext conftest.$ac_ext
31472LIBS=$ac_check_lib_save_LIBS
31473fi
31474eval ac_res=\$$as_ac_Lib
31475	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31476$as_echo "$ac_res" >&6; }
31477if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31478  acx_blas_ok=yes; BLAS_TYPE="Generic Blas"; BLAS_LIBS="-lblas"
31479fi
31480
31481fi
31482
31483if test "$with_blas_library" != no -a "$with_blas_library" != ""; then
31484BLAS_LIBS="-L$with_blas_library $BLAS_LIBS"
31485fi
31486
31487
31488
31489LIBS="$acx_blas_save_LIBS"
31490LDFLAGS="$saved_ldflags"
31491
31492# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
31493if test x"$acx_blas_ok" = xyes; then
31494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLAS_TYPE found" >&5
31495$as_echo "$BLAS_TYPE found" >&6; }
31496
31497        :
31498else
31499        acx_blas_ok=no
31500        as_fn_error $? "Impossible to find a BLAS compatible library (see BLAS or ATLAS)." "$LINENO" 5
31501
31502fi
31503
31504
31505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if LAPACK is available" >&5
31506$as_echo_n "checking if LAPACK is available... " >&6; }
31507echo ""
31508
31509
31510acx_lapack_ok=no
31511
31512
31513# Check whether --with-lapack-library was given.
31514if test "${with_lapack_library+set}" = set; then :
31515  withval=$with_lapack_library;
31516fi
31517
31518saved_ldflags="$LDFLAGS"
31519
31520if test "$with_lapack_library" != no -a "$with_lapack_library" != ""; then
31521LDFLAGS="$LDFLAGS -L$with_lapack_library"
31522fi
31523
31524
31525# Get fortran linker name of LAPACK function to check for.
31526ac_ext=f
31527ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
31528ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31529ac_compiler_gnu=$ac_cv_f77_compiler_gnu
31530case $ac_cv_f77_mangling in
31531  upper*) ac_val="CHEEV" ;;
31532  lower*) ac_val="cheev" ;;
31533  *)      ac_val="unknown" ;;
31534esac
31535case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac
31536
31537cheev="$ac_val"
31538
31539ac_ext=c
31540ac_cpp='$CPP $CPPFLAGS'
31541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31543ac_compiler_gnu=$ac_cv_c_compiler_gnu
31544
31545
31546# We cannot use LAPACK if BLAS is not found
31547if test "x$acx_blas_ok" != xyes; then
31548        acx_lapack_ok=noblas
31549fi
31550
31551# First, check LAPACK_LIBS environment variable
31552if test "x$LAPACK_LIBS" != x; then
31553        save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
31554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5
31555$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; }
31556        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31557/* end confdefs.h.  */
31558
31559/* Override any GCC internal prototype to avoid an error.
31560   Use char because int might match the return type of a GCC
31561   builtin and then its argument prototype would still apply.  */
31562#ifdef __cplusplus
31563extern "C"
31564#endif
31565char $cheev ();
31566#ifdef F77_DUMMY_MAIN
31567
31568#  ifdef __cplusplus
31569     extern "C"
31570#  endif
31571   int F77_DUMMY_MAIN() { return 1; }
31572
31573#endif
31574int
31575main ()
31576{
31577return $cheev ();
31578  ;
31579  return 0;
31580}
31581_ACEOF
31582if ac_fn_c_try_link "$LINENO"; then :
31583  acx_lapack_ok=yes; LAPACK_TYPE="LAPACK_LIBS env variable"
31584else
31585  LAPACK_LIBS=""
31586fi
31587rm -f core conftest.err conftest.$ac_objext \
31588    conftest$ac_exeext conftest.$ac_ext
31589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5
31590$as_echo "$acx_lapack_ok" >&6; }
31591        LIBS="$save_LIBS"
31592        if test acx_lapack_ok = no; then
31593                LAPACK_LIBS=""
31594        fi
31595elif $WITH_DEVTOOLS; then # Scilab thirdparties
31596     LAPACK_LIBS="-L$DEVTOOLS_LIBDIR -llapack -lblas"
31597     LAPACK_TYPE="Lapack (thirdparties)"
31598     acx_lapack_ok=yes
31599fi
31600
31601# LAPACK linked to by default?  (is sometimes included in BLAS lib)
31602if test $acx_lapack_ok = no; then
31603        save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS"
31604        as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh`
31605ac_fn_c_check_func "$LINENO" "$cheev" "$as_ac_var"
31606if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31607  acx_lapack_ok=yes; LAPACK_TYPE="Default link (may be provided with BLAS)"
31608fi
31609
31610        LIBS="$save_LIBS"
31611fi
31612
31613# Generic LAPACK library?
31614for lapack in lapack lapack_rs6k; do
31615        if test $acx_lapack_ok = no; then
31616                save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
31617                as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh`
31618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5
31619$as_echo_n "checking for $cheev in -l$lapack... " >&6; }
31620if eval \${$as_ac_Lib+:} false; then :
31621  $as_echo_n "(cached) " >&6
31622else
31623  ac_check_lib_save_LIBS=$LIBS
31624LIBS="-l$lapack $FLIBS $LIBS"
31625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31626/* end confdefs.h.  */
31627
31628/* Override any GCC internal prototype to avoid an error.
31629   Use char because int might match the return type of a GCC
31630   builtin and then its argument prototype would still apply.  */
31631#ifdef __cplusplus
31632extern "C"
31633#endif
31634char $cheev ();
31635#ifdef F77_DUMMY_MAIN
31636
31637#  ifdef __cplusplus
31638     extern "C"
31639#  endif
31640   int F77_DUMMY_MAIN() { return 1; }
31641
31642#endif
31643int
31644main ()
31645{
31646return $cheev ();
31647  ;
31648  return 0;
31649}
31650_ACEOF
31651if ac_fn_c_try_link "$LINENO"; then :
31652  eval "$as_ac_Lib=yes"
31653else
31654  eval "$as_ac_Lib=no"
31655fi
31656rm -f core conftest.err conftest.$ac_objext \
31657    conftest$ac_exeext conftest.$ac_ext
31658LIBS=$ac_check_lib_save_LIBS
31659fi
31660eval ac_res=\$$as_ac_Lib
31661	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31662$as_echo "$ac_res" >&6; }
31663if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
31664  acx_lapack_ok=yes; LAPACK_TYPE="Library -l$lapack"; LAPACK_LIBS="-l$lapack"
31665fi
31666
31667                LIBS="$save_LIBS"
31668        fi
31669done
31670
31671LDFLAGS="$saved_ldflags"
31672
31673if test "$with_lapack_library" != no -a "$with_lapack_library" != ""; then
31674LAPACK_LIBS="$LAPACK_LIBS -L$with_lapack_library"
31675fi
31676
31677
31678
31679# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
31680if test x"$acx_lapack_ok" = xyes; then
31681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LAPACK_TYPE found" >&5
31682$as_echo "$LAPACK_TYPE found" >&6; }
31683        :
31684else
31685        acx_lapack_ok=no
31686        as_fn_error $? "Impossible to find the LAPACK library." "$LINENO" 5
31687
31688fi
31689
31690
31691
31692
31693# Check whether --with-arpack-ng was given.
31694if test "${with_arpack_ng+set}" = set; then :
31695  withval=$with_arpack_ng;
31696fi
31697
31698
31699ARPACK_NG=no
31700if test "$with_arpack_ng" != no; then
31701   ARPACK_NG=yes
31702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ARPACK-NG is available" >&5
31703$as_echo_n "checking if ARPACK-NG is available... " >&6; }
31704echo ""
31705
31706
31707
31708acx_arpack_ok=no
31709
31710
31711# Check whether --with-arpack-library was given.
31712if test "${with_arpack_library+set}" = set; then :
31713  withval=$with_arpack_library;
31714fi
31715
31716saved_ldflags="$LDFLAGS"
31717
31718if test "$with_arpack_library" != no -a "$with_arpack_library" != ""; then
31719LDFLAGS="$LDFLAGS -L$with_arpack_library"
31720fi
31721
31722if $WITH_DEVTOOLS; then # Scilab thirdparties
31723    ARPACK_LIBS="-L$DEVTOOLS_LIBDIR -larpack -llapack -lblas"
31724    LDFLAGS="$LDFLAGS -L$DEVTOOLS_LIBDIR"
31725    acx_arpack_ok=yes
31726else
31727    ARPACK_LIBS="-larpack"
31728fi
31729# Get fortran linker name of ARPACK function to check for.
31730ac_ext=f
31731ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
31732ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31733ac_compiler_gnu=$ac_cv_f77_compiler_gnu
31734case $ac_cv_f77_mangling in
31735  upper*) ac_val="ZNAUPD" ;;
31736  lower*) ac_val="znaupd" ;;
31737  *)      ac_val="unknown" ;;
31738esac
31739case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac
31740
31741znaupd="$ac_val"
31742
31743ac_ext=c
31744ac_cpp='$CPP $CPPFLAGS'
31745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31747ac_compiler_gnu=$ac_cv_c_compiler_gnu
31748
31749
31750# We cannot use ARPACK if BLAS is not found
31751if test "x$acx_blas_ok" != xyes -a "x$acx_lapack_ok" != xyes ; then
31752        acx_arpack_ok=noblas
31753fi
31754
31755# First, check ARPACK_LIBS environment variable
31756if test "x$ARPACK_LIBS" != x; then
31757        save_LIBS="$LIBS"; LIBS="$ARPACK_LIBS $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
31758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $znaupd in $ARPACK_LIBS" >&5
31759$as_echo_n "checking for $znaupd in $ARPACK_LIBS... " >&6; }
31760        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31761/* end confdefs.h.  */
31762
31763/* Override any GCC internal prototype to avoid an error.
31764   Use char because int might match the return type of a GCC
31765   builtin and then its argument prototype would still apply.  */
31766#ifdef __cplusplus
31767extern "C"
31768#endif
31769char $znaupd ();
31770#ifdef F77_DUMMY_MAIN
31771
31772#  ifdef __cplusplus
31773     extern "C"
31774#  endif
31775   int F77_DUMMY_MAIN() { return 1; }
31776
31777#endif
31778int
31779main ()
31780{
31781return $znaupd ();
31782  ;
31783  return 0;
31784}
31785_ACEOF
31786if ac_fn_c_try_link "$LINENO"; then :
31787  acx_arpack_ok=yes
31788else
31789  ARPACK_LIBS="-larpack"
31790fi
31791rm -f core conftest.err conftest.$ac_objext \
31792    conftest$ac_exeext conftest.$ac_ext
31793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_arpack_ok" >&5
31794$as_echo "$acx_arpack_ok" >&6; }
31795        LIBS="$save_LIBS"
31796        if test acx_arpack_ok = no; then
31797                ARPACK_LIBS=""
31798        fi
31799fi
31800
31801
31802LDFLAGS="$saved_ldflags"
31803
31804if test "$with_arpack_library" != no -a "$with_arpack_library" != ""; then
31805ARPACK_LIBS="$ARPACK_LIBS -L$with_arpack_library"
31806fi
31807
31808
31809
31810# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
31811if test x"$acx_arpack_ok" = xyes; then
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARPACK-NG library found" >&5
31813$as_echo "ARPACK-NG library found" >&6; }
31814        :
31815else
31816        acx_arpack_ok=no
31817        as_fn_error $? "Impossible to find the ARPACK library. Please note that arpack was bundled with version prior to 5.4.0 and Scilab requires arpack-ng ( http://forge.scilab.org/index.php/p/arpack-ng/ )." "$LINENO" 5
31818
31819fi
31820
31821
31822
31823  ac_ext=cpp
31824ac_cpp='$CXXCPP $CPPFLAGS'
31825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31828
31829  save_LIBS="$LIBS";
31830  LIBS="$ARPACK_LIBS $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
31831  save_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
31832  if $WITH_DEVTOOLS; then # Scilab thirdparties
31833      export LD_LIBRARY_PATH="$DEVTOOLS_LIBDIR:$LD_LIBRARY_PATH"
31834  fi
31835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the arpack library works" >&5
31836$as_echo_n "checking whether the arpack library works... " >&6; }
31837if ${lib_cv_arpack_ok+:} false; then :
31838  $as_echo_n "(cached) " >&6
31839else
31840
31841      if test "$cross_compiling" = yes; then :
31842  cv_lib_arpack_ok=yes
31843else
31844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31845/* end confdefs.h.  */
31846
31847// External functions from ARPACK library
31848extern "C" int
31849C2F(dnaupd) (int&, const char *, const int&, const char *,
31850                           int&, const double&, double*, const int&,
31851                           double*, const int&, int*, int*, double*,
31852                           double*, const int&, int&, long int, long int);
31853
31854extern "C" int
31855C2F(dneupd) (const int&, const char *, int*, double*,
31856                           double*, double*, const int&,
31857                           const double&, const double&, double*,
31858                           const char*, const int&, const char *,
31859                           int&, const double&, double*, const int&,
31860                           double*, const int&, int*, int*, double*,
31861                           double*, const int&, int&, long int,
31862                           long int, long int);
31863
31864extern "C" int
31865C2F(dgemv) (const char *, const int&, const int&,
31866                         const double&, const double*, const int&,
31867                         const double*, const int&, const double&,
31868                         double*, const int&, long int);
31869
31870#include <cfloat>
31871
31872void
31873doit (void)
31874{
31875  // Based on Octave function EigsRealNonSymmetricMatrix from liboctave/eigs-base.cc.
31876
31877  // Problem matrix.  See bug #31479
31878  int n = 4;
31879  double *m = new double [n * n];
31880  m[0] = 1, m[4] = 0, m[8]  = 0, m[12] = -1;
31881  m[1] = 0, m[5] = 1, m[9]  = 0, m[13] = 0;
31882  m[2] = 0, m[6] = 0, m[10] = 1, m[14] = 0;
31883  m[3] = 0, m[7] = 0, m[11] = 2, m[15] = 1;
31884
31885  double *resid = new double [4];
31886
31887  resid[0] = 0.960966;
31888  resid[1] = 0.741195;
31889  resid[2] = 0.150143;
31890  resid[3] = 0.868067;
31891
31892  int *ip = new int [11];
31893
31894  ip[0] = 1;   // ishift
31895  ip[1] = 0;   // ip[1] not referenced
31896  ip[2] = 300; // mxiter, maximum number of iterations
31897  ip[3] = 1;   // NB blocksize in recurrence
31898  ip[4] = 0;   // nconv, number of Ritz values that satisfy convergence
31899  ip[5] = 0;   // ip[5] not referenced
31900  ip[6] = 1;   // mode
31901  ip[7] = 0;   // ip[7] to ip[10] are return values
31902  ip[8] = 0;
31903  ip[9] = 0;
31904  ip[10] = 0;
31905
31906  int *ipntr = new int [14];
31907
31908  int k = 1;
31909  int p = 3;
31910  int lwork = 3 * p * (p + 2);
31911
31912  double *v = new double [n * (p + 1)];
31913  double *workl = new double [lwork + 1];
31914  double *workd = new double [3 * n + 1];
31915
31916  int ido = 0;
31917  int info = 0;
31918
31919  double tol = DBL_EPSILON;
31920
31921  do
31922    {
31923      C2F(dnaupd) (ido, "I", n, "LM", k, tol, resid, p,
31924                                 v, n, ip, ipntr, workd, workl, lwork,
31925                                 info, 1L, 2L);
31926
31927      if (ido == -1 || ido == 1 || ido == 2)
31928        {
31929          double *x = workd + ipntr[0] - 1;
31930          double *y = workd + ipntr[1] - 1;
31931
31932          C2F(dgemv) ("N", n, n, 1.0, m, n, x, 1, 0.0,
31933                                   y, 1, 1L);
31934        }
31935      else
31936        {
31937          if (info < 0)
31938            {
31939              return;  // Error
31940            }
31941
31942          break;
31943        }
31944    }
31945  while (1);
31946
31947  int *sel = new int [p];
31948
31949  // The dimensions of dr and di are k+1, but k+2 avoids segfault
31950  double *dr = new double [k + 1];
31951  double *di = new double [k + 1];
31952  double *workev = new double [3 * p];
31953
31954  for (int i = 0; i < k + 1; i++)
31955    dr[i] = di[i] = 0.;
31956
31957  int rvec = 1;
31958
31959  double sigmar = 0.0;
31960  double sigmai = 0.0;
31961
31962  // This is n*(k+1), but k+2 avoids segfault
31963  double *z = new double [n * (k + 1)];
31964
31965  C2F(dneupd) (rvec, "A", sel, dr, di, z, n, sigmar,
31966                             sigmai, workev, "I", n, "LM", k, tol,
31967                             resid, p, v, n, ip, ipntr, workd,
31968                             workl, lwork, info, 1L, 1L, 2L);
31969}
31970
31971#ifdef F77_DUMMY_MAIN
31972
31973#  ifdef __cplusplus
31974     extern "C"
31975#  endif
31976   int F77_DUMMY_MAIN() { return 1; }
31977
31978#endif
31979int
31980main ()
31981{
31982
31983  for (int i = 0; i < 10; i++)
31984    doit ();
31985
31986  ;
31987  return 0;
31988}
31989_ACEOF
31990if ac_fn_cxx_try_run "$LINENO"; then :
31991  cv_lib_arpack_ok=yes
31992else
31993  cv_lib_arpack_ok=no
31994fi
31995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31996  conftest.$ac_objext conftest.beam conftest.$ac_ext
31997fi
31998
31999fi
32000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lib_cv_arpack_ok" >&5
32001$as_echo "$lib_cv_arpack_ok" >&6; }
32002  LIBS="$save_LIBS"
32003  export LD_LIBRARY_PATH="$save_LD_LIBRARY_PATH"
32004  ac_ext=c
32005ac_cpp='$CPP $CPPFLAGS'
32006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32008ac_compiler_gnu=$ac_cv_c_compiler_gnu
32009
32010  if test "$cv_lib_arpack_ok" = "yes"; then
32011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Working ARPACK-NG library found (probably ARPACK-NG or a patched version of ARPACK)" >&5
32012$as_echo "Working ARPACK-NG library found (probably ARPACK-NG or a patched version of ARPACK)" >&6; }
32013  else
32014    as_fn_error $? "ARPACK library found, but seems not to work properly. Please make sure you are using arpack-ng" "$LINENO" 5
32015
32016  fi
32017
32018else
32019   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Skip ARPACK-NG detection" >&5
32020$as_echo_n "checking Skip ARPACK-NG detection... " >&6; }
32021fi
32022
32023 if test "$ARPACK_NG" != "no"; then
32024  ARPACK_NG_TRUE=
32025  ARPACK_NG_FALSE='#'
32026else
32027  ARPACK_NG_TRUE='#'
32028  ARPACK_NG_FALSE=
32029fi
32030
32031
32032
32033#################
32034## UMFPACK
32035#################
32036
32037
32038# Check whether --with-umfpack was given.
32039if test "${with_umfpack+set}" = set; then :
32040  withval=$with_umfpack;
32041fi
32042
32043
32044UMFPACK_ENABLE=no
32045if test "$with_umfpack" != no; then
32046
32047
32048BLAS_LIBS="$BLAS_LIBS"
32049
32050UMFPACK_OK=no
32051SUITESPARSE=no
32052
32053
32054# Check whether --with-umfpack_library was given.
32055if test "${with_umfpack_library+set}" = set; then :
32056  withval=$with_umfpack_library; with_umfpack_library=$withval
32057else
32058  with_umfpack_library='yes'
32059
32060fi
32061
32062
32063
32064# Check whether --with-umfpack_include was given.
32065if test "${with_umfpack_include+set}" = set; then :
32066  withval=$with_umfpack_include; with_umfpack_include=$withval
32067else
32068  with_umfpack_include='yes'
32069
32070fi
32071
32072
32073# Include provided... check if you set it as -I/path/ if it can find the header
32074if test "x$with_umfpack_include" != "xyes"; then
32075	save_CFLAGS="$CFLAGS"
32076	CFLAGS="-I$with_umfpack_include"
32077	ac_fn_c_check_header_mongrel "$LINENO" "suitesparse/umfpack.h" "ac_cv_header_suitesparse_umfpack_h" "$ac_includes_default"
32078if test "x$ac_cv_header_suitesparse_umfpack_h" = xyes; then :
32079  UMFPACK_CFLAGS="$CFLAGS"; SUITESPARSE=yes
32080else
32081  ac_fn_c_check_header_mongrel "$LINENO" "umfpack.h" "ac_cv_header_umfpack_h" "$ac_includes_default"
32082if test "x$ac_cv_header_umfpack_h" = xyes; then :
32083  UMFPACK_CFLAGS="$CFLAGS"; SUITESPARSE=no
32084else
32085  as_fn_error $? "Cannot find headers (umfpack.h) of the library UMFPACK. Please install the dev package (Debian : libsuitesparse-dev)" "$LINENO" 5
32086
32087fi
32088
32089
32090
32091fi
32092
32093
32094	CFLAGS="$save_CFLAGS"
32095fi
32096
32097# Look in the default paths
32098if test "x$UMFPACK_INCLUDE" = "x" ; then
32099    if $WITH_DEVTOOLS; then # Scilab thirparties
32100        UMFPACK_CFLAGS="-I$DEVTOOLS_INCDIR"
32101    else
32102        ac_fn_c_check_header_mongrel "$LINENO" "suitesparse/umfpack.h" "ac_cv_header_suitesparse_umfpack_h" "$ac_includes_default"
32103if test "x$ac_cv_header_suitesparse_umfpack_h" = xyes; then :
32104  SUITESPARSE=yes
32105else
32106  ac_fn_c_check_header_mongrel "$LINENO" "umfpack.h" "ac_cv_header_umfpack_h" "$ac_includes_default"
32107if test "x$ac_cv_header_umfpack_h" = xyes; then :
32108  SUITESPARSE=no
32109else
32110  as_fn_error $? "Cannot find headers (umfpack.h) of the library UMFPACK. Please install the dev package (Debian : libsuitesparse-dev)" "$LINENO" 5
32111
32112fi
32113
32114
32115
32116fi
32117
32118
32119    fi
32120fi
32121
32122# --with-umfpack-library set then check in this dir
32123if test "x$with_umfpack_library" != "xyes"; then
32124	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_solve in $with_umfpack_library" >&5
32125$as_echo_n "checking for umfpack_di_solve in $with_umfpack_library... " >&6; }
32126	save_LIBS="$LIBS"
32127	LIBS="$BLAS_LIBS -L$with_umfpack_library -lm $LIBS"
32128	# We need -lm because sometimes (ubuntu 7.10 for example) does not link libamd against lib math
32129
32130	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_solve in -lumfpack" >&5
32131$as_echo_n "checking for umfpack_di_solve in -lumfpack... " >&6; }
32132if ${ac_cv_lib_umfpack_umfpack_di_solve+:} false; then :
32133  $as_echo_n "(cached) " >&6
32134else
32135  ac_check_lib_save_LIBS=$LIBS
32136LIBS="-lumfpack  $LIBS"
32137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32138/* end confdefs.h.  */
32139
32140/* Override any GCC internal prototype to avoid an error.
32141   Use char because int might match the return type of a GCC
32142   builtin and then its argument prototype would still apply.  */
32143#ifdef __cplusplus
32144extern "C"
32145#endif
32146char umfpack_di_solve ();
32147#ifdef F77_DUMMY_MAIN
32148
32149#  ifdef __cplusplus
32150     extern "C"
32151#  endif
32152   int F77_DUMMY_MAIN() { return 1; }
32153
32154#endif
32155int
32156main ()
32157{
32158return umfpack_di_solve ();
32159  ;
32160  return 0;
32161}
32162_ACEOF
32163if ac_fn_c_try_link "$LINENO"; then :
32164  ac_cv_lib_umfpack_umfpack_di_solve=yes
32165else
32166  ac_cv_lib_umfpack_umfpack_di_solve=no
32167fi
32168rm -f core conftest.err conftest.$ac_objext \
32169    conftest$ac_exeext conftest.$ac_ext
32170LIBS=$ac_check_lib_save_LIBS
32171fi
32172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umfpack_umfpack_di_solve" >&5
32173$as_echo "$ac_cv_lib_umfpack_umfpack_di_solve" >&6; }
32174if test "x$ac_cv_lib_umfpack_umfpack_di_solve" = xyes; then :
32175  UMFPACK_LIB="-L$with_umfpack_library -lumfpack $UMFPACK_LIB"; UMFPACK_OK=yes
32176else
32177  as_fn_error $? "libumfpack : Library missing. (Cannot find umfpack_di_solve). Check if libumfpack is installed and if the version is correct (also called lib suitesparse)" "$LINENO" 5
32178
32179fi
32180
32181
32182#	AC_TRY_LINK_FUNC(umfpack_di_solve, [UMFPACK_OK=yes; BLAS_TYPE="Using BLAS_LIBS environment variable"], [UMFPACK_LIBS=""])
32183	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UMFPACK_OK" >&5
32184$as_echo "$UMFPACK_OK" >&6; }
32185	LIBS="$save_LIBS"
32186fi
32187
32188# check in the default path
32189if test $UMFPACK_OK = no; then
32190    if $WITH_DEVTOOLS; then # Scilab thirparties
32191        UMFPACK_LIB="-L$DEVTOOLS_LIBDIR -lumfpack -lamd"
32192    else
32193        save_LIBS="$LIBS"
32194        LIBS="$BLAS_LIBS $LIBS -lm" # libamd* is mandatory to link umfpack
32195        # We need -lm because sometimes (ubuntu 7.10 for example) does not link libamd against lib math
32196
32197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for amd_info in -lamd" >&5
32198$as_echo_n "checking for amd_info in -lamd... " >&6; }
32199if ${ac_cv_lib_amd_amd_info+:} false; then :
32200  $as_echo_n "(cached) " >&6
32201else
32202  ac_check_lib_save_LIBS=$LIBS
32203LIBS="-lamd  $LIBS"
32204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32205/* end confdefs.h.  */
32206
32207/* Override any GCC internal prototype to avoid an error.
32208   Use char because int might match the return type of a GCC
32209   builtin and then its argument prototype would still apply.  */
32210#ifdef __cplusplus
32211extern "C"
32212#endif
32213char amd_info ();
32214#ifdef F77_DUMMY_MAIN
32215
32216#  ifdef __cplusplus
32217     extern "C"
32218#  endif
32219   int F77_DUMMY_MAIN() { return 1; }
32220
32221#endif
32222int
32223main ()
32224{
32225return amd_info ();
32226  ;
32227  return 0;
32228}
32229_ACEOF
32230if ac_fn_c_try_link "$LINENO"; then :
32231  ac_cv_lib_amd_amd_info=yes
32232else
32233  ac_cv_lib_amd_amd_info=no
32234fi
32235rm -f core conftest.err conftest.$ac_objext \
32236    conftest$ac_exeext conftest.$ac_ext
32237LIBS=$ac_check_lib_save_LIBS
32238fi
32239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_amd_amd_info" >&5
32240$as_echo "$ac_cv_lib_amd_amd_info" >&6; }
32241if test "x$ac_cv_lib_amd_amd_info" = xyes; then :
32242  UMFPACK_LIB="-lamd"
32243else
32244  as_fn_error $? "libamd: Library missing (Cannot find symbol amd_info). Check if libamd (sparse matrix minimum degree ordering) is installed and if the version is correct" "$LINENO" 5
32245
32246fi
32247
32248        LIBS="$UMFPACK_LIB $LIBS"
32249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_solve in -lumfpack" >&5
32250$as_echo_n "checking for umfpack_di_solve in -lumfpack... " >&6; }
32251if ${ac_cv_lib_umfpack_umfpack_di_solve+:} false; then :
32252  $as_echo_n "(cached) " >&6
32253else
32254  ac_check_lib_save_LIBS=$LIBS
32255LIBS="-lumfpack  $LIBS"
32256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32257/* end confdefs.h.  */
32258
32259/* Override any GCC internal prototype to avoid an error.
32260   Use char because int might match the return type of a GCC
32261   builtin and then its argument prototype would still apply.  */
32262#ifdef __cplusplus
32263extern "C"
32264#endif
32265char umfpack_di_solve ();
32266#ifdef F77_DUMMY_MAIN
32267
32268#  ifdef __cplusplus
32269     extern "C"
32270#  endif
32271   int F77_DUMMY_MAIN() { return 1; }
32272
32273#endif
32274int
32275main ()
32276{
32277return umfpack_di_solve ();
32278  ;
32279  return 0;
32280}
32281_ACEOF
32282if ac_fn_c_try_link "$LINENO"; then :
32283  ac_cv_lib_umfpack_umfpack_di_solve=yes
32284else
32285  ac_cv_lib_umfpack_umfpack_di_solve=no
32286fi
32287rm -f core conftest.err conftest.$ac_objext \
32288    conftest$ac_exeext conftest.$ac_ext
32289LIBS=$ac_check_lib_save_LIBS
32290fi
32291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umfpack_umfpack_di_solve" >&5
32292$as_echo "$ac_cv_lib_umfpack_umfpack_di_solve" >&6; }
32293if test "x$ac_cv_lib_umfpack_umfpack_di_solve" = xyes; then :
32294  UMFPACK_LIB="-lumfpack $UMFPACK_LIB"; UMFPACK_OK=yes
32295else
32296  as_fn_error $? "libumfpack: Library missing. (Cannot find symbol umfpack_di_solve). Check if libumfpack is installed and if the version is correct (also called lib suitesparse)" "$LINENO" 5
32297
32298fi
32299
32300        LIBS="$save_LIBS"
32301    fi
32302fi
32303
32304
32305
32306if test $SUITESPARSE = yes; then
32307
32308cat >>confdefs.h <<_ACEOF
32309#define UMFPACK_SUITESPARSE
32310_ACEOF
32311
32312fi
32313
32314
32315$as_echo "#define WITH_UMFPACK /**/" >>confdefs.h
32316
32317
32318
32319   UMFPACK_ENABLE=yes
32320fi
32321
32322
32323 if test "$with_umfpack" != no; then
32324  UMFPACK_TRUE=
32325  UMFPACK_FALSE='#'
32326else
32327  UMFPACK_TRUE='#'
32328  UMFPACK_FALSE=
32329fi
32330
32331
32332#######################
32333## Test for PCRE
32334#######################
32335
32336
32337
32338
32339
32340# Check whether --with-pcre was given.
32341if test "${with_pcre+set}" = set; then :
32342  withval=$with_pcre; with_pcre=$withval
32343else
32344  with_pcre='yes'
32345
32346fi
32347
32348
32349if test "$with_pcre" != 'yes' -a "$with_pcre" != 'no'; then
32350    # Look if pcre-config (which provides cflags and ldflags) is available
32351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking pcre, for pcre-config" >&5
32352$as_echo_n "checking pcre, for pcre-config... " >&6; }
32353    PCRE_FOUND=0
32354    PCRE_CONFIG="$with_pcre/bin/pcre-config"
32355    if test -x "$PCRE_CONFIG"; then
32356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_CONFIG" >&5
32357$as_echo "$PCRE_CONFIG" >&6; }
32358        PCRE_FOUND=1
32359    fi
32360    if test $PCRE_FOUND -eq 0; then
32361        PCRE_CONFIG="$with_pcre/pcre-config"
32362        if test -x "$PCRE_CONFIG"; then
32363            PCRE_FOUND=1
32364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_CONFIG" >&5
32365$as_echo "$PCRE_CONFIG" >&6; }
32366        fi
32367    fi
32368    if test $PCRE_FOUND -eq 0; then
32369        as_fn_error $? "Unable to find $PCRE_CONFIG. Please check the path you provided" "$LINENO" 5
32370    else
32371        unset PCRE_FOUND
32372    fi
32373else
32374    if $WITH_DEVTOOLS; then # Scilab thirdparties
32375        PCRE_CONFIG="$DEVTOOLS_BINDIR/pcre-config"
32376    else
32377        for ac_prog in pcre-config
32378do
32379  # Extract the first word of "$ac_prog", so it can be a program name with args.
32380set dummy $ac_prog; ac_word=$2
32381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32382$as_echo_n "checking for $ac_word... " >&6; }
32383if ${ac_cv_prog_PCRE_CONFIG+:} false; then :
32384  $as_echo_n "(cached) " >&6
32385else
32386  if test -n "$PCRE_CONFIG"; then
32387  ac_cv_prog_PCRE_CONFIG="$PCRE_CONFIG" # Let the user override the test.
32388else
32389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32390for as_dir in $PATH
32391do
32392  IFS=$as_save_IFS
32393  test -z "$as_dir" && as_dir=.
32394    for ac_exec_ext in '' $ac_executable_extensions; do
32395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32396    ac_cv_prog_PCRE_CONFIG="$ac_prog"
32397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32398    break 2
32399  fi
32400done
32401  done
32402IFS=$as_save_IFS
32403
32404fi
32405fi
32406PCRE_CONFIG=$ac_cv_prog_PCRE_CONFIG
32407if test -n "$PCRE_CONFIG"; then
32408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_CONFIG" >&5
32409$as_echo "$PCRE_CONFIG" >&6; }
32410else
32411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32412$as_echo "no" >&6; }
32413fi
32414
32415
32416  test -n "$PCRE_CONFIG" && break
32417done
32418test -n "$PCRE_CONFIG" || PCRE_CONFIG="no"
32419
32420    fi
32421    if test "x$PCRE_CONFIG" = "xno"; then
32422        as_fn_error $? "Unable to find pcre-config in the path. Please check your installation of pcre (example : libpcre3 & libpcre3-dev with Debian)" "$LINENO" 5
32423    fi
32424fi
32425saved_cflags="$CFLAGS"
32426saved_LIBS="$LIBS"
32427
32428PCRE_CFLAGS=`$PCRE_CONFIG --cflags`
32429PCRE_LIBS=`$PCRE_CONFIG --libs-posix`
32430PCRE_VERSION=`$PCRE_CONFIG --version`
32431
32432PCRE_REQUIRED_VERSION=7.6
32433
32434pkg_failed=no
32435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCRE" >&5
32436$as_echo_n "checking for PCRE... " >&6; }
32437
32438if test -n "$PKG_CONFIG"; then
32439    if test -n "$PCRE_CFLAGS"; then
32440        pkg_cv_PCRE_CFLAGS="$PCRE_CFLAGS"
32441    else
32442        if test -n "$PKG_CONFIG" && \
32443    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre >= \$PCRE_REQUIRED_VERSION\""; } >&5
32444  ($PKG_CONFIG --exists --print-errors "libpcre >= $PCRE_REQUIRED_VERSION") 2>&5
32445  ac_status=$?
32446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32447  test $ac_status = 0; }; then
32448  pkg_cv_PCRE_CFLAGS=`$PKG_CONFIG --cflags "libpcre >= $PCRE_REQUIRED_VERSION" 2>/dev/null`
32449else
32450  pkg_failed=yes
32451fi
32452    fi
32453else
32454	pkg_failed=untried
32455fi
32456if test -n "$PKG_CONFIG"; then
32457    if test -n "$PCRE_LIBS"; then
32458        pkg_cv_PCRE_LIBS="$PCRE_LIBS"
32459    else
32460        if test -n "$PKG_CONFIG" && \
32461    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre >= \$PCRE_REQUIRED_VERSION\""; } >&5
32462  ($PKG_CONFIG --exists --print-errors "libpcre >= $PCRE_REQUIRED_VERSION") 2>&5
32463  ac_status=$?
32464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32465  test $ac_status = 0; }; then
32466  pkg_cv_PCRE_LIBS=`$PKG_CONFIG --libs "libpcre >= $PCRE_REQUIRED_VERSION" 2>/dev/null`
32467else
32468  pkg_failed=yes
32469fi
32470    fi
32471else
32472	pkg_failed=untried
32473fi
32474
32475
32476
32477if test $pkg_failed = yes; then
32478
32479if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32480        _pkg_short_errors_supported=yes
32481else
32482        _pkg_short_errors_supported=no
32483fi
32484        if test $_pkg_short_errors_supported = yes; then
32485	        PCRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpcre >= $PCRE_REQUIRED_VERSION"`
32486        else
32487	        PCRE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpcre >= $PCRE_REQUIRED_VERSION"`
32488        fi
32489	# Put the nasty error message in config.log where it belongs
32490	echo "$PCRE_PKG_ERRORS" >&5
32491
32492	as_fn_error $? "Package requirements (libpcre >= $PCRE_REQUIRED_VERSION) were not met:
32493
32494$PCRE_PKG_ERRORS
32495
32496Consider adjusting the PKG_CONFIG_PATH environment variable if you
32497installed software in a non-standard prefix.
32498
32499Alternatively, you may set the environment variables PCRE_CFLAGS
32500and PCRE_LIBS to avoid the need to call pkg-config.
32501See the pkg-config man page for more details.
32502" "$LINENO" 5
32503elif test $pkg_failed = untried; then
32504	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32506as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32507is in your PATH or set the PKG_CONFIG environment variable to the full
32508path to pkg-config.
32509
32510Alternatively, you may set the environment variables PCRE_CFLAGS
32511and PCRE_LIBS to avoid the need to call pkg-config.
32512See the pkg-config man page for more details.
32513
32514To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32515See \`config.log' for more details" "$LINENO" 5; }
32516else
32517	PCRE_CFLAGS=$pkg_cv_PCRE_CFLAGS
32518	PCRE_LIBS=$pkg_cv_PCRE_LIBS
32519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32520$as_echo "yes" >&6; }
32521	:
32522fi
32523
32524LIBS="$PCRE_LIBS $LIBS"
32525CFLAGS="$PCRE_CFLAGS $CFLAGS"
32526
32527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
32528$as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
32529if ${ac_cv_lib_pcre_pcre_compile+:} false; then :
32530  $as_echo_n "(cached) " >&6
32531else
32532  ac_check_lib_save_LIBS=$LIBS
32533LIBS="-lpcre  $LIBS"
32534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32535/* end confdefs.h.  */
32536
32537/* Override any GCC internal prototype to avoid an error.
32538   Use char because int might match the return type of a GCC
32539   builtin and then its argument prototype would still apply.  */
32540#ifdef __cplusplus
32541extern "C"
32542#endif
32543char pcre_compile ();
32544#ifdef F77_DUMMY_MAIN
32545
32546#  ifdef __cplusplus
32547     extern "C"
32548#  endif
32549   int F77_DUMMY_MAIN() { return 1; }
32550
32551#endif
32552int
32553main ()
32554{
32555return pcre_compile ();
32556  ;
32557  return 0;
32558}
32559_ACEOF
32560if ac_fn_c_try_link "$LINENO"; then :
32561  ac_cv_lib_pcre_pcre_compile=yes
32562else
32563  ac_cv_lib_pcre_pcre_compile=no
32564fi
32565rm -f core conftest.err conftest.$ac_objext \
32566    conftest$ac_exeext conftest.$ac_ext
32567LIBS=$ac_check_lib_save_LIBS
32568fi
32569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
32570$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
32571if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
32572  cat >>confdefs.h <<_ACEOF
32573#define HAVE_LIBPCRE 1
32574_ACEOF
32575
32576  LIBS="-lpcre $LIBS"
32577
32578else
32579  as_fn_error $? "pcre : library missing. (Cannot find symbol pcre_compile). Check if pcre is installed and if the version is correct" "$LINENO" 5
32580
32581fi
32582
32583
32584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for regexec in -lpcreposix" >&5
32585$as_echo_n "checking for regexec in -lpcreposix... " >&6; }
32586if ${ac_cv_lib_pcreposix_regexec+:} false; then :
32587  $as_echo_n "(cached) " >&6
32588else
32589  ac_check_lib_save_LIBS=$LIBS
32590LIBS="-lpcreposix  $LIBS"
32591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32592/* end confdefs.h.  */
32593
32594/* Override any GCC internal prototype to avoid an error.
32595   Use char because int might match the return type of a GCC
32596   builtin and then its argument prototype would still apply.  */
32597#ifdef __cplusplus
32598extern "C"
32599#endif
32600char regexec ();
32601#ifdef F77_DUMMY_MAIN
32602
32603#  ifdef __cplusplus
32604     extern "C"
32605#  endif
32606   int F77_DUMMY_MAIN() { return 1; }
32607
32608#endif
32609int
32610main ()
32611{
32612return regexec ();
32613  ;
32614  return 0;
32615}
32616_ACEOF
32617if ac_fn_c_try_link "$LINENO"; then :
32618  ac_cv_lib_pcreposix_regexec=yes
32619else
32620  ac_cv_lib_pcreposix_regexec=no
32621fi
32622rm -f core conftest.err conftest.$ac_objext \
32623    conftest$ac_exeext conftest.$ac_ext
32624LIBS=$ac_check_lib_save_LIBS
32625fi
32626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcreposix_regexec" >&5
32627$as_echo "$ac_cv_lib_pcreposix_regexec" >&6; }
32628if test "x$ac_cv_lib_pcreposix_regexec" = xyes; then :
32629  cat >>confdefs.h <<_ACEOF
32630#define HAVE_LIBPCREPOSIX 1
32631_ACEOF
32632
32633  LIBS="-lpcreposix $LIBS"
32634
32635else
32636  as_fn_error $? "pcreposix : library missing. (Cannot find symbol regexec). Check if pcre is installed and if the version is correct" "$LINENO" 5
32637
32638fi
32639
32640for ac_header in pcre.h
32641do :
32642  ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
32643if test "x$ac_cv_header_pcre_h" = xyes; then :
32644  cat >>confdefs.h <<_ACEOF
32645#define HAVE_PCRE_H 1
32646_ACEOF
32647
32648fi
32649
32650done
32651
32652
32653LIBS="$saved_LIBS"
32654CFLAGS="$saved_cflags"
32655
32656
32657
32658
32659
32660
32661cat >>confdefs.h <<_ACEOF
32662#define PCRE_CFLAGS "$PCRE_CFLAGS"
32663_ACEOF
32664
32665
32666cat >>confdefs.h <<_ACEOF
32667#define PCRE_LIBS "$PCRE_LIBS"
32668_ACEOF
32669
32670
32671cat >>confdefs.h <<_ACEOF
32672#define PCRE_VERSION "$PCRE_VERSION"
32673_ACEOF
32674
32675
32676# Gets compilation and library flags
32677
32678
32679#######################
32680## Test for CURL
32681#######################
32682
32683
32684
32685
32686
32687# Check whether --with-curl was given.
32688if test "${with_curl+set}" = set; then :
32689  withval=$with_curl; with_curl=$withval
32690else
32691  with_curl='yes'
32692
32693fi
32694
32695
32696if test "$with_curl" != 'yes' -a "$with_curl" != 'no'; then
32697    # Look if curl-config (which provides cflags and ldflags) is available
32698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking curl, for curl-config" >&5
32699$as_echo_n "checking curl, for curl-config... " >&6; }
32700    CURL_FOUND=0
32701    CURL_CONFIG="$with_curl/bin/curl-config"
32702    if test -x "$CURL_CONFIG"; then
32703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5
32704$as_echo "$CURL_CONFIG" >&6; }
32705        CURL_FOUND=1
32706    fi
32707    if test $CURL_FOUND -eq 0; then
32708        CURL_CONFIG="$with_curl/curl-config"
32709        if test -x "$CURL_CONFIG"; then
32710            CURL_FOUND=1
32711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5
32712$as_echo "$CURL_CONFIG" >&6; }
32713        fi
32714    fi
32715    if test $CURL_FOUND -eq 0; then
32716        as_fn_error $? "Unable to find $CURL_CONFIG. Please check the path you provided" "$LINENO" 5
32717    else
32718       unset CURL_FOUND
32719    fi
32720else
32721    if $WITH_DEVTOOLS; then # Scilab thirdparties
32722        CURL_CONFIG="$DEVTOOLS_BINDIR/curl-config"
32723    else
32724        for ac_prog in curl-config
32725do
32726  # Extract the first word of "$ac_prog", so it can be a program name with args.
32727set dummy $ac_prog; ac_word=$2
32728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32729$as_echo_n "checking for $ac_word... " >&6; }
32730if ${ac_cv_prog_CURL_CONFIG+:} false; then :
32731  $as_echo_n "(cached) " >&6
32732else
32733  if test -n "$CURL_CONFIG"; then
32734  ac_cv_prog_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test.
32735else
32736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32737for as_dir in $PATH
32738do
32739  IFS=$as_save_IFS
32740  test -z "$as_dir" && as_dir=.
32741    for ac_exec_ext in '' $ac_executable_extensions; do
32742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32743    ac_cv_prog_CURL_CONFIG="$ac_prog"
32744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32745    break 2
32746  fi
32747done
32748  done
32749IFS=$as_save_IFS
32750
32751fi
32752fi
32753CURL_CONFIG=$ac_cv_prog_CURL_CONFIG
32754if test -n "$CURL_CONFIG"; then
32755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5
32756$as_echo "$CURL_CONFIG" >&6; }
32757else
32758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32759$as_echo "no" >&6; }
32760fi
32761
32762
32763  test -n "$CURL_CONFIG" && break
32764done
32765test -n "$CURL_CONFIG" || CURL_CONFIG="no"
32766
32767        if test "x$CURL_CONFIG" = "xno"; then
32768            as_fn_error $? "Unable to find curl-config in the path. Please check your installation of curl (example : libcurl3 & libcurl3-dev with Debian)" "$LINENO" 5
32769        fi
32770    fi
32771fi
32772saved_cflags="$CFLAGS"
32773saved_LIBS="$LIBS"
32774
32775CURL_CFLAGS=`$CURL_CONFIG --cflags`
32776CURL_LIBS=`$CURL_CONFIG --libs`
32777CURL_VERSION=`$CURL_CONFIG --version`
32778
32779CURL_REQUIRED_VERSION=7.6
32780
32781if test -n "$CURL_CONFIG" && \
32782    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$CURL_CONFIG --checkfor \$CURL_REQUIRED_VERSION"; } >&5
32783  ($CURL_CONFIG --checkfor $CURL_REQUIRED_VERSION) 2>&5
32784  ac_status=$?
32785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32786  test $ac_status = 0; }; then
32787      pkg_cv_CURL_CFLAGS=`$CURL_CONFIG --cflags 2>/dev/null`
32788      pkg_cv_CURL_LIBS=`$CURL_CONFIG --libs 2>/dev/null`
32789    else
32790      # If CURL_CONFIG didn't work, try with PKG_CONFIG
32791
32792pkg_failed=no
32793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5
32794$as_echo_n "checking for CURL... " >&6; }
32795
32796if test -n "$PKG_CONFIG"; then
32797    if test -n "$CURL_CFLAGS"; then
32798        pkg_cv_CURL_CFLAGS="$CURL_CFLAGS"
32799    else
32800        if test -n "$PKG_CONFIG" && \
32801    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= \$CURL_REQUIRED_VERSION\""; } >&5
32802  ($PKG_CONFIG --exists --print-errors "libcurl >= $CURL_REQUIRED_VERSION") 2>&5
32803  ac_status=$?
32804  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32805  test $ac_status = 0; }; then
32806  pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= $CURL_REQUIRED_VERSION" 2>/dev/null`
32807else
32808  pkg_failed=yes
32809fi
32810    fi
32811else
32812	pkg_failed=untried
32813fi
32814if test -n "$PKG_CONFIG"; then
32815    if test -n "$CURL_LIBS"; then
32816        pkg_cv_CURL_LIBS="$CURL_LIBS"
32817    else
32818        if test -n "$PKG_CONFIG" && \
32819    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= \$CURL_REQUIRED_VERSION\""; } >&5
32820  ($PKG_CONFIG --exists --print-errors "libcurl >= $CURL_REQUIRED_VERSION") 2>&5
32821  ac_status=$?
32822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32823  test $ac_status = 0; }; then
32824  pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl >= $CURL_REQUIRED_VERSION" 2>/dev/null`
32825else
32826  pkg_failed=yes
32827fi
32828    fi
32829else
32830	pkg_failed=untried
32831fi
32832
32833
32834
32835if test $pkg_failed = yes; then
32836
32837if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32838        _pkg_short_errors_supported=yes
32839else
32840        _pkg_short_errors_supported=no
32841fi
32842        if test $_pkg_short_errors_supported = yes; then
32843	        CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl >= $CURL_REQUIRED_VERSION"`
32844        else
32845	        CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl >= $CURL_REQUIRED_VERSION"`
32846        fi
32847	# Put the nasty error message in config.log where it belongs
32848	echo "$CURL_PKG_ERRORS" >&5
32849
32850	as_fn_error $? "Package requirements (libcurl >= $CURL_REQUIRED_VERSION) were not met:
32851
32852$CURL_PKG_ERRORS
32853
32854Consider adjusting the PKG_CONFIG_PATH environment variable if you
32855installed software in a non-standard prefix.
32856
32857Alternatively, you may set the environment variables CURL_CFLAGS
32858and CURL_LIBS to avoid the need to call pkg-config.
32859See the pkg-config man page for more details.
32860" "$LINENO" 5
32861elif test $pkg_failed = untried; then
32862	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32864as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32865is in your PATH or set the PKG_CONFIG environment variable to the full
32866path to pkg-config.
32867
32868Alternatively, you may set the environment variables CURL_CFLAGS
32869and CURL_LIBS to avoid the need to call pkg-config.
32870See the pkg-config man page for more details.
32871
32872To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32873See \`config.log' for more details" "$LINENO" 5; }
32874else
32875	CURL_CFLAGS=$pkg_cv_CURL_CFLAGS
32876	CURL_LIBS=$pkg_cv_CURL_LIBS
32877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32878$as_echo "yes" >&6; }
32879	:
32880fi
32881
32882fi
32883
32884LIBS="$CURL_LIBS $LIBS"
32885CFLAGS="$CURL_CFLAGS $CFLAGS"
32886
32887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_setopt in -lcurl" >&5
32888$as_echo_n "checking for curl_easy_setopt in -lcurl... " >&6; }
32889if ${ac_cv_lib_curl_curl_easy_setopt+:} false; then :
32890  $as_echo_n "(cached) " >&6
32891else
32892  ac_check_lib_save_LIBS=$LIBS
32893LIBS="-lcurl  $LIBS"
32894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32895/* end confdefs.h.  */
32896
32897/* Override any GCC internal prototype to avoid an error.
32898   Use char because int might match the return type of a GCC
32899   builtin and then its argument prototype would still apply.  */
32900#ifdef __cplusplus
32901extern "C"
32902#endif
32903char curl_easy_setopt ();
32904#ifdef F77_DUMMY_MAIN
32905
32906#  ifdef __cplusplus
32907     extern "C"
32908#  endif
32909   int F77_DUMMY_MAIN() { return 1; }
32910
32911#endif
32912int
32913main ()
32914{
32915return curl_easy_setopt ();
32916  ;
32917  return 0;
32918}
32919_ACEOF
32920if ac_fn_c_try_link "$LINENO"; then :
32921  ac_cv_lib_curl_curl_easy_setopt=yes
32922else
32923  ac_cv_lib_curl_curl_easy_setopt=no
32924fi
32925rm -f core conftest.err conftest.$ac_objext \
32926    conftest$ac_exeext conftest.$ac_ext
32927LIBS=$ac_check_lib_save_LIBS
32928fi
32929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_setopt" >&5
32930$as_echo "$ac_cv_lib_curl_curl_easy_setopt" >&6; }
32931if test "x$ac_cv_lib_curl_curl_easy_setopt" = xyes; then :
32932  cat >>confdefs.h <<_ACEOF
32933#define HAVE_LIBCURL 1
32934_ACEOF
32935
32936  LIBS="-lcurl $LIBS"
32937
32938else
32939  as_fn_error $? "curl : library missing. (Cannot find symbol curl_easy_setopt). Check if curl is installed and if the version is correct" "$LINENO" 5
32940
32941fi
32942
32943
32944for ac_header in curl.h
32945do :
32946  ac_fn_c_check_header_mongrel "$LINENO" "curl.h" "ac_cv_header_curl_h" "$ac_includes_default"
32947if test "x$ac_cv_header_curl_h" = xyes; then :
32948  cat >>confdefs.h <<_ACEOF
32949#define HAVE_CURL_H 1
32950_ACEOF
32951
32952fi
32953
32954done
32955
32956
32957LIBS="$saved_LIBS"
32958CFLAGS="$saved_cflags"
32959
32960
32961
32962
32963
32964
32965cat >>confdefs.h <<_ACEOF
32966#define CURL_CFLAGS "$CURL_CFLAGS"
32967_ACEOF
32968
32969
32970cat >>confdefs.h <<_ACEOF
32971#define CURL_LIBS "$CURL_LIBS"
32972_ACEOF
32973
32974
32975cat >>confdefs.h <<_ACEOF
32976#define CURL_VERSION "$CURL_VERSION"
32977_ACEOF
32978
32979
32980# Gets compilation and library flags
32981
32982
32983#################
32984## Tcl/Tk library
32985#################
32986
32987WITH_TKSCI=no
32988if test "$with_tk" != no; then
32989   if test "$MACOSX" = "1"; then
32990      as_fn_error $? "Due to technical constraints, Tcl/Tk must be disabled under Mac OS X (--without-tk)" "$LINENO" 5
32991   fi
32992
32993    # check user arguments
32994    USER_TCL_LIB_PATH=""
32995    USER_TCL_INC_PATH=""
32996
32997# Check whether --with-tcl-library was given.
32998if test "${with_tcl_library+set}" = set; then :
32999  withval=$with_tcl_library;   USER_TCL_LIB_PATH=$withval
33000
33001fi
33002
33003
33004# Check whether --with-tcl-include was given.
33005if test "${with_tcl_include+set}" = set; then :
33006  withval=$with_tcl_include;   USER_TCL_INC_PATH=$withval
33007
33008fi
33009
33010
33011    USER_TK_LIB_PATH=$USER_TCL_LIB_PATH
33012    USER_TK_INC_PATH=$USER_TCL_INC_PATH
33013
33014
33015# Check whether --with-tk-library was given.
33016if test "${with_tk_library+set}" = set; then :
33017  withval=$with_tk_library;   USER_TK_LIB_PATH=$withval
33018
33019fi
33020
33021
33022
33023# Check whether --with-tk-include was given.
33024if test "${with_tk_include+set}" = set; then :
33025  withval=$with_tk_include;   USER_TK_INC_PATH=$withval
33026
33027fi
33028
33029
33030###########################
33031########## X11 checks
33032###########################
33033        ## This check is mandatory since tk needs Xlib headers and libs
33034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
33035$as_echo_n "checking for X... " >&6; }
33036
33037
33038# Check whether --with-x was given.
33039if test "${with_x+set}" = set; then :
33040  withval=$with_x;
33041fi
33042
33043# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
33044if test "x$with_x" = xno; then
33045  # The user explicitly disabled X.
33046  have_x=disabled
33047else
33048  case $x_includes,$x_libraries in #(
33049    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
33050    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
33051  $as_echo_n "(cached) " >&6
33052else
33053  # One or both of the vars are not set, and there is no cached value.
33054ac_x_includes=no ac_x_libraries=no
33055rm -f -r conftest.dir
33056if mkdir conftest.dir; then
33057  cd conftest.dir
33058  cat >Imakefile <<'_ACEOF'
33059incroot:
33060	@echo incroot='${INCROOT}'
33061usrlibdir:
33062	@echo usrlibdir='${USRLIBDIR}'
33063libdir:
33064	@echo libdir='${LIBDIR}'
33065_ACEOF
33066  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
33067    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
33068    for ac_var in incroot usrlibdir libdir; do
33069      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
33070    done
33071    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
33072    for ac_extension in a so sl dylib la dll; do
33073      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
33074	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
33075	ac_im_usrlibdir=$ac_im_libdir; break
33076      fi
33077    done
33078    # Screen out bogus values from the imake configuration.  They are
33079    # bogus both because they are the default anyway, and because
33080    # using them would break gcc on systems where it needs fixed includes.
33081    case $ac_im_incroot in
33082	/usr/include) ac_x_includes= ;;
33083	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
33084    esac
33085    case $ac_im_usrlibdir in
33086	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
33087	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
33088    esac
33089  fi
33090  cd ..
33091  rm -f -r conftest.dir
33092fi
33093
33094# Standard set of common directories for X headers.
33095# Check X11 before X11Rn because it is often a symlink to the current release.
33096ac_x_header_dirs='
33097/usr/X11/include
33098/usr/X11R7/include
33099/usr/X11R6/include
33100/usr/X11R5/include
33101/usr/X11R4/include
33102
33103/usr/include/X11
33104/usr/include/X11R7
33105/usr/include/X11R6
33106/usr/include/X11R5
33107/usr/include/X11R4
33108
33109/usr/local/X11/include
33110/usr/local/X11R7/include
33111/usr/local/X11R6/include
33112/usr/local/X11R5/include
33113/usr/local/X11R4/include
33114
33115/usr/local/include/X11
33116/usr/local/include/X11R7
33117/usr/local/include/X11R6
33118/usr/local/include/X11R5
33119/usr/local/include/X11R4
33120
33121/usr/X386/include
33122/usr/x386/include
33123/usr/XFree86/include/X11
33124
33125/usr/include
33126/usr/local/include
33127/usr/unsupported/include
33128/usr/athena/include
33129/usr/local/x11r5/include
33130/usr/lpp/Xamples/include
33131
33132/usr/openwin/include
33133/usr/openwin/share/include'
33134
33135if test "$ac_x_includes" = no; then
33136  # Guess where to find include files, by looking for Xlib.h.
33137  # First, try using that file with no special directory specified.
33138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33139/* end confdefs.h.  */
33140#include <X11/Xlib.h>
33141_ACEOF
33142if ac_fn_c_try_cpp "$LINENO"; then :
33143  # We can compile using X headers with no special include directory.
33144ac_x_includes=
33145else
33146  for ac_dir in $ac_x_header_dirs; do
33147  if test -r "$ac_dir/X11/Xlib.h"; then
33148    ac_x_includes=$ac_dir
33149    break
33150  fi
33151done
33152fi
33153rm -f conftest.err conftest.i conftest.$ac_ext
33154fi # $ac_x_includes = no
33155
33156if test "$ac_x_libraries" = no; then
33157  # Check for the libraries.
33158  # See if we find them without any special options.
33159  # Don't add to $LIBS permanently.
33160  ac_save_LIBS=$LIBS
33161  LIBS="-lX11 $LIBS"
33162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33163/* end confdefs.h.  */
33164#include <X11/Xlib.h>
33165#ifdef F77_DUMMY_MAIN
33166
33167#  ifdef __cplusplus
33168     extern "C"
33169#  endif
33170   int F77_DUMMY_MAIN() { return 1; }
33171
33172#endif
33173int
33174main ()
33175{
33176XrmInitialize ()
33177  ;
33178  return 0;
33179}
33180_ACEOF
33181if ac_fn_c_try_link "$LINENO"; then :
33182  LIBS=$ac_save_LIBS
33183# We can link X programs with no special library path.
33184ac_x_libraries=
33185else
33186  LIBS=$ac_save_LIBS
33187for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
33188do
33189  # Don't even attempt the hair of trying to link an X program!
33190  for ac_extension in a so sl dylib la dll; do
33191    if test -r "$ac_dir/libX11.$ac_extension"; then
33192      ac_x_libraries=$ac_dir
33193      break 2
33194    fi
33195  done
33196done
33197fi
33198rm -f core conftest.err conftest.$ac_objext \
33199    conftest$ac_exeext conftest.$ac_ext
33200fi # $ac_x_libraries = no
33201
33202case $ac_x_includes,$ac_x_libraries in #(
33203  no,* | *,no | *\'*)
33204    # Didn't find X, or a directory has "'" in its name.
33205    ac_cv_have_x="have_x=no";; #(
33206  *)
33207    # Record where we found X for the cache.
33208    ac_cv_have_x="have_x=yes\
33209	ac_x_includes='$ac_x_includes'\
33210	ac_x_libraries='$ac_x_libraries'"
33211esac
33212fi
33213;; #(
33214    *) have_x=yes;;
33215  esac
33216  eval "$ac_cv_have_x"
33217fi # $with_x != no
33218
33219if test "$have_x" != yes; then
33220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
33221$as_echo "$have_x" >&6; }
33222  no_x=yes
33223else
33224  # If each of the values was on the command line, it overrides each guess.
33225  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
33226  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
33227  # Update the cache value to reflect the command line values.
33228  ac_cv_have_x="have_x=yes\
33229	ac_x_includes='$x_includes'\
33230	ac_x_libraries='$x_libraries'"
33231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
33232$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
33233fi
33234
33235if test "$no_x" = yes; then
33236  # Not all programs may use this symbol, but it does not hurt to define it.
33237
33238$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
33239
33240  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
33241else
33242  if test -n "$x_includes"; then
33243    X_CFLAGS="$X_CFLAGS -I$x_includes"
33244  fi
33245
33246  # It would also be nice to do this for all -L options, not just this one.
33247  if test -n "$x_libraries"; then
33248    X_LIBS="$X_LIBS -L$x_libraries"
33249    # For Solaris; some versions of Sun CC require a space after -R and
33250    # others require no space.  Words are not sufficient . . . .
33251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
33252$as_echo_n "checking whether -R must be followed by a space... " >&6; }
33253    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
33254    ac_xsave_c_werror_flag=$ac_c_werror_flag
33255    ac_c_werror_flag=yes
33256    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33257/* end confdefs.h.  */
33258
33259#ifdef F77_DUMMY_MAIN
33260
33261#  ifdef __cplusplus
33262     extern "C"
33263#  endif
33264   int F77_DUMMY_MAIN() { return 1; }
33265
33266#endif
33267int
33268main ()
33269{
33270
33271  ;
33272  return 0;
33273}
33274_ACEOF
33275if ac_fn_c_try_link "$LINENO"; then :
33276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33277$as_echo "no" >&6; }
33278       X_LIBS="$X_LIBS -R$x_libraries"
33279else
33280  LIBS="$ac_xsave_LIBS -R $x_libraries"
33281       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33282/* end confdefs.h.  */
33283
33284#ifdef F77_DUMMY_MAIN
33285
33286#  ifdef __cplusplus
33287     extern "C"
33288#  endif
33289   int F77_DUMMY_MAIN() { return 1; }
33290
33291#endif
33292int
33293main ()
33294{
33295
33296  ;
33297  return 0;
33298}
33299_ACEOF
33300if ac_fn_c_try_link "$LINENO"; then :
33301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33302$as_echo "yes" >&6; }
33303	  X_LIBS="$X_LIBS -R $x_libraries"
33304else
33305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
33306$as_echo "neither works" >&6; }
33307fi
33308rm -f core conftest.err conftest.$ac_objext \
33309    conftest$ac_exeext conftest.$ac_ext
33310fi
33311rm -f core conftest.err conftest.$ac_objext \
33312    conftest$ac_exeext conftest.$ac_ext
33313    ac_c_werror_flag=$ac_xsave_c_werror_flag
33314    LIBS=$ac_xsave_LIBS
33315  fi
33316
33317  # Check for system-dependent libraries X programs must link with.
33318  # Do this before checking for the system-independent R6 libraries
33319  # (-lICE), since we may need -lsocket or whatever for X linking.
33320
33321  if test "$ISC" = yes; then
33322    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
33323  else
33324    # Martyn Johnson says this is needed for Ultrix, if the X
33325    # libraries were built with DECnet support.  And Karl Berry says
33326    # the Alpha needs dnet_stub (dnet does not exist).
33327    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
33328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33329/* end confdefs.h.  */
33330
33331/* Override any GCC internal prototype to avoid an error.
33332   Use char because int might match the return type of a GCC
33333   builtin and then its argument prototype would still apply.  */
33334#ifdef __cplusplus
33335extern "C"
33336#endif
33337char XOpenDisplay ();
33338#ifdef F77_DUMMY_MAIN
33339
33340#  ifdef __cplusplus
33341     extern "C"
33342#  endif
33343   int F77_DUMMY_MAIN() { return 1; }
33344
33345#endif
33346int
33347main ()
33348{
33349return XOpenDisplay ();
33350  ;
33351  return 0;
33352}
33353_ACEOF
33354if ac_fn_c_try_link "$LINENO"; then :
33355
33356else
33357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
33358$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
33359if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
33360  $as_echo_n "(cached) " >&6
33361else
33362  ac_check_lib_save_LIBS=$LIBS
33363LIBS="-ldnet  $LIBS"
33364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33365/* end confdefs.h.  */
33366
33367/* Override any GCC internal prototype to avoid an error.
33368   Use char because int might match the return type of a GCC
33369   builtin and then its argument prototype would still apply.  */
33370#ifdef __cplusplus
33371extern "C"
33372#endif
33373char dnet_ntoa ();
33374#ifdef F77_DUMMY_MAIN
33375
33376#  ifdef __cplusplus
33377     extern "C"
33378#  endif
33379   int F77_DUMMY_MAIN() { return 1; }
33380
33381#endif
33382int
33383main ()
33384{
33385return dnet_ntoa ();
33386  ;
33387  return 0;
33388}
33389_ACEOF
33390if ac_fn_c_try_link "$LINENO"; then :
33391  ac_cv_lib_dnet_dnet_ntoa=yes
33392else
33393  ac_cv_lib_dnet_dnet_ntoa=no
33394fi
33395rm -f core conftest.err conftest.$ac_objext \
33396    conftest$ac_exeext conftest.$ac_ext
33397LIBS=$ac_check_lib_save_LIBS
33398fi
33399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
33400$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
33401if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
33402  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
33403fi
33404
33405    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
33406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
33407$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
33408if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
33409  $as_echo_n "(cached) " >&6
33410else
33411  ac_check_lib_save_LIBS=$LIBS
33412LIBS="-ldnet_stub  $LIBS"
33413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33414/* end confdefs.h.  */
33415
33416/* Override any GCC internal prototype to avoid an error.
33417   Use char because int might match the return type of a GCC
33418   builtin and then its argument prototype would still apply.  */
33419#ifdef __cplusplus
33420extern "C"
33421#endif
33422char dnet_ntoa ();
33423#ifdef F77_DUMMY_MAIN
33424
33425#  ifdef __cplusplus
33426     extern "C"
33427#  endif
33428   int F77_DUMMY_MAIN() { return 1; }
33429
33430#endif
33431int
33432main ()
33433{
33434return dnet_ntoa ();
33435  ;
33436  return 0;
33437}
33438_ACEOF
33439if ac_fn_c_try_link "$LINENO"; then :
33440  ac_cv_lib_dnet_stub_dnet_ntoa=yes
33441else
33442  ac_cv_lib_dnet_stub_dnet_ntoa=no
33443fi
33444rm -f core conftest.err conftest.$ac_objext \
33445    conftest$ac_exeext conftest.$ac_ext
33446LIBS=$ac_check_lib_save_LIBS
33447fi
33448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
33449$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
33450if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
33451  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
33452fi
33453
33454    fi
33455fi
33456rm -f core conftest.err conftest.$ac_objext \
33457    conftest$ac_exeext conftest.$ac_ext
33458    LIBS="$ac_xsave_LIBS"
33459
33460    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
33461    # to get the SysV transport functions.
33462    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
33463    # needs -lnsl.
33464    # The nsl library prevents programs from opening the X display
33465    # on Irix 5.2, according to T.E. Dickey.
33466    # The functions gethostbyname, getservbyname, and inet_addr are
33467    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
33468    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
33469if test "x$ac_cv_func_gethostbyname" = xyes; then :
33470
33471fi
33472
33473    if test $ac_cv_func_gethostbyname = no; then
33474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
33475$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
33476if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
33477  $as_echo_n "(cached) " >&6
33478else
33479  ac_check_lib_save_LIBS=$LIBS
33480LIBS="-lnsl  $LIBS"
33481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33482/* end confdefs.h.  */
33483
33484/* Override any GCC internal prototype to avoid an error.
33485   Use char because int might match the return type of a GCC
33486   builtin and then its argument prototype would still apply.  */
33487#ifdef __cplusplus
33488extern "C"
33489#endif
33490char gethostbyname ();
33491#ifdef F77_DUMMY_MAIN
33492
33493#  ifdef __cplusplus
33494     extern "C"
33495#  endif
33496   int F77_DUMMY_MAIN() { return 1; }
33497
33498#endif
33499int
33500main ()
33501{
33502return gethostbyname ();
33503  ;
33504  return 0;
33505}
33506_ACEOF
33507if ac_fn_c_try_link "$LINENO"; then :
33508  ac_cv_lib_nsl_gethostbyname=yes
33509else
33510  ac_cv_lib_nsl_gethostbyname=no
33511fi
33512rm -f core conftest.err conftest.$ac_objext \
33513    conftest$ac_exeext conftest.$ac_ext
33514LIBS=$ac_check_lib_save_LIBS
33515fi
33516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
33517$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
33518if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
33519  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
33520fi
33521
33522      if test $ac_cv_lib_nsl_gethostbyname = no; then
33523	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
33524$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
33525if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
33526  $as_echo_n "(cached) " >&6
33527else
33528  ac_check_lib_save_LIBS=$LIBS
33529LIBS="-lbsd  $LIBS"
33530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33531/* end confdefs.h.  */
33532
33533/* Override any GCC internal prototype to avoid an error.
33534   Use char because int might match the return type of a GCC
33535   builtin and then its argument prototype would still apply.  */
33536#ifdef __cplusplus
33537extern "C"
33538#endif
33539char gethostbyname ();
33540#ifdef F77_DUMMY_MAIN
33541
33542#  ifdef __cplusplus
33543     extern "C"
33544#  endif
33545   int F77_DUMMY_MAIN() { return 1; }
33546
33547#endif
33548int
33549main ()
33550{
33551return gethostbyname ();
33552  ;
33553  return 0;
33554}
33555_ACEOF
33556if ac_fn_c_try_link "$LINENO"; then :
33557  ac_cv_lib_bsd_gethostbyname=yes
33558else
33559  ac_cv_lib_bsd_gethostbyname=no
33560fi
33561rm -f core conftest.err conftest.$ac_objext \
33562    conftest$ac_exeext conftest.$ac_ext
33563LIBS=$ac_check_lib_save_LIBS
33564fi
33565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
33566$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
33567if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
33568  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
33569fi
33570
33571      fi
33572    fi
33573
33574    # lieder@skyler.mavd.honeywell.com says without -lsocket,
33575    # socket/setsockopt and other routines are undefined under SCO ODT
33576    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
33577    # on later versions), says Simon Leinen: it contains gethostby*
33578    # variants that don't use the name server (or something).  -lsocket
33579    # must be given before -lnsl if both are needed.  We assume that
33580    # if connect needs -lnsl, so does gethostbyname.
33581    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
33582if test "x$ac_cv_func_connect" = xyes; then :
33583
33584fi
33585
33586    if test $ac_cv_func_connect = no; then
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
33588$as_echo_n "checking for connect in -lsocket... " >&6; }
33589if ${ac_cv_lib_socket_connect+:} false; then :
33590  $as_echo_n "(cached) " >&6
33591else
33592  ac_check_lib_save_LIBS=$LIBS
33593LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
33594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33595/* end confdefs.h.  */
33596
33597/* Override any GCC internal prototype to avoid an error.
33598   Use char because int might match the return type of a GCC
33599   builtin and then its argument prototype would still apply.  */
33600#ifdef __cplusplus
33601extern "C"
33602#endif
33603char connect ();
33604#ifdef F77_DUMMY_MAIN
33605
33606#  ifdef __cplusplus
33607     extern "C"
33608#  endif
33609   int F77_DUMMY_MAIN() { return 1; }
33610
33611#endif
33612int
33613main ()
33614{
33615return connect ();
33616  ;
33617  return 0;
33618}
33619_ACEOF
33620if ac_fn_c_try_link "$LINENO"; then :
33621  ac_cv_lib_socket_connect=yes
33622else
33623  ac_cv_lib_socket_connect=no
33624fi
33625rm -f core conftest.err conftest.$ac_objext \
33626    conftest$ac_exeext conftest.$ac_ext
33627LIBS=$ac_check_lib_save_LIBS
33628fi
33629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
33630$as_echo "$ac_cv_lib_socket_connect" >&6; }
33631if test "x$ac_cv_lib_socket_connect" = xyes; then :
33632  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
33633fi
33634
33635    fi
33636
33637    # Guillermo Gomez says -lposix is necessary on A/UX.
33638    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
33639if test "x$ac_cv_func_remove" = xyes; then :
33640
33641fi
33642
33643    if test $ac_cv_func_remove = no; then
33644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
33645$as_echo_n "checking for remove in -lposix... " >&6; }
33646if ${ac_cv_lib_posix_remove+:} false; then :
33647  $as_echo_n "(cached) " >&6
33648else
33649  ac_check_lib_save_LIBS=$LIBS
33650LIBS="-lposix  $LIBS"
33651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33652/* end confdefs.h.  */
33653
33654/* Override any GCC internal prototype to avoid an error.
33655   Use char because int might match the return type of a GCC
33656   builtin and then its argument prototype would still apply.  */
33657#ifdef __cplusplus
33658extern "C"
33659#endif
33660char remove ();
33661#ifdef F77_DUMMY_MAIN
33662
33663#  ifdef __cplusplus
33664     extern "C"
33665#  endif
33666   int F77_DUMMY_MAIN() { return 1; }
33667
33668#endif
33669int
33670main ()
33671{
33672return remove ();
33673  ;
33674  return 0;
33675}
33676_ACEOF
33677if ac_fn_c_try_link "$LINENO"; then :
33678  ac_cv_lib_posix_remove=yes
33679else
33680  ac_cv_lib_posix_remove=no
33681fi
33682rm -f core conftest.err conftest.$ac_objext \
33683    conftest$ac_exeext conftest.$ac_ext
33684LIBS=$ac_check_lib_save_LIBS
33685fi
33686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
33687$as_echo "$ac_cv_lib_posix_remove" >&6; }
33688if test "x$ac_cv_lib_posix_remove" = xyes; then :
33689  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
33690fi
33691
33692    fi
33693
33694    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
33695    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
33696if test "x$ac_cv_func_shmat" = xyes; then :
33697
33698fi
33699
33700    if test $ac_cv_func_shmat = no; then
33701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
33702$as_echo_n "checking for shmat in -lipc... " >&6; }
33703if ${ac_cv_lib_ipc_shmat+:} false; then :
33704  $as_echo_n "(cached) " >&6
33705else
33706  ac_check_lib_save_LIBS=$LIBS
33707LIBS="-lipc  $LIBS"
33708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33709/* end confdefs.h.  */
33710
33711/* Override any GCC internal prototype to avoid an error.
33712   Use char because int might match the return type of a GCC
33713   builtin and then its argument prototype would still apply.  */
33714#ifdef __cplusplus
33715extern "C"
33716#endif
33717char shmat ();
33718#ifdef F77_DUMMY_MAIN
33719
33720#  ifdef __cplusplus
33721     extern "C"
33722#  endif
33723   int F77_DUMMY_MAIN() { return 1; }
33724
33725#endif
33726int
33727main ()
33728{
33729return shmat ();
33730  ;
33731  return 0;
33732}
33733_ACEOF
33734if ac_fn_c_try_link "$LINENO"; then :
33735  ac_cv_lib_ipc_shmat=yes
33736else
33737  ac_cv_lib_ipc_shmat=no
33738fi
33739rm -f core conftest.err conftest.$ac_objext \
33740    conftest$ac_exeext conftest.$ac_ext
33741LIBS=$ac_check_lib_save_LIBS
33742fi
33743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
33744$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
33745if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
33746  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
33747fi
33748
33749    fi
33750  fi
33751
33752  # Check for libraries that X11R6 Xt/Xaw programs need.
33753  ac_save_LDFLAGS=$LDFLAGS
33754  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
33755  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
33756  # check for ICE first), but we must link in the order -lSM -lICE or
33757  # we get undefined symbols.  So assume we have SM if we have ICE.
33758  # These have to be linked with before -lX11, unlike the other
33759  # libraries we check for below, so use a different variable.
33760  # John Interrante, Karl Berry
33761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
33762$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
33763if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
33764  $as_echo_n "(cached) " >&6
33765else
33766  ac_check_lib_save_LIBS=$LIBS
33767LIBS="-lICE $X_EXTRA_LIBS $LIBS"
33768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33769/* end confdefs.h.  */
33770
33771/* Override any GCC internal prototype to avoid an error.
33772   Use char because int might match the return type of a GCC
33773   builtin and then its argument prototype would still apply.  */
33774#ifdef __cplusplus
33775extern "C"
33776#endif
33777char IceConnectionNumber ();
33778#ifdef F77_DUMMY_MAIN
33779
33780#  ifdef __cplusplus
33781     extern "C"
33782#  endif
33783   int F77_DUMMY_MAIN() { return 1; }
33784
33785#endif
33786int
33787main ()
33788{
33789return IceConnectionNumber ();
33790  ;
33791  return 0;
33792}
33793_ACEOF
33794if ac_fn_c_try_link "$LINENO"; then :
33795  ac_cv_lib_ICE_IceConnectionNumber=yes
33796else
33797  ac_cv_lib_ICE_IceConnectionNumber=no
33798fi
33799rm -f core conftest.err conftest.$ac_objext \
33800    conftest$ac_exeext conftest.$ac_ext
33801LIBS=$ac_check_lib_save_LIBS
33802fi
33803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
33804$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
33805if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
33806  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
33807fi
33808
33809  LDFLAGS=$ac_save_LDFLAGS
33810
33811fi
33812
33813        ##
33814
33815    saved_cflags="$CFLAGS"
33816    saved_ldflags="$LDFLAGS"
33817    saved_cppflags="$CXXFLAGS"
33818
33819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5
33820$as_echo_n "checking for main in -ldl... " >&6; }
33821if ${ac_cv_lib_dl_main+:} false; then :
33822  $as_echo_n "(cached) " >&6
33823else
33824  ac_check_lib_save_LIBS=$LIBS
33825LIBS="-ldl  $LIBS"
33826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33827/* end confdefs.h.  */
33828
33829
33830#ifdef F77_DUMMY_MAIN
33831
33832#  ifdef __cplusplus
33833     extern "C"
33834#  endif
33835   int F77_DUMMY_MAIN() { return 1; }
33836
33837#endif
33838int
33839main ()
33840{
33841return main ();
33842  ;
33843  return 0;
33844}
33845_ACEOF
33846if ac_fn_c_try_link "$LINENO"; then :
33847  ac_cv_lib_dl_main=yes
33848else
33849  ac_cv_lib_dl_main=no
33850fi
33851rm -f core conftest.err conftest.$ac_objext \
33852    conftest$ac_exeext conftest.$ac_ext
33853LIBS=$ac_check_lib_save_LIBS
33854fi
33855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5
33856$as_echo "$ac_cv_lib_dl_main" >&6; }
33857if test "x$ac_cv_lib_dl_main" = xyes; then :
33858  TCLTK_LIBS=" -ldl"
33859fi
33860
33861
33862
33863  WITH_TKSCI=no
33864  TCL_LIB_OK=0
33865  TCL_INCLUDE_OK=0
33866  # Check for tcl header file
33867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for header file tcl.h" >&5
33868$as_echo_n "checking for header file tcl.h... " >&6; }
33869  dirs="$USER_TCL_INC_PATH $DEVTOOLS_INCDIR /include /usr/include /usr/include/tcl /usr/include/tcl8.5 /usr/include/tcl8.* /usr/local/include /usr/local/include/tcl /usr/local/include/tcl8.*  /usr/X11/include/tcl /usr/X11/include/tcl8.* /usr/include/X11 /usr/include/X11/tcl /usr/include/X11/tcl8.* ../include ../../include /usr/tcl /usr/local/tcl /usr/local/tcl/include /usr/tcl/include /sw/include"
33870  for i in $dirs ; do
33871	if test -r $i/tcl.h; then
33872		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $i " >&5
33873$as_echo "found in $i " >&6; }
33874
33875
33876CHK_TCL_INCLUDE_PATH=$i
33877CHK_TCL_MAJOR=8
33878CHK_TCL_MINOR=4
33879CHK_TCL_INC_NAME=tcl.h
33880saved_cflags="$CFLAGS"
33881saved_cppflags="$CPPFLAGS"
33882CFLAGS="$CFLAGS -I$CHK_TCL_INCLUDE_PATH"
33883CPPFLAGS="$CPPFLAGS -I$CHK_TCL_INCLUDE_PATH"
33884
33885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5
33886$as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; }
33887cat > conftest.$ac_ext <<EOF
33888#line 33888 "configure"
33889#include "confdefs.h"
33890
33891#include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME"
33892#if (TCL_MAJOR_VERSION > $CHK_TCL_MAJOR)
33893TCL_VERSION_OK
33894#else
33895#if ((TCL_MAJOR_VERSION == $CHK_TCL_MAJOR) && (TCL_MINOR_VERSION >= $CHK_TCL_MINOR))
33896TCL_VERSION_OK
33897#endif
33898#endif
33899
33900EOF
33901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33902  grep "TCL_VERSION_OK" >/dev/null 2>&1; then
33903  rm -rf conftest*
33904  \
33905TCL_VERSION_OK=1
33906else
33907  rm -rf conftest*
33908  \
33909TCL_VERSION_OK=0
33910fi
33911rm -f conftest*
33912
33913
33914if test "$cross_compiling" = yes; then :
33915  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33917as_fn_error $? "cannot run test program while cross compiling
33918See \`config.log' for more details" "$LINENO" 5; }
33919else
33920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33921/* end confdefs.h.  */
33922#include "confdefs.h"
33923#include <stdio.h>
33924#include <$CHK_TCL_INC_NAME>
33925int main(void) {
33926        FILE *maj = fopen("tclmajor","w");
33927        FILE *min = fopen("tclminor","w");
33928        FILE *serial = fopen("tclserial","w");
33929        fprintf(maj,"%d",TCL_MAJOR_VERSION);
33930        fprintf(min,"%d",TCL_MINOR_VERSION);
33931        fprintf(serial,"%s",TCL_PATCH_LEVEL);
33932        fclose(maj);
33933        fclose(min);
33934        fclose(serial);
33935        return 0;
33936}
33937
33938_ACEOF
33939if ac_fn_c_try_run "$LINENO"; then :
33940
33941  TCL_MAJOR_VERSION=`cat tclmajor`
33942  TCL_MINOR_VERSION=`cat tclminor`
33943  TCL_SERIAL_VERSION=`cat tclserial`
33944  TCL_VERSION=$TCL_MAJOR_VERSION.$TCL_MINOR_VERSION
33945  rm -f tclmajor tclminor tclserial
33946
33947else
33948  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33950as_fn_error $? "The TCL detection of the version failed.
33951If you are using Intel Compiler, check if Intel Library (ex : libimf.so) is available (in the LD_LIBRARY_PATH for example)
33952See \`config.log' for more details" "$LINENO" 5; }
33953fi
33954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33955  conftest.$ac_objext conftest.beam conftest.$ac_ext
33956fi
33957
33958
33959case $host_os in
33960  darwin* | rhapsody*)
33961# already added to CFLAGS
33962  ;;
33963  *)
33964 TCL_INC_PATH=-I$i
33965  ;;
33966esac
33967
33968TCL_LIB=tcl$TCL_VERSION
33969if test $TCL_VERSION_OK = 1; then
33970	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($TCL_VERSION) yes" >&5
33971$as_echo "($TCL_VERSION) yes" >&6; }
33972else
33973	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($TCL_VERSION) no" >&5
33974$as_echo "($TCL_VERSION) no" >&6; }
33975	if test "$TCL_VERSION" == "can't happen"; then
33976		as_fn_error $? "can't happen" "$LINENO" 5
33977        else
33978	   as_fn_error $? "You need at least version $CHK_TCL_MAJOR.$CHK_TCL_MINOR of tcl" "$LINENO" 5
33979	fi
33980fi
33981CFLAGS=$saved_cflags
33982CPPFLAGS=$saved_cppflags
33983
33984		if test $TCL_VERSION_OK = 1; then
33985			TCL_INCLUDE_OK=1
33986
33987
33988CHK_TCL_MAJ=$TCL_MAJOR_VERSION
33989CHK_TCL_MIN=$TCL_MINOR_VERSION
33990TCL_LIB_OK=0
33991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl library tcl$TCL_MAJOR_VERSION.$TCL_MINOR_VERSION" >&5
33992$as_echo_n "checking for tcl library tcl$TCL_MAJOR_VERSION.$TCL_MINOR_VERSION... " >&6; }
33993MULTIARCH_HOST=`gcc -v 2>&1|grep Target|cut -d" " -f2`
33994dirs="$USER_TCL_LIB_PATH $DEVTOOLS_LIBDIR /lib64 /usr/lib64 /lib /usr/lib /usr/lib/tcl /usr/lib/tcl8.* /shlib /shlib/tcl /shlib/tcl8.* /usr/shlib /shlib/tcl /usr//shlib/tcl8.* /usr/local/lib /usr/local/lib/tcl /usr/local/lib/tcl8.* /usr/local/shlib /usr/X11/lib/tcl /usr/X11/lib/tcl8.* /usr/lib/X11 /usr/lib/X11/tcl /usr/lib/X11/tcl8.* ../lib ../../lib  /usr/local/tcl /usr/tcl /usr/tcl/lib /usr/local/tcl/lib /sw/lib/ /usr/lib/$MULTIARCH_HOST ."
33995libexts="so so.1.0 sl dylib a"
33996libnames="tcl$CHK_TCL_MAJ.$CHK_TCL_MIN tcl.$CHK_TCL_MAJ.$CHK_TCL_MIN tcl$CHK_TCL_MAJ$CHK_TCL_MIN tcl.$CHK_TCL_MAJ$CHK_TCL_MIN"
33997for e in $libexts; do
33998	for j in $dirs; do
33999		for n in $libnames; do
34000			m="$j/lib$n.$e"
34001			if test -r $m; then
34002				PATH_LIB_TCL=$j
34003				EXT_LIB_TCL=$e
34004				NAME_LIB_TCL=$n
34005				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found $m using -L$PATH_LIB_TCL -l$NAME_LIB_TCL" >&5
34006$as_echo "found $m using -L$PATH_LIB_TCL -l$NAME_LIB_TCL" >&6; }
34007				saved_cflags="$CFLAGS"
34008				saved_ldflags="$LDFLAGS"
34009				saved_cppflags="$CPPFLAGS"
34010				CFLAGS="$CFLAGS $TCL_INC_PATH"
34011				CPPFLAGS="$CPPFLAGS $TCL_INC_PATH"
34012				LDFLAGS=$LDFLAGS
34013				TCL_LDFLAGS="$X_LIBS $X_EXTRA_LIBS $TCLTK_LIBS"
34014				TCL_LIB_OK=1
34015				# Check for Tcl lib
34016				if test "$USER_TCL_LIB_PATH" = ""
34017				then
34018					LDFLAGS="$LDFLAGS -L$PATH_LIB_TCL"
34019					as_ac_Lib=`$as_echo "ac_cv_lib_$NAME_LIB_TCL''_Tcl_DoOneEvent" | $as_tr_sh`
34020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl_DoOneEvent in -l$NAME_LIB_TCL" >&5
34021$as_echo_n "checking for Tcl_DoOneEvent in -l$NAME_LIB_TCL... " >&6; }
34022if eval \${$as_ac_Lib+:} false; then :
34023  $as_echo_n "(cached) " >&6
34024else
34025  ac_check_lib_save_LIBS=$LIBS
34026LIBS="-l$NAME_LIB_TCL -l$NAME_LIB_TCL $TCL_LDFLAGS $LIBS"
34027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34028/* end confdefs.h.  */
34029
34030/* Override any GCC internal prototype to avoid an error.
34031   Use char because int might match the return type of a GCC
34032   builtin and then its argument prototype would still apply.  */
34033#ifdef __cplusplus
34034extern "C"
34035#endif
34036char Tcl_DoOneEvent ();
34037#ifdef F77_DUMMY_MAIN
34038
34039#  ifdef __cplusplus
34040     extern "C"
34041#  endif
34042   int F77_DUMMY_MAIN() { return 1; }
34043
34044#endif
34045int
34046main ()
34047{
34048return Tcl_DoOneEvent ();
34049  ;
34050  return 0;
34051}
34052_ACEOF
34053if ac_fn_c_try_link "$LINENO"; then :
34054  eval "$as_ac_Lib=yes"
34055else
34056  eval "$as_ac_Lib=no"
34057fi
34058rm -f core conftest.err conftest.$ac_objext \
34059    conftest$ac_exeext conftest.$ac_ext
34060LIBS=$ac_check_lib_save_LIBS
34061fi
34062eval ac_res=\$$as_ac_Lib
34063	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34064$as_echo "$ac_res" >&6; }
34065if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
34066  TCL_LIB_OK=1
34067else
34068  TCL_LIB_OK=0
34069fi
34070
34071				else
34072					LDFLAGS="$LDFLAGS -L$USER_TCL_LIB_PATH"
34073					as_ac_Lib=`$as_echo "ac_cv_lib_$NAME_LIB_TCL''_Tcl_DoOneEvent" | $as_tr_sh`
34074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl_DoOneEvent in -l$NAME_LIB_TCL" >&5
34075$as_echo_n "checking for Tcl_DoOneEvent in -l$NAME_LIB_TCL... " >&6; }
34076if eval \${$as_ac_Lib+:} false; then :
34077  $as_echo_n "(cached) " >&6
34078else
34079  ac_check_lib_save_LIBS=$LIBS
34080LIBS="-l$NAME_LIB_TCL -l$NAME_LIB_TCL $TCL_LDFLAGS $LIBS"
34081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34082/* end confdefs.h.  */
34083
34084/* Override any GCC internal prototype to avoid an error.
34085   Use char because int might match the return type of a GCC
34086   builtin and then its argument prototype would still apply.  */
34087#ifdef __cplusplus
34088extern "C"
34089#endif
34090char Tcl_DoOneEvent ();
34091#ifdef F77_DUMMY_MAIN
34092
34093#  ifdef __cplusplus
34094     extern "C"
34095#  endif
34096   int F77_DUMMY_MAIN() { return 1; }
34097
34098#endif
34099int
34100main ()
34101{
34102return Tcl_DoOneEvent ();
34103  ;
34104  return 0;
34105}
34106_ACEOF
34107if ac_fn_c_try_link "$LINENO"; then :
34108  eval "$as_ac_Lib=yes"
34109else
34110  eval "$as_ac_Lib=no"
34111fi
34112rm -f core conftest.err conftest.$ac_objext \
34113    conftest$ac_exeext conftest.$ac_ext
34114LIBS=$ac_check_lib_save_LIBS
34115fi
34116eval ac_res=\$$as_ac_Lib
34117	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34118$as_echo "$ac_res" >&6; }
34119if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
34120  TCL_LIB_OK=1
34121else
34122  TCL_LIB_OK=0
34123fi
34124
34125				fi
34126				CFLAGS="$saved_cflags"
34127				CPPFLAGS="$saved_cppflags"
34128				LDFLAGS="$saved_ldflags"
34129				if test $TCL_LIB_OK = 1; then
34130					if test "$USER_TCL_LIB_PATH" = ""
34131					then TCL_LIB=" -L$PATH_LIB_TCL -l$NAME_LIB_TCL"
34132					else TCL_LIB=" -L$USER_TCL_LIB_PATH  -l$NAME_LIB_TCL"
34133					fi
34134					break 3;
34135				fi
34136			fi
34137				done
34138		done
34139done
34140
34141			if test $TCL_LIB_OK = 1; then
34142				TCLTK_LIBS=" $TCL_LIB $TCLTK_LIBS"
34143				break;
34144			fi
34145		fi
34146	fi
34147  done
34148
34149  #perform tk tests if tcl test passed
34150  if test $TCL_LIB_OK = 0; then
34151	if test $TCL_INCLUDE_OK = 0; then
34152        	as_fn_error $? "no header file tcl.h found for 8.4* or 8.5*. Please install the dev library of tcl 8.4 or 8.5" "$LINENO" 5
34153        else
34154			as_fn_error $? "header file tcl.h has been found for 8.4* or 8.5* but no corresponding tcl library (ie libtcl8.4.so or libtcl8.5.so)" "$LINENO" 5
34155        fi
34156  fi
34157# Check if X11/Xlib.h is available or not (tk.h needs it ...)
34158   for ac_header in X11/Xlib.h
34159do :
34160  ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
34161if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
34162  cat >>confdefs.h <<_ACEOF
34163#define HAVE_X11_XLIB_H 1
34164_ACEOF
34165
34166else
34167  as_fn_error $? "Could not find X11/Xlib.h ... This dependency is necessary because of tk.h... Provided by package libx11-dev under Debian/Ubuntu for example." "$LINENO" 5
34168fi
34169
34170done
34171
34172
34173  # Check for tk header file
34174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for header file tk.h" >&5
34175$as_echo_n "checking for header file tk.h... " >&6; }
34176  TK_LIB_OK=0
34177  TK_INCLUDE_OK=0
34178  dirs="$USER_TK_INC_PATH $DEVTOOLS_INCDIR /include /usr/include /usr/include/tk /usr/include/tk8.5 /usr/include/tk8.* /usr/local/include /usr/local/include/tk /usr/local/include/tk8.* /usr/X11/include/tk /usr/X11/include/tk8.* /usr/include/X11 /usr/include/X11/tk /usr/include/X11/tk8.* ../include ../../include /usr/tk /usr/local/tk /usr/local/tk/include /usr/tk/include  /usr/local/tcl /usr/tcl /usr/tcl/include /usr/local/tcl/include /sw/include /usr/include/tcl8.5 /usr/include/tcl8.*"
34179# /usr/include/tcl8.5 is checked because some distribs store tk headers
34180# in /usr/include/tcl8.*
34181  for i in $dirs ; do
34182	if test -r $i/tk.h; then
34183		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $i " >&5
34184$as_echo "found in $i " >&6; }
34185
34186
34187CHK_TK_INCLUDE_PATH=$i
34188CHK_TK_MAJOR=8
34189CHK_TK_MINOR=4
34190CHK_TK_INC_NAME=tk.h
34191saved_cflags="$CFLAGS"
34192saved_cppflags="$CPPFLAGS"
34193CFLAGS="$CFLAGS $TCL_INC_PATH -I$CHK_TK_INCLUDE_PATH $X_CFLAGS"
34194CPPFLAGS="$CPPFLAGS $TCL_INC_PATH -I$CHK_TK_INCLUDE_PATH $X_CFLAGS"
34195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later" >&5
34196$as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; }
34197
34198cat > conftest.$ac_ext <<EOF
34199#line 34199 "configure"
34200#include "confdefs.h"
34201
34202#include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME"
34203#if (TK_MAJOR_VERSION > $CHK_TK_MAJOR)
34204TK_VERSION_OK
34205#else
34206#if ((TK_MAJOR_VERSION == $CHK_TK_MAJOR) && (TK_MINOR_VERSION >= $CHK_TK_MINOR))
34207TK_VERSION_OK
34208#endif
34209#endif
34210
34211EOF
34212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34213  grep "TK_VERSION_OK" >/dev/null 2>&1; then
34214  rm -rf conftest*
34215  \
34216TK_VERSION_OK=1
34217else
34218  rm -rf conftest*
34219  \
34220TK_VERSION_OK=0
34221fi
34222rm -f conftest*
34223
34224
34225
34226cat > conftest.$ac_ext <<EOF
34227#include "confdefs.h"
34228#include <stdio.h>
34229#include <$CHK_TK_INC_NAME>
34230int main(void) {
34231        FILE *maj = fopen("tkmajor","w");
34232        FILE *min = fopen("tkminor","w");
34233        FILE *serial = fopen("tkserial","w");
34234        fprintf(maj,"%d",TK_MAJOR_VERSION);
34235        fprintf(min,"%d",TK_MINOR_VERSION);
34236        fprintf(serial,"%s",TK_PATCH_LEVEL);
34237        fclose(maj);
34238        fclose(min);
34239        fclose(serial);
34240        return 0;
34241}
34242EOF
34243
34244eval $ac_link
34245if test -s conftest && (./conftest; exit) 2>/dev/null; then
34246  TK_MAJOR_VERSION=`cat tkmajor`
34247  TK_MINOR_VERSION=`cat tkminor`
34248  TK_SERIAL_VERSION=`cat tkserial`
34249  TK_VERSION=$TK_MAJOR_VERSION.$TK_MINOR_VERSION
34250  rm -f tkmajor tkminor tkserial
34251else
34252  TK_VERSION="can't happen"
34253fi
34254
34255case $host_os in
34256  darwin* | rhapsody*)
34257# already added to CFLAGS
34258  ;;
34259  *)
34260 TK_INC_PATH=-I$i
34261  ;;
34262esac
34263
34264TK_LIB=tk$TK_VERSION
34265if test $TK_VERSION_OK = 1; then
34266	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($TK_VERSION) yes" >&5
34267$as_echo "($TK_VERSION) yes" >&6; }
34268else
34269	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($TK_VERSION) no" >&5
34270$as_echo "($TK_VERSION) no" >&6; }
34271	if $TK_VERSION = "can't happen"; then
34272		as_fn_error $? "can(t happen" "$LINENO" 5
34273        else
34274	   as_fn_error $? "you need at least version 8.4 of tk" "$LINENO" 5
34275	fi
34276fi
34277CFLAGS=$saved_cflags
34278CPPFLAGS=$saved_cppflags
34279
34280		if test $TK_VERSION_OK = 1; then
34281			TK_INCLUDE_OK=1
34282
34283
34284CHK_TK_MAJ=$TK_MAJOR_VERSION
34285CHK_TK_MIN=$TK_MINOR_VERSION
34286TK_LIB_OK=0
34287
34288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tk library tk$TK_MAJOR_VERSION.$TK_MINOR_VERSION" >&5
34289$as_echo_n "checking for tk library tk$TK_MAJOR_VERSION.$TK_MINOR_VERSION... " >&6; }
34290MULTIARCH_HOST=`gcc -v 2>&1|grep Target|cut -d" " -f2`
34291
34292dirs="$USER_TK_LIB_PATH $DEVTOOLS_LIBDIR /lib /usr/lib /usr/lib64 /usr/lib/tk /usr/lib/tk8.* /shlib /shlib/tk /shlib/tk8.* /usr/shlib /shlib/tk /usr/shlib/tk8.* /usr/local/lib /usr/local/lib/tk /usr/local/lib/tk8.* /usr/local/shlib /usr/X11/lib/tk /usr/X11/lib/tk8.*  /usr/lib/X11 /usr/lib/X11/tk /usr/lib/X11/tk8.* ../lib ../../lib /usr/tk /usr/local/tk /usr/local/tk/lib /usr/tk/lib /usr/local/tcl /usr/tcl /usr/local/tcl/lib /usr/tcl/lib /sw/lib /usr/lib/$MULTIARCH_HOST ."
34293libexts="so so.1.0 sl dylib a"
34294libnames="tk$CHK_TK_MAJ.$CHK_TK_MIN tk.$CHK_TK_MAJ.$CHK_TK_MIN tk$CHK_TK_MAJ$CHK_TK_MIN tk.$CHK_TK_MAJ$CHK_TK_MIN"
34295
34296TK_PLUS="$TCL_LIB -lX11"
34297
34298case $host_os in
34299  darwin* | rhapsody*)
34300	TK_PLUS="-L${X11BASE}/lib -lX11"
34301  ;;
34302esac
34303
34304# needed for cygwin with X11
34305case "$host" in
34306  *-*-cygwin* )
34307	TK_PLUS=" "
34308    ;;
34309esac
34310
34311
34312for e in $libexts; do
34313	for j in $dirs; do
34314		for n in $libnames; do
34315			m="$j/lib$n.$e"
34316			if test -r $m; then
34317				PATH_LIB_TK=$j
34318				EXT_LIB_TK=$e
34319				NAME_LIB_TK=$n
34320				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found $m using -L$PATH_LIB_TK -l$NAME_LIB_TK" >&5
34321$as_echo "found $m using -L$PATH_LIB_TK -l$NAME_LIB_TK" >&6; }
34322				saved_cflags="$CFLAGS"
34323				saved_ldflags="$LDFLAGS"
34324				saved_cppflags="$CPPFLAGS"
34325				CFLAGS="$CFLAGS $TK_INC_PATH"
34326				CPPFLAGS="$CPPFLAGS $TK_INC_PATH"
34327				LDFLAGS=$LDFLAGS
34328				TK_LDFLAGS="$X_LIBS $X_EXTRA_LIBS $TCLTK_LIBS"
34329				# Check for Tk lib
34330				if test "$USER_TK_LIB_PATH" = ""
34331				then
34332					LDFLAGS="$LDFLAGS $TK_LDFLAGS -L$PATH_LIB_TK"
34333					as_ac_Lib=`$as_echo "ac_cv_lib_$NAME_LIB_TK''_Tk_BindEvent" | $as_tr_sh`
34334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_BindEvent in -l$NAME_LIB_TK" >&5
34335$as_echo_n "checking for Tk_BindEvent in -l$NAME_LIB_TK... " >&6; }
34336if eval \${$as_ac_Lib+:} false; then :
34337  $as_echo_n "(cached) " >&6
34338else
34339  ac_check_lib_save_LIBS=$LIBS
34340LIBS="-l$NAME_LIB_TK -l$NAME_LIB_TK $TK_PLUS $LIBS"
34341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34342/* end confdefs.h.  */
34343
34344/* Override any GCC internal prototype to avoid an error.
34345   Use char because int might match the return type of a GCC
34346   builtin and then its argument prototype would still apply.  */
34347#ifdef __cplusplus
34348extern "C"
34349#endif
34350char Tk_BindEvent ();
34351#ifdef F77_DUMMY_MAIN
34352
34353#  ifdef __cplusplus
34354     extern "C"
34355#  endif
34356   int F77_DUMMY_MAIN() { return 1; }
34357
34358#endif
34359int
34360main ()
34361{
34362return Tk_BindEvent ();
34363  ;
34364  return 0;
34365}
34366_ACEOF
34367if ac_fn_c_try_link "$LINENO"; then :
34368  eval "$as_ac_Lib=yes"
34369else
34370  eval "$as_ac_Lib=no"
34371fi
34372rm -f core conftest.err conftest.$ac_objext \
34373    conftest$ac_exeext conftest.$ac_ext
34374LIBS=$ac_check_lib_save_LIBS
34375fi
34376eval ac_res=\$$as_ac_Lib
34377	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34378$as_echo "$ac_res" >&6; }
34379if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
34380  TK_LIB_OK=1
34381else
34382  TK_LIB_OK=0
34383fi
34384
34385				else
34386					LDFLAGS="$LDFLAGS $TK_LDFLAGS -L$USER_TK_LIB_PATH"
34387
34388					as_ac_Lib=`$as_echo "ac_cv_lib_$NAME_LIB_TK''_Tk_BindEvent" | $as_tr_sh`
34389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_BindEvent in -l$NAME_LIB_TK" >&5
34390$as_echo_n "checking for Tk_BindEvent in -l$NAME_LIB_TK... " >&6; }
34391if eval \${$as_ac_Lib+:} false; then :
34392  $as_echo_n "(cached) " >&6
34393else
34394  ac_check_lib_save_LIBS=$LIBS
34395LIBS="-l$NAME_LIB_TK -l$NAME_LIB_TK $TK_PLUS $LIBS"
34396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34397/* end confdefs.h.  */
34398
34399/* Override any GCC internal prototype to avoid an error.
34400   Use char because int might match the return type of a GCC
34401   builtin and then its argument prototype would still apply.  */
34402#ifdef __cplusplus
34403extern "C"
34404#endif
34405char Tk_BindEvent ();
34406#ifdef F77_DUMMY_MAIN
34407
34408#  ifdef __cplusplus
34409     extern "C"
34410#  endif
34411   int F77_DUMMY_MAIN() { return 1; }
34412
34413#endif
34414int
34415main ()
34416{
34417return Tk_BindEvent ();
34418  ;
34419  return 0;
34420}
34421_ACEOF
34422if ac_fn_c_try_link "$LINENO"; then :
34423  eval "$as_ac_Lib=yes"
34424else
34425  eval "$as_ac_Lib=no"
34426fi
34427rm -f core conftest.err conftest.$ac_objext \
34428    conftest$ac_exeext conftest.$ac_ext
34429LIBS=$ac_check_lib_save_LIBS
34430fi
34431eval ac_res=\$$as_ac_Lib
34432	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34433$as_echo "$ac_res" >&6; }
34434if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
34435  TK_LIB_OK=1
34436else
34437  TK_LIB_OK=0
34438fi
34439
34440				fi
34441				CFLAGS="$saved_cflags"
34442				CPPFLAGS="$saved_cppflags"
34443				LDFLAGS="$saved_ldflags"
34444				if test $TK_LIB_OK = 1; then
34445					if test "$USER_TK_LIB_PATH" = ""
34446					then TK_LIB=" -L$PATH_LIB_TK -l$NAME_LIB_TK"
34447					else TK_LIB=" -L$USER_TK_LIB_PATH  -l$NAME_LIB_TK"
34448					fi
34449					break 3;
34450				fi
34451			fi
34452				done
34453		done
34454done
34455
34456			if test $TK_LIB_OK = 1; then
34457				TKTK_LIBS=" $TK_LIB $TKTK_LIBS"
34458				break;
34459			fi
34460		fi
34461	fi
34462  done
34463
34464  if test $TK_LIB_OK = 0; then
34465	if test $TK_INCLUDE_OK = 0; then
34466        	as_fn_error $? "no header file tk.h found for 8.4* or 8.5*. Please install the dev library of tk 8.4 or 8.5" "$LINENO" 5
34467        else
34468		as_fn_error $? "header file tk.h has been found for 8.4* or 8.5* but no corresponding tk library (libtk8.4.so or libtk8.5.so)" "$LINENO" 5
34469        fi
34470
34471  else
34472        TCLTK_LIBS=$TK_LIB" $TCLTK_LIBS"
34473        WITH_TKSCI=yes
34474  fi
34475
34476
34477    # set variables
34478    if test "$WITH_TKSCI" = yes; then
34479
34480$as_echo "#define WITH_TK /**/" >>confdefs.h
34481
34482    else
34483        as_fn_error $? "TCL/TK not found. Use --without-tk or specify the librairies and include paths manually" "$LINENO" 5
34484    fi
34485
34486
34487
34488
34489
34490fi
34491
34492 if test "$WITH_TKSCI" = yes; then
34493  TCLTK_TRUE=
34494  TCLTK_FALSE='#'
34495else
34496  TCLTK_TRUE='#'
34497  TCLTK_FALSE=
34498fi
34499
34500
34501#################
34502## MATIO LIBRARY (MAT File I/O Library)
34503#################
34504
34505
34506
34507# Check whether --with-matio was given.
34508if test "${with_matio+set}" = set; then :
34509  withval=$with_matio;
34510fi
34511
34512
34513
34514# Check whether --with-matio_include was given.
34515if test "${with_matio_include+set}" = set; then :
34516  withval=$with_matio_include; with_matio_include="-I$withval"
34517fi
34518
34519
34520
34521# Check whether --with-matio_library was given.
34522if test "${with_matio_library+set}" = set; then :
34523  withval=$with_matio_library; with_matio_library="-L$withval"
34524fi
34525
34526
34527MATIO_ENABLE=no
34528
34529if test "$with_matio" != no; then
34530   if test -n "$with_matio_include" -o -n "$with_matio_library" ; then
34531      MATIO_CFLAGS="$with_matio_include"
34532      MATIO_LIBS="$with_matio_library -lm -lz -lmatio -lhdf5"
34533   else
34534      if $WITH_DEVTOOLS; then # Scilab thirdparties
34535         MATIO_CFLAGS="-I$DEVTOOLS_INCDIR"
34536         MATIO_LIBS="-L$DEVTOOLS_LIBDIR -lm -lz -lmatio -lhdf5"
34537      else
34538
34539pkg_failed=no
34540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MATIO" >&5
34541$as_echo_n "checking for MATIO... " >&6; }
34542
34543if test -n "$PKG_CONFIG"; then
34544    if test -n "$MATIO_CFLAGS"; then
34545        pkg_cv_MATIO_CFLAGS="$MATIO_CFLAGS"
34546    else
34547        if test -n "$PKG_CONFIG" && \
34548    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"matio >= 1.5.0\""; } >&5
34549  ($PKG_CONFIG --exists --print-errors "matio >= 1.5.0") 2>&5
34550  ac_status=$?
34551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34552  test $ac_status = 0; }; then
34553  pkg_cv_MATIO_CFLAGS=`$PKG_CONFIG --cflags "matio >= 1.5.0" 2>/dev/null`
34554else
34555  pkg_failed=yes
34556fi
34557    fi
34558else
34559	pkg_failed=untried
34560fi
34561if test -n "$PKG_CONFIG"; then
34562    if test -n "$MATIO_LIBS"; then
34563        pkg_cv_MATIO_LIBS="$MATIO_LIBS"
34564    else
34565        if test -n "$PKG_CONFIG" && \
34566    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"matio >= 1.5.0\""; } >&5
34567  ($PKG_CONFIG --exists --print-errors "matio >= 1.5.0") 2>&5
34568  ac_status=$?
34569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34570  test $ac_status = 0; }; then
34571  pkg_cv_MATIO_LIBS=`$PKG_CONFIG --libs "matio >= 1.5.0" 2>/dev/null`
34572else
34573  pkg_failed=yes
34574fi
34575    fi
34576else
34577	pkg_failed=untried
34578fi
34579
34580
34581
34582if test $pkg_failed = yes; then
34583
34584if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34585        _pkg_short_errors_supported=yes
34586else
34587        _pkg_short_errors_supported=no
34588fi
34589        if test $_pkg_short_errors_supported = yes; then
34590	        MATIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "matio >= 1.5.0"`
34591        else
34592	        MATIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "matio >= 1.5.0"`
34593        fi
34594	# Put the nasty error message in config.log where it belongs
34595	echo "$MATIO_PKG_ERRORS" >&5
34596
34597	as_fn_error $? "Package requirements (matio >= 1.5.0) were not met:
34598
34599$MATIO_PKG_ERRORS
34600
34601Consider adjusting the PKG_CONFIG_PATH environment variable if you
34602installed software in a non-standard prefix.
34603
34604Alternatively, you may set the environment variables MATIO_CFLAGS
34605and MATIO_LIBS to avoid the need to call pkg-config.
34606See the pkg-config man page for more details.
34607" "$LINENO" 5
34608elif test $pkg_failed = untried; then
34609	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34611as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
34612is in your PATH or set the PKG_CONFIG environment variable to the full
34613path to pkg-config.
34614
34615Alternatively, you may set the environment variables MATIO_CFLAGS
34616and MATIO_LIBS to avoid the need to call pkg-config.
34617See the pkg-config man page for more details.
34618
34619To get pkg-config, see <http://pkg-config.freedesktop.org/>.
34620See \`config.log' for more details" "$LINENO" 5; }
34621else
34622	MATIO_CFLAGS=$pkg_cv_MATIO_CFLAGS
34623	MATIO_LIBS=$pkg_cv_MATIO_LIBS
34624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34625$as_echo "yes" >&6; }
34626	:
34627fi
34628      fi
34629   fi
34630
34631   save_CFLAGS="$CFLAGS"
34632   save_LIBS="$LIBS"
34633
34634   CFLAGS="$CFLAGS $MATIO_CFLAGS"
34635   LIBS="$LIBS $MATIO_LIBS"
34636
34637   for ac_header in matio.h
34638do :
34639  ac_fn_c_check_header_mongrel "$LINENO" "matio.h" "ac_cv_header_matio_h" "$ac_includes_default"
34640if test "x$ac_cv_header_matio_h" = xyes; then :
34641  cat >>confdefs.h <<_ACEOF
34642#define HAVE_MATIO_H 1
34643_ACEOF
34644
34645else
34646  as_fn_error $? "Invalid MATIO_CFLAGS returned by pkg-config. Try to define MATIO_CFLAGS." "$LINENO" 5
34647fi
34648
34649done
34650
34651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mat_Open in -lmatio" >&5
34652$as_echo_n "checking for Mat_Open in -lmatio... " >&6; }
34653if ${ac_cv_lib_matio_Mat_Open+:} false; then :
34654  $as_echo_n "(cached) " >&6
34655else
34656  ac_check_lib_save_LIBS=$LIBS
34657LIBS="-lmatio  $LIBS"
34658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34659/* end confdefs.h.  */
34660
34661/* Override any GCC internal prototype to avoid an error.
34662   Use char because int might match the return type of a GCC
34663   builtin and then its argument prototype would still apply.  */
34664#ifdef __cplusplus
34665extern "C"
34666#endif
34667char Mat_Open ();
34668#ifdef F77_DUMMY_MAIN
34669
34670#  ifdef __cplusplus
34671     extern "C"
34672#  endif
34673   int F77_DUMMY_MAIN() { return 1; }
34674
34675#endif
34676int
34677main ()
34678{
34679return Mat_Open ();
34680  ;
34681  return 0;
34682}
34683_ACEOF
34684if ac_fn_c_try_link "$LINENO"; then :
34685  ac_cv_lib_matio_Mat_Open=yes
34686else
34687  ac_cv_lib_matio_Mat_Open=no
34688fi
34689rm -f core conftest.err conftest.$ac_objext \
34690    conftest$ac_exeext conftest.$ac_ext
34691LIBS=$ac_check_lib_save_LIBS
34692fi
34693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matio_Mat_Open" >&5
34694$as_echo "$ac_cv_lib_matio_Mat_Open" >&6; }
34695if test "x$ac_cv_lib_matio_Mat_Open" = xyes; then :
34696  cat >>confdefs.h <<_ACEOF
34697#define HAVE_LIBMATIO 1
34698_ACEOF
34699
34700  LIBS="-lmatio $LIBS"
34701
34702else
34703  as_fn_error $? "Invalid MATIO_LIBS returned by pkg-config. Try to define MATIO_LIBS." "$LINENO" 5
34704fi
34705
34706
34707   LIBS="$save_LIBS"
34708   CFLAGS="$save_CFLAGS"
34709
34710
34711$as_echo "#define WITH_MATIO /**/" >>confdefs.h
34712
34713   MATIO_ENABLE=yes
34714
34715
34716
34717fi
34718
34719
34720
34721 if test "$with_matio" != no; then
34722  MATIO_TRUE=
34723  MATIO_FALSE='#'
34724else
34725  MATIO_TRUE='#'
34726  MATIO_FALSE=
34727fi
34728
34729
34730
34731#############################
34732## Documentation management #
34733#############################
34734
34735HELP_ENABLE=yes
34736
34737# Check whether --enable-build-help was given.
34738if test "${enable_build_help+set}" = set; then :
34739  enableval=$enable_build_help;
34740fi
34741
34742
34743if test "$enable_build_help" != no; then
34744
34745
34746DOCBOOK_OK=no
34747DOCBOOK_ROOT=""
34748
34749if test "x$ac_java_jvm_name" != "x" ; then
34750    # if JDK is not enabled, skip the docbook detection
34751
34752
34753# Check whether --with-docbook was given.
34754if test "${with_docbook+set}" = set; then :
34755  withval=$with_docbook; with_docbook=$withval
34756else
34757  with_docbook='yes'
34758
34759fi
34760
34761
34762	for dir in $with_docbook $SCI_SRCDIR_FULL/thirdparty/docbook/ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/docbook2X/xslt/man/ /usr/share/xml/docbook/stylesheet/nwalsh/ /usr/share/xml/docbook/stylesheet/nwalsh/current/ /sw/share/xml/xsl/docbook-xsl /usr/share/xml/docbook/xsl-stylesheets-*/ /usr/share/sgml/docbook/xsl-stylesheets-*/ /usr/share/sgml/docbook/xsl-stylesheets /usr/share/sgml/docbook/xsl-ns-stylesheets-*/ /usr/share/xml/docbook/stylesheet/docbook-xsl /opt/local/share/xsl/docbook-xsl; do
34763		if test -r "$dir/fo/docbook.xsl" -a "$DOCBOOK_ROOT" = ""; then
34764			DOCBOOK_ROOT=$dir
34765        fi
34766	done
34767	if test -z "$DOCBOOK_ROOT"; then
34768		as_fn_error $? "Could not find the Docbook root directory. If you have installed it on your system and we haven't been able to find it. Please report a bug" "$LINENO" 5
34769	fi
34770
34771
34772
34773	# Saxon XSLT Processor, as the JVM implementation is unable to parse the docbook xsl files
34774	# check Saxon-HE 9.5 first then fallback to Saxon-6.5
34775
34776
34777
34778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking saxon9he" >&5
34779$as_echo_n "checking saxon9he... " >&6; }
34780    PACKAGE_JAR_FILE=
34781
34782    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
34783
34784    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'saxon9he.jar' -or -name 'libsaxon9he.jar' -or -name 'libsaxon9he-java.jar' -or -name 'saxon9he*.jar' \) 2>/dev/null |tr '\n' ':')."
34785
34786    if test ! -f conftestSharedChecker.class ; then
34787
34788    cat << \EOF > conftestSharedChecker.java
34789// #line 34789 "configure"
34790import java.util.regex.Pattern;
34791import java.io.File;
34792import java.io.IOException;
34793import java.lang.reflect.Field;
34794import java.lang.reflect.InvocationTargetException;
34795import java.lang.reflect.Method;
34796import java.net.URL;
34797import java.net.URLClassLoader;
34798import java.util.ArrayList;
34799
34800public class conftestSharedChecker {
34801
34802    /**
34803     * Required arguments :
34804     *  argv[0]: name of the jar package
34805     *  argv[1]: name of the class (with the package prefix)
34806     *  argv[2]: possible paths of the jar package (separated by ':')
34807     *
34808     * Optional arguments:
34809     *  argv[3]: field or method used to retrieve the version
34810     *  argv[4]: expected version
34811     *  argv[5]: String comparator :
34812     *      "="  for exact version
34813     */
34814    public static void main(String[] argv) {
34815        final String packageName = argv[0];
34816        final String className = argv[1];
34817        final String[] jarList = argv[2].split(":");
34818
34819        ArrayList<URL> found = new ArrayList<>();
34820        for(String jar : jarList)
34821        {
34822            try {
34823                File f = new File(jar);
34824                if (f.exists()) {
34825                    found.add(f.toURI().toURL());
34826                }
34827            } catch (IOException ex) {
34828                System.err.println(ex.toString());
34829            }
34830        }
34831
34832        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
34833        URL klassURL = null;
34834        Class<?> klass = null;
34835        try {
34836            String resourceName = className.replace(".", "/") + ".class";
34837            klassURL = localClassLoader.getResource(resourceName);
34838            klass = localClassLoader.loadClass(className);
34839        } catch (ClassNotFoundException ex) {
34840            System.err.println(className + " not found");
34841            System.exit(-1);
34842        }
34843
34844        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
34845        String path = pathURL.substring(pathURL.indexOf(':') + 1);
34846        System.err.println("found: " + path);
34847
34848        String version;
34849        if (!"".equals(argv[3])) {
34850            version = checkVersion(klass, argv);
34851        } else {
34852            version = klass.getPackage().getSpecificationVersion();
34853        }
34854
34855        System.out.println(path + " " + version);
34856    }
34857
34858    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
34859        final String versionMethod = argv[3];
34860        final String expected = argv[4];
34861        final String atLeastOrEqual;
34862        if (!"".equals(argv[5])) {
34863            atLeastOrEqual = argv[5];
34864        } else {
34865            atLeastOrEqual = "<=";
34866        }
34867
34868        String value = "";
34869        if (versionMethod.isEmpty()) {
34870            value = klass.getPackage().getSpecificationVersion();
34871            compareAndDisplay(atLeastOrEqual, expected, value);
34872            return value;
34873        }
34874
34875        try {
34876            try {
34877                Field field = klass.getField(versionMethod);
34878                value = String.valueOf(field.get(null));
34879                compareAndDisplay(atLeastOrEqual, expected, value);
34880            } catch (NoSuchFieldException fe) {
34881                Method method = null;
34882                try {
34883                    method = klass.getMethod(versionMethod);
34884                } catch (NoSuchMethodException ex) {
34885                    System.err.println(ex.toString());
34886                    System.exit(-3);
34887                }
34888
34889                try {
34890                    value = String.valueOf(method.invoke(null));
34891                    compareAndDisplay(atLeastOrEqual, expected, value);
34892                } catch (NullPointerException ex) {
34893                    value = String.valueOf(method.invoke(klass.newInstance()));
34894                    compareAndDisplay(atLeastOrEqual, expected, value);
34895                }
34896            }
34897        } catch (IllegalAccessException ex) {
34898            System.err.println(ex);
34899            System.exit(-2);
34900        } catch (InvocationTargetException ex) {
34901            System.err.println(ex);
34902            System.exit(-2);
34903        } catch (InstantiationException ex) {
34904            System.err.println(ex);
34905            System.exit(-2);
34906        }
34907        return value;
34908    }
34909
34910    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
34911        int cmp = compare(expected, value);
34912
34913        switch(atLeastOrEqual) {
34914            case ">":
34915                if (cmp > 0) {
34916                    return;
34917                } else {
34918                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
34919                    System.exit(-4);
34920                }
34921            case "==":
34922                if (cmp == 0) {
34923                    return;
34924                } else {
34925                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
34926                    System.exit(-4);
34927                }
34928            case "<=":
34929                if (cmp <= 0) {
34930                    return;
34931                } else {
34932                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
34933                    System.exit(-4);
34934                }
34935            default:
34936                System.err.println("unable to compare with "+atLeastOrEqual);
34937                System.exit(-4);
34938        }
34939    }
34940
34941    private static int compare(String v1, String v2) {
34942        String s1 = normalisedVersion(v1);
34943        String s2 = normalisedVersion(v2);
34944
34945        System.err.println("compare: " + v1 + " normalised to " + s1);
34946        System.err.println("compare: " + v2 + " normalised to " + s2);
34947        return s1.compareTo(s2);
34948    }
34949
34950    private static String normalisedVersion(String version) {
34951        return normalisedVersion(version, ".", 4);
34952    }
34953
34954    private static String normalisedVersion(String version, String sep, int maxWidth) {
34955        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
34956        StringBuilder sb = new StringBuilder();
34957        for (String s : split) {
34958            sb.append(String.format("%" + maxWidth + 's', s));
34959        }
34960        return sb.toString();
34961    }
34962}
34963EOF
34964
34965    CLASSPATH=$ac_java_classpath
34966    export CLASSPATH
34967    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
34968    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
34969        echo "configure: conftestSharedChecker.class available" >&5
34970    else
34971        echo "configure: failed program was:" >&5
34972        cat conftestSharedChecker.java >&5
34973        echo "configure: CLASSPATH was $CLASSPATH" >&5
34974    fi
34975
34976    fi
34977
34978    CLASSPATH=$ac_java_classpath
34979    export CLASSPATH
34980    echo "CLASSPATH="$CLASSPATH >&5
34981    cmd="$JAVA conftestSharedChecker \"saxon9he\" \"net.sf.saxon.Version\" \"$jar_resolved\" \"\" \"\" \"\""
34982    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
34983        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
34984$(tail -n 1 conftestSharedChecker.java.output)
34985EOF
34986        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
34987$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
34988        echo "yes" >&5
34989        # append the found file to the classpath to manage jar dependency
34990        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
34991    else
34992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34993$as_echo "no" >&6; }
34994      if test ""yes"" = "yes"; then
34995         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar saxon9he used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" >&5
34996$as_echo "$as_me: WARNING: Could not find or use the Java package/jar saxon9he used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" >&2;}
34997      else
34998          as_fn_error $? "Could not find or use the Java package/jar saxon9he used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" "$LINENO" 5
34999      fi
35000    fi
35001    if test -f conftestSharedChecker.java.output; then
35002        rm conftestSharedChecker.java.output
35003    fi
35004
35005	SAXON=$PACKAGE_JAR_FILE
35006	if test -z "$SAXON"; then
35007
35008
35009
35010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking saxon" >&5
35011$as_echo_n "checking saxon... " >&6; }
35012    PACKAGE_JAR_FILE=
35013
35014    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
35015
35016    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'saxon.jar' -or -name 'libsaxon.jar' -or -name 'libsaxon-java.jar' -or -name 'saxon*.jar' \) 2>/dev/null |tr '\n' ':')."
35017
35018    if test ! -f conftestSharedChecker.class ; then
35019
35020    cat << \EOF > conftestSharedChecker.java
35021// #line 35021 "configure"
35022import java.util.regex.Pattern;
35023import java.io.File;
35024import java.io.IOException;
35025import java.lang.reflect.Field;
35026import java.lang.reflect.InvocationTargetException;
35027import java.lang.reflect.Method;
35028import java.net.URL;
35029import java.net.URLClassLoader;
35030import java.util.ArrayList;
35031
35032public class conftestSharedChecker {
35033
35034    /**
35035     * Required arguments :
35036     *  argv[0]: name of the jar package
35037     *  argv[1]: name of the class (with the package prefix)
35038     *  argv[2]: possible paths of the jar package (separated by ':')
35039     *
35040     * Optional arguments:
35041     *  argv[3]: field or method used to retrieve the version
35042     *  argv[4]: expected version
35043     *  argv[5]: String comparator :
35044     *      "="  for exact version
35045     */
35046    public static void main(String[] argv) {
35047        final String packageName = argv[0];
35048        final String className = argv[1];
35049        final String[] jarList = argv[2].split(":");
35050
35051        ArrayList<URL> found = new ArrayList<>();
35052        for(String jar : jarList)
35053        {
35054            try {
35055                File f = new File(jar);
35056                if (f.exists()) {
35057                    found.add(f.toURI().toURL());
35058                }
35059            } catch (IOException ex) {
35060                System.err.println(ex.toString());
35061            }
35062        }
35063
35064        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
35065        URL klassURL = null;
35066        Class<?> klass = null;
35067        try {
35068            String resourceName = className.replace(".", "/") + ".class";
35069            klassURL = localClassLoader.getResource(resourceName);
35070            klass = localClassLoader.loadClass(className);
35071        } catch (ClassNotFoundException ex) {
35072            System.err.println(className + " not found");
35073            System.exit(-1);
35074        }
35075
35076        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
35077        String path = pathURL.substring(pathURL.indexOf(':') + 1);
35078        System.err.println("found: " + path);
35079
35080        String version;
35081        if (!"".equals(argv[3])) {
35082            version = checkVersion(klass, argv);
35083        } else {
35084            version = klass.getPackage().getSpecificationVersion();
35085        }
35086
35087        System.out.println(path + " " + version);
35088    }
35089
35090    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
35091        final String versionMethod = argv[3];
35092        final String expected = argv[4];
35093        final String atLeastOrEqual;
35094        if (!"".equals(argv[5])) {
35095            atLeastOrEqual = argv[5];
35096        } else {
35097            atLeastOrEqual = "<=";
35098        }
35099
35100        String value = "";
35101        if (versionMethod.isEmpty()) {
35102            value = klass.getPackage().getSpecificationVersion();
35103            compareAndDisplay(atLeastOrEqual, expected, value);
35104            return value;
35105        }
35106
35107        try {
35108            try {
35109                Field field = klass.getField(versionMethod);
35110                value = String.valueOf(field.get(null));
35111                compareAndDisplay(atLeastOrEqual, expected, value);
35112            } catch (NoSuchFieldException fe) {
35113                Method method = null;
35114                try {
35115                    method = klass.getMethod(versionMethod);
35116                } catch (NoSuchMethodException ex) {
35117                    System.err.println(ex.toString());
35118                    System.exit(-3);
35119                }
35120
35121                try {
35122                    value = String.valueOf(method.invoke(null));
35123                    compareAndDisplay(atLeastOrEqual, expected, value);
35124                } catch (NullPointerException ex) {
35125                    value = String.valueOf(method.invoke(klass.newInstance()));
35126                    compareAndDisplay(atLeastOrEqual, expected, value);
35127                }
35128            }
35129        } catch (IllegalAccessException ex) {
35130            System.err.println(ex);
35131            System.exit(-2);
35132        } catch (InvocationTargetException ex) {
35133            System.err.println(ex);
35134            System.exit(-2);
35135        } catch (InstantiationException ex) {
35136            System.err.println(ex);
35137            System.exit(-2);
35138        }
35139        return value;
35140    }
35141
35142    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
35143        int cmp = compare(expected, value);
35144
35145        switch(atLeastOrEqual) {
35146            case ">":
35147                if (cmp > 0) {
35148                    return;
35149                } else {
35150                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
35151                    System.exit(-4);
35152                }
35153            case "==":
35154                if (cmp == 0) {
35155                    return;
35156                } else {
35157                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
35158                    System.exit(-4);
35159                }
35160            case "<=":
35161                if (cmp <= 0) {
35162                    return;
35163                } else {
35164                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
35165                    System.exit(-4);
35166                }
35167            default:
35168                System.err.println("unable to compare with "+atLeastOrEqual);
35169                System.exit(-4);
35170        }
35171    }
35172
35173    private static int compare(String v1, String v2) {
35174        String s1 = normalisedVersion(v1);
35175        String s2 = normalisedVersion(v2);
35176
35177        System.err.println("compare: " + v1 + " normalised to " + s1);
35178        System.err.println("compare: " + v2 + " normalised to " + s2);
35179        return s1.compareTo(s2);
35180    }
35181
35182    private static String normalisedVersion(String version) {
35183        return normalisedVersion(version, ".", 4);
35184    }
35185
35186    private static String normalisedVersion(String version, String sep, int maxWidth) {
35187        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
35188        StringBuilder sb = new StringBuilder();
35189        for (String s : split) {
35190            sb.append(String.format("%" + maxWidth + 's', s));
35191        }
35192        return sb.toString();
35193    }
35194}
35195EOF
35196
35197    CLASSPATH=$ac_java_classpath
35198    export CLASSPATH
35199    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
35200    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
35201        echo "configure: conftestSharedChecker.class available" >&5
35202    else
35203        echo "configure: failed program was:" >&5
35204        cat conftestSharedChecker.java >&5
35205        echo "configure: CLASSPATH was $CLASSPATH" >&5
35206    fi
35207
35208    fi
35209
35210    CLASSPATH=$ac_java_classpath
35211    export CLASSPATH
35212    echo "CLASSPATH="$CLASSPATH >&5
35213    cmd="$JAVA conftestSharedChecker \"saxon\" \"net.sf.saxon.Version\" \"$jar_resolved\" \"\" \"\" \"\""
35214    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
35215        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
35216$(tail -n 1 conftestSharedChecker.java.output)
35217EOF
35218        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
35219$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
35220        echo "yes" >&5
35221        # append the found file to the classpath to manage jar dependency
35222        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
35223    else
35224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35225$as_echo "no" >&6; }
35226      if test ""yes"" = "yes"; then
35227         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" >&5
35228$as_echo "$as_me: WARNING: Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" >&2;}
35229      else
35230          as_fn_error $? "Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package net.sf.saxon.Version)" "$LINENO" 5
35231      fi
35232    fi
35233    if test -f conftestSharedChecker.java.output; then
35234        rm conftestSharedChecker.java.output
35235    fi
35236
35237		SAXON=$PACKAGE_JAR_FILE
35238	fi
35239	if test -z "$SAXON"; then
35240
35241
35242
35243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking saxon" >&5
35244$as_echo_n "checking saxon... " >&6; }
35245    PACKAGE_JAR_FILE=
35246
35247    DEFAULT_JAR_DIR="  /usr/local/share/java/classes  /usr/local/share/java/fop/build  /usr/local/share/java/batik/lib  /usr/local/share/java/jeuclid/repo $(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
35248
35249    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name 'saxon.jar' -or -name 'libsaxon.jar' -or -name 'libsaxon-java.jar' -or -name 'saxon*.jar' \) 2>/dev/null |tr '\n' ':')."
35250
35251    if test ! -f conftestSharedChecker.class ; then
35252
35253    cat << \EOF > conftestSharedChecker.java
35254// #line 35254 "configure"
35255import java.util.regex.Pattern;
35256import java.io.File;
35257import java.io.IOException;
35258import java.lang.reflect.Field;
35259import java.lang.reflect.InvocationTargetException;
35260import java.lang.reflect.Method;
35261import java.net.URL;
35262import java.net.URLClassLoader;
35263import java.util.ArrayList;
35264
35265public class conftestSharedChecker {
35266
35267    /**
35268     * Required arguments :
35269     *  argv[0]: name of the jar package
35270     *  argv[1]: name of the class (with the package prefix)
35271     *  argv[2]: possible paths of the jar package (separated by ':')
35272     *
35273     * Optional arguments:
35274     *  argv[3]: field or method used to retrieve the version
35275     *  argv[4]: expected version
35276     *  argv[5]: String comparator :
35277     *      "="  for exact version
35278     */
35279    public static void main(String[] argv) {
35280        final String packageName = argv[0];
35281        final String className = argv[1];
35282        final String[] jarList = argv[2].split(":");
35283
35284        ArrayList<URL> found = new ArrayList<>();
35285        for(String jar : jarList)
35286        {
35287            try {
35288                File f = new File(jar);
35289                if (f.exists()) {
35290                    found.add(f.toURI().toURL());
35291                }
35292            } catch (IOException ex) {
35293                System.err.println(ex.toString());
35294            }
35295        }
35296
35297        URLClassLoader localClassLoader = new URLClassLoader(found.toArray(new URL[found.size()]));
35298        URL klassURL = null;
35299        Class<?> klass = null;
35300        try {
35301            String resourceName = className.replace(".", "/") + ".class";
35302            klassURL = localClassLoader.getResource(resourceName);
35303            klass = localClassLoader.loadClass(className);
35304        } catch (ClassNotFoundException ex) {
35305            System.err.println(className + " not found");
35306            System.exit(-1);
35307        }
35308
35309        String pathURL = klassURL.getPath().substring(0, klassURL.getPath().indexOf('!'));
35310        String path = pathURL.substring(pathURL.indexOf(':') + 1);
35311        System.err.println("found: " + path);
35312
35313        String version;
35314        if (!"".equals(argv[3])) {
35315            version = checkVersion(klass, argv);
35316        } else {
35317            version = klass.getPackage().getSpecificationVersion();
35318        }
35319
35320        System.out.println(path + " " + version);
35321    }
35322
35323    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
35324        final String versionMethod = argv[3];
35325        final String expected = argv[4];
35326        final String atLeastOrEqual;
35327        if (!"".equals(argv[5])) {
35328            atLeastOrEqual = argv[5];
35329        } else {
35330            atLeastOrEqual = "<=";
35331        }
35332
35333        String value = "";
35334        if (versionMethod.isEmpty()) {
35335            value = klass.getPackage().getSpecificationVersion();
35336            compareAndDisplay(atLeastOrEqual, expected, value);
35337            return value;
35338        }
35339
35340        try {
35341            try {
35342                Field field = klass.getField(versionMethod);
35343                value = String.valueOf(field.get(null));
35344                compareAndDisplay(atLeastOrEqual, expected, value);
35345            } catch (NoSuchFieldException fe) {
35346                Method method = null;
35347                try {
35348                    method = klass.getMethod(versionMethod);
35349                } catch (NoSuchMethodException ex) {
35350                    System.err.println(ex.toString());
35351                    System.exit(-3);
35352                }
35353
35354                try {
35355                    value = String.valueOf(method.invoke(null));
35356                    compareAndDisplay(atLeastOrEqual, expected, value);
35357                } catch (NullPointerException ex) {
35358                    value = String.valueOf(method.invoke(klass.newInstance()));
35359                    compareAndDisplay(atLeastOrEqual, expected, value);
35360                }
35361            }
35362        } catch (IllegalAccessException ex) {
35363            System.err.println(ex);
35364            System.exit(-2);
35365        } catch (InvocationTargetException ex) {
35366            System.err.println(ex);
35367            System.exit(-2);
35368        } catch (InstantiationException ex) {
35369            System.err.println(ex);
35370            System.exit(-2);
35371        }
35372        return value;
35373    }
35374
35375    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
35376        int cmp = compare(expected, value);
35377
35378        switch(atLeastOrEqual) {
35379            case ">":
35380                if (cmp > 0) {
35381                    return;
35382                } else {
35383                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
35384                    System.exit(-4);
35385                }
35386            case "==":
35387                if (cmp == 0) {
35388                    return;
35389                } else {
35390                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
35391                    System.exit(-4);
35392                }
35393            case "<=":
35394                if (cmp <= 0) {
35395                    return;
35396                } else {
35397                    System.err.println("expected "+atLeastOrEqual+""+expected+" but got "+value);
35398                    System.exit(-4);
35399                }
35400            default:
35401                System.err.println("unable to compare with "+atLeastOrEqual);
35402                System.exit(-4);
35403        }
35404    }
35405
35406    private static int compare(String v1, String v2) {
35407        String s1 = normalisedVersion(v1);
35408        String s2 = normalisedVersion(v2);
35409
35410        System.err.println("compare: " + v1 + " normalised to " + s1);
35411        System.err.println("compare: " + v2 + " normalised to " + s2);
35412        return s1.compareTo(s2);
35413    }
35414
35415    private static String normalisedVersion(String version) {
35416        return normalisedVersion(version, ".", 4);
35417    }
35418
35419    private static String normalisedVersion(String version, String sep, int maxWidth) {
35420        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
35421        StringBuilder sb = new StringBuilder();
35422        for (String s : split) {
35423            sb.append(String.format("%" + maxWidth + 's', s));
35424        }
35425        return sb.toString();
35426    }
35427}
35428EOF
35429
35430    CLASSPATH=$ac_java_classpath
35431    export CLASSPATH
35432    cmd="$JAVAC ${JAVAC_FLAGS} conftestSharedChecker.java"
35433    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5) ; then
35434        echo "configure: conftestSharedChecker.class available" >&5
35435    else
35436        echo "configure: failed program was:" >&5
35437        cat conftestSharedChecker.java >&5
35438        echo "configure: CLASSPATH was $CLASSPATH" >&5
35439    fi
35440
35441    fi
35442
35443    CLASSPATH=$ac_java_classpath
35444    export CLASSPATH
35445    echo "CLASSPATH="$CLASSPATH >&5
35446    cmd="$JAVA conftestSharedChecker \"saxon\" \"com.icl.saxon.Loader\" \"$jar_resolved\" \"\" \"\" \"\""
35447    if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
35448        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
35449$(tail -n 1 conftestSharedChecker.java.output)
35450EOF
35451        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&5
35452$as_echo " $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION " >&6; }
35453        echo "yes" >&5
35454        # append the found file to the classpath to manage jar dependency
35455        ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
35456    else
35457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35458$as_echo "no" >&6; }
35459      if test "" = "yes"; then
35460         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package com.icl.saxon.Loader)" >&5
35461$as_echo "$as_me: WARNING: Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package com.icl.saxon.Loader)" >&2;}
35462      else
35463          as_fn_error $? "Could not find or use the Java package/jar saxon used by Saxon XSLT Processor (looking for package com.icl.saxon.Loader)" "$LINENO" 5
35464      fi
35465    fi
35466    if test -f conftestSharedChecker.java.output; then
35467        rm conftestSharedChecker.java.output
35468    fi
35469
35470		SAXON=$PACKAGE_JAR_FILE
35471	fi
35472
35473
35474fi # JDK
35475
35476
35477else
35478    HELP_ENABLE=no
35479fi
35480
35481if test "$JAVA_ENABLE" = no; then
35482    HELP_ENABLE=no
35483fi
35484
35485
35486
35487 if test $HELP_ENABLE = yes; then
35488  BUILD_HELP_TRUE=
35489  BUILD_HELP_FALSE='#'
35490else
35491  BUILD_HELP_TRUE='#'
35492  BUILD_HELP_FALSE=
35493fi
35494
35495
35496## Install XML help files ###
35497
35498
35499# Check whether --with-install-help-xml was given.
35500if test "${with_install_help_xml+set}" = set; then :
35501  withval=$with_install_help_xml;
35502fi
35503
35504HELP_INSTALL_ENABLE=no
35505if test "$with_install_help_xml" != no -a "$with_install_help_xml" != ""; then
35506   HELP_INSTALL_ENABLE=yes
35507fi
35508 if test "$HELP_INSTALL_ENABLE" != ""; then
35509  INSTALL_HELP_XML_TRUE=
35510  INSTALL_HELP_XML_FALSE='#'
35511else
35512  INSTALL_HELP_XML_TRUE='#'
35513  INSTALL_HELP_XML_FALSE=
35514fi
35515
35516
35517## Doxygen help generation
35518# Check whether --enable-build-doxygen was given.
35519if test "${enable_build_doxygen+set}" = set; then :
35520  enableval=$enable_build_doxygen;
35521fi
35522
35523
35524DOXYGEN_ENABLE=yes
35525if test "$enable_build_doxygen" != no -a "$enable_build_doxygen" != ""; then
35526
35527    ## If the user is providing a path to the option
35528    if test "$enable_build_doxygen" != 'yes' -a "$enable_build_doxygen" != 'no'; then
35529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking doxygen" >&5
35530$as_echo_n "checking doxygen... " >&6; }
35531        DOXYGEN_BIN="$enable_build_doxygen/doxygen"
35532        if test -f "$DOXYGEN_BIN"; then
35533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN_BIN" >&5
35534$as_echo "$DOXYGEN_BIN" >&6; }
35535        else
35536            as_fn_error $? "Unable to find $DOXYGEN_BIN. Please check the path you provided" "$LINENO" 5
35537        fi
35538    else
35539        # Looks for it in the path
35540        for ac_prog in doxygen
35541do
35542  # Extract the first word of "$ac_prog", so it can be a program name with args.
35543set dummy $ac_prog; ac_word=$2
35544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35545$as_echo_n "checking for $ac_word... " >&6; }
35546if ${ac_cv_prog_DOXYGEN_BIN+:} false; then :
35547  $as_echo_n "(cached) " >&6
35548else
35549  if test -n "$DOXYGEN_BIN"; then
35550  ac_cv_prog_DOXYGEN_BIN="$DOXYGEN_BIN" # Let the user override the test.
35551else
35552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35553for as_dir in $PATH
35554do
35555  IFS=$as_save_IFS
35556  test -z "$as_dir" && as_dir=.
35557    for ac_exec_ext in '' $ac_executable_extensions; do
35558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35559    ac_cv_prog_DOXYGEN_BIN="$ac_prog"
35560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35561    break 2
35562  fi
35563done
35564  done
35565IFS=$as_save_IFS
35566
35567fi
35568fi
35569DOXYGEN_BIN=$ac_cv_prog_DOXYGEN_BIN
35570if test -n "$DOXYGEN_BIN"; then
35571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN_BIN" >&5
35572$as_echo "$DOXYGEN_BIN" >&6; }
35573else
35574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35575$as_echo "no" >&6; }
35576fi
35577
35578
35579  test -n "$DOXYGEN_BIN" && break
35580done
35581test -n "$DOXYGEN_BIN" || DOXYGEN_BIN="no"
35582
35583        if test "x$DOXYGEN_BIN" = "xno"; then
35584            as_fn_error $? "Could find doxygen in the PATH" "$LINENO" 5
35585        fi
35586    fi
35587
35588
35589else
35590    DOXYGEN_ENABLE=no
35591fi
35592 if test $DOXYGEN_ENABLE = yes; then
35593  DOXYGEN_TRUE=
35594  DOXYGEN_FALSE='#'
35595else
35596  DOXYGEN_TRUE='#'
35597  DOXYGEN_FALSE=
35598fi
35599
35600
35601## Valgrind specific code
35602if test -n "$PKG_CONFIG" && \
35603    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind\""; } >&5
35604  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
35605  ac_status=$?
35606  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35607  test $ac_status = 0; }; then
35608
35609pkg_failed=no
35610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5
35611$as_echo_n "checking for VALGRIND... " >&6; }
35612
35613if test -n "$PKG_CONFIG"; then
35614    if test -n "$VALGRIND_CFLAGS"; then
35615        pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS"
35616    else
35617        if test -n "$PKG_CONFIG" && \
35618    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind\""; } >&5
35619  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
35620  ac_status=$?
35621  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35622  test $ac_status = 0; }; then
35623  pkg_cv_VALGRIND_CFLAGS=`$PKG_CONFIG --cflags "valgrind" 2>/dev/null`
35624else
35625  pkg_failed=yes
35626fi
35627    fi
35628else
35629	pkg_failed=untried
35630fi
35631if test -n "$PKG_CONFIG"; then
35632    if test -n "$VALGRIND_LIBS"; then
35633        pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS"
35634    else
35635        if test -n "$PKG_CONFIG" && \
35636    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind\""; } >&5
35637  ($PKG_CONFIG --exists --print-errors "valgrind") 2>&5
35638  ac_status=$?
35639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35640  test $ac_status = 0; }; then
35641  pkg_cv_VALGRIND_LIBS=`$PKG_CONFIG --libs "valgrind" 2>/dev/null`
35642else
35643  pkg_failed=yes
35644fi
35645    fi
35646else
35647	pkg_failed=untried
35648fi
35649
35650
35651
35652if test $pkg_failed = yes; then
35653
35654if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35655        _pkg_short_errors_supported=yes
35656else
35657        _pkg_short_errors_supported=no
35658fi
35659        if test $_pkg_short_errors_supported = yes; then
35660	        VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind"`
35661        else
35662	        VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind"`
35663        fi
35664	# Put the nasty error message in config.log where it belongs
35665	echo "$VALGRIND_PKG_ERRORS" >&5
35666
35667	as_fn_error $? "Package requirements (valgrind) were not met:
35668
35669$VALGRIND_PKG_ERRORS
35670
35671Consider adjusting the PKG_CONFIG_PATH environment variable if you
35672installed software in a non-standard prefix.
35673
35674Alternatively, you may set the environment variables VALGRIND_CFLAGS
35675and VALGRIND_LIBS to avoid the need to call pkg-config.
35676See the pkg-config man page for more details.
35677" "$LINENO" 5
35678elif test $pkg_failed = untried; then
35679	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35681as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35682is in your PATH or set the PKG_CONFIG environment variable to the full
35683path to pkg-config.
35684
35685Alternatively, you may set the environment variables VALGRIND_CFLAGS
35686and VALGRIND_LIBS to avoid the need to call pkg-config.
35687See the pkg-config man page for more details.
35688
35689To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35690See \`config.log' for more details" "$LINENO" 5; }
35691else
35692	VALGRIND_CFLAGS=$pkg_cv_VALGRIND_CFLAGS
35693	VALGRIND_LIBS=$pkg_cv_VALGRIND_LIBS
35694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35695$as_echo "yes" >&6; }
35696
35697$as_echo "#define VALGRIND_ENABLE /**/" >>confdefs.h
35698
35699fi
35700fi
35701
35702##############################################################
35703## Javasci module
35704##############################################################
35705
35706JAVASCI_ENABLE=yes
35707
35708if test "$JAVA_ENABLE" = no -o "$JAVASCI" = no; then
35709   JAVASCI_ENABLE=no
35710fi
35711
35712
35713
35714
35715##############################################################
35716## Enable test at compilation time
35717##############################################################
35718
35719COMPILATION_TESTS=no
35720if test "$enable_compilation_tests" != no -a "$enable_compilation_tests" != ""; then
35721   COMPILATION_TESTS=yes
35722fi
35723
35724if test COMPILATION_TESTS=yes -a "$JUNIT4" == ""; then
35725   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-compilation-tests deactivated: Could not find Junit4\"" >&5
35726$as_echo "$as_me: WARNING: --enable-compilation-tests deactivated: Could not find Junit4\"" >&2;}
35727   COMPILATION_TESTS=no
35728fi
35729
35730 if test "$COMPILATION_TESTS" != "no"; then
35731  COMPILATION_TESTS_TRUE=
35732  COMPILATION_TESTS_FALSE='#'
35733else
35734  COMPILATION_TESTS_TRUE='#'
35735  COMPILATION_TESTS_FALSE=
35736fi
35737
35738
35739##############################################################
35740## Enable the global force link
35741##############################################################
35742
35743# Check whether --enable-force-full-link was given.
35744if test "${enable_force_full_link+set}" = set; then :
35745  enableval=$enable_force_full_link;
35746fi
35747
35748
35749FORCE_FULL_LINK="no"
35750if test "$enable_force_full_link" == "yes"; then
35751    FORCE_FULL_LINK="yes"
35752fi
35753
35754 if test "$FORCE_FULL_LINK" == "yes"; then
35755  FORCE_LINK_TRUE=
35756  FORCE_LINK_FALSE='#'
35757else
35758  FORCE_LINK_TRUE='#'
35759  FORCE_LINK_FALSE=
35760fi
35761
35762
35763##############################################################
35764## demo_tools module
35765##############################################################
35766
35767DEMOTOOLS_ENABLE=yes
35768
35769if test "$GUI_ENABLE" = no; then
35770   DEMOTOOLS_ENABLE=no
35771fi
35772
35773
35774
35775##############################################################
35776## graphics/renderer/graphic_export module
35777##############################################################
35778
35779GRAPHICS_ENABLE=yes
35780
35781if test "$GUI_ENABLE" = no; then
35782   GRAPHICS_ENABLE=no
35783fi
35784
35785
35786
35787#########################
35788## libtool
35789#########################
35790
35791
35792case `pwd` in
35793  *\ * | *\	*)
35794    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
35795$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
35796esac
35797
35798
35799
35800macro_version='2.4.6'
35801macro_revision='2.4.6'
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811
35812
35813
35814
35815ltmain=$ac_aux_dir/ltmain.sh
35816
35817# Backslashify metacharacters that are still active within
35818# double-quoted strings.
35819sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
35820
35821# Same as above, but do not quote variable references.
35822double_quote_subst='s/\(["`\\]\)/\\\1/g'
35823
35824# Sed substitution to delay expansion of an escaped shell variable in a
35825# double_quote_subst'ed string.
35826delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
35827
35828# Sed substitution to delay expansion of an escaped single quote.
35829delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
35830
35831# Sed substitution to avoid accidental globbing in evaled expressions
35832no_glob_subst='s/\*/\\\*/g'
35833
35834ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
35835ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
35836ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
35837
35838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
35839$as_echo_n "checking how to print strings... " >&6; }
35840# Test print first, because it will be a builtin if present.
35841if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
35842   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
35843  ECHO='print -r --'
35844elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
35845  ECHO='printf %s\n'
35846else
35847  # Use this function as a fallback that always works.
35848  func_fallback_echo ()
35849  {
35850    eval 'cat <<_LTECHO_EOF
35851$1
35852_LTECHO_EOF'
35853  }
35854  ECHO='func_fallback_echo'
35855fi
35856
35857# func_echo_all arg...
35858# Invoke $ECHO with all args, space-separated.
35859func_echo_all ()
35860{
35861    $ECHO ""
35862}
35863
35864case $ECHO in
35865  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
35866$as_echo "printf" >&6; } ;;
35867  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
35868$as_echo "print -r" >&6; } ;;
35869  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
35870$as_echo "cat" >&6; } ;;
35871esac
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
35887$as_echo_n "checking for a sed that does not truncate output... " >&6; }
35888if ${ac_cv_path_SED+:} false; then :
35889  $as_echo_n "(cached) " >&6
35890else
35891            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
35892     for ac_i in 1 2 3 4 5 6 7; do
35893       ac_script="$ac_script$as_nl$ac_script"
35894     done
35895     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
35896     { ac_script=; unset ac_script;}
35897     if test -z "$SED"; then
35898  ac_path_SED_found=false
35899  # Loop through the user's path and test for each of PROGNAME-LIST
35900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35901for as_dir in $PATH
35902do
35903  IFS=$as_save_IFS
35904  test -z "$as_dir" && as_dir=.
35905    for ac_prog in sed gsed; do
35906    for ac_exec_ext in '' $ac_executable_extensions; do
35907      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
35908      as_fn_executable_p "$ac_path_SED" || continue
35909# Check for GNU ac_path_SED and select it if it is found.
35910  # Check for GNU $ac_path_SED
35911case `"$ac_path_SED" --version 2>&1` in
35912*GNU*)
35913  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
35914*)
35915  ac_count=0
35916  $as_echo_n 0123456789 >"conftest.in"
35917  while :
35918  do
35919    cat "conftest.in" "conftest.in" >"conftest.tmp"
35920    mv "conftest.tmp" "conftest.in"
35921    cp "conftest.in" "conftest.nl"
35922    $as_echo '' >> "conftest.nl"
35923    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
35924    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
35925    as_fn_arith $ac_count + 1 && ac_count=$as_val
35926    if test $ac_count -gt ${ac_path_SED_max-0}; then
35927      # Best one so far, save it but keep looking for a better one
35928      ac_cv_path_SED="$ac_path_SED"
35929      ac_path_SED_max=$ac_count
35930    fi
35931    # 10*(2^10) chars as input seems more than enough
35932    test $ac_count -gt 10 && break
35933  done
35934  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
35935esac
35936
35937      $ac_path_SED_found && break 3
35938    done
35939  done
35940  done
35941IFS=$as_save_IFS
35942  if test -z "$ac_cv_path_SED"; then
35943    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
35944  fi
35945else
35946  ac_cv_path_SED=$SED
35947fi
35948
35949fi
35950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
35951$as_echo "$ac_cv_path_SED" >&6; }
35952 SED="$ac_cv_path_SED"
35953  rm -f conftest.sed
35954
35955test -z "$SED" && SED=sed
35956Xsed="$SED -e 1s/^X//"
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
35969$as_echo_n "checking for fgrep... " >&6; }
35970if ${ac_cv_path_FGREP+:} false; then :
35971  $as_echo_n "(cached) " >&6
35972else
35973  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
35974   then ac_cv_path_FGREP="$GREP -F"
35975   else
35976     if test -z "$FGREP"; then
35977  ac_path_FGREP_found=false
35978  # Loop through the user's path and test for each of PROGNAME-LIST
35979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35980for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
35981do
35982  IFS=$as_save_IFS
35983  test -z "$as_dir" && as_dir=.
35984    for ac_prog in fgrep; do
35985    for ac_exec_ext in '' $ac_executable_extensions; do
35986      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
35987      as_fn_executable_p "$ac_path_FGREP" || continue
35988# Check for GNU ac_path_FGREP and select it if it is found.
35989  # Check for GNU $ac_path_FGREP
35990case `"$ac_path_FGREP" --version 2>&1` in
35991*GNU*)
35992  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
35993*)
35994  ac_count=0
35995  $as_echo_n 0123456789 >"conftest.in"
35996  while :
35997  do
35998    cat "conftest.in" "conftest.in" >"conftest.tmp"
35999    mv "conftest.tmp" "conftest.in"
36000    cp "conftest.in" "conftest.nl"
36001    $as_echo 'FGREP' >> "conftest.nl"
36002    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
36003    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
36004    as_fn_arith $ac_count + 1 && ac_count=$as_val
36005    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
36006      # Best one so far, save it but keep looking for a better one
36007      ac_cv_path_FGREP="$ac_path_FGREP"
36008      ac_path_FGREP_max=$ac_count
36009    fi
36010    # 10*(2^10) chars as input seems more than enough
36011    test $ac_count -gt 10 && break
36012  done
36013  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
36014esac
36015
36016      $ac_path_FGREP_found && break 3
36017    done
36018  done
36019  done
36020IFS=$as_save_IFS
36021  if test -z "$ac_cv_path_FGREP"; then
36022    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
36023  fi
36024else
36025  ac_cv_path_FGREP=$FGREP
36026fi
36027
36028   fi
36029fi
36030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
36031$as_echo "$ac_cv_path_FGREP" >&6; }
36032 FGREP="$ac_cv_path_FGREP"
36033
36034
36035test -z "$GREP" && GREP=grep
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055# Check whether --with-gnu-ld was given.
36056if test "${with_gnu_ld+set}" = set; then :
36057  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
36058else
36059  with_gnu_ld=no
36060fi
36061
36062ac_prog=ld
36063if test yes = "$GCC"; then
36064  # Check if gcc -print-prog-name=ld gives a path.
36065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
36066$as_echo_n "checking for ld used by $CC... " >&6; }
36067  case $host in
36068  *-*-mingw*)
36069    # gcc leaves a trailing carriage return, which upsets mingw
36070    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
36071  *)
36072    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
36073  esac
36074  case $ac_prog in
36075    # Accept absolute paths.
36076    [\\/]* | ?:[\\/]*)
36077      re_direlt='/[^/][^/]*/\.\./'
36078      # Canonicalize the pathname of ld
36079      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
36080      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
36081	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
36082      done
36083      test -z "$LD" && LD=$ac_prog
36084      ;;
36085  "")
36086    # If it fails, then pretend we aren't using GCC.
36087    ac_prog=ld
36088    ;;
36089  *)
36090    # If it is relative, then search for the first ld in PATH.
36091    with_gnu_ld=unknown
36092    ;;
36093  esac
36094elif test yes = "$with_gnu_ld"; then
36095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
36096$as_echo_n "checking for GNU ld... " >&6; }
36097else
36098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
36099$as_echo_n "checking for non-GNU ld... " >&6; }
36100fi
36101if ${lt_cv_path_LD+:} false; then :
36102  $as_echo_n "(cached) " >&6
36103else
36104  if test -z "$LD"; then
36105  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36106  for ac_dir in $PATH; do
36107    IFS=$lt_save_ifs
36108    test -z "$ac_dir" && ac_dir=.
36109    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
36110      lt_cv_path_LD=$ac_dir/$ac_prog
36111      # Check to see if the program is GNU ld.  I'd rather use --version,
36112      # but apparently some variants of GNU ld only accept -v.
36113      # Break only if it was the GNU/non-GNU ld that we prefer.
36114      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
36115      *GNU* | *'with BFD'*)
36116	test no != "$with_gnu_ld" && break
36117	;;
36118      *)
36119	test yes != "$with_gnu_ld" && break
36120	;;
36121      esac
36122    fi
36123  done
36124  IFS=$lt_save_ifs
36125else
36126  lt_cv_path_LD=$LD # Let the user override the test with a path.
36127fi
36128fi
36129
36130LD=$lt_cv_path_LD
36131if test -n "$LD"; then
36132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36133$as_echo "$LD" >&6; }
36134else
36135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36136$as_echo "no" >&6; }
36137fi
36138test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
36139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
36140$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
36141if ${lt_cv_prog_gnu_ld+:} false; then :
36142  $as_echo_n "(cached) " >&6
36143else
36144  # I'd rather use --version here, but apparently some GNU lds only accept -v.
36145case `$LD -v 2>&1 </dev/null` in
36146*GNU* | *'with BFD'*)
36147  lt_cv_prog_gnu_ld=yes
36148  ;;
36149*)
36150  lt_cv_prog_gnu_ld=no
36151  ;;
36152esac
36153fi
36154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
36155$as_echo "$lt_cv_prog_gnu_ld" >&6; }
36156with_gnu_ld=$lt_cv_prog_gnu_ld
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
36167$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
36168if ${lt_cv_path_NM+:} false; then :
36169  $as_echo_n "(cached) " >&6
36170else
36171  if test -n "$NM"; then
36172  # Let the user override the test.
36173  lt_cv_path_NM=$NM
36174else
36175  lt_nm_to_check=${ac_tool_prefix}nm
36176  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36177    lt_nm_to_check="$lt_nm_to_check nm"
36178  fi
36179  for lt_tmp_nm in $lt_nm_to_check; do
36180    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36181    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36182      IFS=$lt_save_ifs
36183      test -z "$ac_dir" && ac_dir=.
36184      tmp_nm=$ac_dir/$lt_tmp_nm
36185      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
36186	# Check to see if the nm accepts a BSD-compat flag.
36187	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
36188	#   nm: unknown option "B" ignored
36189	# Tru64's nm complains that /dev/null is an invalid object file
36190	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
36191	case $build_os in
36192	mingw*) lt_bad_file=conftest.nm/nofile ;;
36193	*) lt_bad_file=/dev/null ;;
36194	esac
36195	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
36196	*$lt_bad_file* | *'Invalid file or object type'*)
36197	  lt_cv_path_NM="$tmp_nm -B"
36198	  break 2
36199	  ;;
36200	*)
36201	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
36202	  */dev/null*)
36203	    lt_cv_path_NM="$tmp_nm -p"
36204	    break 2
36205	    ;;
36206	  *)
36207	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
36208	    continue # so that we can try to find one that supports BSD flags
36209	    ;;
36210	  esac
36211	  ;;
36212	esac
36213      fi
36214    done
36215    IFS=$lt_save_ifs
36216  done
36217  : ${lt_cv_path_NM=no}
36218fi
36219fi
36220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
36221$as_echo "$lt_cv_path_NM" >&6; }
36222if test no != "$lt_cv_path_NM"; then
36223  NM=$lt_cv_path_NM
36224else
36225  # Didn't find any BSD compatible name lister, look for dumpbin.
36226  if test -n "$DUMPBIN"; then :
36227    # Let the user override the test.
36228  else
36229    if test -n "$ac_tool_prefix"; then
36230  for ac_prog in dumpbin "link -dump"
36231  do
36232    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36233set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36235$as_echo_n "checking for $ac_word... " >&6; }
36236if ${ac_cv_prog_DUMPBIN+:} false; then :
36237  $as_echo_n "(cached) " >&6
36238else
36239  if test -n "$DUMPBIN"; then
36240  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
36241else
36242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36243for as_dir in $PATH
36244do
36245  IFS=$as_save_IFS
36246  test -z "$as_dir" && as_dir=.
36247    for ac_exec_ext in '' $ac_executable_extensions; do
36248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36249    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
36250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36251    break 2
36252  fi
36253done
36254  done
36255IFS=$as_save_IFS
36256
36257fi
36258fi
36259DUMPBIN=$ac_cv_prog_DUMPBIN
36260if test -n "$DUMPBIN"; then
36261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
36262$as_echo "$DUMPBIN" >&6; }
36263else
36264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36265$as_echo "no" >&6; }
36266fi
36267
36268
36269    test -n "$DUMPBIN" && break
36270  done
36271fi
36272if test -z "$DUMPBIN"; then
36273  ac_ct_DUMPBIN=$DUMPBIN
36274  for ac_prog in dumpbin "link -dump"
36275do
36276  # Extract the first word of "$ac_prog", so it can be a program name with args.
36277set dummy $ac_prog; ac_word=$2
36278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36279$as_echo_n "checking for $ac_word... " >&6; }
36280if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
36281  $as_echo_n "(cached) " >&6
36282else
36283  if test -n "$ac_ct_DUMPBIN"; then
36284  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
36285else
36286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36287for as_dir in $PATH
36288do
36289  IFS=$as_save_IFS
36290  test -z "$as_dir" && as_dir=.
36291    for ac_exec_ext in '' $ac_executable_extensions; do
36292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36293    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
36294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36295    break 2
36296  fi
36297done
36298  done
36299IFS=$as_save_IFS
36300
36301fi
36302fi
36303ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
36304if test -n "$ac_ct_DUMPBIN"; then
36305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
36306$as_echo "$ac_ct_DUMPBIN" >&6; }
36307else
36308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36309$as_echo "no" >&6; }
36310fi
36311
36312
36313  test -n "$ac_ct_DUMPBIN" && break
36314done
36315
36316  if test "x$ac_ct_DUMPBIN" = x; then
36317    DUMPBIN=":"
36318  else
36319    case $cross_compiling:$ac_tool_warned in
36320yes:)
36321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36323ac_tool_warned=yes ;;
36324esac
36325    DUMPBIN=$ac_ct_DUMPBIN
36326  fi
36327fi
36328
36329    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
36330    *COFF*)
36331      DUMPBIN="$DUMPBIN -symbols -headers"
36332      ;;
36333    *)
36334      DUMPBIN=:
36335      ;;
36336    esac
36337  fi
36338
36339  if test : != "$DUMPBIN"; then
36340    NM=$DUMPBIN
36341  fi
36342fi
36343test -z "$NM" && NM=nm
36344
36345
36346
36347
36348
36349
36350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
36351$as_echo_n "checking the name lister ($NM) interface... " >&6; }
36352if ${lt_cv_nm_interface+:} false; then :
36353  $as_echo_n "(cached) " >&6
36354else
36355  lt_cv_nm_interface="BSD nm"
36356  echo "int some_variable = 0;" > conftest.$ac_ext
36357  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
36358  (eval "$ac_compile" 2>conftest.err)
36359  cat conftest.err >&5
36360  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
36361  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
36362  cat conftest.err >&5
36363  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
36364  cat conftest.out >&5
36365  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
36366    lt_cv_nm_interface="MS dumpbin"
36367  fi
36368  rm -f conftest*
36369fi
36370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
36371$as_echo "$lt_cv_nm_interface" >&6; }
36372
36373# find the maximum length of command line arguments
36374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
36375$as_echo_n "checking the maximum length of command line arguments... " >&6; }
36376if ${lt_cv_sys_max_cmd_len+:} false; then :
36377  $as_echo_n "(cached) " >&6
36378else
36379    i=0
36380  teststring=ABCD
36381
36382  case $build_os in
36383  msdosdjgpp*)
36384    # On DJGPP, this test can blow up pretty badly due to problems in libc
36385    # (any single argument exceeding 2000 bytes causes a buffer overrun
36386    # during glob expansion).  Even if it were fixed, the result of this
36387    # check would be larger than it should be.
36388    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
36389    ;;
36390
36391  gnu*)
36392    # Under GNU Hurd, this test is not required because there is
36393    # no limit to the length of command line arguments.
36394    # Libtool will interpret -1 as no limit whatsoever
36395    lt_cv_sys_max_cmd_len=-1;
36396    ;;
36397
36398  cygwin* | mingw* | cegcc*)
36399    # On Win9x/ME, this test blows up -- it succeeds, but takes
36400    # about 5 minutes as the teststring grows exponentially.
36401    # Worse, since 9x/ME are not pre-emptively multitasking,
36402    # you end up with a "frozen" computer, even though with patience
36403    # the test eventually succeeds (with a max line length of 256k).
36404    # Instead, let's just punt: use the minimum linelength reported by
36405    # all of the supported platforms: 8192 (on NT/2K/XP).
36406    lt_cv_sys_max_cmd_len=8192;
36407    ;;
36408
36409  mint*)
36410    # On MiNT this can take a long time and run out of memory.
36411    lt_cv_sys_max_cmd_len=8192;
36412    ;;
36413
36414  amigaos*)
36415    # On AmigaOS with pdksh, this test takes hours, literally.
36416    # So we just punt and use a minimum line length of 8192.
36417    lt_cv_sys_max_cmd_len=8192;
36418    ;;
36419
36420  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
36421    # This has been around since 386BSD, at least.  Likely further.
36422    if test -x /sbin/sysctl; then
36423      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
36424    elif test -x /usr/sbin/sysctl; then
36425      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
36426    else
36427      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
36428    fi
36429    # And add a safety zone
36430    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
36431    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
36432    ;;
36433
36434  interix*)
36435    # We know the value 262144 and hardcode it with a safety zone (like BSD)
36436    lt_cv_sys_max_cmd_len=196608
36437    ;;
36438
36439  os2*)
36440    # The test takes a long time on OS/2.
36441    lt_cv_sys_max_cmd_len=8192
36442    ;;
36443
36444  osf*)
36445    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
36446    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
36447    # nice to cause kernel panics so lets avoid the loop below.
36448    # First set a reasonable default.
36449    lt_cv_sys_max_cmd_len=16384
36450    #
36451    if test -x /sbin/sysconfig; then
36452      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
36453        *1*) lt_cv_sys_max_cmd_len=-1 ;;
36454      esac
36455    fi
36456    ;;
36457  sco3.2v5*)
36458    lt_cv_sys_max_cmd_len=102400
36459    ;;
36460  sysv5* | sco5v6* | sysv4.2uw2*)
36461    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
36462    if test -n "$kargmax"; then
36463      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
36464    else
36465      lt_cv_sys_max_cmd_len=32768
36466    fi
36467    ;;
36468  *)
36469    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
36470    if test -n "$lt_cv_sys_max_cmd_len" && \
36471       test undefined != "$lt_cv_sys_max_cmd_len"; then
36472      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
36473      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
36474    else
36475      # Make teststring a little bigger before we do anything with it.
36476      # a 1K string should be a reasonable start.
36477      for i in 1 2 3 4 5 6 7 8; do
36478        teststring=$teststring$teststring
36479      done
36480      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
36481      # If test is not a shell built-in, we'll probably end up computing a
36482      # maximum length that is only half of the actual maximum length, but
36483      # we can't tell.
36484      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
36485	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
36486	      test 17 != "$i" # 1/2 MB should be enough
36487      do
36488        i=`expr $i + 1`
36489        teststring=$teststring$teststring
36490      done
36491      # Only check the string length outside the loop.
36492      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
36493      teststring=
36494      # Add a significant safety factor because C++ compilers can tack on
36495      # massive amounts of additional arguments before passing them to the
36496      # linker.  It appears as though 1/2 is a usable value.
36497      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
36498    fi
36499    ;;
36500  esac
36501
36502fi
36503
36504if test -n "$lt_cv_sys_max_cmd_len"; then
36505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
36506$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
36507else
36508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
36509$as_echo "none" >&6; }
36510fi
36511max_cmd_len=$lt_cv_sys_max_cmd_len
36512
36513
36514
36515
36516
36517
36518: ${CP="cp -f"}
36519: ${MV="mv -f"}
36520: ${RM="rm -f"}
36521
36522if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
36523  lt_unset=unset
36524else
36525  lt_unset=false
36526fi
36527
36528
36529
36530
36531
36532# test EBCDIC or ASCII
36533case `echo X|tr X '\101'` in
36534 A) # ASCII based system
36535    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
36536  lt_SP2NL='tr \040 \012'
36537  lt_NL2SP='tr \015\012 \040\040'
36538  ;;
36539 *) # EBCDIC based system
36540  lt_SP2NL='tr \100 \n'
36541  lt_NL2SP='tr \r\n \100\100'
36542  ;;
36543esac
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
36554$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
36555if ${lt_cv_to_host_file_cmd+:} false; then :
36556  $as_echo_n "(cached) " >&6
36557else
36558  case $host in
36559  *-*-mingw* )
36560    case $build in
36561      *-*-mingw* ) # actually msys
36562        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
36563        ;;
36564      *-*-cygwin* )
36565        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
36566        ;;
36567      * ) # otherwise, assume *nix
36568        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
36569        ;;
36570    esac
36571    ;;
36572  *-*-cygwin* )
36573    case $build in
36574      *-*-mingw* ) # actually msys
36575        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
36576        ;;
36577      *-*-cygwin* )
36578        lt_cv_to_host_file_cmd=func_convert_file_noop
36579        ;;
36580      * ) # otherwise, assume *nix
36581        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
36582        ;;
36583    esac
36584    ;;
36585  * ) # unhandled hosts (and "normal" native builds)
36586    lt_cv_to_host_file_cmd=func_convert_file_noop
36587    ;;
36588esac
36589
36590fi
36591
36592to_host_file_cmd=$lt_cv_to_host_file_cmd
36593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
36594$as_echo "$lt_cv_to_host_file_cmd" >&6; }
36595
36596
36597
36598
36599
36600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
36601$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
36602if ${lt_cv_to_tool_file_cmd+:} false; then :
36603  $as_echo_n "(cached) " >&6
36604else
36605  #assume ordinary cross tools, or native build.
36606lt_cv_to_tool_file_cmd=func_convert_file_noop
36607case $host in
36608  *-*-mingw* )
36609    case $build in
36610      *-*-mingw* ) # actually msys
36611        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
36612        ;;
36613    esac
36614    ;;
36615esac
36616
36617fi
36618
36619to_tool_file_cmd=$lt_cv_to_tool_file_cmd
36620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
36621$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
36622
36623
36624
36625
36626
36627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
36628$as_echo_n "checking for $LD option to reload object files... " >&6; }
36629if ${lt_cv_ld_reload_flag+:} false; then :
36630  $as_echo_n "(cached) " >&6
36631else
36632  lt_cv_ld_reload_flag='-r'
36633fi
36634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
36635$as_echo "$lt_cv_ld_reload_flag" >&6; }
36636reload_flag=$lt_cv_ld_reload_flag
36637case $reload_flag in
36638"" | " "*) ;;
36639*) reload_flag=" $reload_flag" ;;
36640esac
36641reload_cmds='$LD$reload_flag -o $output$reload_objs'
36642case $host_os in
36643  cygwin* | mingw* | pw32* | cegcc*)
36644    if test yes != "$GCC"; then
36645      reload_cmds=false
36646    fi
36647    ;;
36648  darwin*)
36649    if test yes = "$GCC"; then
36650      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
36651    else
36652      reload_cmds='$LD$reload_flag -o $output$reload_objs'
36653    fi
36654    ;;
36655esac
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665if test -n "$ac_tool_prefix"; then
36666  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
36667set dummy ${ac_tool_prefix}objdump; ac_word=$2
36668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36669$as_echo_n "checking for $ac_word... " >&6; }
36670if ${ac_cv_prog_OBJDUMP+:} false; then :
36671  $as_echo_n "(cached) " >&6
36672else
36673  if test -n "$OBJDUMP"; then
36674  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
36675else
36676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36677for as_dir in $PATH
36678do
36679  IFS=$as_save_IFS
36680  test -z "$as_dir" && as_dir=.
36681    for ac_exec_ext in '' $ac_executable_extensions; do
36682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36683    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
36684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36685    break 2
36686  fi
36687done
36688  done
36689IFS=$as_save_IFS
36690
36691fi
36692fi
36693OBJDUMP=$ac_cv_prog_OBJDUMP
36694if test -n "$OBJDUMP"; then
36695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
36696$as_echo "$OBJDUMP" >&6; }
36697else
36698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36699$as_echo "no" >&6; }
36700fi
36701
36702
36703fi
36704if test -z "$ac_cv_prog_OBJDUMP"; then
36705  ac_ct_OBJDUMP=$OBJDUMP
36706  # Extract the first word of "objdump", so it can be a program name with args.
36707set dummy objdump; ac_word=$2
36708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36709$as_echo_n "checking for $ac_word... " >&6; }
36710if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
36711  $as_echo_n "(cached) " >&6
36712else
36713  if test -n "$ac_ct_OBJDUMP"; then
36714  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
36715else
36716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36717for as_dir in $PATH
36718do
36719  IFS=$as_save_IFS
36720  test -z "$as_dir" && as_dir=.
36721    for ac_exec_ext in '' $ac_executable_extensions; do
36722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36723    ac_cv_prog_ac_ct_OBJDUMP="objdump"
36724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36725    break 2
36726  fi
36727done
36728  done
36729IFS=$as_save_IFS
36730
36731fi
36732fi
36733ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
36734if test -n "$ac_ct_OBJDUMP"; then
36735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
36736$as_echo "$ac_ct_OBJDUMP" >&6; }
36737else
36738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36739$as_echo "no" >&6; }
36740fi
36741
36742  if test "x$ac_ct_OBJDUMP" = x; then
36743    OBJDUMP="false"
36744  else
36745    case $cross_compiling:$ac_tool_warned in
36746yes:)
36747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36749ac_tool_warned=yes ;;
36750esac
36751    OBJDUMP=$ac_ct_OBJDUMP
36752  fi
36753else
36754  OBJDUMP="$ac_cv_prog_OBJDUMP"
36755fi
36756
36757test -z "$OBJDUMP" && OBJDUMP=objdump
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
36768$as_echo_n "checking how to recognize dependent libraries... " >&6; }
36769if ${lt_cv_deplibs_check_method+:} false; then :
36770  $as_echo_n "(cached) " >&6
36771else
36772  lt_cv_file_magic_cmd='$MAGIC_CMD'
36773lt_cv_file_magic_test_file=
36774lt_cv_deplibs_check_method='unknown'
36775# Need to set the preceding variable on all platforms that support
36776# interlibrary dependencies.
36777# 'none' -- dependencies not supported.
36778# 'unknown' -- same as none, but documents that we really don't know.
36779# 'pass_all' -- all dependencies passed with no checks.
36780# 'test_compile' -- check by making test program.
36781# 'file_magic [[regex]]' -- check by looking for files in library path
36782# that responds to the $file_magic_cmd with a given extended regex.
36783# If you have 'file' or equivalent on your system and you're not sure
36784# whether 'pass_all' will *always* work, you probably want this one.
36785
36786case $host_os in
36787aix[4-9]*)
36788  lt_cv_deplibs_check_method=pass_all
36789  ;;
36790
36791beos*)
36792  lt_cv_deplibs_check_method=pass_all
36793  ;;
36794
36795bsdi[45]*)
36796  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
36797  lt_cv_file_magic_cmd='/usr/bin/file -L'
36798  lt_cv_file_magic_test_file=/shlib/libc.so
36799  ;;
36800
36801cygwin*)
36802  # func_win32_libid is a shell function defined in ltmain.sh
36803  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
36804  lt_cv_file_magic_cmd='func_win32_libid'
36805  ;;
36806
36807mingw* | pw32*)
36808  # Base MSYS/MinGW do not provide the 'file' command needed by
36809  # func_win32_libid shell function, so use a weaker test based on 'objdump',
36810  # unless we find 'file', for example because we are cross-compiling.
36811  if ( file / ) >/dev/null 2>&1; then
36812    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
36813    lt_cv_file_magic_cmd='func_win32_libid'
36814  else
36815    # Keep this pattern in sync with the one in func_win32_libid.
36816    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
36817    lt_cv_file_magic_cmd='$OBJDUMP -f'
36818  fi
36819  ;;
36820
36821cegcc*)
36822  # use the weaker test based on 'objdump'. See mingw*.
36823  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
36824  lt_cv_file_magic_cmd='$OBJDUMP -f'
36825  ;;
36826
36827darwin* | rhapsody*)
36828  lt_cv_deplibs_check_method=pass_all
36829  ;;
36830
36831freebsd* | dragonfly*)
36832  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
36833    case $host_cpu in
36834    i*86 )
36835      # Not sure whether the presence of OpenBSD here was a mistake.
36836      # Let's accept both of them until this is cleared up.
36837      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
36838      lt_cv_file_magic_cmd=/usr/bin/file
36839      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
36840      ;;
36841    esac
36842  else
36843    lt_cv_deplibs_check_method=pass_all
36844  fi
36845  ;;
36846
36847haiku*)
36848  lt_cv_deplibs_check_method=pass_all
36849  ;;
36850
36851hpux10.20* | hpux11*)
36852  lt_cv_file_magic_cmd=/usr/bin/file
36853  case $host_cpu in
36854  ia64*)
36855    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
36856    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
36857    ;;
36858  hppa*64*)
36859    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]'
36860    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
36861    ;;
36862  *)
36863    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
36864    lt_cv_file_magic_test_file=/usr/lib/libc.sl
36865    ;;
36866  esac
36867  ;;
36868
36869interix[3-9]*)
36870  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
36871  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
36872  ;;
36873
36874irix5* | irix6* | nonstopux*)
36875  case $LD in
36876  *-32|*"-32 ") libmagic=32-bit;;
36877  *-n32|*"-n32 ") libmagic=N32;;
36878  *-64|*"-64 ") libmagic=64-bit;;
36879  *) libmagic=never-match;;
36880  esac
36881  lt_cv_deplibs_check_method=pass_all
36882  ;;
36883
36884# This must be glibc/ELF.
36885linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
36886  lt_cv_deplibs_check_method=pass_all
36887  ;;
36888
36889netbsd*)
36890  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
36891    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
36892  else
36893    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
36894  fi
36895  ;;
36896
36897newos6*)
36898  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
36899  lt_cv_file_magic_cmd=/usr/bin/file
36900  lt_cv_file_magic_test_file=/usr/lib/libnls.so
36901  ;;
36902
36903*nto* | *qnx*)
36904  lt_cv_deplibs_check_method=pass_all
36905  ;;
36906
36907openbsd* | bitrig*)
36908  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
36909    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
36910  else
36911    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
36912  fi
36913  ;;
36914
36915osf3* | osf4* | osf5*)
36916  lt_cv_deplibs_check_method=pass_all
36917  ;;
36918
36919rdos*)
36920  lt_cv_deplibs_check_method=pass_all
36921  ;;
36922
36923solaris*)
36924  lt_cv_deplibs_check_method=pass_all
36925  ;;
36926
36927sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36928  lt_cv_deplibs_check_method=pass_all
36929  ;;
36930
36931sysv4 | sysv4.3*)
36932  case $host_vendor in
36933  motorola)
36934    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]'
36935    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
36936    ;;
36937  ncr)
36938    lt_cv_deplibs_check_method=pass_all
36939    ;;
36940  sequent)
36941    lt_cv_file_magic_cmd='/bin/file'
36942    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
36943    ;;
36944  sni)
36945    lt_cv_file_magic_cmd='/bin/file'
36946    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
36947    lt_cv_file_magic_test_file=/lib/libc.so
36948    ;;
36949  siemens)
36950    lt_cv_deplibs_check_method=pass_all
36951    ;;
36952  pc)
36953    lt_cv_deplibs_check_method=pass_all
36954    ;;
36955  esac
36956  ;;
36957
36958tpf*)
36959  lt_cv_deplibs_check_method=pass_all
36960  ;;
36961os2*)
36962  lt_cv_deplibs_check_method=pass_all
36963  ;;
36964esac
36965
36966fi
36967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
36968$as_echo "$lt_cv_deplibs_check_method" >&6; }
36969
36970file_magic_glob=
36971want_nocaseglob=no
36972if test "$build" = "$host"; then
36973  case $host_os in
36974  mingw* | pw32*)
36975    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36976      want_nocaseglob=yes
36977    else
36978      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
36979    fi
36980    ;;
36981  esac
36982fi
36983
36984file_magic_cmd=$lt_cv_file_magic_cmd
36985deplibs_check_method=$lt_cv_deplibs_check_method
36986test -z "$deplibs_check_method" && deplibs_check_method=unknown
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009if test -n "$ac_tool_prefix"; then
37010  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
37011set dummy ${ac_tool_prefix}dlltool; ac_word=$2
37012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37013$as_echo_n "checking for $ac_word... " >&6; }
37014if ${ac_cv_prog_DLLTOOL+:} false; then :
37015  $as_echo_n "(cached) " >&6
37016else
37017  if test -n "$DLLTOOL"; then
37018  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
37019else
37020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37021for as_dir in $PATH
37022do
37023  IFS=$as_save_IFS
37024  test -z "$as_dir" && as_dir=.
37025    for ac_exec_ext in '' $ac_executable_extensions; do
37026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37027    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
37028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37029    break 2
37030  fi
37031done
37032  done
37033IFS=$as_save_IFS
37034
37035fi
37036fi
37037DLLTOOL=$ac_cv_prog_DLLTOOL
37038if test -n "$DLLTOOL"; then
37039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
37040$as_echo "$DLLTOOL" >&6; }
37041else
37042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37043$as_echo "no" >&6; }
37044fi
37045
37046
37047fi
37048if test -z "$ac_cv_prog_DLLTOOL"; then
37049  ac_ct_DLLTOOL=$DLLTOOL
37050  # Extract the first word of "dlltool", so it can be a program name with args.
37051set dummy dlltool; ac_word=$2
37052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37053$as_echo_n "checking for $ac_word... " >&6; }
37054if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
37055  $as_echo_n "(cached) " >&6
37056else
37057  if test -n "$ac_ct_DLLTOOL"; then
37058  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
37059else
37060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37061for as_dir in $PATH
37062do
37063  IFS=$as_save_IFS
37064  test -z "$as_dir" && as_dir=.
37065    for ac_exec_ext in '' $ac_executable_extensions; do
37066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37067    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
37068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37069    break 2
37070  fi
37071done
37072  done
37073IFS=$as_save_IFS
37074
37075fi
37076fi
37077ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
37078if test -n "$ac_ct_DLLTOOL"; then
37079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
37080$as_echo "$ac_ct_DLLTOOL" >&6; }
37081else
37082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37083$as_echo "no" >&6; }
37084fi
37085
37086  if test "x$ac_ct_DLLTOOL" = x; then
37087    DLLTOOL="false"
37088  else
37089    case $cross_compiling:$ac_tool_warned in
37090yes:)
37091{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37092$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37093ac_tool_warned=yes ;;
37094esac
37095    DLLTOOL=$ac_ct_DLLTOOL
37096  fi
37097else
37098  DLLTOOL="$ac_cv_prog_DLLTOOL"
37099fi
37100
37101test -z "$DLLTOOL" && DLLTOOL=dlltool
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
37113$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
37114if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
37115  $as_echo_n "(cached) " >&6
37116else
37117  lt_cv_sharedlib_from_linklib_cmd='unknown'
37118
37119case $host_os in
37120cygwin* | mingw* | pw32* | cegcc*)
37121  # two different shell functions defined in ltmain.sh;
37122  # decide which one to use based on capabilities of $DLLTOOL
37123  case `$DLLTOOL --help 2>&1` in
37124  *--identify-strict*)
37125    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
37126    ;;
37127  *)
37128    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
37129    ;;
37130  esac
37131  ;;
37132*)
37133  # fallback: assume linklib IS sharedlib
37134  lt_cv_sharedlib_from_linklib_cmd=$ECHO
37135  ;;
37136esac
37137
37138fi
37139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
37140$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
37141sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
37142test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
37143
37144
37145
37146
37147
37148
37149
37150if test -n "$ac_tool_prefix"; then
37151  for ac_prog in ar
37152  do
37153    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37154set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37156$as_echo_n "checking for $ac_word... " >&6; }
37157if ${ac_cv_prog_AR+:} false; then :
37158  $as_echo_n "(cached) " >&6
37159else
37160  if test -n "$AR"; then
37161  ac_cv_prog_AR="$AR" # Let the user override the test.
37162else
37163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37164for as_dir in $PATH
37165do
37166  IFS=$as_save_IFS
37167  test -z "$as_dir" && as_dir=.
37168    for ac_exec_ext in '' $ac_executable_extensions; do
37169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37170    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37172    break 2
37173  fi
37174done
37175  done
37176IFS=$as_save_IFS
37177
37178fi
37179fi
37180AR=$ac_cv_prog_AR
37181if test -n "$AR"; then
37182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37183$as_echo "$AR" >&6; }
37184else
37185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37186$as_echo "no" >&6; }
37187fi
37188
37189
37190    test -n "$AR" && break
37191  done
37192fi
37193if test -z "$AR"; then
37194  ac_ct_AR=$AR
37195  for ac_prog in ar
37196do
37197  # Extract the first word of "$ac_prog", so it can be a program name with args.
37198set dummy $ac_prog; ac_word=$2
37199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37200$as_echo_n "checking for $ac_word... " >&6; }
37201if ${ac_cv_prog_ac_ct_AR+:} false; then :
37202  $as_echo_n "(cached) " >&6
37203else
37204  if test -n "$ac_ct_AR"; then
37205  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37206else
37207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37208for as_dir in $PATH
37209do
37210  IFS=$as_save_IFS
37211  test -z "$as_dir" && as_dir=.
37212    for ac_exec_ext in '' $ac_executable_extensions; do
37213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37214    ac_cv_prog_ac_ct_AR="$ac_prog"
37215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37216    break 2
37217  fi
37218done
37219  done
37220IFS=$as_save_IFS
37221
37222fi
37223fi
37224ac_ct_AR=$ac_cv_prog_ac_ct_AR
37225if test -n "$ac_ct_AR"; then
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37227$as_echo "$ac_ct_AR" >&6; }
37228else
37229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37230$as_echo "no" >&6; }
37231fi
37232
37233
37234  test -n "$ac_ct_AR" && break
37235done
37236
37237  if test "x$ac_ct_AR" = x; then
37238    AR="false"
37239  else
37240    case $cross_compiling:$ac_tool_warned in
37241yes:)
37242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37244ac_tool_warned=yes ;;
37245esac
37246    AR=$ac_ct_AR
37247  fi
37248fi
37249
37250: ${AR=ar}
37251: ${AR_FLAGS=cru}
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
37264$as_echo_n "checking for archiver @FILE support... " >&6; }
37265if ${lt_cv_ar_at_file+:} false; then :
37266  $as_echo_n "(cached) " >&6
37267else
37268  lt_cv_ar_at_file=no
37269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37270/* end confdefs.h.  */
37271
37272#ifdef F77_DUMMY_MAIN
37273
37274#  ifdef __cplusplus
37275     extern "C"
37276#  endif
37277   int F77_DUMMY_MAIN() { return 1; }
37278
37279#endif
37280int
37281main ()
37282{
37283
37284  ;
37285  return 0;
37286}
37287_ACEOF
37288if ac_fn_c_try_compile "$LINENO"; then :
37289  echo conftest.$ac_objext > conftest.lst
37290      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
37291      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
37292  (eval $lt_ar_try) 2>&5
37293  ac_status=$?
37294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37295  test $ac_status = 0; }
37296      if test 0 -eq "$ac_status"; then
37297	# Ensure the archiver fails upon bogus file names.
37298	rm -f conftest.$ac_objext libconftest.a
37299	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
37300  (eval $lt_ar_try) 2>&5
37301  ac_status=$?
37302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37303  test $ac_status = 0; }
37304	if test 0 -ne "$ac_status"; then
37305          lt_cv_ar_at_file=@
37306        fi
37307      fi
37308      rm -f conftest.* libconftest.a
37309
37310fi
37311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37312
37313fi
37314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
37315$as_echo "$lt_cv_ar_at_file" >&6; }
37316
37317if test no = "$lt_cv_ar_at_file"; then
37318  archiver_list_spec=
37319else
37320  archiver_list_spec=$lt_cv_ar_at_file
37321fi
37322
37323
37324
37325
37326
37327
37328
37329if test -n "$ac_tool_prefix"; then
37330  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
37331set dummy ${ac_tool_prefix}strip; ac_word=$2
37332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37333$as_echo_n "checking for $ac_word... " >&6; }
37334if ${ac_cv_prog_STRIP+:} false; then :
37335  $as_echo_n "(cached) " >&6
37336else
37337  if test -n "$STRIP"; then
37338  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37339else
37340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37341for as_dir in $PATH
37342do
37343  IFS=$as_save_IFS
37344  test -z "$as_dir" && as_dir=.
37345    for ac_exec_ext in '' $ac_executable_extensions; do
37346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37347    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
37348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37349    break 2
37350  fi
37351done
37352  done
37353IFS=$as_save_IFS
37354
37355fi
37356fi
37357STRIP=$ac_cv_prog_STRIP
37358if test -n "$STRIP"; then
37359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37360$as_echo "$STRIP" >&6; }
37361else
37362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37363$as_echo "no" >&6; }
37364fi
37365
37366
37367fi
37368if test -z "$ac_cv_prog_STRIP"; then
37369  ac_ct_STRIP=$STRIP
37370  # Extract the first word of "strip", so it can be a program name with args.
37371set dummy strip; ac_word=$2
37372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37373$as_echo_n "checking for $ac_word... " >&6; }
37374if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37375  $as_echo_n "(cached) " >&6
37376else
37377  if test -n "$ac_ct_STRIP"; then
37378  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37379else
37380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37381for as_dir in $PATH
37382do
37383  IFS=$as_save_IFS
37384  test -z "$as_dir" && as_dir=.
37385    for ac_exec_ext in '' $ac_executable_extensions; do
37386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37387    ac_cv_prog_ac_ct_STRIP="strip"
37388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37389    break 2
37390  fi
37391done
37392  done
37393IFS=$as_save_IFS
37394
37395fi
37396fi
37397ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37398if test -n "$ac_ct_STRIP"; then
37399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37400$as_echo "$ac_ct_STRIP" >&6; }
37401else
37402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37403$as_echo "no" >&6; }
37404fi
37405
37406  if test "x$ac_ct_STRIP" = x; then
37407    STRIP=":"
37408  else
37409    case $cross_compiling:$ac_tool_warned in
37410yes:)
37411{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37412$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37413ac_tool_warned=yes ;;
37414esac
37415    STRIP=$ac_ct_STRIP
37416  fi
37417else
37418  STRIP="$ac_cv_prog_STRIP"
37419fi
37420
37421test -z "$STRIP" && STRIP=:
37422
37423
37424
37425
37426
37427
37428if test -n "$ac_tool_prefix"; then
37429  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
37430set dummy ${ac_tool_prefix}ranlib; ac_word=$2
37431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37432$as_echo_n "checking for $ac_word... " >&6; }
37433if ${ac_cv_prog_RANLIB+:} false; then :
37434  $as_echo_n "(cached) " >&6
37435else
37436  if test -n "$RANLIB"; then
37437  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
37438else
37439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37440for as_dir in $PATH
37441do
37442  IFS=$as_save_IFS
37443  test -z "$as_dir" && as_dir=.
37444    for ac_exec_ext in '' $ac_executable_extensions; do
37445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37446    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
37447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37448    break 2
37449  fi
37450done
37451  done
37452IFS=$as_save_IFS
37453
37454fi
37455fi
37456RANLIB=$ac_cv_prog_RANLIB
37457if test -n "$RANLIB"; then
37458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
37459$as_echo "$RANLIB" >&6; }
37460else
37461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37462$as_echo "no" >&6; }
37463fi
37464
37465
37466fi
37467if test -z "$ac_cv_prog_RANLIB"; then
37468  ac_ct_RANLIB=$RANLIB
37469  # Extract the first word of "ranlib", so it can be a program name with args.
37470set dummy ranlib; ac_word=$2
37471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37472$as_echo_n "checking for $ac_word... " >&6; }
37473if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
37474  $as_echo_n "(cached) " >&6
37475else
37476  if test -n "$ac_ct_RANLIB"; then
37477  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
37478else
37479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37480for as_dir in $PATH
37481do
37482  IFS=$as_save_IFS
37483  test -z "$as_dir" && as_dir=.
37484    for ac_exec_ext in '' $ac_executable_extensions; do
37485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37486    ac_cv_prog_ac_ct_RANLIB="ranlib"
37487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37488    break 2
37489  fi
37490done
37491  done
37492IFS=$as_save_IFS
37493
37494fi
37495fi
37496ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
37497if test -n "$ac_ct_RANLIB"; then
37498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
37499$as_echo "$ac_ct_RANLIB" >&6; }
37500else
37501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37502$as_echo "no" >&6; }
37503fi
37504
37505  if test "x$ac_ct_RANLIB" = x; then
37506    RANLIB=":"
37507  else
37508    case $cross_compiling:$ac_tool_warned in
37509yes:)
37510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37512ac_tool_warned=yes ;;
37513esac
37514    RANLIB=$ac_ct_RANLIB
37515  fi
37516else
37517  RANLIB="$ac_cv_prog_RANLIB"
37518fi
37519
37520test -z "$RANLIB" && RANLIB=:
37521
37522
37523
37524
37525
37526
37527# Determine commands to create old-style static archives.
37528old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
37529old_postinstall_cmds='chmod 644 $oldlib'
37530old_postuninstall_cmds=
37531
37532if test -n "$RANLIB"; then
37533  case $host_os in
37534  bitrig* | openbsd*)
37535    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
37536    ;;
37537  *)
37538    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
37539    ;;
37540  esac
37541  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
37542fi
37543
37544case $host_os in
37545  darwin*)
37546    lock_old_archive_extraction=yes ;;
37547  *)
37548    lock_old_archive_extraction=no ;;
37549esac
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569
37570
37571
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589# If no C compiler was specified, use CC.
37590LTCC=${LTCC-"$CC"}
37591
37592# If no C compiler flags were specified, use CFLAGS.
37593LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
37594
37595# Allow CC to be a program name with arguments.
37596compiler=$CC
37597
37598
37599# Check for command to grab the raw symbol name followed by C symbol from nm.
37600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
37601$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
37602if ${lt_cv_sys_global_symbol_pipe+:} false; then :
37603  $as_echo_n "(cached) " >&6
37604else
37605
37606# These are sane defaults that work on at least a few old systems.
37607# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
37608
37609# Character class describing NM global symbol codes.
37610symcode='[BCDEGRST]'
37611
37612# Regexp to match symbols that can be accessed directly from C.
37613sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
37614
37615# Define system-specific variables.
37616case $host_os in
37617aix*)
37618  symcode='[BCDT]'
37619  ;;
37620cygwin* | mingw* | pw32* | cegcc*)
37621  symcode='[ABCDGISTW]'
37622  ;;
37623hpux*)
37624  if test ia64 = "$host_cpu"; then
37625    symcode='[ABCDEGRST]'
37626  fi
37627  ;;
37628irix* | nonstopux*)
37629  symcode='[BCDEGRST]'
37630  ;;
37631osf*)
37632  symcode='[BCDEGQRST]'
37633  ;;
37634solaris*)
37635  symcode='[BDRT]'
37636  ;;
37637sco3.2v5*)
37638  symcode='[DT]'
37639  ;;
37640sysv4.2uw2*)
37641  symcode='[DT]'
37642  ;;
37643sysv5* | sco5v6* | unixware* | OpenUNIX*)
37644  symcode='[ABDT]'
37645  ;;
37646sysv4)
37647  symcode='[DFNSTU]'
37648  ;;
37649esac
37650
37651# If we're using GNU nm, then use its standard symbol codes.
37652case `$NM -V 2>&1` in
37653*GNU* | *'with BFD'*)
37654  symcode='[ABCDGIRSTW]' ;;
37655esac
37656
37657if test "$lt_cv_nm_interface" = "MS dumpbin"; then
37658  # Gets list of data symbols to import.
37659  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
37660  # Adjust the below global symbol transforms to fixup imported variables.
37661  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
37662  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
37663  lt_c_name_lib_hook="\
37664  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
37665  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
37666else
37667  # Disable hooks by default.
37668  lt_cv_sys_global_symbol_to_import=
37669  lt_cdecl_hook=
37670  lt_c_name_hook=
37671  lt_c_name_lib_hook=
37672fi
37673
37674# Transform an extracted symbol line into a proper C declaration.
37675# Some systems (esp. on ia64) link data and code symbols differently,
37676# so use this general approach.
37677lt_cv_sys_global_symbol_to_cdecl="sed -n"\
37678$lt_cdecl_hook\
37679" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
37680" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
37681
37682# Transform an extracted symbol line into symbol name and symbol address
37683lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
37684$lt_c_name_hook\
37685" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
37686" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
37687
37688# Transform an extracted symbol line into symbol name with lib prefix and
37689# symbol address.
37690lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
37691$lt_c_name_lib_hook\
37692" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
37693" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
37694" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
37695
37696# Handle CRLF in mingw tool chain
37697opt_cr=
37698case $build_os in
37699mingw*)
37700  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
37701  ;;
37702esac
37703
37704# Try without a prefix underscore, then with it.
37705for ac_symprfx in "" "_"; do
37706
37707  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
37708  symxfrm="\\1 $ac_symprfx\\2 \\2"
37709
37710  # Write the raw and C identifiers.
37711  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
37712    # Fake it for dumpbin and say T for any non-static function,
37713    # D for any global variable and I for any imported variable.
37714    # Also find C++ and __fastcall symbols from MSVC++,
37715    # which start with @ or ?.
37716    lt_cv_sys_global_symbol_pipe="$AWK '"\
37717"     {last_section=section; section=\$ 3};"\
37718"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
37719"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
37720"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
37721"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
37722"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
37723"     \$ 0!~/External *\|/{next};"\
37724"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
37725"     {if(hide[section]) next};"\
37726"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
37727"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
37728"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
37729"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
37730"     ' prfx=^$ac_symprfx"
37731  else
37732    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
37733  fi
37734  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
37735
37736  # Check to see that the pipe works correctly.
37737  pipe_works=no
37738
37739  rm -f conftest*
37740  cat > conftest.$ac_ext <<_LT_EOF
37741#ifdef __cplusplus
37742extern "C" {
37743#endif
37744char nm_test_var;
37745void nm_test_func(void);
37746void nm_test_func(void){}
37747#ifdef __cplusplus
37748}
37749#endif
37750int main(){nm_test_var='a';nm_test_func();return(0);}
37751_LT_EOF
37752
37753  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
37754  (eval $ac_compile) 2>&5
37755  ac_status=$?
37756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37757  test $ac_status = 0; }; then
37758    # Now try to grab the symbols.
37759    nlist=conftest.nm
37760    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
37761  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
37762  ac_status=$?
37763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37764  test $ac_status = 0; } && test -s "$nlist"; then
37765      # Try sorting and uniquifying the output.
37766      if sort "$nlist" | uniq > "$nlist"T; then
37767	mv -f "$nlist"T "$nlist"
37768      else
37769	rm -f "$nlist"T
37770      fi
37771
37772      # Make sure that we snagged all the symbols we need.
37773      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
37774	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
37775	  cat <<_LT_EOF > conftest.$ac_ext
37776/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
37777#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
37778/* DATA imports from DLLs on WIN32 can't be const, because runtime
37779   relocations are performed -- see ld's documentation on pseudo-relocs.  */
37780# define LT_DLSYM_CONST
37781#elif defined __osf__
37782/* This system does not cope well with relocations in const data.  */
37783# define LT_DLSYM_CONST
37784#else
37785# define LT_DLSYM_CONST const
37786#endif
37787
37788#ifdef __cplusplus
37789extern "C" {
37790#endif
37791
37792_LT_EOF
37793	  # Now generate the symbol file.
37794	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
37795
37796	  cat <<_LT_EOF >> conftest.$ac_ext
37797
37798/* The mapping between symbol names and symbols.  */
37799LT_DLSYM_CONST struct {
37800  const char *name;
37801  void       *address;
37802}
37803lt__PROGRAM__LTX_preloaded_symbols[] =
37804{
37805  { "@PROGRAM@", (void *) 0 },
37806_LT_EOF
37807	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
37808	  cat <<\_LT_EOF >> conftest.$ac_ext
37809  {0, (void *) 0}
37810};
37811
37812/* This works around a problem in FreeBSD linker */
37813#ifdef FREEBSD_WORKAROUND
37814static const void *lt_preloaded_setup() {
37815  return lt__PROGRAM__LTX_preloaded_symbols;
37816}
37817#endif
37818
37819#ifdef __cplusplus
37820}
37821#endif
37822_LT_EOF
37823	  # Now try linking the two files.
37824	  mv conftest.$ac_objext conftstm.$ac_objext
37825	  lt_globsym_save_LIBS=$LIBS
37826	  lt_globsym_save_CFLAGS=$CFLAGS
37827	  LIBS=conftstm.$ac_objext
37828	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
37829	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37830  (eval $ac_link) 2>&5
37831  ac_status=$?
37832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37833  test $ac_status = 0; } && test -s conftest$ac_exeext; then
37834	    pipe_works=yes
37835	  fi
37836	  LIBS=$lt_globsym_save_LIBS
37837	  CFLAGS=$lt_globsym_save_CFLAGS
37838	else
37839	  echo "cannot find nm_test_func in $nlist" >&5
37840	fi
37841      else
37842	echo "cannot find nm_test_var in $nlist" >&5
37843      fi
37844    else
37845      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
37846    fi
37847  else
37848    echo "$progname: failed program was:" >&5
37849    cat conftest.$ac_ext >&5
37850  fi
37851  rm -rf conftest* conftst*
37852
37853  # Do not use the global_symbol_pipe unless it works.
37854  if test yes = "$pipe_works"; then
37855    break
37856  else
37857    lt_cv_sys_global_symbol_pipe=
37858  fi
37859done
37860
37861fi
37862
37863if test -z "$lt_cv_sys_global_symbol_pipe"; then
37864  lt_cv_sys_global_symbol_to_cdecl=
37865fi
37866if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
37867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
37868$as_echo "failed" >&6; }
37869else
37870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
37871$as_echo "ok" >&6; }
37872fi
37873
37874# Response file support.
37875if test "$lt_cv_nm_interface" = "MS dumpbin"; then
37876  nm_file_list_spec='@'
37877elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
37878  nm_file_list_spec='@'
37879fi
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
37918$as_echo_n "checking for sysroot... " >&6; }
37919
37920# Check whether --with-sysroot was given.
37921if test "${with_sysroot+set}" = set; then :
37922  withval=$with_sysroot;
37923else
37924  with_sysroot=no
37925fi
37926
37927
37928lt_sysroot=
37929case $with_sysroot in #(
37930 yes)
37931   if test yes = "$GCC"; then
37932     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
37933   fi
37934   ;; #(
37935 /*)
37936   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
37937   ;; #(
37938 no|'')
37939   ;; #(
37940 *)
37941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
37942$as_echo "$with_sysroot" >&6; }
37943   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
37944   ;;
37945esac
37946
37947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
37948$as_echo "${lt_sysroot:-no}" >&6; }
37949
37950
37951
37952
37953
37954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
37955$as_echo_n "checking for a working dd... " >&6; }
37956if ${ac_cv_path_lt_DD+:} false; then :
37957  $as_echo_n "(cached) " >&6
37958else
37959  printf 0123456789abcdef0123456789abcdef >conftest.i
37960cat conftest.i conftest.i >conftest2.i
37961: ${lt_DD:=$DD}
37962if test -z "$lt_DD"; then
37963  ac_path_lt_DD_found=false
37964  # Loop through the user's path and test for each of PROGNAME-LIST
37965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37966for as_dir in $PATH
37967do
37968  IFS=$as_save_IFS
37969  test -z "$as_dir" && as_dir=.
37970    for ac_prog in dd; do
37971    for ac_exec_ext in '' $ac_executable_extensions; do
37972      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
37973      as_fn_executable_p "$ac_path_lt_DD" || continue
37974if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
37975  cmp -s conftest.i conftest.out \
37976  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
37977fi
37978      $ac_path_lt_DD_found && break 3
37979    done
37980  done
37981  done
37982IFS=$as_save_IFS
37983  if test -z "$ac_cv_path_lt_DD"; then
37984    :
37985  fi
37986else
37987  ac_cv_path_lt_DD=$lt_DD
37988fi
37989
37990rm -f conftest.i conftest2.i conftest.out
37991fi
37992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
37993$as_echo "$ac_cv_path_lt_DD" >&6; }
37994
37995
37996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
37997$as_echo_n "checking how to truncate binary pipes... " >&6; }
37998if ${lt_cv_truncate_bin+:} false; then :
37999  $as_echo_n "(cached) " >&6
38000else
38001  printf 0123456789abcdef0123456789abcdef >conftest.i
38002cat conftest.i conftest.i >conftest2.i
38003lt_cv_truncate_bin=
38004if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
38005  cmp -s conftest.i conftest.out \
38006  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
38007fi
38008rm -f conftest.i conftest2.i conftest.out
38009test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
38010fi
38011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
38012$as_echo "$lt_cv_truncate_bin" >&6; }
38013
38014
38015
38016
38017
38018
38019
38020# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
38021func_cc_basename ()
38022{
38023    for cc_temp in $*""; do
38024      case $cc_temp in
38025        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
38026        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
38027        \-*) ;;
38028        *) break;;
38029      esac
38030    done
38031    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
38032}
38033
38034# Check whether --enable-libtool-lock was given.
38035if test "${enable_libtool_lock+set}" = set; then :
38036  enableval=$enable_libtool_lock;
38037fi
38038
38039test no = "$enable_libtool_lock" || enable_libtool_lock=yes
38040
38041# Some flags need to be propagated to the compiler or linker for good
38042# libtool support.
38043case $host in
38044ia64-*-hpux*)
38045  # Find out what ABI is being produced by ac_compile, and set mode
38046  # options accordingly.
38047  echo 'int i;' > conftest.$ac_ext
38048  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
38049  (eval $ac_compile) 2>&5
38050  ac_status=$?
38051  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38052  test $ac_status = 0; }; then
38053    case `/usr/bin/file conftest.$ac_objext` in
38054      *ELF-32*)
38055	HPUX_IA64_MODE=32
38056	;;
38057      *ELF-64*)
38058	HPUX_IA64_MODE=64
38059	;;
38060    esac
38061  fi
38062  rm -rf conftest*
38063  ;;
38064*-*-irix6*)
38065  # Find out what ABI is being produced by ac_compile, and set linker
38066  # options accordingly.
38067  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
38068  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
38069  (eval $ac_compile) 2>&5
38070  ac_status=$?
38071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38072  test $ac_status = 0; }; then
38073    if test yes = "$lt_cv_prog_gnu_ld"; then
38074      case `/usr/bin/file conftest.$ac_objext` in
38075	*32-bit*)
38076	  LD="${LD-ld} -melf32bsmip"
38077	  ;;
38078	*N32*)
38079	  LD="${LD-ld} -melf32bmipn32"
38080	  ;;
38081	*64-bit*)
38082	  LD="${LD-ld} -melf64bmip"
38083	;;
38084      esac
38085    else
38086      case `/usr/bin/file conftest.$ac_objext` in
38087	*32-bit*)
38088	  LD="${LD-ld} -32"
38089	  ;;
38090	*N32*)
38091	  LD="${LD-ld} -n32"
38092	  ;;
38093	*64-bit*)
38094	  LD="${LD-ld} -64"
38095	  ;;
38096      esac
38097    fi
38098  fi
38099  rm -rf conftest*
38100  ;;
38101
38102mips64*-*linux*)
38103  # Find out what ABI is being produced by ac_compile, and set linker
38104  # options accordingly.
38105  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
38106  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
38107  (eval $ac_compile) 2>&5
38108  ac_status=$?
38109  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38110  test $ac_status = 0; }; then
38111    emul=elf
38112    case `/usr/bin/file conftest.$ac_objext` in
38113      *32-bit*)
38114	emul="${emul}32"
38115	;;
38116      *64-bit*)
38117	emul="${emul}64"
38118	;;
38119    esac
38120    case `/usr/bin/file conftest.$ac_objext` in
38121      *MSB*)
38122	emul="${emul}btsmip"
38123	;;
38124      *LSB*)
38125	emul="${emul}ltsmip"
38126	;;
38127    esac
38128    case `/usr/bin/file conftest.$ac_objext` in
38129      *N32*)
38130	emul="${emul}n32"
38131	;;
38132    esac
38133    LD="${LD-ld} -m $emul"
38134  fi
38135  rm -rf conftest*
38136  ;;
38137
38138x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
38139s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
38140  # Find out what ABI is being produced by ac_compile, and set linker
38141  # options accordingly.  Note that the listed cases only cover the
38142  # situations where additional linker options are needed (such as when
38143  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
38144  # vice versa); the common cases where no linker options are needed do
38145  # not appear in the list.
38146  echo 'int i;' > conftest.$ac_ext
38147  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
38148  (eval $ac_compile) 2>&5
38149  ac_status=$?
38150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38151  test $ac_status = 0; }; then
38152    case `/usr/bin/file conftest.o` in
38153      *32-bit*)
38154	case $host in
38155	  x86_64-*kfreebsd*-gnu)
38156	    LD="${LD-ld} -m elf_i386_fbsd"
38157	    ;;
38158	  x86_64-*linux*)
38159	    case `/usr/bin/file conftest.o` in
38160	      *x86-64*)
38161		LD="${LD-ld} -m elf32_x86_64"
38162		;;
38163	      *)
38164		LD="${LD-ld} -m elf_i386"
38165		;;
38166	    esac
38167	    ;;
38168	  powerpc64le-*linux*)
38169	    LD="${LD-ld} -m elf32lppclinux"
38170	    ;;
38171	  powerpc64-*linux*)
38172	    LD="${LD-ld} -m elf32ppclinux"
38173	    ;;
38174	  s390x-*linux*)
38175	    LD="${LD-ld} -m elf_s390"
38176	    ;;
38177	  sparc64-*linux*)
38178	    LD="${LD-ld} -m elf32_sparc"
38179	    ;;
38180	esac
38181	;;
38182      *64-bit*)
38183	case $host in
38184	  x86_64-*kfreebsd*-gnu)
38185	    LD="${LD-ld} -m elf_x86_64_fbsd"
38186	    ;;
38187	  x86_64-*linux*)
38188	    LD="${LD-ld} -m elf_x86_64"
38189	    ;;
38190	  powerpcle-*linux*)
38191	    LD="${LD-ld} -m elf64lppc"
38192	    ;;
38193	  powerpc-*linux*)
38194	    LD="${LD-ld} -m elf64ppc"
38195	    ;;
38196	  s390*-*linux*|s390*-*tpf*)
38197	    LD="${LD-ld} -m elf64_s390"
38198	    ;;
38199	  sparc*-*linux*)
38200	    LD="${LD-ld} -m elf64_sparc"
38201	    ;;
38202	esac
38203	;;
38204    esac
38205  fi
38206  rm -rf conftest*
38207  ;;
38208
38209*-*-sco3.2v5*)
38210  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
38211  SAVE_CFLAGS=$CFLAGS
38212  CFLAGS="$CFLAGS -belf"
38213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
38214$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
38215if ${lt_cv_cc_needs_belf+:} false; then :
38216  $as_echo_n "(cached) " >&6
38217else
38218  ac_ext=c
38219ac_cpp='$CPP $CPPFLAGS'
38220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
38221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
38222ac_compiler_gnu=$ac_cv_c_compiler_gnu
38223
38224     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38225/* end confdefs.h.  */
38226
38227#ifdef F77_DUMMY_MAIN
38228
38229#  ifdef __cplusplus
38230     extern "C"
38231#  endif
38232   int F77_DUMMY_MAIN() { return 1; }
38233
38234#endif
38235int
38236main ()
38237{
38238
38239  ;
38240  return 0;
38241}
38242_ACEOF
38243if ac_fn_c_try_link "$LINENO"; then :
38244  lt_cv_cc_needs_belf=yes
38245else
38246  lt_cv_cc_needs_belf=no
38247fi
38248rm -f core conftest.err conftest.$ac_objext \
38249    conftest$ac_exeext conftest.$ac_ext
38250     ac_ext=c
38251ac_cpp='$CPP $CPPFLAGS'
38252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
38253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
38254ac_compiler_gnu=$ac_cv_c_compiler_gnu
38255
38256fi
38257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
38258$as_echo "$lt_cv_cc_needs_belf" >&6; }
38259  if test yes != "$lt_cv_cc_needs_belf"; then
38260    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
38261    CFLAGS=$SAVE_CFLAGS
38262  fi
38263  ;;
38264*-*solaris*)
38265  # Find out what ABI is being produced by ac_compile, and set linker
38266  # options accordingly.
38267  echo 'int i;' > conftest.$ac_ext
38268  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
38269  (eval $ac_compile) 2>&5
38270  ac_status=$?
38271  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38272  test $ac_status = 0; }; then
38273    case `/usr/bin/file conftest.o` in
38274    *64-bit*)
38275      case $lt_cv_prog_gnu_ld in
38276      yes*)
38277        case $host in
38278        i?86-*-solaris*|x86_64-*-solaris*)
38279          LD="${LD-ld} -m elf_x86_64"
38280          ;;
38281        sparc*-*-solaris*)
38282          LD="${LD-ld} -m elf64_sparc"
38283          ;;
38284        esac
38285        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
38286        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
38287          LD=${LD-ld}_sol2
38288        fi
38289        ;;
38290      *)
38291	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
38292	  LD="${LD-ld} -64"
38293	fi
38294	;;
38295      esac
38296      ;;
38297    esac
38298  fi
38299  rm -rf conftest*
38300  ;;
38301esac
38302
38303need_locks=$enable_libtool_lock
38304
38305if test -n "$ac_tool_prefix"; then
38306  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
38307set dummy ${ac_tool_prefix}mt; ac_word=$2
38308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38309$as_echo_n "checking for $ac_word... " >&6; }
38310if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
38311  $as_echo_n "(cached) " >&6
38312else
38313  if test -n "$MANIFEST_TOOL"; then
38314  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
38315else
38316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38317for as_dir in $PATH
38318do
38319  IFS=$as_save_IFS
38320  test -z "$as_dir" && as_dir=.
38321    for ac_exec_ext in '' $ac_executable_extensions; do
38322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38323    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
38324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38325    break 2
38326  fi
38327done
38328  done
38329IFS=$as_save_IFS
38330
38331fi
38332fi
38333MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
38334if test -n "$MANIFEST_TOOL"; then
38335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
38336$as_echo "$MANIFEST_TOOL" >&6; }
38337else
38338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38339$as_echo "no" >&6; }
38340fi
38341
38342
38343fi
38344if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
38345  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
38346  # Extract the first word of "mt", so it can be a program name with args.
38347set dummy mt; ac_word=$2
38348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38349$as_echo_n "checking for $ac_word... " >&6; }
38350if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
38351  $as_echo_n "(cached) " >&6
38352else
38353  if test -n "$ac_ct_MANIFEST_TOOL"; then
38354  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
38355else
38356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38357for as_dir in $PATH
38358do
38359  IFS=$as_save_IFS
38360  test -z "$as_dir" && as_dir=.
38361    for ac_exec_ext in '' $ac_executable_extensions; do
38362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38363    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
38364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38365    break 2
38366  fi
38367done
38368  done
38369IFS=$as_save_IFS
38370
38371fi
38372fi
38373ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
38374if test -n "$ac_ct_MANIFEST_TOOL"; then
38375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
38376$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
38377else
38378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38379$as_echo "no" >&6; }
38380fi
38381
38382  if test "x$ac_ct_MANIFEST_TOOL" = x; then
38383    MANIFEST_TOOL=":"
38384  else
38385    case $cross_compiling:$ac_tool_warned in
38386yes:)
38387{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38388$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38389ac_tool_warned=yes ;;
38390esac
38391    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
38392  fi
38393else
38394  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
38395fi
38396
38397test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
38399$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
38400if ${lt_cv_path_mainfest_tool+:} false; then :
38401  $as_echo_n "(cached) " >&6
38402else
38403  lt_cv_path_mainfest_tool=no
38404  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
38405  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38406  cat conftest.err >&5
38407  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38408    lt_cv_path_mainfest_tool=yes
38409  fi
38410  rm -f conftest*
38411fi
38412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
38413$as_echo "$lt_cv_path_mainfest_tool" >&6; }
38414if test yes != "$lt_cv_path_mainfest_tool"; then
38415  MANIFEST_TOOL=:
38416fi
38417
38418
38419
38420
38421
38422
38423  case $host_os in
38424    rhapsody* | darwin*)
38425    if test -n "$ac_tool_prefix"; then
38426  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
38427set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
38428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38429$as_echo_n "checking for $ac_word... " >&6; }
38430if ${ac_cv_prog_DSYMUTIL+:} false; then :
38431  $as_echo_n "(cached) " >&6
38432else
38433  if test -n "$DSYMUTIL"; then
38434  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
38435else
38436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38437for as_dir in $PATH
38438do
38439  IFS=$as_save_IFS
38440  test -z "$as_dir" && as_dir=.
38441    for ac_exec_ext in '' $ac_executable_extensions; do
38442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38443    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
38444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38445    break 2
38446  fi
38447done
38448  done
38449IFS=$as_save_IFS
38450
38451fi
38452fi
38453DSYMUTIL=$ac_cv_prog_DSYMUTIL
38454if test -n "$DSYMUTIL"; then
38455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
38456$as_echo "$DSYMUTIL" >&6; }
38457else
38458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38459$as_echo "no" >&6; }
38460fi
38461
38462
38463fi
38464if test -z "$ac_cv_prog_DSYMUTIL"; then
38465  ac_ct_DSYMUTIL=$DSYMUTIL
38466  # Extract the first word of "dsymutil", so it can be a program name with args.
38467set dummy dsymutil; ac_word=$2
38468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38469$as_echo_n "checking for $ac_word... " >&6; }
38470if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
38471  $as_echo_n "(cached) " >&6
38472else
38473  if test -n "$ac_ct_DSYMUTIL"; then
38474  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
38475else
38476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38477for as_dir in $PATH
38478do
38479  IFS=$as_save_IFS
38480  test -z "$as_dir" && as_dir=.
38481    for ac_exec_ext in '' $ac_executable_extensions; do
38482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38483    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
38484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38485    break 2
38486  fi
38487done
38488  done
38489IFS=$as_save_IFS
38490
38491fi
38492fi
38493ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
38494if test -n "$ac_ct_DSYMUTIL"; then
38495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
38496$as_echo "$ac_ct_DSYMUTIL" >&6; }
38497else
38498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38499$as_echo "no" >&6; }
38500fi
38501
38502  if test "x$ac_ct_DSYMUTIL" = x; then
38503    DSYMUTIL=":"
38504  else
38505    case $cross_compiling:$ac_tool_warned in
38506yes:)
38507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38509ac_tool_warned=yes ;;
38510esac
38511    DSYMUTIL=$ac_ct_DSYMUTIL
38512  fi
38513else
38514  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
38515fi
38516
38517    if test -n "$ac_tool_prefix"; then
38518  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
38519set dummy ${ac_tool_prefix}nmedit; ac_word=$2
38520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38521$as_echo_n "checking for $ac_word... " >&6; }
38522if ${ac_cv_prog_NMEDIT+:} false; then :
38523  $as_echo_n "(cached) " >&6
38524else
38525  if test -n "$NMEDIT"; then
38526  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
38527else
38528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38529for as_dir in $PATH
38530do
38531  IFS=$as_save_IFS
38532  test -z "$as_dir" && as_dir=.
38533    for ac_exec_ext in '' $ac_executable_extensions; do
38534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38535    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
38536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38537    break 2
38538  fi
38539done
38540  done
38541IFS=$as_save_IFS
38542
38543fi
38544fi
38545NMEDIT=$ac_cv_prog_NMEDIT
38546if test -n "$NMEDIT"; then
38547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
38548$as_echo "$NMEDIT" >&6; }
38549else
38550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38551$as_echo "no" >&6; }
38552fi
38553
38554
38555fi
38556if test -z "$ac_cv_prog_NMEDIT"; then
38557  ac_ct_NMEDIT=$NMEDIT
38558  # Extract the first word of "nmedit", so it can be a program name with args.
38559set dummy nmedit; ac_word=$2
38560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38561$as_echo_n "checking for $ac_word... " >&6; }
38562if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
38563  $as_echo_n "(cached) " >&6
38564else
38565  if test -n "$ac_ct_NMEDIT"; then
38566  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
38567else
38568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38569for as_dir in $PATH
38570do
38571  IFS=$as_save_IFS
38572  test -z "$as_dir" && as_dir=.
38573    for ac_exec_ext in '' $ac_executable_extensions; do
38574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38575    ac_cv_prog_ac_ct_NMEDIT="nmedit"
38576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38577    break 2
38578  fi
38579done
38580  done
38581IFS=$as_save_IFS
38582
38583fi
38584fi
38585ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
38586if test -n "$ac_ct_NMEDIT"; then
38587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
38588$as_echo "$ac_ct_NMEDIT" >&6; }
38589else
38590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38591$as_echo "no" >&6; }
38592fi
38593
38594  if test "x$ac_ct_NMEDIT" = x; then
38595    NMEDIT=":"
38596  else
38597    case $cross_compiling:$ac_tool_warned in
38598yes:)
38599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38601ac_tool_warned=yes ;;
38602esac
38603    NMEDIT=$ac_ct_NMEDIT
38604  fi
38605else
38606  NMEDIT="$ac_cv_prog_NMEDIT"
38607fi
38608
38609    if test -n "$ac_tool_prefix"; then
38610  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
38611set dummy ${ac_tool_prefix}lipo; ac_word=$2
38612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38613$as_echo_n "checking for $ac_word... " >&6; }
38614if ${ac_cv_prog_LIPO+:} false; then :
38615  $as_echo_n "(cached) " >&6
38616else
38617  if test -n "$LIPO"; then
38618  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
38619else
38620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38621for as_dir in $PATH
38622do
38623  IFS=$as_save_IFS
38624  test -z "$as_dir" && as_dir=.
38625    for ac_exec_ext in '' $ac_executable_extensions; do
38626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38627    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
38628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38629    break 2
38630  fi
38631done
38632  done
38633IFS=$as_save_IFS
38634
38635fi
38636fi
38637LIPO=$ac_cv_prog_LIPO
38638if test -n "$LIPO"; then
38639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38640$as_echo "$LIPO" >&6; }
38641else
38642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38643$as_echo "no" >&6; }
38644fi
38645
38646
38647fi
38648if test -z "$ac_cv_prog_LIPO"; then
38649  ac_ct_LIPO=$LIPO
38650  # Extract the first word of "lipo", so it can be a program name with args.
38651set dummy lipo; ac_word=$2
38652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38653$as_echo_n "checking for $ac_word... " >&6; }
38654if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
38655  $as_echo_n "(cached) " >&6
38656else
38657  if test -n "$ac_ct_LIPO"; then
38658  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
38659else
38660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38661for as_dir in $PATH
38662do
38663  IFS=$as_save_IFS
38664  test -z "$as_dir" && as_dir=.
38665    for ac_exec_ext in '' $ac_executable_extensions; do
38666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38667    ac_cv_prog_ac_ct_LIPO="lipo"
38668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38669    break 2
38670  fi
38671done
38672  done
38673IFS=$as_save_IFS
38674
38675fi
38676fi
38677ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
38678if test -n "$ac_ct_LIPO"; then
38679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
38680$as_echo "$ac_ct_LIPO" >&6; }
38681else
38682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38683$as_echo "no" >&6; }
38684fi
38685
38686  if test "x$ac_ct_LIPO" = x; then
38687    LIPO=":"
38688  else
38689    case $cross_compiling:$ac_tool_warned in
38690yes:)
38691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38693ac_tool_warned=yes ;;
38694esac
38695    LIPO=$ac_ct_LIPO
38696  fi
38697else
38698  LIPO="$ac_cv_prog_LIPO"
38699fi
38700
38701    if test -n "$ac_tool_prefix"; then
38702  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
38703set dummy ${ac_tool_prefix}otool; ac_word=$2
38704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38705$as_echo_n "checking for $ac_word... " >&6; }
38706if ${ac_cv_prog_OTOOL+:} false; then :
38707  $as_echo_n "(cached) " >&6
38708else
38709  if test -n "$OTOOL"; then
38710  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
38711else
38712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38713for as_dir in $PATH
38714do
38715  IFS=$as_save_IFS
38716  test -z "$as_dir" && as_dir=.
38717    for ac_exec_ext in '' $ac_executable_extensions; do
38718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38719    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
38720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38721    break 2
38722  fi
38723done
38724  done
38725IFS=$as_save_IFS
38726
38727fi
38728fi
38729OTOOL=$ac_cv_prog_OTOOL
38730if test -n "$OTOOL"; then
38731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
38732$as_echo "$OTOOL" >&6; }
38733else
38734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38735$as_echo "no" >&6; }
38736fi
38737
38738
38739fi
38740if test -z "$ac_cv_prog_OTOOL"; then
38741  ac_ct_OTOOL=$OTOOL
38742  # Extract the first word of "otool", so it can be a program name with args.
38743set dummy otool; ac_word=$2
38744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38745$as_echo_n "checking for $ac_word... " >&6; }
38746if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
38747  $as_echo_n "(cached) " >&6
38748else
38749  if test -n "$ac_ct_OTOOL"; then
38750  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
38751else
38752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38753for as_dir in $PATH
38754do
38755  IFS=$as_save_IFS
38756  test -z "$as_dir" && as_dir=.
38757    for ac_exec_ext in '' $ac_executable_extensions; do
38758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38759    ac_cv_prog_ac_ct_OTOOL="otool"
38760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38761    break 2
38762  fi
38763done
38764  done
38765IFS=$as_save_IFS
38766
38767fi
38768fi
38769ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
38770if test -n "$ac_ct_OTOOL"; then
38771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
38772$as_echo "$ac_ct_OTOOL" >&6; }
38773else
38774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38775$as_echo "no" >&6; }
38776fi
38777
38778  if test "x$ac_ct_OTOOL" = x; then
38779    OTOOL=":"
38780  else
38781    case $cross_compiling:$ac_tool_warned in
38782yes:)
38783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38785ac_tool_warned=yes ;;
38786esac
38787    OTOOL=$ac_ct_OTOOL
38788  fi
38789else
38790  OTOOL="$ac_cv_prog_OTOOL"
38791fi
38792
38793    if test -n "$ac_tool_prefix"; then
38794  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
38795set dummy ${ac_tool_prefix}otool64; ac_word=$2
38796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38797$as_echo_n "checking for $ac_word... " >&6; }
38798if ${ac_cv_prog_OTOOL64+:} false; then :
38799  $as_echo_n "(cached) " >&6
38800else
38801  if test -n "$OTOOL64"; then
38802  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
38803else
38804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38805for as_dir in $PATH
38806do
38807  IFS=$as_save_IFS
38808  test -z "$as_dir" && as_dir=.
38809    for ac_exec_ext in '' $ac_executable_extensions; do
38810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38811    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
38812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38813    break 2
38814  fi
38815done
38816  done
38817IFS=$as_save_IFS
38818
38819fi
38820fi
38821OTOOL64=$ac_cv_prog_OTOOL64
38822if test -n "$OTOOL64"; then
38823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
38824$as_echo "$OTOOL64" >&6; }
38825else
38826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38827$as_echo "no" >&6; }
38828fi
38829
38830
38831fi
38832if test -z "$ac_cv_prog_OTOOL64"; then
38833  ac_ct_OTOOL64=$OTOOL64
38834  # Extract the first word of "otool64", so it can be a program name with args.
38835set dummy otool64; ac_word=$2
38836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38837$as_echo_n "checking for $ac_word... " >&6; }
38838if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
38839  $as_echo_n "(cached) " >&6
38840else
38841  if test -n "$ac_ct_OTOOL64"; then
38842  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
38843else
38844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38845for as_dir in $PATH
38846do
38847  IFS=$as_save_IFS
38848  test -z "$as_dir" && as_dir=.
38849    for ac_exec_ext in '' $ac_executable_extensions; do
38850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38851    ac_cv_prog_ac_ct_OTOOL64="otool64"
38852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38853    break 2
38854  fi
38855done
38856  done
38857IFS=$as_save_IFS
38858
38859fi
38860fi
38861ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
38862if test -n "$ac_ct_OTOOL64"; then
38863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
38864$as_echo "$ac_ct_OTOOL64" >&6; }
38865else
38866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38867$as_echo "no" >&6; }
38868fi
38869
38870  if test "x$ac_ct_OTOOL64" = x; then
38871    OTOOL64=":"
38872  else
38873    case $cross_compiling:$ac_tool_warned in
38874yes:)
38875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38877ac_tool_warned=yes ;;
38878esac
38879    OTOOL64=$ac_ct_OTOOL64
38880  fi
38881else
38882  OTOOL64="$ac_cv_prog_OTOOL64"
38883fi
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
38912$as_echo_n "checking for -single_module linker flag... " >&6; }
38913if ${lt_cv_apple_cc_single_mod+:} false; then :
38914  $as_echo_n "(cached) " >&6
38915else
38916  lt_cv_apple_cc_single_mod=no
38917      if test -z "$LT_MULTI_MODULE"; then
38918	# By default we will add the -single_module flag. You can override
38919	# by either setting the environment variable LT_MULTI_MODULE
38920	# non-empty at configure time, or by adding -multi_module to the
38921	# link flags.
38922	rm -rf libconftest.dylib*
38923	echo "int foo(void){return 1;}" > conftest.c
38924	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
38925-dynamiclib -Wl,-single_module conftest.c" >&5
38926	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
38927	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
38928        _lt_result=$?
38929	# If there is a non-empty error log, and "single_module"
38930	# appears in it, assume the flag caused a linker warning
38931        if test -s conftest.err && $GREP single_module conftest.err; then
38932	  cat conftest.err >&5
38933	# Otherwise, if the output was created with a 0 exit code from
38934	# the compiler, it worked.
38935	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
38936	  lt_cv_apple_cc_single_mod=yes
38937	else
38938	  cat conftest.err >&5
38939	fi
38940	rm -rf libconftest.dylib*
38941	rm -f conftest.*
38942      fi
38943fi
38944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
38945$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
38946
38947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
38948$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
38949if ${lt_cv_ld_exported_symbols_list+:} false; then :
38950  $as_echo_n "(cached) " >&6
38951else
38952  lt_cv_ld_exported_symbols_list=no
38953      save_LDFLAGS=$LDFLAGS
38954      echo "_main" > conftest.sym
38955      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
38956      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38957/* end confdefs.h.  */
38958
38959#ifdef F77_DUMMY_MAIN
38960
38961#  ifdef __cplusplus
38962     extern "C"
38963#  endif
38964   int F77_DUMMY_MAIN() { return 1; }
38965
38966#endif
38967int
38968main ()
38969{
38970
38971  ;
38972  return 0;
38973}
38974_ACEOF
38975if ac_fn_c_try_link "$LINENO"; then :
38976  lt_cv_ld_exported_symbols_list=yes
38977else
38978  lt_cv_ld_exported_symbols_list=no
38979fi
38980rm -f core conftest.err conftest.$ac_objext \
38981    conftest$ac_exeext conftest.$ac_ext
38982	LDFLAGS=$save_LDFLAGS
38983
38984fi
38985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
38986$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
38987
38988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
38989$as_echo_n "checking for -force_load linker flag... " >&6; }
38990if ${lt_cv_ld_force_load+:} false; then :
38991  $as_echo_n "(cached) " >&6
38992else
38993  lt_cv_ld_force_load=no
38994      cat > conftest.c << _LT_EOF
38995int forced_loaded() { return 2;}
38996_LT_EOF
38997      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
38998      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
38999      echo "$AR cru libconftest.a conftest.o" >&5
39000      $AR cru libconftest.a conftest.o 2>&5
39001      echo "$RANLIB libconftest.a" >&5
39002      $RANLIB libconftest.a 2>&5
39003      cat > conftest.c << _LT_EOF
39004int main() { return 0;}
39005_LT_EOF
39006      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
39007      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
39008      _lt_result=$?
39009      if test -s conftest.err && $GREP force_load conftest.err; then
39010	cat conftest.err >&5
39011      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
39012	lt_cv_ld_force_load=yes
39013      else
39014	cat conftest.err >&5
39015      fi
39016        rm -f conftest.err libconftest.a conftest conftest.c
39017        rm -rf conftest.dSYM
39018
39019fi
39020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
39021$as_echo "$lt_cv_ld_force_load" >&6; }
39022    case $host_os in
39023    rhapsody* | darwin1.[012])
39024      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
39025    darwin1.*)
39026      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
39027    darwin*) # darwin 5.x on
39028      # if running on 10.5 or later, the deployment target defaults
39029      # to the OS version, if on x86, and 10.4, the deployment
39030      # target defaults to 10.4. Don't you love it?
39031      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
39032	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
39033	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
39034	10.[012][,.]*)
39035	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
39036	10.*)
39037	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
39038      esac
39039    ;;
39040  esac
39041    if test yes = "$lt_cv_apple_cc_single_mod"; then
39042      _lt_dar_single_mod='$single_module'
39043    fi
39044    if test yes = "$lt_cv_ld_exported_symbols_list"; then
39045      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
39046    else
39047      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
39048    fi
39049    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
39050      _lt_dsymutil='~$DSYMUTIL $lib || :'
39051    else
39052      _lt_dsymutil=
39053    fi
39054    ;;
39055  esac
39056
39057# func_munge_path_list VARIABLE PATH
39058# -----------------------------------
39059# VARIABLE is name of variable containing _space_ separated list of
39060# directories to be munged by the contents of PATH, which is string
39061# having a format:
39062# "DIR[:DIR]:"
39063#       string "DIR[ DIR]" will be prepended to VARIABLE
39064# ":DIR[:DIR]"
39065#       string "DIR[ DIR]" will be appended to VARIABLE
39066# "DIRP[:DIRP]::[DIRA:]DIRA"
39067#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
39068#       "DIRA[ DIRA]" will be appended to VARIABLE
39069# "DIR[:DIR]"
39070#       VARIABLE will be replaced by "DIR[ DIR]"
39071func_munge_path_list ()
39072{
39073    case x$2 in
39074    x)
39075        ;;
39076    *:)
39077        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
39078        ;;
39079    x:*)
39080        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
39081        ;;
39082    *::*)
39083        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
39084        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
39085        ;;
39086    *)
39087        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
39088        ;;
39089    esac
39090}
39091
39092for ac_header in dlfcn.h
39093do :
39094  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
39095"
39096if test "x$ac_cv_header_dlfcn_h" = xyes; then :
39097  cat >>confdefs.h <<_ACEOF
39098#define HAVE_DLFCN_H 1
39099_ACEOF
39100
39101fi
39102
39103done
39104
39105
39106
39107func_stripname_cnf ()
39108{
39109  case $2 in
39110  .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
39111  *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
39112  esac
39113} # func_stripname_cnf
39114
39115
39116
39117
39118
39119# Set options
39120# Check whether --enable-shared was given.
39121if test "${enable_shared+set}" = set; then :
39122  enableval=$enable_shared; p=${PACKAGE-default}
39123    case $enableval in
39124    yes) enable_shared=yes ;;
39125    no) enable_shared=no ;;
39126    *)
39127      enable_shared=no
39128      # Look at the argument we got.  We use all the common list separators.
39129      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
39130      for pkg in $enableval; do
39131	IFS=$lt_save_ifs
39132	if test "X$pkg" = "X$p"; then
39133	  enable_shared=yes
39134	fi
39135      done
39136      IFS=$lt_save_ifs
39137      ;;
39138    esac
39139else
39140  enable_shared=yes
39141fi
39142
39143
39144
39145
39146
39147
39148
39149enable_dlopen=yes
39150# Check whether --enable-static was given.
39151if test "${enable_static+set}" = set; then :
39152  enableval=$enable_static; p=${PACKAGE-default}
39153    case $enableval in
39154    yes) enable_static=yes ;;
39155    no) enable_static=no ;;
39156    *)
39157     enable_static=no
39158      # Look at the argument we got.  We use all the common list separators.
39159      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
39160      for pkg in $enableval; do
39161	IFS=$lt_save_ifs
39162	if test "X$pkg" = "X$p"; then
39163	  enable_static=yes
39164	fi
39165      done
39166      IFS=$lt_save_ifs
39167      ;;
39168    esac
39169else
39170  enable_static=no
39171fi
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183  enable_win32_dll=no
39184
39185
39186
39187
39188
39189# Check whether --with-pic was given.
39190if test "${with_pic+set}" = set; then :
39191  withval=$with_pic; lt_p=${PACKAGE-default}
39192    case $withval in
39193    yes|no) pic_mode=$withval ;;
39194    *)
39195      pic_mode=default
39196      # Look at the argument we got.  We use all the common list separators.
39197      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
39198      for lt_pkg in $withval; do
39199	IFS=$lt_save_ifs
39200	if test "X$lt_pkg" = "X$lt_p"; then
39201	  pic_mode=yes
39202	fi
39203      done
39204      IFS=$lt_save_ifs
39205      ;;
39206    esac
39207else
39208  pic_mode=default
39209fi
39210
39211
39212
39213
39214
39215
39216
39217
39218  # Check whether --enable-fast-install was given.
39219if test "${enable_fast_install+set}" = set; then :
39220  enableval=$enable_fast_install; p=${PACKAGE-default}
39221    case $enableval in
39222    yes) enable_fast_install=yes ;;
39223    no) enable_fast_install=no ;;
39224    *)
39225      enable_fast_install=no
39226      # Look at the argument we got.  We use all the common list separators.
39227      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
39228      for pkg in $enableval; do
39229	IFS=$lt_save_ifs
39230	if test "X$pkg" = "X$p"; then
39231	  enable_fast_install=yes
39232	fi
39233      done
39234      IFS=$lt_save_ifs
39235      ;;
39236    esac
39237else
39238  enable_fast_install=yes
39239fi
39240
39241
39242
39243
39244
39245
39246
39247
39248  shared_archive_member_spec=
39249case $host,$enable_shared in
39250power*-*-aix[5-9]*,yes)
39251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
39252$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
39253
39254# Check whether --with-aix-soname was given.
39255if test "${with_aix_soname+set}" = set; then :
39256  withval=$with_aix_soname; case $withval in
39257    aix|svr4|both)
39258      ;;
39259    *)
39260      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
39261      ;;
39262    esac
39263    lt_cv_with_aix_soname=$with_aix_soname
39264else
39265  if ${lt_cv_with_aix_soname+:} false; then :
39266  $as_echo_n "(cached) " >&6
39267else
39268  lt_cv_with_aix_soname=aix
39269fi
39270
39271    with_aix_soname=$lt_cv_with_aix_soname
39272fi
39273
39274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
39275$as_echo "$with_aix_soname" >&6; }
39276  if test aix != "$with_aix_soname"; then
39277    # For the AIX way of multilib, we name the shared archive member
39278    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
39279    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
39280    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
39281    # the AIX toolchain works better with OBJECT_MODE set (default 32).
39282    if test 64 = "${OBJECT_MODE-32}"; then
39283      shared_archive_member_spec=shr_64
39284    else
39285      shared_archive_member_spec=shr
39286    fi
39287  fi
39288  ;;
39289*)
39290  with_aix_soname=aix
39291  ;;
39292esac
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303# This can be used to rebuild libtool when needed
39304LIBTOOL_DEPS=$ltmain
39305
39306# Always use our own libtool.
39307LIBTOOL='$(SHELL) $(top_builddir)/libtool'
39308
39309
39310
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
39326
39327
39328
39329
39330
39331
39332
39333
39334
39335
39336
39337
39338test -z "$LN_S" && LN_S="ln -s"
39339
39340
39341
39342
39343
39344
39345
39346
39347
39348
39349
39350
39351
39352
39353if test -n "${ZSH_VERSION+set}"; then
39354   setopt NO_GLOB_SUBST
39355fi
39356
39357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
39358$as_echo_n "checking for objdir... " >&6; }
39359if ${lt_cv_objdir+:} false; then :
39360  $as_echo_n "(cached) " >&6
39361else
39362  rm -f .libs 2>/dev/null
39363mkdir .libs 2>/dev/null
39364if test -d .libs; then
39365  lt_cv_objdir=.libs
39366else
39367  # MS-DOS does not allow filenames that begin with a dot.
39368  lt_cv_objdir=_libs
39369fi
39370rmdir .libs 2>/dev/null
39371fi
39372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
39373$as_echo "$lt_cv_objdir" >&6; }
39374objdir=$lt_cv_objdir
39375
39376
39377
39378
39379
39380cat >>confdefs.h <<_ACEOF
39381#define LT_OBJDIR "$lt_cv_objdir/"
39382_ACEOF
39383
39384
39385
39386
39387case $host_os in
39388aix3*)
39389  # AIX sometimes has problems with the GCC collect2 program.  For some
39390  # reason, if we set the COLLECT_NAMES environment variable, the problems
39391  # vanish in a puff of smoke.
39392  if test set != "${COLLECT_NAMES+set}"; then
39393    COLLECT_NAMES=
39394    export COLLECT_NAMES
39395  fi
39396  ;;
39397esac
39398
39399# Global variables:
39400ofile=libtool
39401can_build_shared=yes
39402
39403# All known linkers require a '.a' archive for static linking (except MSVC,
39404# which needs '.lib').
39405libext=a
39406
39407with_gnu_ld=$lt_cv_prog_gnu_ld
39408
39409old_CC=$CC
39410old_CFLAGS=$CFLAGS
39411
39412# Set sane defaults for various variables
39413test -z "$CC" && CC=cc
39414test -z "$LTCC" && LTCC=$CC
39415test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
39416test -z "$LD" && LD=ld
39417test -z "$ac_objext" && ac_objext=o
39418
39419func_cc_basename $compiler
39420cc_basename=$func_cc_basename_result
39421
39422
39423# Only perform the check for file, if the check method requires it
39424test -z "$MAGIC_CMD" && MAGIC_CMD=file
39425case $deplibs_check_method in
39426file_magic*)
39427  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
39428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
39429$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
39430if ${lt_cv_path_MAGIC_CMD+:} false; then :
39431  $as_echo_n "(cached) " >&6
39432else
39433  case $MAGIC_CMD in
39434[\\/*] |  ?:[\\/]*)
39435  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
39436  ;;
39437*)
39438  lt_save_MAGIC_CMD=$MAGIC_CMD
39439  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
39440  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
39441  for ac_dir in $ac_dummy; do
39442    IFS=$lt_save_ifs
39443    test -z "$ac_dir" && ac_dir=.
39444    if test -f "$ac_dir/${ac_tool_prefix}file"; then
39445      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
39446      if test -n "$file_magic_test_file"; then
39447	case $deplibs_check_method in
39448	"file_magic "*)
39449	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
39450	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
39451	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
39452	    $EGREP "$file_magic_regex" > /dev/null; then
39453	    :
39454	  else
39455	    cat <<_LT_EOF 1>&2
39456
39457*** Warning: the command libtool uses to detect shared libraries,
39458*** $file_magic_cmd, produces output that libtool cannot recognize.
39459*** The result is that libtool may fail to recognize shared libraries
39460*** as such.  This will affect the creation of libtool libraries that
39461*** depend on shared libraries, but programs linked with such libtool
39462*** libraries will work regardless of this problem.  Nevertheless, you
39463*** may want to report the problem to your system manager and/or to
39464*** bug-libtool@gnu.org
39465
39466_LT_EOF
39467	  fi ;;
39468	esac
39469      fi
39470      break
39471    fi
39472  done
39473  IFS=$lt_save_ifs
39474  MAGIC_CMD=$lt_save_MAGIC_CMD
39475  ;;
39476esac
39477fi
39478
39479MAGIC_CMD=$lt_cv_path_MAGIC_CMD
39480if test -n "$MAGIC_CMD"; then
39481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
39482$as_echo "$MAGIC_CMD" >&6; }
39483else
39484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39485$as_echo "no" >&6; }
39486fi
39487
39488
39489
39490
39491
39492if test -z "$lt_cv_path_MAGIC_CMD"; then
39493  if test -n "$ac_tool_prefix"; then
39494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
39495$as_echo_n "checking for file... " >&6; }
39496if ${lt_cv_path_MAGIC_CMD+:} false; then :
39497  $as_echo_n "(cached) " >&6
39498else
39499  case $MAGIC_CMD in
39500[\\/*] |  ?:[\\/]*)
39501  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
39502  ;;
39503*)
39504  lt_save_MAGIC_CMD=$MAGIC_CMD
39505  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
39506  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
39507  for ac_dir in $ac_dummy; do
39508    IFS=$lt_save_ifs
39509    test -z "$ac_dir" && ac_dir=.
39510    if test -f "$ac_dir/file"; then
39511      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
39512      if test -n "$file_magic_test_file"; then
39513	case $deplibs_check_method in
39514	"file_magic "*)
39515	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
39516	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
39517	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
39518	    $EGREP "$file_magic_regex" > /dev/null; then
39519	    :
39520	  else
39521	    cat <<_LT_EOF 1>&2
39522
39523*** Warning: the command libtool uses to detect shared libraries,
39524*** $file_magic_cmd, produces output that libtool cannot recognize.
39525*** The result is that libtool may fail to recognize shared libraries
39526*** as such.  This will affect the creation of libtool libraries that
39527*** depend on shared libraries, but programs linked with such libtool
39528*** libraries will work regardless of this problem.  Nevertheless, you
39529*** may want to report the problem to your system manager and/or to
39530*** bug-libtool@gnu.org
39531
39532_LT_EOF
39533	  fi ;;
39534	esac
39535      fi
39536      break
39537    fi
39538  done
39539  IFS=$lt_save_ifs
39540  MAGIC_CMD=$lt_save_MAGIC_CMD
39541  ;;
39542esac
39543fi
39544
39545MAGIC_CMD=$lt_cv_path_MAGIC_CMD
39546if test -n "$MAGIC_CMD"; then
39547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
39548$as_echo "$MAGIC_CMD" >&6; }
39549else
39550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39551$as_echo "no" >&6; }
39552fi
39553
39554
39555  else
39556    MAGIC_CMD=:
39557  fi
39558fi
39559
39560  fi
39561  ;;
39562esac
39563
39564# Use C for the default configuration in the libtool script
39565
39566lt_save_CC=$CC
39567ac_ext=c
39568ac_cpp='$CPP $CPPFLAGS'
39569ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39570ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39571ac_compiler_gnu=$ac_cv_c_compiler_gnu
39572
39573
39574# Source file extension for C test sources.
39575ac_ext=c
39576
39577# Object file extension for compiled C test sources.
39578objext=o
39579objext=$objext
39580
39581# Code to be used in simple compile tests
39582lt_simple_compile_test_code="int some_variable = 0;"
39583
39584# Code to be used in simple link tests
39585lt_simple_link_test_code='int main(){return(0);}'
39586
39587
39588
39589
39590
39591
39592
39593# If no C compiler was specified, use CC.
39594LTCC=${LTCC-"$CC"}
39595
39596# If no C compiler flags were specified, use CFLAGS.
39597LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
39598
39599# Allow CC to be a program name with arguments.
39600compiler=$CC
39601
39602# Save the default compiler, since it gets overwritten when the other
39603# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
39604compiler_DEFAULT=$CC
39605
39606# save warnings/boilerplate of simple test code
39607ac_outfile=conftest.$ac_objext
39608echo "$lt_simple_compile_test_code" >conftest.$ac_ext
39609eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
39610_lt_compiler_boilerplate=`cat conftest.err`
39611$RM conftest*
39612
39613ac_outfile=conftest.$ac_objext
39614echo "$lt_simple_link_test_code" >conftest.$ac_ext
39615eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
39616_lt_linker_boilerplate=`cat conftest.err`
39617$RM -r conftest*
39618
39619
39620## CAVEAT EMPTOR:
39621## There is no encapsulation within the following macros, do not change
39622## the running order or otherwise move them around unless you know exactly
39623## what you are doing...
39624if test -n "$compiler"; then
39625
39626lt_prog_compiler_no_builtin_flag=
39627
39628if test yes = "$GCC"; then
39629  case $cc_basename in
39630  nvcc*)
39631    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
39632  *)
39633    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
39634  esac
39635
39636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
39637$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
39638if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
39639  $as_echo_n "(cached) " >&6
39640else
39641  lt_cv_prog_compiler_rtti_exceptions=no
39642   ac_outfile=conftest.$ac_objext
39643   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
39644   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
39645   # Insert the option either (1) after the last *FLAGS variable, or
39646   # (2) before a word containing "conftest.", or (3) at the end.
39647   # Note that $ac_compile itself does not contain backslashes and begins
39648   # with a dollar sign (not a hyphen), so the echo should work correctly.
39649   # The option is referenced via a variable to avoid confusing sed.
39650   lt_compile=`echo "$ac_compile" | $SED \
39651   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
39652   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
39653   -e 's:$: $lt_compiler_flag:'`
39654   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
39655   (eval "$lt_compile" 2>conftest.err)
39656   ac_status=$?
39657   cat conftest.err >&5
39658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39659   if (exit $ac_status) && test -s "$ac_outfile"; then
39660     # The compiler can only warn and ignore the option if not recognized
39661     # So say no if there are warnings other than the usual output.
39662     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
39663     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
39664     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
39665       lt_cv_prog_compiler_rtti_exceptions=yes
39666     fi
39667   fi
39668   $RM conftest*
39669
39670fi
39671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
39672$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
39673
39674if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
39675    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
39676else
39677    :
39678fi
39679
39680fi
39681
39682
39683
39684
39685
39686
39687  lt_prog_compiler_wl=
39688lt_prog_compiler_pic=
39689lt_prog_compiler_static=
39690
39691
39692  if test yes = "$GCC"; then
39693    lt_prog_compiler_wl='-Wl,'
39694    lt_prog_compiler_static='-static'
39695
39696    case $host_os in
39697      aix*)
39698      # All AIX code is PIC.
39699      if test ia64 = "$host_cpu"; then
39700	# AIX 5 now supports IA64 processor
39701	lt_prog_compiler_static='-Bstatic'
39702      fi
39703      lt_prog_compiler_pic='-fPIC'
39704      ;;
39705
39706    amigaos*)
39707      case $host_cpu in
39708      powerpc)
39709            # see comment about AmigaOS4 .so support
39710            lt_prog_compiler_pic='-fPIC'
39711        ;;
39712      m68k)
39713            # FIXME: we need at least 68020 code to build shared libraries, but
39714            # adding the '-m68020' flag to GCC prevents building anything better,
39715            # like '-m68040'.
39716            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
39717        ;;
39718      esac
39719      ;;
39720
39721    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
39722      # PIC is the default for these OSes.
39723      ;;
39724
39725    mingw* | cygwin* | pw32* | os2* | cegcc*)
39726      # This hack is so that the source file can tell whether it is being
39727      # built for inclusion in a dll (and should export symbols for example).
39728      # Although the cygwin gcc ignores -fPIC, still need this for old-style
39729      # (--disable-auto-import) libraries
39730      lt_prog_compiler_pic='-DDLL_EXPORT'
39731      case $host_os in
39732      os2*)
39733	lt_prog_compiler_static='$wl-static'
39734	;;
39735      esac
39736      ;;
39737
39738    darwin* | rhapsody*)
39739      # PIC is the default on this platform
39740      # Common symbols not allowed in MH_DYLIB files
39741      lt_prog_compiler_pic='-fno-common'
39742      ;;
39743
39744    haiku*)
39745      # PIC is the default for Haiku.
39746      # The "-static" flag exists, but is broken.
39747      lt_prog_compiler_static=
39748      ;;
39749
39750    hpux*)
39751      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
39752      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
39753      # sets the default TLS model and affects inlining.
39754      case $host_cpu in
39755      hppa*64*)
39756	# +Z the default
39757	;;
39758      *)
39759	lt_prog_compiler_pic='-fPIC'
39760	;;
39761      esac
39762      ;;
39763
39764    interix[3-9]*)
39765      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
39766      # Instead, we relocate shared libraries at runtime.
39767      ;;
39768
39769    msdosdjgpp*)
39770      # Just because we use GCC doesn't mean we suddenly get shared libraries
39771      # on systems that don't support them.
39772      lt_prog_compiler_can_build_shared=no
39773      enable_shared=no
39774      ;;
39775
39776    *nto* | *qnx*)
39777      # QNX uses GNU C++, but need to define -shared option too, otherwise
39778      # it will coredump.
39779      lt_prog_compiler_pic='-fPIC -shared'
39780      ;;
39781
39782    sysv4*MP*)
39783      if test -d /usr/nec; then
39784	lt_prog_compiler_pic=-Kconform_pic
39785      fi
39786      ;;
39787
39788    *)
39789      lt_prog_compiler_pic='-fPIC'
39790      ;;
39791    esac
39792
39793    case $cc_basename in
39794    nvcc*) # Cuda Compiler Driver 2.2
39795      lt_prog_compiler_wl='-Xlinker '
39796      if test -n "$lt_prog_compiler_pic"; then
39797        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
39798      fi
39799      ;;
39800    esac
39801  else
39802    # PORTME Check for flag to pass linker flags through the system compiler.
39803    case $host_os in
39804    aix*)
39805      lt_prog_compiler_wl='-Wl,'
39806      if test ia64 = "$host_cpu"; then
39807	# AIX 5 now supports IA64 processor
39808	lt_prog_compiler_static='-Bstatic'
39809      else
39810	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
39811      fi
39812      ;;
39813
39814    darwin* | rhapsody*)
39815      # PIC is the default on this platform
39816      # Common symbols not allowed in MH_DYLIB files
39817      lt_prog_compiler_pic='-fno-common'
39818      case $cc_basename in
39819      nagfor*)
39820        # NAG Fortran compiler
39821        lt_prog_compiler_wl='-Wl,-Wl,,'
39822        lt_prog_compiler_pic='-PIC'
39823        lt_prog_compiler_static='-Bstatic'
39824        ;;
39825      esac
39826      ;;
39827
39828    mingw* | cygwin* | pw32* | os2* | cegcc*)
39829      # This hack is so that the source file can tell whether it is being
39830      # built for inclusion in a dll (and should export symbols for example).
39831      lt_prog_compiler_pic='-DDLL_EXPORT'
39832      case $host_os in
39833      os2*)
39834	lt_prog_compiler_static='$wl-static'
39835	;;
39836      esac
39837      ;;
39838
39839    hpux9* | hpux10* | hpux11*)
39840      lt_prog_compiler_wl='-Wl,'
39841      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
39842      # not for PA HP-UX.
39843      case $host_cpu in
39844      hppa*64*|ia64*)
39845	# +Z the default
39846	;;
39847      *)
39848	lt_prog_compiler_pic='+Z'
39849	;;
39850      esac
39851      # Is there a better lt_prog_compiler_static that works with the bundled CC?
39852      lt_prog_compiler_static='$wl-a ${wl}archive'
39853      ;;
39854
39855    irix5* | irix6* | nonstopux*)
39856      lt_prog_compiler_wl='-Wl,'
39857      # PIC (with -KPIC) is the default.
39858      lt_prog_compiler_static='-non_shared'
39859      ;;
39860
39861    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
39862      case $cc_basename in
39863      # old Intel for x86_64, which still supported -KPIC.
39864      ecc*)
39865	lt_prog_compiler_wl='-Wl,'
39866	lt_prog_compiler_pic='-KPIC'
39867	lt_prog_compiler_static='-static'
39868        ;;
39869      # icc used to be incompatible with GCC.
39870      # ICC 10 doesn't accept -KPIC any more.
39871      icc* | ifort*)
39872	lt_prog_compiler_wl='-Wl,'
39873	lt_prog_compiler_pic='-fPIC'
39874	lt_prog_compiler_static='-static'
39875        ;;
39876      # Lahey Fortran 8.1.
39877      lf95*)
39878	lt_prog_compiler_wl='-Wl,'
39879	lt_prog_compiler_pic='--shared'
39880	lt_prog_compiler_static='--static'
39881	;;
39882      nagfor*)
39883	# NAG Fortran compiler
39884	lt_prog_compiler_wl='-Wl,-Wl,,'
39885	lt_prog_compiler_pic='-PIC'
39886	lt_prog_compiler_static='-Bstatic'
39887	;;
39888      tcc*)
39889	# Fabrice Bellard et al's Tiny C Compiler
39890	lt_prog_compiler_wl='-Wl,'
39891	lt_prog_compiler_pic='-fPIC'
39892	lt_prog_compiler_static='-static'
39893	;;
39894      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
39895        # Portland Group compilers (*not* the Pentium gcc compiler,
39896	# which looks to be a dead project)
39897	lt_prog_compiler_wl='-Wl,'
39898	lt_prog_compiler_pic='-fpic'
39899	lt_prog_compiler_static='-Bstatic'
39900        ;;
39901      ccc*)
39902        lt_prog_compiler_wl='-Wl,'
39903        # All Alpha code is PIC.
39904        lt_prog_compiler_static='-non_shared'
39905        ;;
39906      xl* | bgxl* | bgf* | mpixl*)
39907	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
39908	lt_prog_compiler_wl='-Wl,'
39909	lt_prog_compiler_pic='-qpic'
39910	lt_prog_compiler_static='-qstaticlink'
39911	;;
39912      *)
39913	case `$CC -V 2>&1 | sed 5q` in
39914	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
39915	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
39916	  lt_prog_compiler_pic='-KPIC'
39917	  lt_prog_compiler_static='-Bstatic'
39918	  lt_prog_compiler_wl=''
39919	  ;;
39920	*Sun\ F* | *Sun*Fortran*)
39921	  lt_prog_compiler_pic='-KPIC'
39922	  lt_prog_compiler_static='-Bstatic'
39923	  lt_prog_compiler_wl='-Qoption ld '
39924	  ;;
39925	*Sun\ C*)
39926	  # Sun C 5.9
39927	  lt_prog_compiler_pic='-KPIC'
39928	  lt_prog_compiler_static='-Bstatic'
39929	  lt_prog_compiler_wl='-Wl,'
39930	  ;;
39931        *Intel*\ [CF]*Compiler*)
39932	  lt_prog_compiler_wl='-Wl,'
39933	  lt_prog_compiler_pic='-fPIC'
39934	  lt_prog_compiler_static='-static'
39935	  ;;
39936	*Portland\ Group*)
39937	  lt_prog_compiler_wl='-Wl,'
39938	  lt_prog_compiler_pic='-fpic'
39939	  lt_prog_compiler_static='-Bstatic'
39940	  ;;
39941	esac
39942	;;
39943      esac
39944      ;;
39945
39946    newsos6)
39947      lt_prog_compiler_pic='-KPIC'
39948      lt_prog_compiler_static='-Bstatic'
39949      ;;
39950
39951    *nto* | *qnx*)
39952      # QNX uses GNU C++, but need to define -shared option too, otherwise
39953      # it will coredump.
39954      lt_prog_compiler_pic='-fPIC -shared'
39955      ;;
39956
39957    osf3* | osf4* | osf5*)
39958      lt_prog_compiler_wl='-Wl,'
39959      # All OSF/1 code is PIC.
39960      lt_prog_compiler_static='-non_shared'
39961      ;;
39962
39963    rdos*)
39964      lt_prog_compiler_static='-non_shared'
39965      ;;
39966
39967    solaris*)
39968      lt_prog_compiler_pic='-KPIC'
39969      lt_prog_compiler_static='-Bstatic'
39970      case $cc_basename in
39971      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
39972	lt_prog_compiler_wl='-Qoption ld ';;
39973      *)
39974	lt_prog_compiler_wl='-Wl,';;
39975      esac
39976      ;;
39977
39978    sunos4*)
39979      lt_prog_compiler_wl='-Qoption ld '
39980      lt_prog_compiler_pic='-PIC'
39981      lt_prog_compiler_static='-Bstatic'
39982      ;;
39983
39984    sysv4 | sysv4.2uw2* | sysv4.3*)
39985      lt_prog_compiler_wl='-Wl,'
39986      lt_prog_compiler_pic='-KPIC'
39987      lt_prog_compiler_static='-Bstatic'
39988      ;;
39989
39990    sysv4*MP*)
39991      if test -d /usr/nec; then
39992	lt_prog_compiler_pic='-Kconform_pic'
39993	lt_prog_compiler_static='-Bstatic'
39994      fi
39995      ;;
39996
39997    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
39998      lt_prog_compiler_wl='-Wl,'
39999      lt_prog_compiler_pic='-KPIC'
40000      lt_prog_compiler_static='-Bstatic'
40001      ;;
40002
40003    unicos*)
40004      lt_prog_compiler_wl='-Wl,'
40005      lt_prog_compiler_can_build_shared=no
40006      ;;
40007
40008    uts4*)
40009      lt_prog_compiler_pic='-pic'
40010      lt_prog_compiler_static='-Bstatic'
40011      ;;
40012
40013    *)
40014      lt_prog_compiler_can_build_shared=no
40015      ;;
40016    esac
40017  fi
40018
40019case $host_os in
40020  # For platforms that do not support PIC, -DPIC is meaningless:
40021  *djgpp*)
40022    lt_prog_compiler_pic=
40023    ;;
40024  *)
40025    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
40026    ;;
40027esac
40028
40029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
40030$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
40031if ${lt_cv_prog_compiler_pic+:} false; then :
40032  $as_echo_n "(cached) " >&6
40033else
40034  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
40035fi
40036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
40037$as_echo "$lt_cv_prog_compiler_pic" >&6; }
40038lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
40039
40040#
40041# Check to make sure the PIC flag actually works.
40042#
40043if test -n "$lt_prog_compiler_pic"; then
40044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
40045$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
40046if ${lt_cv_prog_compiler_pic_works+:} false; then :
40047  $as_echo_n "(cached) " >&6
40048else
40049  lt_cv_prog_compiler_pic_works=no
40050   ac_outfile=conftest.$ac_objext
40051   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
40052   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
40053   # Insert the option either (1) after the last *FLAGS variable, or
40054   # (2) before a word containing "conftest.", or (3) at the end.
40055   # Note that $ac_compile itself does not contain backslashes and begins
40056   # with a dollar sign (not a hyphen), so the echo should work correctly.
40057   # The option is referenced via a variable to avoid confusing sed.
40058   lt_compile=`echo "$ac_compile" | $SED \
40059   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
40060   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
40061   -e 's:$: $lt_compiler_flag:'`
40062   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
40063   (eval "$lt_compile" 2>conftest.err)
40064   ac_status=$?
40065   cat conftest.err >&5
40066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40067   if (exit $ac_status) && test -s "$ac_outfile"; then
40068     # The compiler can only warn and ignore the option if not recognized
40069     # So say no if there are warnings other than the usual output.
40070     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
40071     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
40072     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
40073       lt_cv_prog_compiler_pic_works=yes
40074     fi
40075   fi
40076   $RM conftest*
40077
40078fi
40079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
40080$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
40081
40082if test yes = "$lt_cv_prog_compiler_pic_works"; then
40083    case $lt_prog_compiler_pic in
40084     "" | " "*) ;;
40085     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
40086     esac
40087else
40088    lt_prog_compiler_pic=
40089     lt_prog_compiler_can_build_shared=no
40090fi
40091
40092fi
40093
40094
40095
40096
40097
40098
40099
40100
40101
40102
40103
40104#
40105# Check to make sure the static flag actually works.
40106#
40107wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
40108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
40109$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
40110if ${lt_cv_prog_compiler_static_works+:} false; then :
40111  $as_echo_n "(cached) " >&6
40112else
40113  lt_cv_prog_compiler_static_works=no
40114   save_LDFLAGS=$LDFLAGS
40115   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
40116   echo "$lt_simple_link_test_code" > conftest.$ac_ext
40117   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
40118     # The linker can only warn and ignore the option if not recognized
40119     # So say no if there are warnings
40120     if test -s conftest.err; then
40121       # Append any errors to the config.log.
40122       cat conftest.err 1>&5
40123       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
40124       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
40125       if diff conftest.exp conftest.er2 >/dev/null; then
40126         lt_cv_prog_compiler_static_works=yes
40127       fi
40128     else
40129       lt_cv_prog_compiler_static_works=yes
40130     fi
40131   fi
40132   $RM -r conftest*
40133   LDFLAGS=$save_LDFLAGS
40134
40135fi
40136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
40137$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
40138
40139if test yes = "$lt_cv_prog_compiler_static_works"; then
40140    :
40141else
40142    lt_prog_compiler_static=
40143fi
40144
40145
40146
40147
40148
40149
40150
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
40152$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
40153if ${lt_cv_prog_compiler_c_o+:} false; then :
40154  $as_echo_n "(cached) " >&6
40155else
40156  lt_cv_prog_compiler_c_o=no
40157   $RM -r conftest 2>/dev/null
40158   mkdir conftest
40159   cd conftest
40160   mkdir out
40161   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
40162
40163   lt_compiler_flag="-o out/conftest2.$ac_objext"
40164   # Insert the option either (1) after the last *FLAGS variable, or
40165   # (2) before a word containing "conftest.", or (3) at the end.
40166   # Note that $ac_compile itself does not contain backslashes and begins
40167   # with a dollar sign (not a hyphen), so the echo should work correctly.
40168   lt_compile=`echo "$ac_compile" | $SED \
40169   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
40170   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
40171   -e 's:$: $lt_compiler_flag:'`
40172   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
40173   (eval "$lt_compile" 2>out/conftest.err)
40174   ac_status=$?
40175   cat out/conftest.err >&5
40176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40177   if (exit $ac_status) && test -s out/conftest2.$ac_objext
40178   then
40179     # The compiler can only warn and ignore the option if not recognized
40180     # So say no if there are warnings
40181     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
40182     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
40183     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
40184       lt_cv_prog_compiler_c_o=yes
40185     fi
40186   fi
40187   chmod u+w . 2>&5
40188   $RM conftest*
40189   # SGI C++ compiler will create directory out/ii_files/ for
40190   # template instantiation
40191   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
40192   $RM out/* && rmdir out
40193   cd ..
40194   $RM -r conftest
40195   $RM conftest*
40196
40197fi
40198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
40199$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
40200
40201
40202
40203
40204
40205
40206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
40207$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
40208if ${lt_cv_prog_compiler_c_o+:} false; then :
40209  $as_echo_n "(cached) " >&6
40210else
40211  lt_cv_prog_compiler_c_o=no
40212   $RM -r conftest 2>/dev/null
40213   mkdir conftest
40214   cd conftest
40215   mkdir out
40216   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
40217
40218   lt_compiler_flag="-o out/conftest2.$ac_objext"
40219   # Insert the option either (1) after the last *FLAGS variable, or
40220   # (2) before a word containing "conftest.", or (3) at the end.
40221   # Note that $ac_compile itself does not contain backslashes and begins
40222   # with a dollar sign (not a hyphen), so the echo should work correctly.
40223   lt_compile=`echo "$ac_compile" | $SED \
40224   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
40225   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
40226   -e 's:$: $lt_compiler_flag:'`
40227   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
40228   (eval "$lt_compile" 2>out/conftest.err)
40229   ac_status=$?
40230   cat out/conftest.err >&5
40231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40232   if (exit $ac_status) && test -s out/conftest2.$ac_objext
40233   then
40234     # The compiler can only warn and ignore the option if not recognized
40235     # So say no if there are warnings
40236     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
40237     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
40238     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
40239       lt_cv_prog_compiler_c_o=yes
40240     fi
40241   fi
40242   chmod u+w . 2>&5
40243   $RM conftest*
40244   # SGI C++ compiler will create directory out/ii_files/ for
40245   # template instantiation
40246   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
40247   $RM out/* && rmdir out
40248   cd ..
40249   $RM -r conftest
40250   $RM conftest*
40251
40252fi
40253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
40254$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
40255
40256
40257
40258
40259hard_links=nottested
40260if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
40261  # do not overwrite the value of need_locks provided by the user
40262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
40263$as_echo_n "checking if we can lock with hard links... " >&6; }
40264  hard_links=yes
40265  $RM conftest*
40266  ln conftest.a conftest.b 2>/dev/null && hard_links=no
40267  touch conftest.a
40268  ln conftest.a conftest.b 2>&5 || hard_links=no
40269  ln conftest.a conftest.b 2>/dev/null && hard_links=no
40270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
40271$as_echo "$hard_links" >&6; }
40272  if test no = "$hard_links"; then
40273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
40274$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
40275    need_locks=warn
40276  fi
40277else
40278  need_locks=no
40279fi
40280
40281
40282
40283
40284
40285
40286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
40287$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
40288
40289  runpath_var=
40290  allow_undefined_flag=
40291  always_export_symbols=no
40292  archive_cmds=
40293  archive_expsym_cmds=
40294  compiler_needs_object=no
40295  enable_shared_with_static_runtimes=no
40296  export_dynamic_flag_spec=
40297  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
40298  hardcode_automatic=no
40299  hardcode_direct=no
40300  hardcode_direct_absolute=no
40301  hardcode_libdir_flag_spec=
40302  hardcode_libdir_separator=
40303  hardcode_minus_L=no
40304  hardcode_shlibpath_var=unsupported
40305  inherit_rpath=no
40306  link_all_deplibs=unknown
40307  module_cmds=
40308  module_expsym_cmds=
40309  old_archive_from_new_cmds=
40310  old_archive_from_expsyms_cmds=
40311  thread_safe_flag_spec=
40312  whole_archive_flag_spec=
40313  # include_expsyms should be a list of space-separated symbols to be *always*
40314  # included in the symbol list
40315  include_expsyms=
40316  # exclude_expsyms can be an extended regexp of symbols to exclude
40317  # it will be wrapped by ' (' and ')$', so one must not match beginning or
40318  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
40319  # as well as any symbol that contains 'd'.
40320  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
40321  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
40322  # platforms (ab)use it in PIC code, but their linkers get confused if
40323  # the symbol is explicitly referenced.  Since portable code cannot
40324  # rely on this symbol name, it's probably fine to never include it in
40325  # preloaded symbol tables.
40326  # Exclude shared library initialization/finalization symbols.
40327  extract_expsyms_cmds=
40328
40329  case $host_os in
40330  cygwin* | mingw* | pw32* | cegcc*)
40331    # FIXME: the MSVC++ port hasn't been tested in a loooong time
40332    # When not using gcc, we currently assume that we are using
40333    # Microsoft Visual C++.
40334    if test yes != "$GCC"; then
40335      with_gnu_ld=no
40336    fi
40337    ;;
40338  interix*)
40339    # we just hope/assume this is gcc and not c89 (= MSVC++)
40340    with_gnu_ld=yes
40341    ;;
40342  openbsd* | bitrig*)
40343    with_gnu_ld=no
40344    ;;
40345  esac
40346
40347  ld_shlibs=yes
40348
40349  # On some targets, GNU ld is compatible enough with the native linker
40350  # that we're better off using the native interface for both.
40351  lt_use_gnu_ld_interface=no
40352  if test yes = "$with_gnu_ld"; then
40353    case $host_os in
40354      aix*)
40355	# The AIX port of GNU ld has always aspired to compatibility
40356	# with the native linker.  However, as the warning in the GNU ld
40357	# block says, versions before 2.19.5* couldn't really create working
40358	# shared libraries, regardless of the interface used.
40359	case `$LD -v 2>&1` in
40360	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
40361	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
40362	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
40363	  *)
40364	    lt_use_gnu_ld_interface=yes
40365	    ;;
40366	esac
40367	;;
40368      *)
40369	lt_use_gnu_ld_interface=yes
40370	;;
40371    esac
40372  fi
40373
40374  if test yes = "$lt_use_gnu_ld_interface"; then
40375    # If archive_cmds runs LD, not CC, wlarc should be empty
40376    wlarc='$wl'
40377
40378    # Set some defaults for GNU ld with shared library support. These
40379    # are reset later if shared libraries are not supported. Putting them
40380    # here allows them to be overridden if necessary.
40381    runpath_var=LD_RUN_PATH
40382    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
40383    export_dynamic_flag_spec='$wl--export-dynamic'
40384    # ancient GNU ld didn't support --whole-archive et. al.
40385    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
40386      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
40387    else
40388      whole_archive_flag_spec=
40389    fi
40390    supports_anon_versioning=no
40391    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
40392      *GNU\ gold*) supports_anon_versioning=yes ;;
40393      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
40394      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
40395      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
40396      *\ 2.11.*) ;; # other 2.11 versions
40397      *) supports_anon_versioning=yes ;;
40398    esac
40399
40400    # See if GNU ld supports shared libraries.
40401    case $host_os in
40402    aix[3-9]*)
40403      # On AIX/PPC, the GNU linker is very broken
40404      if test ia64 != "$host_cpu"; then
40405	ld_shlibs=no
40406	cat <<_LT_EOF 1>&2
40407
40408*** Warning: the GNU linker, at least up to release 2.19, is reported
40409*** to be unable to reliably create shared libraries on AIX.
40410*** Therefore, libtool is disabling shared libraries support.  If you
40411*** really care for shared libraries, you may want to install binutils
40412*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
40413*** You will then need to restart the configuration process.
40414
40415_LT_EOF
40416      fi
40417      ;;
40418
40419    amigaos*)
40420      case $host_cpu in
40421      powerpc)
40422            # see comment about AmigaOS4 .so support
40423            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40424            archive_expsym_cmds=''
40425        ;;
40426      m68k)
40427            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)'
40428            hardcode_libdir_flag_spec='-L$libdir'
40429            hardcode_minus_L=yes
40430        ;;
40431      esac
40432      ;;
40433
40434    beos*)
40435      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
40436	allow_undefined_flag=unsupported
40437	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
40438	# support --undefined.  This deserves some investigation.  FIXME
40439	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40440      else
40441	ld_shlibs=no
40442      fi
40443      ;;
40444
40445    cygwin* | mingw* | pw32* | cegcc*)
40446      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
40447      # as there is no search path for DLLs.
40448      hardcode_libdir_flag_spec='-L$libdir'
40449      export_dynamic_flag_spec='$wl--export-all-symbols'
40450      allow_undefined_flag=unsupported
40451      always_export_symbols=no
40452      enable_shared_with_static_runtimes=yes
40453      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'
40454      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
40455
40456      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
40457        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
40458	# If the export-symbols file already is a .def file, use it as
40459	# is; otherwise, prepend EXPORTS...
40460	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
40461          cp $export_symbols $output_objdir/$soname.def;
40462        else
40463          echo EXPORTS > $output_objdir/$soname.def;
40464          cat $export_symbols >> $output_objdir/$soname.def;
40465        fi~
40466        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
40467      else
40468	ld_shlibs=no
40469      fi
40470      ;;
40471
40472    haiku*)
40473      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40474      link_all_deplibs=yes
40475      ;;
40476
40477    os2*)
40478      hardcode_libdir_flag_spec='-L$libdir'
40479      hardcode_minus_L=yes
40480      allow_undefined_flag=unsupported
40481      shrext_cmds=.dll
40482      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
40483	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
40484	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
40485	$ECHO EXPORTS >> $output_objdir/$libname.def~
40486	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
40487	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
40488	emximp -o $lib $output_objdir/$libname.def'
40489      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
40490	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
40491	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
40492	$ECHO EXPORTS >> $output_objdir/$libname.def~
40493	prefix_cmds="$SED"~
40494	if test EXPORTS = "`$SED 1q $export_symbols`"; then
40495	  prefix_cmds="$prefix_cmds -e 1d";
40496	fi~
40497	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
40498	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
40499	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
40500	emximp -o $lib $output_objdir/$libname.def'
40501      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
40502      enable_shared_with_static_runtimes=yes
40503      ;;
40504
40505    interix[3-9]*)
40506      hardcode_direct=no
40507      hardcode_shlibpath_var=no
40508      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
40509      export_dynamic_flag_spec='$wl-E'
40510      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
40511      # Instead, shared libraries are loaded at an image base (0x10000000 by
40512      # default) and relocated if they conflict, which is a slow very memory
40513      # consuming and fragmenting process.  To avoid this, we pick a random,
40514      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
40515      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
40516      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
40517      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'
40518      ;;
40519
40520    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
40521      tmp_diet=no
40522      if test linux-dietlibc = "$host_os"; then
40523	case $cc_basename in
40524	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
40525	esac
40526      fi
40527      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
40528	 && test no = "$tmp_diet"
40529      then
40530	tmp_addflag=' $pic_flag'
40531	tmp_sharedflag='-shared'
40532	case $cc_basename,$host_cpu in
40533        pgcc*)				# Portland Group C compiler
40534	  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'
40535	  tmp_addflag=' $pic_flag'
40536	  ;;
40537	pgf77* | pgf90* | pgf95* | pgfortran*)
40538					# Portland Group f77 and f90 compilers
40539	  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'
40540	  tmp_addflag=' $pic_flag -Mnomain' ;;
40541	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
40542	  tmp_addflag=' -i_dynamic' ;;
40543	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
40544	  tmp_addflag=' -i_dynamic -nofor_main' ;;
40545	ifc* | ifort*)			# Intel Fortran compiler
40546	  tmp_addflag=' -nofor_main' ;;
40547	lf95*)				# Lahey Fortran 8.1
40548	  whole_archive_flag_spec=
40549	  tmp_sharedflag='--shared' ;;
40550        nagfor*)                        # NAGFOR 5.3
40551          tmp_sharedflag='-Wl,-shared' ;;
40552	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
40553	  tmp_sharedflag='-qmkshrobj'
40554	  tmp_addflag= ;;
40555	nvcc*)	# Cuda Compiler Driver 2.2
40556	  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'
40557	  compiler_needs_object=yes
40558	  ;;
40559	esac
40560	case `$CC -V 2>&1 | sed 5q` in
40561	*Sun\ C*)			# Sun C 5.9
40562	  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'
40563	  compiler_needs_object=yes
40564	  tmp_sharedflag='-G' ;;
40565	*Sun\ F*)			# Sun Fortran 8.3
40566	  tmp_sharedflag='-G' ;;
40567	esac
40568	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40569
40570        if test yes = "$supports_anon_versioning"; then
40571          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
40572            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
40573            echo "local: *; };" >> $output_objdir/$libname.ver~
40574            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
40575        fi
40576
40577	case $cc_basename in
40578	tcc*)
40579	  export_dynamic_flag_spec='-rdynamic'
40580	  ;;
40581	xlf* | bgf* | bgxlf* | mpixlf*)
40582	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
40583	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
40584	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
40585	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
40586	  if test yes = "$supports_anon_versioning"; then
40587	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
40588              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
40589              echo "local: *; };" >> $output_objdir/$libname.ver~
40590              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
40591	  fi
40592	  ;;
40593	esac
40594      else
40595        ld_shlibs=no
40596      fi
40597      ;;
40598
40599    netbsd*)
40600      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
40601	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
40602	wlarc=
40603      else
40604	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40605	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
40606      fi
40607      ;;
40608
40609    solaris*)
40610      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
40611	ld_shlibs=no
40612	cat <<_LT_EOF 1>&2
40613
40614*** Warning: The releases 2.8.* of the GNU linker cannot reliably
40615*** create shared libraries on Solaris systems.  Therefore, libtool
40616*** is disabling shared libraries support.  We urge you to upgrade GNU
40617*** binutils to release 2.9.1 or newer.  Another option is to modify
40618*** your PATH or compiler configuration so that the native linker is
40619*** used, and then restart.
40620
40621_LT_EOF
40622      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
40623	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40624	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
40625      else
40626	ld_shlibs=no
40627      fi
40628      ;;
40629
40630    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
40631      case `$LD -v 2>&1` in
40632        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
40633	ld_shlibs=no
40634	cat <<_LT_EOF 1>&2
40635
40636*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
40637*** reliably create shared libraries on SCO systems.  Therefore, libtool
40638*** is disabling shared libraries support.  We urge you to upgrade GNU
40639*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
40640*** your PATH or compiler configuration so that the native linker is
40641*** used, and then restart.
40642
40643_LT_EOF
40644	;;
40645	*)
40646	  # For security reasons, it is highly recommended that you always
40647	  # use absolute paths for naming shared libraries, and exclude the
40648	  # DT_RUNPATH tag from executables and libraries.  But doing so
40649	  # requires that you compile everything twice, which is a pain.
40650	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
40651	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
40652	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40653	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
40654	  else
40655	    ld_shlibs=no
40656	  fi
40657	;;
40658      esac
40659      ;;
40660
40661    sunos4*)
40662      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
40663      wlarc=
40664      hardcode_direct=yes
40665      hardcode_shlibpath_var=no
40666      ;;
40667
40668    *)
40669      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
40670	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40671	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
40672      else
40673	ld_shlibs=no
40674      fi
40675      ;;
40676    esac
40677
40678    if test no = "$ld_shlibs"; then
40679      runpath_var=
40680      hardcode_libdir_flag_spec=
40681      export_dynamic_flag_spec=
40682      whole_archive_flag_spec=
40683    fi
40684  else
40685    # PORTME fill in a description of your system's linker (not GNU ld)
40686    case $host_os in
40687    aix3*)
40688      allow_undefined_flag=unsupported
40689      always_export_symbols=yes
40690      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'
40691      # Note: this linker hardcodes the directories in LIBPATH if there
40692      # are no directories specified by -L.
40693      hardcode_minus_L=yes
40694      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
40695	# Neither direct hardcoding nor static linking is supported with a
40696	# broken collect2.
40697	hardcode_direct=unsupported
40698      fi
40699      ;;
40700
40701    aix[4-9]*)
40702      if test ia64 = "$host_cpu"; then
40703	# On IA64, the linker does run time linking by default, so we don't
40704	# have to do anything special.
40705	aix_use_runtimelinking=no
40706	exp_sym_flag='-Bexport'
40707	no_entry_flag=
40708      else
40709	# If we're using GNU nm, then we don't want the "-C" option.
40710	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
40711	# Without the "-l" option, or with the "-B" option, AIX nm treats
40712	# weak defined symbols like other global defined symbols, whereas
40713	# GNU nm marks them as "W".
40714	# While the 'weak' keyword is ignored in the Export File, we need
40715	# it in the Import File for the 'aix-soname' feature, so we have
40716	# to replace the "-B" option with "-P" for AIX nm.
40717	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
40718	  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'
40719	else
40720	  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'
40721	fi
40722	aix_use_runtimelinking=no
40723
40724	# Test if we are trying to use run time linking or normal
40725	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
40726	# have runtime linking enabled, and use it for executables.
40727	# For shared libraries, we enable/disable runtime linking
40728	# depending on the kind of the shared library created -
40729	# when "with_aix_soname,aix_use_runtimelinking" is:
40730	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
40731	# "aix,yes"  lib.so          shared, rtl:yes, for executables
40732	#            lib.a           static archive
40733	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
40734	#            lib.a(lib.so.V) shared, rtl:no,  for executables
40735	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
40736	#            lib.a(lib.so.V) shared, rtl:no
40737	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
40738	#            lib.a           static archive
40739	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
40740	  for ld_flag in $LDFLAGS; do
40741	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
40742	    aix_use_runtimelinking=yes
40743	    break
40744	  fi
40745	  done
40746	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
40747	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
40748	    # so we don't have lib.a shared libs to link our executables.
40749	    # We have to force runtime linking in this case.
40750	    aix_use_runtimelinking=yes
40751	    LDFLAGS="$LDFLAGS -Wl,-brtl"
40752	  fi
40753	  ;;
40754	esac
40755
40756	exp_sym_flag='-bexport'
40757	no_entry_flag='-bnoentry'
40758      fi
40759
40760      # When large executables or shared objects are built, AIX ld can
40761      # have problems creating the table of contents.  If linking a library
40762      # or program results in "error TOC overflow" add -mminimal-toc to
40763      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
40764      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
40765
40766      archive_cmds=''
40767      hardcode_direct=yes
40768      hardcode_direct_absolute=yes
40769      hardcode_libdir_separator=':'
40770      link_all_deplibs=yes
40771      file_list_spec='$wl-f,'
40772      case $with_aix_soname,$aix_use_runtimelinking in
40773      aix,*) ;; # traditional, no import file
40774      svr4,* | *,yes) # use import file
40775	# The Import File defines what to hardcode.
40776	hardcode_direct=no
40777	hardcode_direct_absolute=no
40778	;;
40779      esac
40780
40781      if test yes = "$GCC"; then
40782	case $host_os in aix4.[012]|aix4.[012].*)
40783	# We only want to do this on AIX 4.2 and lower, the check
40784	# below for broken collect2 doesn't work under 4.3+
40785	  collect2name=`$CC -print-prog-name=collect2`
40786	  if test -f "$collect2name" &&
40787	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
40788	  then
40789	  # We have reworked collect2
40790	  :
40791	  else
40792	  # We have old collect2
40793	  hardcode_direct=unsupported
40794	  # It fails to find uninstalled libraries when the uninstalled
40795	  # path is not listed in the libpath.  Setting hardcode_minus_L
40796	  # to unsupported forces relinking
40797	  hardcode_minus_L=yes
40798	  hardcode_libdir_flag_spec='-L$libdir'
40799	  hardcode_libdir_separator=
40800	  fi
40801	  ;;
40802	esac
40803	shared_flag='-shared'
40804	if test yes = "$aix_use_runtimelinking"; then
40805	  shared_flag="$shared_flag "'$wl-G'
40806	fi
40807	# Need to ensure runtime linking is disabled for the traditional
40808	# shared library, or the linker may eventually find shared libraries
40809	# /with/ Import File - we do not want to mix them.
40810	shared_flag_aix='-shared'
40811	shared_flag_svr4='-shared $wl-G'
40812      else
40813	# not using gcc
40814	if test ia64 = "$host_cpu"; then
40815	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
40816	# chokes on -Wl,-G. The following line is correct:
40817	  shared_flag='-G'
40818	else
40819	  if test yes = "$aix_use_runtimelinking"; then
40820	    shared_flag='$wl-G'
40821	  else
40822	    shared_flag='$wl-bM:SRE'
40823	  fi
40824	  shared_flag_aix='$wl-bM:SRE'
40825	  shared_flag_svr4='$wl-G'
40826	fi
40827      fi
40828
40829      export_dynamic_flag_spec='$wl-bexpall'
40830      # It seems that -bexpall does not export symbols beginning with
40831      # underscore (_), so it is better to generate a list of symbols to export.
40832      always_export_symbols=yes
40833      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
40834	# Warning - without using the other runtime loading flags (-brtl),
40835	# -berok will link without error, but may produce a broken library.
40836	allow_undefined_flag='-berok'
40837        # Determine the default libpath from the value encoded in an
40838        # empty executable.
40839        if test set = "${lt_cv_aix_libpath+set}"; then
40840  aix_libpath=$lt_cv_aix_libpath
40841else
40842  if ${lt_cv_aix_libpath_+:} false; then :
40843  $as_echo_n "(cached) " >&6
40844else
40845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40846/* end confdefs.h.  */
40847
40848#ifdef F77_DUMMY_MAIN
40849
40850#  ifdef __cplusplus
40851     extern "C"
40852#  endif
40853   int F77_DUMMY_MAIN() { return 1; }
40854
40855#endif
40856int
40857main ()
40858{
40859
40860  ;
40861  return 0;
40862}
40863_ACEOF
40864if ac_fn_c_try_link "$LINENO"; then :
40865
40866  lt_aix_libpath_sed='
40867      /Import File Strings/,/^$/ {
40868	  /^0/ {
40869	      s/^0  *\([^ ]*\) *$/\1/
40870	      p
40871	  }
40872      }'
40873  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
40874  # Check for a 64-bit object if we didn't find anything.
40875  if test -z "$lt_cv_aix_libpath_"; then
40876    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
40877  fi
40878fi
40879rm -f core conftest.err conftest.$ac_objext \
40880    conftest$ac_exeext conftest.$ac_ext
40881  if test -z "$lt_cv_aix_libpath_"; then
40882    lt_cv_aix_libpath_=/usr/lib:/lib
40883  fi
40884
40885fi
40886
40887  aix_libpath=$lt_cv_aix_libpath_
40888fi
40889
40890        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
40891        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
40892      else
40893	if test ia64 = "$host_cpu"; then
40894	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
40895	  allow_undefined_flag="-z nodefs"
40896	  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"
40897	else
40898	 # Determine the default libpath from the value encoded in an
40899	 # empty executable.
40900	 if test set = "${lt_cv_aix_libpath+set}"; then
40901  aix_libpath=$lt_cv_aix_libpath
40902else
40903  if ${lt_cv_aix_libpath_+:} false; then :
40904  $as_echo_n "(cached) " >&6
40905else
40906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40907/* end confdefs.h.  */
40908
40909#ifdef F77_DUMMY_MAIN
40910
40911#  ifdef __cplusplus
40912     extern "C"
40913#  endif
40914   int F77_DUMMY_MAIN() { return 1; }
40915
40916#endif
40917int
40918main ()
40919{
40920
40921  ;
40922  return 0;
40923}
40924_ACEOF
40925if ac_fn_c_try_link "$LINENO"; then :
40926
40927  lt_aix_libpath_sed='
40928      /Import File Strings/,/^$/ {
40929	  /^0/ {
40930	      s/^0  *\([^ ]*\) *$/\1/
40931	      p
40932	  }
40933      }'
40934  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
40935  # Check for a 64-bit object if we didn't find anything.
40936  if test -z "$lt_cv_aix_libpath_"; then
40937    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
40938  fi
40939fi
40940rm -f core conftest.err conftest.$ac_objext \
40941    conftest$ac_exeext conftest.$ac_ext
40942  if test -z "$lt_cv_aix_libpath_"; then
40943    lt_cv_aix_libpath_=/usr/lib:/lib
40944  fi
40945
40946fi
40947
40948  aix_libpath=$lt_cv_aix_libpath_
40949fi
40950
40951	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
40952	  # Warning - without using the other run time loading flags,
40953	  # -berok will link without error, but may produce a broken library.
40954	  no_undefined_flag=' $wl-bernotok'
40955	  allow_undefined_flag=' $wl-berok'
40956	  if test yes = "$with_gnu_ld"; then
40957	    # We only use this code for GNU lds that support --whole-archive.
40958	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
40959	  else
40960	    # Exported symbols can be pulled into shared objects from archives
40961	    whole_archive_flag_spec='$convenience'
40962	  fi
40963	  archive_cmds_need_lc=yes
40964	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
40965	  # -brtl affects multiple linker settings, -berok does not and is overridden later
40966	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
40967	  if test svr4 != "$with_aix_soname"; then
40968	    # This is similar to how AIX traditionally builds its shared libraries.
40969	    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'
40970	  fi
40971	  if test aix != "$with_aix_soname"; then
40972	    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'
40973	  else
40974	    # used by -dlpreopen to get the symbols
40975	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
40976	  fi
40977	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
40978	fi
40979      fi
40980      ;;
40981
40982    amigaos*)
40983      case $host_cpu in
40984      powerpc)
40985            # see comment about AmigaOS4 .so support
40986            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
40987            archive_expsym_cmds=''
40988        ;;
40989      m68k)
40990            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)'
40991            hardcode_libdir_flag_spec='-L$libdir'
40992            hardcode_minus_L=yes
40993        ;;
40994      esac
40995      ;;
40996
40997    bsdi[45]*)
40998      export_dynamic_flag_spec=-rdynamic
40999      ;;
41000
41001    cygwin* | mingw* | pw32* | cegcc*)
41002      # When not using gcc, we currently assume that we are using
41003      # Microsoft Visual C++.
41004      # hardcode_libdir_flag_spec is actually meaningless, as there is
41005      # no search path for DLLs.
41006      case $cc_basename in
41007      cl*)
41008	# Native MSVC
41009	hardcode_libdir_flag_spec=' '
41010	allow_undefined_flag=unsupported
41011	always_export_symbols=yes
41012	file_list_spec='@'
41013	# Tell ltmain to make .lib files, not .a files.
41014	libext=lib
41015	# Tell ltmain to make .dll files, not .so files.
41016	shrext_cmds=.dll
41017	# FIXME: Setting linknames here is a bad hack.
41018	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
41019	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
41020            cp "$export_symbols" "$output_objdir/$soname.def";
41021            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
41022          else
41023            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
41024          fi~
41025          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
41026          linknames='
41027	# The linker will not automatically build a static lib if we build a DLL.
41028	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
41029	enable_shared_with_static_runtimes=yes
41030	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
41031	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
41032	# Don't use ranlib
41033	old_postinstall_cmds='chmod 644 $oldlib'
41034	postlink_cmds='lt_outputfile="@OUTPUT@"~
41035          lt_tool_outputfile="@TOOL_OUTPUT@"~
41036          case $lt_outputfile in
41037            *.exe|*.EXE) ;;
41038            *)
41039              lt_outputfile=$lt_outputfile.exe
41040              lt_tool_outputfile=$lt_tool_outputfile.exe
41041              ;;
41042          esac~
41043          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
41044            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
41045            $RM "$lt_outputfile.manifest";
41046          fi'
41047	;;
41048      *)
41049	# Assume MSVC wrapper
41050	hardcode_libdir_flag_spec=' '
41051	allow_undefined_flag=unsupported
41052	# Tell ltmain to make .lib files, not .a files.
41053	libext=lib
41054	# Tell ltmain to make .dll files, not .so files.
41055	shrext_cmds=.dll
41056	# FIXME: Setting linknames here is a bad hack.
41057	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
41058	# The linker will automatically build a .lib file if we build a DLL.
41059	old_archive_from_new_cmds='true'
41060	# FIXME: Should let the user specify the lib program.
41061	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
41062	enable_shared_with_static_runtimes=yes
41063	;;
41064      esac
41065      ;;
41066
41067    darwin* | rhapsody*)
41068
41069
41070  archive_cmds_need_lc=no
41071  hardcode_direct=no
41072  hardcode_automatic=yes
41073  hardcode_shlibpath_var=unsupported
41074  if test yes = "$lt_cv_ld_force_load"; then
41075    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\"`'
41076
41077  else
41078    whole_archive_flag_spec=''
41079  fi
41080  link_all_deplibs=yes
41081  allow_undefined_flag=$_lt_dar_allow_undefined
41082  case $cc_basename in
41083     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
41084     *) _lt_dar_can_shared=$GCC ;;
41085  esac
41086  if test yes = "$_lt_dar_can_shared"; then
41087    output_verbose_link_cmd=func_echo_all
41088    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
41089    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
41090    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"
41091    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"
41092
41093  else
41094  ld_shlibs=no
41095  fi
41096
41097      ;;
41098
41099    dgux*)
41100      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41101      hardcode_libdir_flag_spec='-L$libdir'
41102      hardcode_shlibpath_var=no
41103      ;;
41104
41105    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
41106    # support.  Future versions do this automatically, but an explicit c++rt0.o
41107    # does not break anything, and helps significantly (at the cost of a little
41108    # extra space).
41109    freebsd2.2*)
41110      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
41111      hardcode_libdir_flag_spec='-R$libdir'
41112      hardcode_direct=yes
41113      hardcode_shlibpath_var=no
41114      ;;
41115
41116    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
41117    freebsd2.*)
41118      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
41119      hardcode_direct=yes
41120      hardcode_minus_L=yes
41121      hardcode_shlibpath_var=no
41122      ;;
41123
41124    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
41125    freebsd* | dragonfly*)
41126      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
41127      hardcode_libdir_flag_spec='-R$libdir'
41128      hardcode_direct=yes
41129      hardcode_shlibpath_var=no
41130      ;;
41131
41132    hpux9*)
41133      if test yes = "$GCC"; then
41134	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'
41135      else
41136	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'
41137      fi
41138      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
41139      hardcode_libdir_separator=:
41140      hardcode_direct=yes
41141
41142      # hardcode_minus_L: Not really in the search PATH,
41143      # but as the default location of the library.
41144      hardcode_minus_L=yes
41145      export_dynamic_flag_spec='$wl-E'
41146      ;;
41147
41148    hpux10*)
41149      if test yes,no = "$GCC,$with_gnu_ld"; then
41150	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
41151      else
41152	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
41153      fi
41154      if test no = "$with_gnu_ld"; then
41155	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
41156	hardcode_libdir_separator=:
41157	hardcode_direct=yes
41158	hardcode_direct_absolute=yes
41159	export_dynamic_flag_spec='$wl-E'
41160	# hardcode_minus_L: Not really in the search PATH,
41161	# but as the default location of the library.
41162	hardcode_minus_L=yes
41163      fi
41164      ;;
41165
41166    hpux11*)
41167      if test yes,no = "$GCC,$with_gnu_ld"; then
41168	case $host_cpu in
41169	hppa*64*)
41170	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
41171	  ;;
41172	ia64*)
41173	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
41174	  ;;
41175	*)
41176	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
41177	  ;;
41178	esac
41179      else
41180	case $host_cpu in
41181	hppa*64*)
41182	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
41183	  ;;
41184	ia64*)
41185	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
41186	  ;;
41187	*)
41188
41189	  # Older versions of the 11.00 compiler do not understand -b yet
41190	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
41191	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
41192$as_echo_n "checking if $CC understands -b... " >&6; }
41193if ${lt_cv_prog_compiler__b+:} false; then :
41194  $as_echo_n "(cached) " >&6
41195else
41196  lt_cv_prog_compiler__b=no
41197   save_LDFLAGS=$LDFLAGS
41198   LDFLAGS="$LDFLAGS -b"
41199   echo "$lt_simple_link_test_code" > conftest.$ac_ext
41200   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
41201     # The linker can only warn and ignore the option if not recognized
41202     # So say no if there are warnings
41203     if test -s conftest.err; then
41204       # Append any errors to the config.log.
41205       cat conftest.err 1>&5
41206       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
41207       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
41208       if diff conftest.exp conftest.er2 >/dev/null; then
41209         lt_cv_prog_compiler__b=yes
41210       fi
41211     else
41212       lt_cv_prog_compiler__b=yes
41213     fi
41214   fi
41215   $RM -r conftest*
41216   LDFLAGS=$save_LDFLAGS
41217
41218fi
41219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
41220$as_echo "$lt_cv_prog_compiler__b" >&6; }
41221
41222if test yes = "$lt_cv_prog_compiler__b"; then
41223    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
41224else
41225    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
41226fi
41227
41228	  ;;
41229	esac
41230      fi
41231      if test no = "$with_gnu_ld"; then
41232	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
41233	hardcode_libdir_separator=:
41234
41235	case $host_cpu in
41236	hppa*64*|ia64*)
41237	  hardcode_direct=no
41238	  hardcode_shlibpath_var=no
41239	  ;;
41240	*)
41241	  hardcode_direct=yes
41242	  hardcode_direct_absolute=yes
41243	  export_dynamic_flag_spec='$wl-E'
41244
41245	  # hardcode_minus_L: Not really in the search PATH,
41246	  # but as the default location of the library.
41247	  hardcode_minus_L=yes
41248	  ;;
41249	esac
41250      fi
41251      ;;
41252
41253    irix5* | irix6* | nonstopux*)
41254      if test yes = "$GCC"; then
41255	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'
41256	# Try to use the -exported_symbol ld option, if it does not
41257	# work, assume that -exports_file does not work either and
41258	# implicitly export all symbols.
41259	# This should be the same for all languages, so no per-tag cache variable.
41260	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
41261$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
41262if ${lt_cv_irix_exported_symbol+:} false; then :
41263  $as_echo_n "(cached) " >&6
41264else
41265  save_LDFLAGS=$LDFLAGS
41266	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
41267	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41268/* end confdefs.h.  */
41269int foo (void) { return 0; }
41270_ACEOF
41271if ac_fn_c_try_link "$LINENO"; then :
41272  lt_cv_irix_exported_symbol=yes
41273else
41274  lt_cv_irix_exported_symbol=no
41275fi
41276rm -f core conftest.err conftest.$ac_objext \
41277    conftest$ac_exeext conftest.$ac_ext
41278           LDFLAGS=$save_LDFLAGS
41279fi
41280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
41281$as_echo "$lt_cv_irix_exported_symbol" >&6; }
41282	if test yes = "$lt_cv_irix_exported_symbol"; then
41283          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'
41284	fi
41285      else
41286	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'
41287	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'
41288      fi
41289      archive_cmds_need_lc='no'
41290      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
41291      hardcode_libdir_separator=:
41292      inherit_rpath=yes
41293      link_all_deplibs=yes
41294      ;;
41295
41296    linux*)
41297      case $cc_basename in
41298      tcc*)
41299	# Fabrice Bellard et al's Tiny C Compiler
41300	ld_shlibs=yes
41301	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
41302	;;
41303      esac
41304      ;;
41305
41306    netbsd*)
41307      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
41308	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
41309      else
41310	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
41311      fi
41312      hardcode_libdir_flag_spec='-R$libdir'
41313      hardcode_direct=yes
41314      hardcode_shlibpath_var=no
41315      ;;
41316
41317    newsos6)
41318      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41319      hardcode_direct=yes
41320      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
41321      hardcode_libdir_separator=:
41322      hardcode_shlibpath_var=no
41323      ;;
41324
41325    *nto* | *qnx*)
41326      ;;
41327
41328    openbsd* | bitrig*)
41329      if test -f /usr/libexec/ld.so; then
41330	hardcode_direct=yes
41331	hardcode_shlibpath_var=no
41332	hardcode_direct_absolute=yes
41333	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
41334	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
41335	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
41336	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
41337	  export_dynamic_flag_spec='$wl-E'
41338	else
41339	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
41340	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
41341	fi
41342      else
41343	ld_shlibs=no
41344      fi
41345      ;;
41346
41347    os2*)
41348      hardcode_libdir_flag_spec='-L$libdir'
41349      hardcode_minus_L=yes
41350      allow_undefined_flag=unsupported
41351      shrext_cmds=.dll
41352      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
41353	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
41354	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
41355	$ECHO EXPORTS >> $output_objdir/$libname.def~
41356	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
41357	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
41358	emximp -o $lib $output_objdir/$libname.def'
41359      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
41360	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
41361	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
41362	$ECHO EXPORTS >> $output_objdir/$libname.def~
41363	prefix_cmds="$SED"~
41364	if test EXPORTS = "`$SED 1q $export_symbols`"; then
41365	  prefix_cmds="$prefix_cmds -e 1d";
41366	fi~
41367	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
41368	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
41369	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
41370	emximp -o $lib $output_objdir/$libname.def'
41371      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
41372      enable_shared_with_static_runtimes=yes
41373      ;;
41374
41375    osf3*)
41376      if test yes = "$GCC"; then
41377	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
41378	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'
41379      else
41380	allow_undefined_flag=' -expect_unresolved \*'
41381	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'
41382      fi
41383      archive_cmds_need_lc='no'
41384      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
41385      hardcode_libdir_separator=:
41386      ;;
41387
41388    osf4* | osf5*)	# as osf3* with the addition of -msym flag
41389      if test yes = "$GCC"; then
41390	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
41391	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'
41392	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
41393      else
41394	allow_undefined_flag=' -expect_unresolved \*'
41395	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'
41396	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~
41397          $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'
41398
41399	# Both c and cxx compiler support -rpath directly
41400	hardcode_libdir_flag_spec='-rpath $libdir'
41401      fi
41402      archive_cmds_need_lc='no'
41403      hardcode_libdir_separator=:
41404      ;;
41405
41406    solaris*)
41407      no_undefined_flag=' -z defs'
41408      if test yes = "$GCC"; then
41409	wlarc='$wl'
41410	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
41411	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
41412          $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'
41413      else
41414	case `$CC -V 2>&1` in
41415	*"Compilers 5.0"*)
41416	  wlarc=''
41417	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
41418	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
41419            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
41420	  ;;
41421	*)
41422	  wlarc='$wl'
41423	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
41424	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
41425            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
41426	  ;;
41427	esac
41428      fi
41429      hardcode_libdir_flag_spec='-R$libdir'
41430      hardcode_shlibpath_var=no
41431      case $host_os in
41432      solaris2.[0-5] | solaris2.[0-5].*) ;;
41433      *)
41434	# The compiler driver will combine and reorder linker options,
41435	# but understands '-z linker_flag'.  GCC discards it without '$wl',
41436	# but is careful enough not to reorder.
41437	# Supported since Solaris 2.6 (maybe 2.5.1?)
41438	if test yes = "$GCC"; then
41439	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
41440	else
41441	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
41442	fi
41443	;;
41444      esac
41445      link_all_deplibs=yes
41446      ;;
41447
41448    sunos4*)
41449      if test sequent = "$host_vendor"; then
41450	# Use $CC to link under sequent, because it throws in some extra .o
41451	# files that make .init and .fini sections work.
41452	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
41453      else
41454	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
41455      fi
41456      hardcode_libdir_flag_spec='-L$libdir'
41457      hardcode_direct=yes
41458      hardcode_minus_L=yes
41459      hardcode_shlibpath_var=no
41460      ;;
41461
41462    sysv4)
41463      case $host_vendor in
41464	sni)
41465	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41466	  hardcode_direct=yes # is this really true???
41467	;;
41468	siemens)
41469	  ## LD is ld it makes a PLAMLIB
41470	  ## CC just makes a GrossModule.
41471	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
41472	  reload_cmds='$CC -r -o $output$reload_objs'
41473	  hardcode_direct=no
41474        ;;
41475	motorola)
41476	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41477	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
41478	;;
41479      esac
41480      runpath_var='LD_RUN_PATH'
41481      hardcode_shlibpath_var=no
41482      ;;
41483
41484    sysv4.3*)
41485      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41486      hardcode_shlibpath_var=no
41487      export_dynamic_flag_spec='-Bexport'
41488      ;;
41489
41490    sysv4*MP*)
41491      if test -d /usr/nec; then
41492	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41493	hardcode_shlibpath_var=no
41494	runpath_var=LD_RUN_PATH
41495	hardcode_runpath_var=yes
41496	ld_shlibs=yes
41497      fi
41498      ;;
41499
41500    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
41501      no_undefined_flag='$wl-z,text'
41502      archive_cmds_need_lc=no
41503      hardcode_shlibpath_var=no
41504      runpath_var='LD_RUN_PATH'
41505
41506      if test yes = "$GCC"; then
41507	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41508	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41509      else
41510	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41511	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41512      fi
41513      ;;
41514
41515    sysv5* | sco3.2v5* | sco5v6*)
41516      # Note: We CANNOT use -z defs as we might desire, because we do not
41517      # link with -lc, and that would cause any symbols used from libc to
41518      # always be unresolved, which means just about no library would
41519      # ever link correctly.  If we're not using GNU ld we use -z text
41520      # though, which does catch some bad symbols but isn't as heavy-handed
41521      # as -z defs.
41522      no_undefined_flag='$wl-z,text'
41523      allow_undefined_flag='$wl-z,nodefs'
41524      archive_cmds_need_lc=no
41525      hardcode_shlibpath_var=no
41526      hardcode_libdir_flag_spec='$wl-R,$libdir'
41527      hardcode_libdir_separator=':'
41528      link_all_deplibs=yes
41529      export_dynamic_flag_spec='$wl-Bexport'
41530      runpath_var='LD_RUN_PATH'
41531
41532      if test yes = "$GCC"; then
41533	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41534	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41535      else
41536	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41537	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
41538      fi
41539      ;;
41540
41541    uts4*)
41542      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
41543      hardcode_libdir_flag_spec='-L$libdir'
41544      hardcode_shlibpath_var=no
41545      ;;
41546
41547    *)
41548      ld_shlibs=no
41549      ;;
41550    esac
41551
41552    if test sni = "$host_vendor"; then
41553      case $host in
41554      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
41555	export_dynamic_flag_spec='$wl-Blargedynsym'
41556	;;
41557      esac
41558    fi
41559  fi
41560
41561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
41562$as_echo "$ld_shlibs" >&6; }
41563test no = "$ld_shlibs" && can_build_shared=no
41564
41565with_gnu_ld=$with_gnu_ld
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581#
41582# Do we need to explicitly link libc?
41583#
41584case "x$archive_cmds_need_lc" in
41585x|xyes)
41586  # Assume -lc should be added
41587  archive_cmds_need_lc=yes
41588
41589  if test yes,yes = "$GCC,$enable_shared"; then
41590    case $archive_cmds in
41591    *'~'*)
41592      # FIXME: we may have to deal with multi-command sequences.
41593      ;;
41594    '$CC '*)
41595      # Test whether the compiler implicitly links with -lc since on some
41596      # systems, -lgcc has to come before -lc. If gcc already passes -lc
41597      # to ld, don't add -lc before -lgcc.
41598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
41599$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
41600if ${lt_cv_archive_cmds_need_lc+:} false; then :
41601  $as_echo_n "(cached) " >&6
41602else
41603  $RM conftest*
41604	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
41605
41606	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
41607  (eval $ac_compile) 2>&5
41608  ac_status=$?
41609  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41610  test $ac_status = 0; } 2>conftest.err; then
41611	  soname=conftest
41612	  lib=conftest
41613	  libobjs=conftest.$ac_objext
41614	  deplibs=
41615	  wl=$lt_prog_compiler_wl
41616	  pic_flag=$lt_prog_compiler_pic
41617	  compiler_flags=-v
41618	  linker_flags=-v
41619	  verstring=
41620	  output_objdir=.
41621	  libname=conftest
41622	  lt_save_allow_undefined_flag=$allow_undefined_flag
41623	  allow_undefined_flag=
41624	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
41625  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
41626  ac_status=$?
41627  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41628  test $ac_status = 0; }
41629	  then
41630	    lt_cv_archive_cmds_need_lc=no
41631	  else
41632	    lt_cv_archive_cmds_need_lc=yes
41633	  fi
41634	  allow_undefined_flag=$lt_save_allow_undefined_flag
41635	else
41636	  cat conftest.err 1>&5
41637	fi
41638	$RM conftest*
41639
41640fi
41641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
41642$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
41643      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
41644      ;;
41645    esac
41646  fi
41647  ;;
41648esac
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
41802$as_echo_n "checking dynamic linker characteristics... " >&6; }
41803
41804if test yes = "$GCC"; then
41805  case $host_os in
41806    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
41807    *) lt_awk_arg='/^libraries:/' ;;
41808  esac
41809  case $host_os in
41810    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
41811    *) lt_sed_strip_eq='s|=/|/|g' ;;
41812  esac
41813  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
41814  case $lt_search_path_spec in
41815  *\;*)
41816    # if the path contains ";" then we assume it to be the separator
41817    # otherwise default to the standard path separator (i.e. ":") - it is
41818    # assumed that no part of a normal pathname contains ";" but that should
41819    # okay in the real world where ";" in dirpaths is itself problematic.
41820    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
41821    ;;
41822  *)
41823    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
41824    ;;
41825  esac
41826  # Ok, now we have the path, separated by spaces, we can step through it
41827  # and add multilib dir if necessary...
41828  lt_tmp_lt_search_path_spec=
41829  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
41830  # ...but if some path component already ends with the multilib dir we assume
41831  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
41832  case "$lt_multi_os_dir; $lt_search_path_spec " in
41833  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
41834    lt_multi_os_dir=
41835    ;;
41836  esac
41837  for lt_sys_path in $lt_search_path_spec; do
41838    if test -d "$lt_sys_path$lt_multi_os_dir"; then
41839      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
41840    elif test -n "$lt_multi_os_dir"; then
41841      test -d "$lt_sys_path" && \
41842	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
41843    fi
41844  done
41845  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
41846BEGIN {RS = " "; FS = "/|\n";} {
41847  lt_foo = "";
41848  lt_count = 0;
41849  for (lt_i = NF; lt_i > 0; lt_i--) {
41850    if ($lt_i != "" && $lt_i != ".") {
41851      if ($lt_i == "..") {
41852        lt_count++;
41853      } else {
41854        if (lt_count == 0) {
41855          lt_foo = "/" $lt_i lt_foo;
41856        } else {
41857          lt_count--;
41858        }
41859      }
41860    }
41861  }
41862  if (lt_foo != "") { lt_freq[lt_foo]++; }
41863  if (lt_freq[lt_foo] == 1) { print lt_foo; }
41864}'`
41865  # AWK program above erroneously prepends '/' to C:/dos/paths
41866  # for these hosts.
41867  case $host_os in
41868    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
41869      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
41870  esac
41871  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
41872else
41873  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
41874fi
41875library_names_spec=
41876libname_spec='lib$name'
41877soname_spec=
41878shrext_cmds=.so
41879postinstall_cmds=
41880postuninstall_cmds=
41881finish_cmds=
41882finish_eval=
41883shlibpath_var=
41884shlibpath_overrides_runpath=unknown
41885version_type=none
41886dynamic_linker="$host_os ld.so"
41887sys_lib_dlsearch_path_spec="/lib /usr/lib"
41888need_lib_prefix=unknown
41889hardcode_into_libs=no
41890
41891# when you set need_version to no, make sure it does not cause -set_version
41892# flags to be left without arguments
41893need_version=unknown
41894
41895
41896
41897case $host_os in
41898aix3*)
41899  version_type=linux # correct to gnu/linux during the next big refactor
41900  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
41901  shlibpath_var=LIBPATH
41902
41903  # AIX 3 has no versioning support, so we append a major version to the name.
41904  soname_spec='$libname$release$shared_ext$major'
41905  ;;
41906
41907aix[4-9]*)
41908  version_type=linux # correct to gnu/linux during the next big refactor
41909  need_lib_prefix=no
41910  need_version=no
41911  hardcode_into_libs=yes
41912  if test ia64 = "$host_cpu"; then
41913    # AIX 5 supports IA64
41914    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
41915    shlibpath_var=LD_LIBRARY_PATH
41916  else
41917    # With GCC up to 2.95.x, collect2 would create an import file
41918    # for dependence libraries.  The import file would start with
41919    # the line '#! .'.  This would cause the generated library to
41920    # depend on '.', always an invalid library.  This was fixed in
41921    # development snapshots of GCC prior to 3.0.
41922    case $host_os in
41923      aix4 | aix4.[01] | aix4.[01].*)
41924      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
41925	   echo ' yes '
41926	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
41927	:
41928      else
41929	can_build_shared=no
41930      fi
41931      ;;
41932    esac
41933    # Using Import Files as archive members, it is possible to support
41934    # filename-based versioning of shared library archives on AIX. While
41935    # this would work for both with and without runtime linking, it will
41936    # prevent static linking of such archives. So we do filename-based
41937    # shared library versioning with .so extension only, which is used
41938    # when both runtime linking and shared linking is enabled.
41939    # Unfortunately, runtime linking may impact performance, so we do
41940    # not want this to be the default eventually. Also, we use the
41941    # versioned .so libs for executables only if there is the -brtl
41942    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
41943    # To allow for filename-based versioning support, we need to create
41944    # libNAME.so.V as an archive file, containing:
41945    # *) an Import File, referring to the versioned filename of the
41946    #    archive as well as the shared archive member, telling the
41947    #    bitwidth (32 or 64) of that shared object, and providing the
41948    #    list of exported symbols of that shared object, eventually
41949    #    decorated with the 'weak' keyword
41950    # *) the shared object with the F_LOADONLY flag set, to really avoid
41951    #    it being seen by the linker.
41952    # At run time we better use the real file rather than another symlink,
41953    # but for link time we create the symlink libNAME.so -> libNAME.so.V
41954
41955    case $with_aix_soname,$aix_use_runtimelinking in
41956    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
41957    # soname into executable. Probably we can add versioning support to
41958    # collect2, so additional links can be useful in future.
41959    aix,yes) # traditional libtool
41960      dynamic_linker='AIX unversionable lib.so'
41961      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
41962      # instead of lib<name>.a to let people know that these are not
41963      # typical AIX shared libraries.
41964      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
41965      ;;
41966    aix,no) # traditional AIX only
41967      dynamic_linker='AIX lib.a(lib.so.V)'
41968      # We preserve .a as extension for shared libraries through AIX4.2
41969      # and later when we are not doing run time linking.
41970      library_names_spec='$libname$release.a $libname.a'
41971      soname_spec='$libname$release$shared_ext$major'
41972      ;;
41973    svr4,*) # full svr4 only
41974      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
41975      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
41976      # We do not specify a path in Import Files, so LIBPATH fires.
41977      shlibpath_overrides_runpath=yes
41978      ;;
41979    *,yes) # both, prefer svr4
41980      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
41981      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
41982      # unpreferred sharedlib libNAME.a needs extra handling
41983      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"'
41984      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"'
41985      # We do not specify a path in Import Files, so LIBPATH fires.
41986      shlibpath_overrides_runpath=yes
41987      ;;
41988    *,no) # both, prefer aix
41989      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
41990      library_names_spec='$libname$release.a $libname.a'
41991      soname_spec='$libname$release$shared_ext$major'
41992      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
41993      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)'
41994      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"'
41995      ;;
41996    esac
41997    shlibpath_var=LIBPATH
41998  fi
41999  ;;
42000
42001amigaos*)
42002  case $host_cpu in
42003  powerpc)
42004    # Since July 2007 AmigaOS4 officially supports .so libraries.
42005    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
42006    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42007    ;;
42008  m68k)
42009    library_names_spec='$libname.ixlibrary $libname.a'
42010    # Create ${libname}_ixlibrary.a entries in /sys/libs.
42011    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'
42012    ;;
42013  esac
42014  ;;
42015
42016beos*)
42017  library_names_spec='$libname$shared_ext'
42018  dynamic_linker="$host_os ld.so"
42019  shlibpath_var=LIBRARY_PATH
42020  ;;
42021
42022bsdi[45]*)
42023  version_type=linux # correct to gnu/linux during the next big refactor
42024  need_version=no
42025  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42026  soname_spec='$libname$release$shared_ext$major'
42027  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
42028  shlibpath_var=LD_LIBRARY_PATH
42029  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
42030  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
42031  # the default ld.so.conf also contains /usr/contrib/lib and
42032  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
42033  # libtool to hard-code these into programs
42034  ;;
42035
42036cygwin* | mingw* | pw32* | cegcc*)
42037  version_type=windows
42038  shrext_cmds=.dll
42039  need_version=no
42040  need_lib_prefix=no
42041
42042  case $GCC,$cc_basename in
42043  yes,*)
42044    # gcc
42045    library_names_spec='$libname.dll.a'
42046    # DLL is installed to $(libdir)/../bin by postinstall_cmds
42047    postinstall_cmds='base_file=`basename \$file`~
42048      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
42049      dldir=$destdir/`dirname \$dlpath`~
42050      test -d \$dldir || mkdir -p \$dldir~
42051      $install_prog $dir/$dlname \$dldir/$dlname~
42052      chmod a+x \$dldir/$dlname~
42053      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
42054        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
42055      fi'
42056    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
42057      dlpath=$dir/\$dldll~
42058       $RM \$dlpath'
42059    shlibpath_overrides_runpath=yes
42060
42061    case $host_os in
42062    cygwin*)
42063      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
42064      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
42065
42066      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
42067      ;;
42068    mingw* | cegcc*)
42069      # MinGW DLLs use traditional 'lib' prefix
42070      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
42071      ;;
42072    pw32*)
42073      # pw32 DLLs use 'pw' prefix rather than 'lib'
42074      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
42075      ;;
42076    esac
42077    dynamic_linker='Win32 ld.exe'
42078    ;;
42079
42080  *,cl*)
42081    # Native MSVC
42082    libname_spec='$name'
42083    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
42084    library_names_spec='$libname.dll.lib'
42085
42086    case $build_os in
42087    mingw*)
42088      sys_lib_search_path_spec=
42089      lt_save_ifs=$IFS
42090      IFS=';'
42091      for lt_path in $LIB
42092      do
42093        IFS=$lt_save_ifs
42094        # Let DOS variable expansion print the short 8.3 style file name.
42095        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
42096        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
42097      done
42098      IFS=$lt_save_ifs
42099      # Convert to MSYS style.
42100      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
42101      ;;
42102    cygwin*)
42103      # Convert to unix form, then to dos form, then back to unix form
42104      # but this time dos style (no spaces!) so that the unix form looks
42105      # like /cygdrive/c/PROGRA~1:/cygdr...
42106      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
42107      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
42108      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
42109      ;;
42110    *)
42111      sys_lib_search_path_spec=$LIB
42112      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
42113        # It is most probably a Windows format PATH.
42114        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
42115      else
42116        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
42117      fi
42118      # FIXME: find the short name or the path components, as spaces are
42119      # common. (e.g. "Program Files" -> "PROGRA~1")
42120      ;;
42121    esac
42122
42123    # DLL is installed to $(libdir)/../bin by postinstall_cmds
42124    postinstall_cmds='base_file=`basename \$file`~
42125      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
42126      dldir=$destdir/`dirname \$dlpath`~
42127      test -d \$dldir || mkdir -p \$dldir~
42128      $install_prog $dir/$dlname \$dldir/$dlname'
42129    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
42130      dlpath=$dir/\$dldll~
42131       $RM \$dlpath'
42132    shlibpath_overrides_runpath=yes
42133    dynamic_linker='Win32 link.exe'
42134    ;;
42135
42136  *)
42137    # Assume MSVC wrapper
42138    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
42139    dynamic_linker='Win32 ld.exe'
42140    ;;
42141  esac
42142  # FIXME: first we should search . and the directory the executable is in
42143  shlibpath_var=PATH
42144  ;;
42145
42146darwin* | rhapsody*)
42147  dynamic_linker="$host_os dyld"
42148  version_type=darwin
42149  need_lib_prefix=no
42150  need_version=no
42151  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
42152  soname_spec='$libname$release$major$shared_ext'
42153  shlibpath_overrides_runpath=yes
42154  shlibpath_var=DYLD_LIBRARY_PATH
42155  shrext_cmds=`test .$module = .yes && echo .so || echo .dylib`
42156
42157  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
42158  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
42159  ;;
42160
42161dgux*)
42162  version_type=linux # correct to gnu/linux during the next big refactor
42163  need_lib_prefix=no
42164  need_version=no
42165  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42166  soname_spec='$libname$release$shared_ext$major'
42167  shlibpath_var=LD_LIBRARY_PATH
42168  ;;
42169
42170freebsd* | dragonfly*)
42171  # DragonFly does not have aout.  When/if they implement a new
42172  # versioning mechanism, adjust this.
42173  if test -x /usr/bin/objformat; then
42174    objformat=`/usr/bin/objformat`
42175  else
42176    case $host_os in
42177    freebsd[23].*) objformat=aout ;;
42178    *) objformat=elf ;;
42179    esac
42180  fi
42181  version_type=freebsd-$objformat
42182  case $version_type in
42183    freebsd-elf*)
42184      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42185      soname_spec='$libname$release$shared_ext$major'
42186      need_version=no
42187      need_lib_prefix=no
42188      ;;
42189    freebsd-*)
42190      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
42191      need_version=yes
42192      ;;
42193  esac
42194  shlibpath_var=LD_LIBRARY_PATH
42195  case $host_os in
42196  freebsd2.*)
42197    shlibpath_overrides_runpath=yes
42198    ;;
42199  freebsd3.[01]* | freebsdelf3.[01]*)
42200    shlibpath_overrides_runpath=yes
42201    hardcode_into_libs=yes
42202    ;;
42203  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
42204  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
42205    shlibpath_overrides_runpath=no
42206    hardcode_into_libs=yes
42207    ;;
42208  *) # from 4.6 on, and DragonFly
42209    shlibpath_overrides_runpath=yes
42210    hardcode_into_libs=yes
42211    ;;
42212  esac
42213  ;;
42214
42215haiku*)
42216  version_type=linux # correct to gnu/linux during the next big refactor
42217  need_lib_prefix=no
42218  need_version=no
42219  dynamic_linker="$host_os runtime_loader"
42220  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42221  soname_spec='$libname$release$shared_ext$major'
42222  shlibpath_var=LIBRARY_PATH
42223  shlibpath_overrides_runpath=no
42224  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
42225  hardcode_into_libs=yes
42226  ;;
42227
42228hpux9* | hpux10* | hpux11*)
42229  # Give a soname corresponding to the major version so that dld.sl refuses to
42230  # link against other versions.
42231  version_type=sunos
42232  need_lib_prefix=no
42233  need_version=no
42234  case $host_cpu in
42235  ia64*)
42236    shrext_cmds='.so'
42237    hardcode_into_libs=yes
42238    dynamic_linker="$host_os dld.so"
42239    shlibpath_var=LD_LIBRARY_PATH
42240    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
42241    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42242    soname_spec='$libname$release$shared_ext$major'
42243    if test 32 = "$HPUX_IA64_MODE"; then
42244      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
42245      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
42246    else
42247      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
42248      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
42249    fi
42250    ;;
42251  hppa*64*)
42252    shrext_cmds='.sl'
42253    hardcode_into_libs=yes
42254    dynamic_linker="$host_os dld.sl"
42255    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
42256    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
42257    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42258    soname_spec='$libname$release$shared_ext$major'
42259    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
42260    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
42261    ;;
42262  *)
42263    shrext_cmds='.sl'
42264    dynamic_linker="$host_os dld.sl"
42265    shlibpath_var=SHLIB_PATH
42266    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
42267    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42268    soname_spec='$libname$release$shared_ext$major'
42269    ;;
42270  esac
42271  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
42272  postinstall_cmds='chmod 555 $lib'
42273  # or fails outright, so override atomically:
42274  install_override_mode=555
42275  ;;
42276
42277interix[3-9]*)
42278  version_type=linux # correct to gnu/linux during the next big refactor
42279  need_lib_prefix=no
42280  need_version=no
42281  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42282  soname_spec='$libname$release$shared_ext$major'
42283  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
42284  shlibpath_var=LD_LIBRARY_PATH
42285  shlibpath_overrides_runpath=no
42286  hardcode_into_libs=yes
42287  ;;
42288
42289irix5* | irix6* | nonstopux*)
42290  case $host_os in
42291    nonstopux*) version_type=nonstopux ;;
42292    *)
42293	if test yes = "$lt_cv_prog_gnu_ld"; then
42294		version_type=linux # correct to gnu/linux during the next big refactor
42295	else
42296		version_type=irix
42297	fi ;;
42298  esac
42299  need_lib_prefix=no
42300  need_version=no
42301  soname_spec='$libname$release$shared_ext$major'
42302  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
42303  case $host_os in
42304  irix5* | nonstopux*)
42305    libsuff= shlibsuff=
42306    ;;
42307  *)
42308    case $LD in # libtool.m4 will add one of these switches to LD
42309    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
42310      libsuff= shlibsuff= libmagic=32-bit;;
42311    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
42312      libsuff=32 shlibsuff=N32 libmagic=N32;;
42313    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
42314      libsuff=64 shlibsuff=64 libmagic=64-bit;;
42315    *) libsuff= shlibsuff= libmagic=never-match;;
42316    esac
42317    ;;
42318  esac
42319  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
42320  shlibpath_overrides_runpath=no
42321  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
42322  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
42323  hardcode_into_libs=yes
42324  ;;
42325
42326# No shared lib support for Linux oldld, aout, or coff.
42327linux*oldld* | linux*aout* | linux*coff*)
42328  dynamic_linker=no
42329  ;;
42330
42331linux*android*)
42332  version_type=none # Android doesn't support versioned libraries.
42333  need_lib_prefix=no
42334  need_version=no
42335  library_names_spec='$libname$release$shared_ext'
42336  soname_spec='$libname$release$shared_ext'
42337  finish_cmds=
42338  shlibpath_var=LD_LIBRARY_PATH
42339  shlibpath_overrides_runpath=yes
42340
42341  # This implies no fast_install, which is unacceptable.
42342  # Some rework will be needed to allow for fast_install
42343  # before this can be enabled.
42344  hardcode_into_libs=yes
42345
42346  dynamic_linker='Android linker'
42347  # Don't embed -rpath directories since the linker doesn't support them.
42348  hardcode_libdir_flag_spec='-L$libdir'
42349  ;;
42350
42351# This must be glibc/ELF.
42352linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
42353  version_type=linux # correct to gnu/linux during the next big refactor
42354  need_lib_prefix=no
42355  need_version=no
42356  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42357  soname_spec='$libname$release$shared_ext$major'
42358  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
42359  shlibpath_var=LD_LIBRARY_PATH
42360  shlibpath_overrides_runpath=no
42361
42362  # Some binutils ld are patched to set DT_RUNPATH
42363  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
42364  $as_echo_n "(cached) " >&6
42365else
42366  lt_cv_shlibpath_overrides_runpath=no
42367    save_LDFLAGS=$LDFLAGS
42368    save_libdir=$libdir
42369    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
42370	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
42371    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42372/* end confdefs.h.  */
42373
42374#ifdef F77_DUMMY_MAIN
42375
42376#  ifdef __cplusplus
42377     extern "C"
42378#  endif
42379   int F77_DUMMY_MAIN() { return 1; }
42380
42381#endif
42382int
42383main ()
42384{
42385
42386  ;
42387  return 0;
42388}
42389_ACEOF
42390if ac_fn_c_try_link "$LINENO"; then :
42391  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
42392  lt_cv_shlibpath_overrides_runpath=yes
42393fi
42394fi
42395rm -f core conftest.err conftest.$ac_objext \
42396    conftest$ac_exeext conftest.$ac_ext
42397    LDFLAGS=$save_LDFLAGS
42398    libdir=$save_libdir
42399
42400fi
42401
42402  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
42403
42404  # This implies no fast_install, which is unacceptable.
42405  # Some rework will be needed to allow for fast_install
42406  # before this can be enabled.
42407  hardcode_into_libs=yes
42408
42409  # Add ABI-specific directories to the system library path.
42410  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
42411
42412  # Ideally, we could use ldconfig to report *all* directores which are
42413  # searched for libraries, however this is still not possible.  Aside from not
42414  # being certain /sbin/ldconfig is available, command
42415  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
42416  # even though it is searched at run-time.  Try to do the best guess by
42417  # appending ld.so.conf contents (and includes) to the search path.
42418  if test -f /etc/ld.so.conf; then
42419    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' ' '`
42420    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
42421  fi
42422
42423  # We used to test for /lib/ld.so.1 and disable shared libraries on
42424  # powerpc, because MkLinux only supported shared libraries with the
42425  # GNU dynamic linker.  Since this was broken with cross compilers,
42426  # most powerpc-linux boxes support dynamic linking these days and
42427  # people can always --disable-shared, the test was removed, and we
42428  # assume the GNU/Linux dynamic linker is in use.
42429  dynamic_linker='GNU/Linux ld.so'
42430  ;;
42431
42432netbsd*)
42433  version_type=sunos
42434  need_lib_prefix=no
42435  need_version=no
42436  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
42437    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
42438    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
42439    dynamic_linker='NetBSD (a.out) ld.so'
42440  else
42441    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42442    soname_spec='$libname$release$shared_ext$major'
42443    dynamic_linker='NetBSD ld.elf_so'
42444  fi
42445  shlibpath_var=LD_LIBRARY_PATH
42446  shlibpath_overrides_runpath=yes
42447  hardcode_into_libs=yes
42448  ;;
42449
42450newsos6)
42451  version_type=linux # correct to gnu/linux during the next big refactor
42452  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42453  shlibpath_var=LD_LIBRARY_PATH
42454  shlibpath_overrides_runpath=yes
42455  ;;
42456
42457*nto* | *qnx*)
42458  version_type=qnx
42459  need_lib_prefix=no
42460  need_version=no
42461  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42462  soname_spec='$libname$release$shared_ext$major'
42463  shlibpath_var=LD_LIBRARY_PATH
42464  shlibpath_overrides_runpath=no
42465  hardcode_into_libs=yes
42466  dynamic_linker='ldqnx.so'
42467  ;;
42468
42469openbsd* | bitrig*)
42470  version_type=sunos
42471  sys_lib_dlsearch_path_spec=/usr/lib
42472  need_lib_prefix=no
42473  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
42474    need_version=no
42475  else
42476    need_version=yes
42477  fi
42478  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
42479  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
42480  shlibpath_var=LD_LIBRARY_PATH
42481  shlibpath_overrides_runpath=yes
42482  ;;
42483
42484os2*)
42485  libname_spec='$name'
42486  version_type=windows
42487  shrext_cmds=.dll
42488  need_version=no
42489  need_lib_prefix=no
42490  # OS/2 can only load a DLL with a base name of 8 characters or less.
42491  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
42492    v=$($ECHO $release$versuffix | tr -d .-);
42493    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
42494    $ECHO $n$v`$shared_ext'
42495  library_names_spec='${libname}_dll.$libext'
42496  dynamic_linker='OS/2 ld.exe'
42497  shlibpath_var=BEGINLIBPATH
42498  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
42499  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
42500  postinstall_cmds='base_file=`basename \$file`~
42501    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
42502    dldir=$destdir/`dirname \$dlpath`~
42503    test -d \$dldir || mkdir -p \$dldir~
42504    $install_prog $dir/$dlname \$dldir/$dlname~
42505    chmod a+x \$dldir/$dlname~
42506    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
42507      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
42508    fi'
42509  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
42510    dlpath=$dir/\$dldll~
42511    $RM \$dlpath'
42512  ;;
42513
42514osf3* | osf4* | osf5*)
42515  version_type=osf
42516  need_lib_prefix=no
42517  need_version=no
42518  soname_spec='$libname$release$shared_ext$major'
42519  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42520  shlibpath_var=LD_LIBRARY_PATH
42521  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
42522  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
42523  ;;
42524
42525rdos*)
42526  dynamic_linker=no
42527  ;;
42528
42529solaris*)
42530  version_type=linux # correct to gnu/linux during the next big refactor
42531  need_lib_prefix=no
42532  need_version=no
42533  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42534  soname_spec='$libname$release$shared_ext$major'
42535  shlibpath_var=LD_LIBRARY_PATH
42536  shlibpath_overrides_runpath=yes
42537  hardcode_into_libs=yes
42538  # ldd complains unless libraries are executable
42539  postinstall_cmds='chmod +x $lib'
42540  ;;
42541
42542sunos4*)
42543  version_type=sunos
42544  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
42545  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
42546  shlibpath_var=LD_LIBRARY_PATH
42547  shlibpath_overrides_runpath=yes
42548  if test yes = "$with_gnu_ld"; then
42549    need_lib_prefix=no
42550  fi
42551  need_version=yes
42552  ;;
42553
42554sysv4 | sysv4.3*)
42555  version_type=linux # correct to gnu/linux during the next big refactor
42556  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42557  soname_spec='$libname$release$shared_ext$major'
42558  shlibpath_var=LD_LIBRARY_PATH
42559  case $host_vendor in
42560    sni)
42561      shlibpath_overrides_runpath=no
42562      need_lib_prefix=no
42563      runpath_var=LD_RUN_PATH
42564      ;;
42565    siemens)
42566      need_lib_prefix=no
42567      ;;
42568    motorola)
42569      need_lib_prefix=no
42570      need_version=no
42571      shlibpath_overrides_runpath=no
42572      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
42573      ;;
42574  esac
42575  ;;
42576
42577sysv4*MP*)
42578  if test -d /usr/nec; then
42579    version_type=linux # correct to gnu/linux during the next big refactor
42580    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
42581    soname_spec='$libname$shared_ext.$major'
42582    shlibpath_var=LD_LIBRARY_PATH
42583  fi
42584  ;;
42585
42586sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
42587  version_type=sco
42588  need_lib_prefix=no
42589  need_version=no
42590  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
42591  soname_spec='$libname$release$shared_ext$major'
42592  shlibpath_var=LD_LIBRARY_PATH
42593  shlibpath_overrides_runpath=yes
42594  hardcode_into_libs=yes
42595  if test yes = "$with_gnu_ld"; then
42596    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
42597  else
42598    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
42599    case $host_os in
42600      sco3.2v5*)
42601        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
42602	;;
42603    esac
42604  fi
42605  sys_lib_dlsearch_path_spec='/usr/lib'
42606  ;;
42607
42608tpf*)
42609  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
42610  version_type=linux # correct to gnu/linux during the next big refactor
42611  need_lib_prefix=no
42612  need_version=no
42613  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42614  shlibpath_var=LD_LIBRARY_PATH
42615  shlibpath_overrides_runpath=no
42616  hardcode_into_libs=yes
42617  ;;
42618
42619uts4*)
42620  version_type=linux # correct to gnu/linux during the next big refactor
42621  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
42622  soname_spec='$libname$release$shared_ext$major'
42623  shlibpath_var=LD_LIBRARY_PATH
42624  ;;
42625
42626*)
42627  dynamic_linker=no
42628  ;;
42629esac
42630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
42631$as_echo "$dynamic_linker" >&6; }
42632test no = "$dynamic_linker" && can_build_shared=no
42633
42634variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
42635if test yes = "$GCC"; then
42636  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
42637fi
42638
42639if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
42640  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
42641fi
42642
42643if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
42644  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
42645fi
42646
42647# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
42648configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
42649
42650# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
42651func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
42652
42653# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
42654configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
42753$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
42754hardcode_action=
42755if test -n "$hardcode_libdir_flag_spec" ||
42756   test -n "$runpath_var" ||
42757   test yes = "$hardcode_automatic"; then
42758
42759  # We can hardcode non-existent directories.
42760  if test no != "$hardcode_direct" &&
42761     # If the only mechanism to avoid hardcoding is shlibpath_var, we
42762     # have to relink, otherwise we might link with an installed library
42763     # when we should be linking with a yet-to-be-installed one
42764     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
42765     test no != "$hardcode_minus_L"; then
42766    # Linking always hardcodes the temporary library directory.
42767    hardcode_action=relink
42768  else
42769    # We can link without hardcoding, and we can hardcode nonexisting dirs.
42770    hardcode_action=immediate
42771  fi
42772else
42773  # We cannot hardcode anything, or else we can only hardcode existing
42774  # directories.
42775  hardcode_action=unsupported
42776fi
42777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
42778$as_echo "$hardcode_action" >&6; }
42779
42780if test relink = "$hardcode_action" ||
42781   test yes = "$inherit_rpath"; then
42782  # Fast installation is not supported
42783  enable_fast_install=no
42784elif test yes = "$shlibpath_overrides_runpath" ||
42785     test no = "$enable_shared"; then
42786  # Fast installation is not necessary
42787  enable_fast_install=needless
42788fi
42789
42790
42791
42792
42793
42794
42795  if test yes != "$enable_dlopen"; then
42796  enable_dlopen=unknown
42797  enable_dlopen_self=unknown
42798  enable_dlopen_self_static=unknown
42799else
42800  lt_cv_dlopen=no
42801  lt_cv_dlopen_libs=
42802
42803  case $host_os in
42804  beos*)
42805    lt_cv_dlopen=load_add_on
42806    lt_cv_dlopen_libs=
42807    lt_cv_dlopen_self=yes
42808    ;;
42809
42810  mingw* | pw32* | cegcc*)
42811    lt_cv_dlopen=LoadLibrary
42812    lt_cv_dlopen_libs=
42813    ;;
42814
42815  cygwin*)
42816    lt_cv_dlopen=dlopen
42817    lt_cv_dlopen_libs=
42818    ;;
42819
42820  darwin*)
42821    # if libdl is installed we need to link against it
42822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
42823$as_echo_n "checking for dlopen in -ldl... " >&6; }
42824if ${ac_cv_lib_dl_dlopen+:} false; then :
42825  $as_echo_n "(cached) " >&6
42826else
42827  ac_check_lib_save_LIBS=$LIBS
42828LIBS="-ldl  $LIBS"
42829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42830/* end confdefs.h.  */
42831
42832/* Override any GCC internal prototype to avoid an error.
42833   Use char because int might match the return type of a GCC
42834   builtin and then its argument prototype would still apply.  */
42835#ifdef __cplusplus
42836extern "C"
42837#endif
42838char dlopen ();
42839#ifdef F77_DUMMY_MAIN
42840
42841#  ifdef __cplusplus
42842     extern "C"
42843#  endif
42844   int F77_DUMMY_MAIN() { return 1; }
42845
42846#endif
42847int
42848main ()
42849{
42850return dlopen ();
42851  ;
42852  return 0;
42853}
42854_ACEOF
42855if ac_fn_c_try_link "$LINENO"; then :
42856  ac_cv_lib_dl_dlopen=yes
42857else
42858  ac_cv_lib_dl_dlopen=no
42859fi
42860rm -f core conftest.err conftest.$ac_objext \
42861    conftest$ac_exeext conftest.$ac_ext
42862LIBS=$ac_check_lib_save_LIBS
42863fi
42864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
42865$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
42866if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
42867  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
42868else
42869
42870    lt_cv_dlopen=dyld
42871    lt_cv_dlopen_libs=
42872    lt_cv_dlopen_self=yes
42873
42874fi
42875
42876    ;;
42877
42878  tpf*)
42879    # Don't try to run any link tests for TPF.  We know it's impossible
42880    # because TPF is a cross-compiler, and we know how we open DSOs.
42881    lt_cv_dlopen=dlopen
42882    lt_cv_dlopen_libs=
42883    lt_cv_dlopen_self=no
42884    ;;
42885
42886  *)
42887    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
42888if test "x$ac_cv_func_shl_load" = xyes; then :
42889  lt_cv_dlopen=shl_load
42890else
42891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
42892$as_echo_n "checking for shl_load in -ldld... " >&6; }
42893if ${ac_cv_lib_dld_shl_load+:} false; then :
42894  $as_echo_n "(cached) " >&6
42895else
42896  ac_check_lib_save_LIBS=$LIBS
42897LIBS="-ldld  $LIBS"
42898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42899/* end confdefs.h.  */
42900
42901/* Override any GCC internal prototype to avoid an error.
42902   Use char because int might match the return type of a GCC
42903   builtin and then its argument prototype would still apply.  */
42904#ifdef __cplusplus
42905extern "C"
42906#endif
42907char shl_load ();
42908#ifdef F77_DUMMY_MAIN
42909
42910#  ifdef __cplusplus
42911     extern "C"
42912#  endif
42913   int F77_DUMMY_MAIN() { return 1; }
42914
42915#endif
42916int
42917main ()
42918{
42919return shl_load ();
42920  ;
42921  return 0;
42922}
42923_ACEOF
42924if ac_fn_c_try_link "$LINENO"; then :
42925  ac_cv_lib_dld_shl_load=yes
42926else
42927  ac_cv_lib_dld_shl_load=no
42928fi
42929rm -f core conftest.err conftest.$ac_objext \
42930    conftest$ac_exeext conftest.$ac_ext
42931LIBS=$ac_check_lib_save_LIBS
42932fi
42933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
42934$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
42935if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
42936  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
42937else
42938  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
42939if test "x$ac_cv_func_dlopen" = xyes; then :
42940  lt_cv_dlopen=dlopen
42941else
42942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
42943$as_echo_n "checking for dlopen in -ldl... " >&6; }
42944if ${ac_cv_lib_dl_dlopen+:} false; then :
42945  $as_echo_n "(cached) " >&6
42946else
42947  ac_check_lib_save_LIBS=$LIBS
42948LIBS="-ldl  $LIBS"
42949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42950/* end confdefs.h.  */
42951
42952/* Override any GCC internal prototype to avoid an error.
42953   Use char because int might match the return type of a GCC
42954   builtin and then its argument prototype would still apply.  */
42955#ifdef __cplusplus
42956extern "C"
42957#endif
42958char dlopen ();
42959#ifdef F77_DUMMY_MAIN
42960
42961#  ifdef __cplusplus
42962     extern "C"
42963#  endif
42964   int F77_DUMMY_MAIN() { return 1; }
42965
42966#endif
42967int
42968main ()
42969{
42970return dlopen ();
42971  ;
42972  return 0;
42973}
42974_ACEOF
42975if ac_fn_c_try_link "$LINENO"; then :
42976  ac_cv_lib_dl_dlopen=yes
42977else
42978  ac_cv_lib_dl_dlopen=no
42979fi
42980rm -f core conftest.err conftest.$ac_objext \
42981    conftest$ac_exeext conftest.$ac_ext
42982LIBS=$ac_check_lib_save_LIBS
42983fi
42984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
42985$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
42986if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
42987  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
42988else
42989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
42990$as_echo_n "checking for dlopen in -lsvld... " >&6; }
42991if ${ac_cv_lib_svld_dlopen+:} false; then :
42992  $as_echo_n "(cached) " >&6
42993else
42994  ac_check_lib_save_LIBS=$LIBS
42995LIBS="-lsvld  $LIBS"
42996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42997/* end confdefs.h.  */
42998
42999/* Override any GCC internal prototype to avoid an error.
43000   Use char because int might match the return type of a GCC
43001   builtin and then its argument prototype would still apply.  */
43002#ifdef __cplusplus
43003extern "C"
43004#endif
43005char dlopen ();
43006#ifdef F77_DUMMY_MAIN
43007
43008#  ifdef __cplusplus
43009     extern "C"
43010#  endif
43011   int F77_DUMMY_MAIN() { return 1; }
43012
43013#endif
43014int
43015main ()
43016{
43017return dlopen ();
43018  ;
43019  return 0;
43020}
43021_ACEOF
43022if ac_fn_c_try_link "$LINENO"; then :
43023  ac_cv_lib_svld_dlopen=yes
43024else
43025  ac_cv_lib_svld_dlopen=no
43026fi
43027rm -f core conftest.err conftest.$ac_objext \
43028    conftest$ac_exeext conftest.$ac_ext
43029LIBS=$ac_check_lib_save_LIBS
43030fi
43031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
43032$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
43033if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
43034  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
43035else
43036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
43037$as_echo_n "checking for dld_link in -ldld... " >&6; }
43038if ${ac_cv_lib_dld_dld_link+:} false; then :
43039  $as_echo_n "(cached) " >&6
43040else
43041  ac_check_lib_save_LIBS=$LIBS
43042LIBS="-ldld  $LIBS"
43043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43044/* end confdefs.h.  */
43045
43046/* Override any GCC internal prototype to avoid an error.
43047   Use char because int might match the return type of a GCC
43048   builtin and then its argument prototype would still apply.  */
43049#ifdef __cplusplus
43050extern "C"
43051#endif
43052char dld_link ();
43053#ifdef F77_DUMMY_MAIN
43054
43055#  ifdef __cplusplus
43056     extern "C"
43057#  endif
43058   int F77_DUMMY_MAIN() { return 1; }
43059
43060#endif
43061int
43062main ()
43063{
43064return dld_link ();
43065  ;
43066  return 0;
43067}
43068_ACEOF
43069if ac_fn_c_try_link "$LINENO"; then :
43070  ac_cv_lib_dld_dld_link=yes
43071else
43072  ac_cv_lib_dld_dld_link=no
43073fi
43074rm -f core conftest.err conftest.$ac_objext \
43075    conftest$ac_exeext conftest.$ac_ext
43076LIBS=$ac_check_lib_save_LIBS
43077fi
43078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
43079$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
43080if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
43081  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
43082fi
43083
43084
43085fi
43086
43087
43088fi
43089
43090
43091fi
43092
43093
43094fi
43095
43096
43097fi
43098
43099    ;;
43100  esac
43101
43102  if test no = "$lt_cv_dlopen"; then
43103    enable_dlopen=no
43104  else
43105    enable_dlopen=yes
43106  fi
43107
43108  case $lt_cv_dlopen in
43109  dlopen)
43110    save_CPPFLAGS=$CPPFLAGS
43111    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
43112
43113    save_LDFLAGS=$LDFLAGS
43114    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
43115
43116    save_LIBS=$LIBS
43117    LIBS="$lt_cv_dlopen_libs $LIBS"
43118
43119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
43120$as_echo_n "checking whether a program can dlopen itself... " >&6; }
43121if ${lt_cv_dlopen_self+:} false; then :
43122  $as_echo_n "(cached) " >&6
43123else
43124  	  if test yes = "$cross_compiling"; then :
43125  lt_cv_dlopen_self=cross
43126else
43127  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
43128  lt_status=$lt_dlunknown
43129  cat > conftest.$ac_ext <<_LT_EOF
43130#line $LINENO "configure"
43131#include "confdefs.h"
43132
43133#if HAVE_DLFCN_H
43134#include <dlfcn.h>
43135#endif
43136
43137#include <stdio.h>
43138
43139#ifdef RTLD_GLOBAL
43140#  define LT_DLGLOBAL		RTLD_GLOBAL
43141#else
43142#  ifdef DL_GLOBAL
43143#    define LT_DLGLOBAL		DL_GLOBAL
43144#  else
43145#    define LT_DLGLOBAL		0
43146#  endif
43147#endif
43148
43149/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
43150   find out it does not work in some platform. */
43151#ifndef LT_DLLAZY_OR_NOW
43152#  ifdef RTLD_LAZY
43153#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
43154#  else
43155#    ifdef DL_LAZY
43156#      define LT_DLLAZY_OR_NOW		DL_LAZY
43157#    else
43158#      ifdef RTLD_NOW
43159#        define LT_DLLAZY_OR_NOW	RTLD_NOW
43160#      else
43161#        ifdef DL_NOW
43162#          define LT_DLLAZY_OR_NOW	DL_NOW
43163#        else
43164#          define LT_DLLAZY_OR_NOW	0
43165#        endif
43166#      endif
43167#    endif
43168#  endif
43169#endif
43170
43171/* When -fvisibility=hidden is used, assume the code has been annotated
43172   correspondingly for the symbols needed.  */
43173#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
43174int fnord () __attribute__((visibility("default")));
43175#endif
43176
43177int fnord () { return 42; }
43178int main ()
43179{
43180  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
43181  int status = $lt_dlunknown;
43182
43183  if (self)
43184    {
43185      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
43186      else
43187        {
43188	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
43189          else puts (dlerror ());
43190	}
43191      /* dlclose (self); */
43192    }
43193  else
43194    puts (dlerror ());
43195
43196  return status;
43197}
43198_LT_EOF
43199  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43200  (eval $ac_link) 2>&5
43201  ac_status=$?
43202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43203  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
43204    (./conftest; exit; ) >&5 2>/dev/null
43205    lt_status=$?
43206    case x$lt_status in
43207      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
43208      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
43209      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
43210    esac
43211  else :
43212    # compilation failed
43213    lt_cv_dlopen_self=no
43214  fi
43215fi
43216rm -fr conftest*
43217
43218
43219fi
43220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
43221$as_echo "$lt_cv_dlopen_self" >&6; }
43222
43223    if test yes = "$lt_cv_dlopen_self"; then
43224      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
43225      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
43226$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
43227if ${lt_cv_dlopen_self_static+:} false; then :
43228  $as_echo_n "(cached) " >&6
43229else
43230  	  if test yes = "$cross_compiling"; then :
43231  lt_cv_dlopen_self_static=cross
43232else
43233  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
43234  lt_status=$lt_dlunknown
43235  cat > conftest.$ac_ext <<_LT_EOF
43236#line $LINENO "configure"
43237#include "confdefs.h"
43238
43239#if HAVE_DLFCN_H
43240#include <dlfcn.h>
43241#endif
43242
43243#include <stdio.h>
43244
43245#ifdef RTLD_GLOBAL
43246#  define LT_DLGLOBAL		RTLD_GLOBAL
43247#else
43248#  ifdef DL_GLOBAL
43249#    define LT_DLGLOBAL		DL_GLOBAL
43250#  else
43251#    define LT_DLGLOBAL		0
43252#  endif
43253#endif
43254
43255/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
43256   find out it does not work in some platform. */
43257#ifndef LT_DLLAZY_OR_NOW
43258#  ifdef RTLD_LAZY
43259#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
43260#  else
43261#    ifdef DL_LAZY
43262#      define LT_DLLAZY_OR_NOW		DL_LAZY
43263#    else
43264#      ifdef RTLD_NOW
43265#        define LT_DLLAZY_OR_NOW	RTLD_NOW
43266#      else
43267#        ifdef DL_NOW
43268#          define LT_DLLAZY_OR_NOW	DL_NOW
43269#        else
43270#          define LT_DLLAZY_OR_NOW	0
43271#        endif
43272#      endif
43273#    endif
43274#  endif
43275#endif
43276
43277/* When -fvisibility=hidden is used, assume the code has been annotated
43278   correspondingly for the symbols needed.  */
43279#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
43280int fnord () __attribute__((visibility("default")));
43281#endif
43282
43283int fnord () { return 42; }
43284int main ()
43285{
43286  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
43287  int status = $lt_dlunknown;
43288
43289  if (self)
43290    {
43291      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
43292      else
43293        {
43294	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
43295          else puts (dlerror ());
43296	}
43297      /* dlclose (self); */
43298    }
43299  else
43300    puts (dlerror ());
43301
43302  return status;
43303}
43304_LT_EOF
43305  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43306  (eval $ac_link) 2>&5
43307  ac_status=$?
43308  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43309  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
43310    (./conftest; exit; ) >&5 2>/dev/null
43311    lt_status=$?
43312    case x$lt_status in
43313      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
43314      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
43315      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
43316    esac
43317  else :
43318    # compilation failed
43319    lt_cv_dlopen_self_static=no
43320  fi
43321fi
43322rm -fr conftest*
43323
43324
43325fi
43326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
43327$as_echo "$lt_cv_dlopen_self_static" >&6; }
43328    fi
43329
43330    CPPFLAGS=$save_CPPFLAGS
43331    LDFLAGS=$save_LDFLAGS
43332    LIBS=$save_LIBS
43333    ;;
43334  esac
43335
43336  case $lt_cv_dlopen_self in
43337  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
43338  *) enable_dlopen_self=unknown ;;
43339  esac
43340
43341  case $lt_cv_dlopen_self_static in
43342  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
43343  *) enable_dlopen_self_static=unknown ;;
43344  esac
43345fi
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363striplib=
43364old_striplib=
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
43366$as_echo_n "checking whether stripping libraries is possible... " >&6; }
43367if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
43368  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
43369  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
43370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43371$as_echo "yes" >&6; }
43372else
43373# FIXME - insert some real tests, host_os isn't really good enough
43374  case $host_os in
43375  darwin*)
43376    if test -n "$STRIP"; then
43377      striplib="$STRIP -x"
43378      old_striplib="$STRIP -S"
43379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43380$as_echo "yes" >&6; }
43381    else
43382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43383$as_echo "no" >&6; }
43384    fi
43385    ;;
43386  *)
43387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43388$as_echo "no" >&6; }
43389    ;;
43390  esac
43391fi
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404  # Report what library types will actually be built
43405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
43406$as_echo_n "checking if libtool supports shared libraries... " >&6; }
43407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
43408$as_echo "$can_build_shared" >&6; }
43409
43410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
43411$as_echo_n "checking whether to build shared libraries... " >&6; }
43412  test no = "$can_build_shared" && enable_shared=no
43413
43414  # On AIX, shared libraries and static libraries use the same namespace, and
43415  # are all built from PIC.
43416  case $host_os in
43417  aix3*)
43418    test yes = "$enable_shared" && enable_static=no
43419    if test -n "$RANLIB"; then
43420      archive_cmds="$archive_cmds~\$RANLIB \$lib"
43421      postinstall_cmds='$RANLIB $lib'
43422    fi
43423    ;;
43424
43425  aix[4-9]*)
43426    if test ia64 != "$host_cpu"; then
43427      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
43428      yes,aix,yes) ;;			# shared object as lib.so file only
43429      yes,svr4,*) ;;			# shared object as lib.so archive member only
43430      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
43431      esac
43432    fi
43433    ;;
43434  esac
43435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
43436$as_echo "$enable_shared" >&6; }
43437
43438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
43439$as_echo_n "checking whether to build static libraries... " >&6; }
43440  # Make sure either enable_shared or enable_static is yes.
43441  test yes = "$enable_shared" || enable_static=yes
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
43443$as_echo "$enable_static" >&6; }
43444
43445
43446
43447
43448fi
43449ac_ext=c
43450ac_cpp='$CPP $CPPFLAGS'
43451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43453ac_compiler_gnu=$ac_cv_c_compiler_gnu
43454
43455CC=$lt_save_CC
43456
43457      if test -n "$CXX" && ( test no != "$CXX" &&
43458    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
43459    (test g++ != "$CXX"))); then
43460  ac_ext=cpp
43461ac_cpp='$CXXCPP $CPPFLAGS'
43462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
43466$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
43467if test -z "$CXXCPP"; then
43468  if ${ac_cv_prog_CXXCPP+:} false; then :
43469  $as_echo_n "(cached) " >&6
43470else
43471      # Double quotes because CXXCPP needs to be expanded
43472    for CXXCPP in "$CXX -E" "/lib/cpp"
43473    do
43474      ac_preproc_ok=false
43475for ac_cxx_preproc_warn_flag in '' yes
43476do
43477  # Use a header file that comes with gcc, so configuring glibc
43478  # with a fresh cross-compiler works.
43479  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43480  # <limits.h> exists even on freestanding compilers.
43481  # On the NeXT, cc -E runs the code through the compiler's parser,
43482  # not just through cpp. "Syntax error" is here to catch this case.
43483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43484/* end confdefs.h.  */
43485#ifdef __STDC__
43486# include <limits.h>
43487#else
43488# include <assert.h>
43489#endif
43490		     Syntax error
43491_ACEOF
43492if ac_fn_cxx_try_cpp "$LINENO"; then :
43493
43494else
43495  # Broken: fails on valid input.
43496continue
43497fi
43498rm -f conftest.err conftest.i conftest.$ac_ext
43499
43500  # OK, works on sane cases.  Now check whether nonexistent headers
43501  # can be detected and how.
43502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43503/* end confdefs.h.  */
43504#include <ac_nonexistent.h>
43505_ACEOF
43506if ac_fn_cxx_try_cpp "$LINENO"; then :
43507  # Broken: success on invalid input.
43508continue
43509else
43510  # Passes both tests.
43511ac_preproc_ok=:
43512break
43513fi
43514rm -f conftest.err conftest.i conftest.$ac_ext
43515
43516done
43517# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
43518rm -f conftest.i conftest.err conftest.$ac_ext
43519if $ac_preproc_ok; then :
43520  break
43521fi
43522
43523    done
43524    ac_cv_prog_CXXCPP=$CXXCPP
43525
43526fi
43527  CXXCPP=$ac_cv_prog_CXXCPP
43528else
43529  ac_cv_prog_CXXCPP=$CXXCPP
43530fi
43531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
43532$as_echo "$CXXCPP" >&6; }
43533ac_preproc_ok=false
43534for ac_cxx_preproc_warn_flag in '' yes
43535do
43536  # Use a header file that comes with gcc, so configuring glibc
43537  # with a fresh cross-compiler works.
43538  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
43539  # <limits.h> exists even on freestanding compilers.
43540  # On the NeXT, cc -E runs the code through the compiler's parser,
43541  # not just through cpp. "Syntax error" is here to catch this case.
43542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43543/* end confdefs.h.  */
43544#ifdef __STDC__
43545# include <limits.h>
43546#else
43547# include <assert.h>
43548#endif
43549		     Syntax error
43550_ACEOF
43551if ac_fn_cxx_try_cpp "$LINENO"; then :
43552
43553else
43554  # Broken: fails on valid input.
43555continue
43556fi
43557rm -f conftest.err conftest.i conftest.$ac_ext
43558
43559  # OK, works on sane cases.  Now check whether nonexistent headers
43560  # can be detected and how.
43561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43562/* end confdefs.h.  */
43563#include <ac_nonexistent.h>
43564_ACEOF
43565if ac_fn_cxx_try_cpp "$LINENO"; then :
43566  # Broken: success on invalid input.
43567continue
43568else
43569  # Passes both tests.
43570ac_preproc_ok=:
43571break
43572fi
43573rm -f conftest.err conftest.i conftest.$ac_ext
43574
43575done
43576# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
43577rm -f conftest.i conftest.err conftest.$ac_ext
43578if $ac_preproc_ok; then :
43579
43580else
43581  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
43583as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
43584See \`config.log' for more details" "$LINENO" 5; }
43585fi
43586
43587ac_ext=c
43588ac_cpp='$CPP $CPPFLAGS'
43589ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43590ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43591ac_compiler_gnu=$ac_cv_c_compiler_gnu
43592
43593else
43594  _lt_caught_CXX_error=yes
43595fi
43596
43597ac_ext=cpp
43598ac_cpp='$CXXCPP $CPPFLAGS'
43599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43602
43603archive_cmds_need_lc_CXX=no
43604allow_undefined_flag_CXX=
43605always_export_symbols_CXX=no
43606archive_expsym_cmds_CXX=
43607compiler_needs_object_CXX=no
43608export_dynamic_flag_spec_CXX=
43609hardcode_direct_CXX=no
43610hardcode_direct_absolute_CXX=no
43611hardcode_libdir_flag_spec_CXX=
43612hardcode_libdir_separator_CXX=
43613hardcode_minus_L_CXX=no
43614hardcode_shlibpath_var_CXX=unsupported
43615hardcode_automatic_CXX=no
43616inherit_rpath_CXX=no
43617module_cmds_CXX=
43618module_expsym_cmds_CXX=
43619link_all_deplibs_CXX=unknown
43620old_archive_cmds_CXX=$old_archive_cmds
43621reload_flag_CXX=$reload_flag
43622reload_cmds_CXX=$reload_cmds
43623no_undefined_flag_CXX=
43624whole_archive_flag_spec_CXX=
43625enable_shared_with_static_runtimes_CXX=no
43626
43627# Source file extension for C++ test sources.
43628ac_ext=cpp
43629
43630# Object file extension for compiled C++ test sources.
43631objext=o
43632objext_CXX=$objext
43633
43634# No sense in running all these tests if we already determined that
43635# the CXX compiler isn't working.  Some variables (like enable_shared)
43636# are currently assumed to apply to all compilers on this platform,
43637# and will be corrupted by setting them based on a non-working compiler.
43638if test yes != "$_lt_caught_CXX_error"; then
43639  # Code to be used in simple compile tests
43640  lt_simple_compile_test_code="int some_variable = 0;"
43641
43642  # Code to be used in simple link tests
43643  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
43644
43645  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
43646
43647
43648
43649
43650
43651
43652# If no C compiler was specified, use CC.
43653LTCC=${LTCC-"$CC"}
43654
43655# If no C compiler flags were specified, use CFLAGS.
43656LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
43657
43658# Allow CC to be a program name with arguments.
43659compiler=$CC
43660
43661
43662  # save warnings/boilerplate of simple test code
43663  ac_outfile=conftest.$ac_objext
43664echo "$lt_simple_compile_test_code" >conftest.$ac_ext
43665eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43666_lt_compiler_boilerplate=`cat conftest.err`
43667$RM conftest*
43668
43669  ac_outfile=conftest.$ac_objext
43670echo "$lt_simple_link_test_code" >conftest.$ac_ext
43671eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43672_lt_linker_boilerplate=`cat conftest.err`
43673$RM -r conftest*
43674
43675
43676  # Allow CC to be a program name with arguments.
43677  lt_save_CC=$CC
43678  lt_save_CFLAGS=$CFLAGS
43679  lt_save_LD=$LD
43680  lt_save_GCC=$GCC
43681  GCC=$GXX
43682  lt_save_with_gnu_ld=$with_gnu_ld
43683  lt_save_path_LD=$lt_cv_path_LD
43684  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
43685    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
43686  else
43687    $as_unset lt_cv_prog_gnu_ld
43688  fi
43689  if test -n "${lt_cv_path_LDCXX+set}"; then
43690    lt_cv_path_LD=$lt_cv_path_LDCXX
43691  else
43692    $as_unset lt_cv_path_LD
43693  fi
43694  test -z "${LDCXX+set}" || LD=$LDCXX
43695  CC=${CXX-"c++"}
43696  CFLAGS=$CXXFLAGS
43697  compiler=$CC
43698  compiler_CXX=$CC
43699  func_cc_basename $compiler
43700cc_basename=$func_cc_basename_result
43701
43702
43703  if test -n "$compiler"; then
43704    # We don't want -fno-exception when compiling C++ code, so set the
43705    # no_builtin_flag separately
43706    if test yes = "$GXX"; then
43707      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
43708    else
43709      lt_prog_compiler_no_builtin_flag_CXX=
43710    fi
43711
43712    if test yes = "$GXX"; then
43713      # Set up default GNU C++ configuration
43714
43715
43716
43717# Check whether --with-gnu-ld was given.
43718if test "${with_gnu_ld+set}" = set; then :
43719  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
43720else
43721  with_gnu_ld=no
43722fi
43723
43724ac_prog=ld
43725if test yes = "$GCC"; then
43726  # Check if gcc -print-prog-name=ld gives a path.
43727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
43728$as_echo_n "checking for ld used by $CC... " >&6; }
43729  case $host in
43730  *-*-mingw*)
43731    # gcc leaves a trailing carriage return, which upsets mingw
43732    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
43733  *)
43734    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
43735  esac
43736  case $ac_prog in
43737    # Accept absolute paths.
43738    [\\/]* | ?:[\\/]*)
43739      re_direlt='/[^/][^/]*/\.\./'
43740      # Canonicalize the pathname of ld
43741      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
43742      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
43743	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
43744      done
43745      test -z "$LD" && LD=$ac_prog
43746      ;;
43747  "")
43748    # If it fails, then pretend we aren't using GCC.
43749    ac_prog=ld
43750    ;;
43751  *)
43752    # If it is relative, then search for the first ld in PATH.
43753    with_gnu_ld=unknown
43754    ;;
43755  esac
43756elif test yes = "$with_gnu_ld"; then
43757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
43758$as_echo_n "checking for GNU ld... " >&6; }
43759else
43760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
43761$as_echo_n "checking for non-GNU ld... " >&6; }
43762fi
43763if ${lt_cv_path_LD+:} false; then :
43764  $as_echo_n "(cached) " >&6
43765else
43766  if test -z "$LD"; then
43767  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
43768  for ac_dir in $PATH; do
43769    IFS=$lt_save_ifs
43770    test -z "$ac_dir" && ac_dir=.
43771    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
43772      lt_cv_path_LD=$ac_dir/$ac_prog
43773      # Check to see if the program is GNU ld.  I'd rather use --version,
43774      # but apparently some variants of GNU ld only accept -v.
43775      # Break only if it was the GNU/non-GNU ld that we prefer.
43776      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
43777      *GNU* | *'with BFD'*)
43778	test no != "$with_gnu_ld" && break
43779	;;
43780      *)
43781	test yes != "$with_gnu_ld" && break
43782	;;
43783      esac
43784    fi
43785  done
43786  IFS=$lt_save_ifs
43787else
43788  lt_cv_path_LD=$LD # Let the user override the test with a path.
43789fi
43790fi
43791
43792LD=$lt_cv_path_LD
43793if test -n "$LD"; then
43794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
43795$as_echo "$LD" >&6; }
43796else
43797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43798$as_echo "no" >&6; }
43799fi
43800test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
43801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
43802$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
43803if ${lt_cv_prog_gnu_ld+:} false; then :
43804  $as_echo_n "(cached) " >&6
43805else
43806  # I'd rather use --version here, but apparently some GNU lds only accept -v.
43807case `$LD -v 2>&1 </dev/null` in
43808*GNU* | *'with BFD'*)
43809  lt_cv_prog_gnu_ld=yes
43810  ;;
43811*)
43812  lt_cv_prog_gnu_ld=no
43813  ;;
43814esac
43815fi
43816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
43817$as_echo "$lt_cv_prog_gnu_ld" >&6; }
43818with_gnu_ld=$lt_cv_prog_gnu_ld
43819
43820
43821
43822
43823
43824
43825
43826      # Check if GNU C++ uses GNU ld as the underlying linker, since the
43827      # archiving commands below assume that GNU ld is being used.
43828      if test yes = "$with_gnu_ld"; then
43829        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
43830        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'
43831
43832        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
43833        export_dynamic_flag_spec_CXX='$wl--export-dynamic'
43834
43835        # If archive_cmds runs LD, not CC, wlarc should be empty
43836        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
43837        #     investigate it a little bit more. (MM)
43838        wlarc='$wl'
43839
43840        # ancient GNU ld didn't support --whole-archive et. al.
43841        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
43842	  $GREP 'no-whole-archive' > /dev/null; then
43843          whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
43844        else
43845          whole_archive_flag_spec_CXX=
43846        fi
43847      else
43848        with_gnu_ld=no
43849        wlarc=
43850
43851        # A generic and very simple default shared library creation
43852        # command for GNU C++ for the case where it uses the native
43853        # linker, instead of GNU ld.  If possible, this setting should
43854        # overridden to take advantage of the native linker features on
43855        # the platform it is being used on.
43856        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
43857      fi
43858
43859      # Commands to make compiler produce verbose output that lists
43860      # what "hidden" libraries, object files and flags are used when
43861      # linking a shared library.
43862      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
43863
43864    else
43865      GXX=no
43866      with_gnu_ld=no
43867      wlarc=
43868    fi
43869
43870    # PORTME: fill in a description of your system's C++ link characteristics
43871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
43872$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
43873    ld_shlibs_CXX=yes
43874    case $host_os in
43875      aix3*)
43876        # FIXME: insert proper C++ library support
43877        ld_shlibs_CXX=no
43878        ;;
43879      aix[4-9]*)
43880        if test ia64 = "$host_cpu"; then
43881          # On IA64, the linker does run time linking by default, so we don't
43882          # have to do anything special.
43883          aix_use_runtimelinking=no
43884          exp_sym_flag='-Bexport'
43885          no_entry_flag=
43886        else
43887          aix_use_runtimelinking=no
43888
43889          # Test if we are trying to use run time linking or normal
43890          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
43891          # have runtime linking enabled, and use it for executables.
43892          # For shared libraries, we enable/disable runtime linking
43893          # depending on the kind of the shared library created -
43894          # when "with_aix_soname,aix_use_runtimelinking" is:
43895          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
43896          # "aix,yes"  lib.so          shared, rtl:yes, for executables
43897          #            lib.a           static archive
43898          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
43899          #            lib.a(lib.so.V) shared, rtl:no,  for executables
43900          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
43901          #            lib.a(lib.so.V) shared, rtl:no
43902          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
43903          #            lib.a           static archive
43904          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
43905	    for ld_flag in $LDFLAGS; do
43906	      case $ld_flag in
43907	      *-brtl*)
43908	        aix_use_runtimelinking=yes
43909	        break
43910	        ;;
43911	      esac
43912	    done
43913	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
43914	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
43915	      # so we don't have lib.a shared libs to link our executables.
43916	      # We have to force runtime linking in this case.
43917	      aix_use_runtimelinking=yes
43918	      LDFLAGS="$LDFLAGS -Wl,-brtl"
43919	    fi
43920	    ;;
43921          esac
43922
43923          exp_sym_flag='-bexport'
43924          no_entry_flag='-bnoentry'
43925        fi
43926
43927        # When large executables or shared objects are built, AIX ld can
43928        # have problems creating the table of contents.  If linking a library
43929        # or program results in "error TOC overflow" add -mminimal-toc to
43930        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
43931        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
43932
43933        archive_cmds_CXX=''
43934        hardcode_direct_CXX=yes
43935        hardcode_direct_absolute_CXX=yes
43936        hardcode_libdir_separator_CXX=':'
43937        link_all_deplibs_CXX=yes
43938        file_list_spec_CXX='$wl-f,'
43939        case $with_aix_soname,$aix_use_runtimelinking in
43940        aix,*) ;;	# no import file
43941        svr4,* | *,yes) # use import file
43942          # The Import File defines what to hardcode.
43943          hardcode_direct_CXX=no
43944          hardcode_direct_absolute_CXX=no
43945          ;;
43946        esac
43947
43948        if test yes = "$GXX"; then
43949          case $host_os in aix4.[012]|aix4.[012].*)
43950          # We only want to do this on AIX 4.2 and lower, the check
43951          # below for broken collect2 doesn't work under 4.3+
43952	  collect2name=`$CC -print-prog-name=collect2`
43953	  if test -f "$collect2name" &&
43954	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
43955	  then
43956	    # We have reworked collect2
43957	    :
43958	  else
43959	    # We have old collect2
43960	    hardcode_direct_CXX=unsupported
43961	    # It fails to find uninstalled libraries when the uninstalled
43962	    # path is not listed in the libpath.  Setting hardcode_minus_L
43963	    # to unsupported forces relinking
43964	    hardcode_minus_L_CXX=yes
43965	    hardcode_libdir_flag_spec_CXX='-L$libdir'
43966	    hardcode_libdir_separator_CXX=
43967	  fi
43968          esac
43969          shared_flag='-shared'
43970	  if test yes = "$aix_use_runtimelinking"; then
43971	    shared_flag=$shared_flag' $wl-G'
43972	  fi
43973	  # Need to ensure runtime linking is disabled for the traditional
43974	  # shared library, or the linker may eventually find shared libraries
43975	  # /with/ Import File - we do not want to mix them.
43976	  shared_flag_aix='-shared'
43977	  shared_flag_svr4='-shared $wl-G'
43978        else
43979          # not using gcc
43980          if test ia64 = "$host_cpu"; then
43981	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
43982	  # chokes on -Wl,-G. The following line is correct:
43983	  shared_flag='-G'
43984          else
43985	    if test yes = "$aix_use_runtimelinking"; then
43986	      shared_flag='$wl-G'
43987	    else
43988	      shared_flag='$wl-bM:SRE'
43989	    fi
43990	    shared_flag_aix='$wl-bM:SRE'
43991	    shared_flag_svr4='$wl-G'
43992          fi
43993        fi
43994
43995        export_dynamic_flag_spec_CXX='$wl-bexpall'
43996        # It seems that -bexpall does not export symbols beginning with
43997        # underscore (_), so it is better to generate a list of symbols to
43998	# export.
43999        always_export_symbols_CXX=yes
44000	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
44001          # Warning - without using the other runtime loading flags (-brtl),
44002          # -berok will link without error, but may produce a broken library.
44003          # The "-G" linker flag allows undefined symbols.
44004          no_undefined_flag_CXX='-bernotok'
44005          # Determine the default libpath from the value encoded in an empty
44006          # executable.
44007          if test set = "${lt_cv_aix_libpath+set}"; then
44008  aix_libpath=$lt_cv_aix_libpath
44009else
44010  if ${lt_cv_aix_libpath__CXX+:} false; then :
44011  $as_echo_n "(cached) " >&6
44012else
44013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44014/* end confdefs.h.  */
44015
44016#ifdef F77_DUMMY_MAIN
44017
44018#  ifdef __cplusplus
44019     extern "C"
44020#  endif
44021   int F77_DUMMY_MAIN() { return 1; }
44022
44023#endif
44024int
44025main ()
44026{
44027
44028  ;
44029  return 0;
44030}
44031_ACEOF
44032if ac_fn_cxx_try_link "$LINENO"; then :
44033
44034  lt_aix_libpath_sed='
44035      /Import File Strings/,/^$/ {
44036	  /^0/ {
44037	      s/^0  *\([^ ]*\) *$/\1/
44038	      p
44039	  }
44040      }'
44041  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
44042  # Check for a 64-bit object if we didn't find anything.
44043  if test -z "$lt_cv_aix_libpath__CXX"; then
44044    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
44045  fi
44046fi
44047rm -f core conftest.err conftest.$ac_objext \
44048    conftest$ac_exeext conftest.$ac_ext
44049  if test -z "$lt_cv_aix_libpath__CXX"; then
44050    lt_cv_aix_libpath__CXX=/usr/lib:/lib
44051  fi
44052
44053fi
44054
44055  aix_libpath=$lt_cv_aix_libpath__CXX
44056fi
44057
44058          hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
44059
44060          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
44061        else
44062          if test ia64 = "$host_cpu"; then
44063	    hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
44064	    allow_undefined_flag_CXX="-z nodefs"
44065	    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"
44066          else
44067	    # Determine the default libpath from the value encoded in an
44068	    # empty executable.
44069	    if test set = "${lt_cv_aix_libpath+set}"; then
44070  aix_libpath=$lt_cv_aix_libpath
44071else
44072  if ${lt_cv_aix_libpath__CXX+:} false; then :
44073  $as_echo_n "(cached) " >&6
44074else
44075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44076/* end confdefs.h.  */
44077
44078#ifdef F77_DUMMY_MAIN
44079
44080#  ifdef __cplusplus
44081     extern "C"
44082#  endif
44083   int F77_DUMMY_MAIN() { return 1; }
44084
44085#endif
44086int
44087main ()
44088{
44089
44090  ;
44091  return 0;
44092}
44093_ACEOF
44094if ac_fn_cxx_try_link "$LINENO"; then :
44095
44096  lt_aix_libpath_sed='
44097      /Import File Strings/,/^$/ {
44098	  /^0/ {
44099	      s/^0  *\([^ ]*\) *$/\1/
44100	      p
44101	  }
44102      }'
44103  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
44104  # Check for a 64-bit object if we didn't find anything.
44105  if test -z "$lt_cv_aix_libpath__CXX"; then
44106    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
44107  fi
44108fi
44109rm -f core conftest.err conftest.$ac_objext \
44110    conftest$ac_exeext conftest.$ac_ext
44111  if test -z "$lt_cv_aix_libpath__CXX"; then
44112    lt_cv_aix_libpath__CXX=/usr/lib:/lib
44113  fi
44114
44115fi
44116
44117  aix_libpath=$lt_cv_aix_libpath__CXX
44118fi
44119
44120	    hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
44121	    # Warning - without using the other run time loading flags,
44122	    # -berok will link without error, but may produce a broken library.
44123	    no_undefined_flag_CXX=' $wl-bernotok'
44124	    allow_undefined_flag_CXX=' $wl-berok'
44125	    if test yes = "$with_gnu_ld"; then
44126	      # We only use this code for GNU lds that support --whole-archive.
44127	      whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
44128	    else
44129	      # Exported symbols can be pulled into shared objects from archives
44130	      whole_archive_flag_spec_CXX='$convenience'
44131	    fi
44132	    archive_cmds_need_lc_CXX=yes
44133	    archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
44134	    # -brtl affects multiple linker settings, -berok does not and is overridden later
44135	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
44136	    if test svr4 != "$with_aix_soname"; then
44137	      # This is similar to how AIX traditionally builds its shared
44138	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
44139	      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'
44140	    fi
44141	    if test aix != "$with_aix_soname"; then
44142	      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'
44143	    else
44144	      # used by -dlpreopen to get the symbols
44145	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
44146	    fi
44147	    archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
44148          fi
44149        fi
44150        ;;
44151
44152      beos*)
44153	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
44154	  allow_undefined_flag_CXX=unsupported
44155	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
44156	  # support --undefined.  This deserves some investigation.  FIXME
44157	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
44158	else
44159	  ld_shlibs_CXX=no
44160	fi
44161	;;
44162
44163      chorus*)
44164        case $cc_basename in
44165          *)
44166	  # FIXME: insert proper C++ library support
44167	  ld_shlibs_CXX=no
44168	  ;;
44169        esac
44170        ;;
44171
44172      cygwin* | mingw* | pw32* | cegcc*)
44173	case $GXX,$cc_basename in
44174	,cl* | no,cl*)
44175	  # Native MSVC
44176	  # hardcode_libdir_flag_spec is actually meaningless, as there is
44177	  # no search path for DLLs.
44178	  hardcode_libdir_flag_spec_CXX=' '
44179	  allow_undefined_flag_CXX=unsupported
44180	  always_export_symbols_CXX=yes
44181	  file_list_spec_CXX='@'
44182	  # Tell ltmain to make .lib files, not .a files.
44183	  libext=lib
44184	  # Tell ltmain to make .dll files, not .so files.
44185	  shrext_cmds=.dll
44186	  # FIXME: Setting linknames here is a bad hack.
44187	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
44188	  archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
44189              cp "$export_symbols" "$output_objdir/$soname.def";
44190              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
44191            else
44192              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
44193            fi~
44194            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
44195            linknames='
44196	  # The linker will not automatically build a static lib if we build a DLL.
44197	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
44198	  enable_shared_with_static_runtimes_CXX=yes
44199	  # Don't use ranlib
44200	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
44201	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
44202            lt_tool_outputfile="@TOOL_OUTPUT@"~
44203            case $lt_outputfile in
44204              *.exe|*.EXE) ;;
44205              *)
44206                lt_outputfile=$lt_outputfile.exe
44207                lt_tool_outputfile=$lt_tool_outputfile.exe
44208                ;;
44209            esac~
44210            func_to_tool_file "$lt_outputfile"~
44211            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
44212              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
44213              $RM "$lt_outputfile.manifest";
44214            fi'
44215	  ;;
44216	*)
44217	  # g++
44218	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
44219	  # as there is no search path for DLLs.
44220	  hardcode_libdir_flag_spec_CXX='-L$libdir'
44221	  export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
44222	  allow_undefined_flag_CXX=unsupported
44223	  always_export_symbols_CXX=no
44224	  enable_shared_with_static_runtimes_CXX=yes
44225
44226	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
44227	    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'
44228	    # If the export-symbols file already is a .def file, use it as
44229	    # is; otherwise, prepend EXPORTS...
44230	    archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
44231              cp $export_symbols $output_objdir/$soname.def;
44232            else
44233              echo EXPORTS > $output_objdir/$soname.def;
44234              cat $export_symbols >> $output_objdir/$soname.def;
44235            fi~
44236            $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'
44237	  else
44238	    ld_shlibs_CXX=no
44239	  fi
44240	  ;;
44241	esac
44242	;;
44243      darwin* | rhapsody*)
44244
44245
44246  archive_cmds_need_lc_CXX=no
44247  hardcode_direct_CXX=no
44248  hardcode_automatic_CXX=yes
44249  hardcode_shlibpath_var_CXX=unsupported
44250  if test yes = "$lt_cv_ld_force_load"; then
44251    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\"`'
44252
44253  else
44254    whole_archive_flag_spec_CXX=''
44255  fi
44256  link_all_deplibs_CXX=yes
44257  allow_undefined_flag_CXX=$_lt_dar_allow_undefined
44258  case $cc_basename in
44259     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
44260     *) _lt_dar_can_shared=$GCC ;;
44261  esac
44262  if test yes = "$_lt_dar_can_shared"; then
44263    output_verbose_link_cmd=func_echo_all
44264    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"
44265    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
44266    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"
44267    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"
44268       if test yes != "$lt_cv_apple_cc_single_mod"; then
44269      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"
44270      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"
44271    fi
44272
44273  else
44274  ld_shlibs_CXX=no
44275  fi
44276
44277	;;
44278
44279      os2*)
44280	hardcode_libdir_flag_spec_CXX='-L$libdir'
44281	hardcode_minus_L_CXX=yes
44282	allow_undefined_flag_CXX=unsupported
44283	shrext_cmds=.dll
44284	archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
44285	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
44286	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
44287	  $ECHO EXPORTS >> $output_objdir/$libname.def~
44288	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
44289	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
44290	  emximp -o $lib $output_objdir/$libname.def'
44291	archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
44292	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
44293	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
44294	  $ECHO EXPORTS >> $output_objdir/$libname.def~
44295	  prefix_cmds="$SED"~
44296	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
44297	    prefix_cmds="$prefix_cmds -e 1d";
44298	  fi~
44299	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
44300	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
44301	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
44302	  emximp -o $lib $output_objdir/$libname.def'
44303	old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
44304	enable_shared_with_static_runtimes_CXX=yes
44305	;;
44306
44307      dgux*)
44308        case $cc_basename in
44309          ec++*)
44310	    # FIXME: insert proper C++ library support
44311	    ld_shlibs_CXX=no
44312	    ;;
44313          ghcx*)
44314	    # Green Hills C++ Compiler
44315	    # FIXME: insert proper C++ library support
44316	    ld_shlibs_CXX=no
44317	    ;;
44318          *)
44319	    # FIXME: insert proper C++ library support
44320	    ld_shlibs_CXX=no
44321	    ;;
44322        esac
44323        ;;
44324
44325      freebsd2.*)
44326        # C++ shared libraries reported to be fairly broken before
44327	# switch to ELF
44328        ld_shlibs_CXX=no
44329        ;;
44330
44331      freebsd-elf*)
44332        archive_cmds_need_lc_CXX=no
44333        ;;
44334
44335      freebsd* | dragonfly*)
44336        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
44337        # conventions
44338        ld_shlibs_CXX=yes
44339        ;;
44340
44341      haiku*)
44342        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
44343        link_all_deplibs_CXX=yes
44344        ;;
44345
44346      hpux9*)
44347        hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
44348        hardcode_libdir_separator_CXX=:
44349        export_dynamic_flag_spec_CXX='$wl-E'
44350        hardcode_direct_CXX=yes
44351        hardcode_minus_L_CXX=yes # Not in the search PATH,
44352				             # but as the default
44353				             # location of the library.
44354
44355        case $cc_basename in
44356          CC*)
44357            # FIXME: insert proper C++ library support
44358            ld_shlibs_CXX=no
44359            ;;
44360          aCC*)
44361            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'
44362            # Commands to make compiler produce verbose output that lists
44363            # what "hidden" libraries, object files and flags are used when
44364            # linking a shared library.
44365            #
44366            # There doesn't appear to be a way to prevent this compiler from
44367            # explicitly linking system object files so we need to strip them
44368            # from the output so that they don't get included in the library
44369            # dependencies.
44370            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"'
44371            ;;
44372          *)
44373            if test yes = "$GXX"; then
44374              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'
44375            else
44376              # FIXME: insert proper C++ library support
44377              ld_shlibs_CXX=no
44378            fi
44379            ;;
44380        esac
44381        ;;
44382
44383      hpux10*|hpux11*)
44384        if test no = "$with_gnu_ld"; then
44385	  hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
44386	  hardcode_libdir_separator_CXX=:
44387
44388          case $host_cpu in
44389            hppa*64*|ia64*)
44390              ;;
44391            *)
44392	      export_dynamic_flag_spec_CXX='$wl-E'
44393              ;;
44394          esac
44395        fi
44396        case $host_cpu in
44397          hppa*64*|ia64*)
44398            hardcode_direct_CXX=no
44399            hardcode_shlibpath_var_CXX=no
44400            ;;
44401          *)
44402            hardcode_direct_CXX=yes
44403            hardcode_direct_absolute_CXX=yes
44404            hardcode_minus_L_CXX=yes # Not in the search PATH,
44405					         # but as the default
44406					         # location of the library.
44407            ;;
44408        esac
44409
44410        case $cc_basename in
44411          CC*)
44412	    # FIXME: insert proper C++ library support
44413	    ld_shlibs_CXX=no
44414	    ;;
44415          aCC*)
44416	    case $host_cpu in
44417	      hppa*64*)
44418	        archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44419	        ;;
44420	      ia64*)
44421	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44422	        ;;
44423	      *)
44424	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44425	        ;;
44426	    esac
44427	    # Commands to make compiler produce verbose output that lists
44428	    # what "hidden" libraries, object files and flags are used when
44429	    # linking a shared library.
44430	    #
44431	    # There doesn't appear to be a way to prevent this compiler from
44432	    # explicitly linking system object files so we need to strip them
44433	    # from the output so that they don't get included in the library
44434	    # dependencies.
44435	    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"'
44436	    ;;
44437          *)
44438	    if test yes = "$GXX"; then
44439	      if test no = "$with_gnu_ld"; then
44440	        case $host_cpu in
44441	          hppa*64*)
44442	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44443	            ;;
44444	          ia64*)
44445	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44446	            ;;
44447	          *)
44448	            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'
44449	            ;;
44450	        esac
44451	      fi
44452	    else
44453	      # FIXME: insert proper C++ library support
44454	      ld_shlibs_CXX=no
44455	    fi
44456	    ;;
44457        esac
44458        ;;
44459
44460      interix[3-9]*)
44461	hardcode_direct_CXX=no
44462	hardcode_shlibpath_var_CXX=no
44463	hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
44464	export_dynamic_flag_spec_CXX='$wl-E'
44465	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
44466	# Instead, shared libraries are loaded at an image base (0x10000000 by
44467	# default) and relocated if they conflict, which is a slow very memory
44468	# consuming and fragmenting process.  To avoid this, we pick a random,
44469	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
44470	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
44471	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'
44472	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'
44473	;;
44474      irix5* | irix6*)
44475        case $cc_basename in
44476          CC*)
44477	    # SGI C++
44478	    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'
44479
44480	    # Archives containing C++ object files must be created using
44481	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
44482	    # necessary to make sure instantiated templates are included
44483	    # in the archive.
44484	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
44485	    ;;
44486          *)
44487	    if test yes = "$GXX"; then
44488	      if test no = "$with_gnu_ld"; then
44489	        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'
44490	      else
44491	        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'
44492	      fi
44493	    fi
44494	    link_all_deplibs_CXX=yes
44495	    ;;
44496        esac
44497        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
44498        hardcode_libdir_separator_CXX=:
44499        inherit_rpath_CXX=yes
44500        ;;
44501
44502      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
44503        case $cc_basename in
44504          KCC*)
44505	    # Kuck and Associates, Inc. (KAI) C++ Compiler
44506
44507	    # KCC will only create a shared library if the output file
44508	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
44509	    # to its proper name (with version) after linking.
44510	    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'
44511	    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'
44512	    # Commands to make compiler produce verbose output that lists
44513	    # what "hidden" libraries, object files and flags are used when
44514	    # linking a shared library.
44515	    #
44516	    # There doesn't appear to be a way to prevent this compiler from
44517	    # explicitly linking system object files so we need to strip them
44518	    # from the output so that they don't get included in the library
44519	    # dependencies.
44520	    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"'
44521
44522	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
44523	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
44524
44525	    # Archives containing C++ object files must be created using
44526	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
44527	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
44528	    ;;
44529	  icpc* | ecpc* )
44530	    # Intel C++
44531	    with_gnu_ld=yes
44532	    # version 8.0 and above of icpc choke on multiply defined symbols
44533	    # if we add $predep_objects and $postdep_objects, however 7.1 and
44534	    # earlier do not add the objects themselves.
44535	    case `$CC -V 2>&1` in
44536	      *"Version 7."*)
44537	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
44538		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'
44539		;;
44540	      *)  # Version 8.0 or newer
44541	        tmp_idyn=
44542	        case $host_cpu in
44543		  ia64*) tmp_idyn=' -i_dynamic';;
44544		esac
44545	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
44546		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'
44547		;;
44548	    esac
44549	    archive_cmds_need_lc_CXX=no
44550	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
44551	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
44552	    whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
44553	    ;;
44554          pgCC* | pgcpp*)
44555            # Portland Group C++ compiler
44556	    case `$CC -V` in
44557	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
44558	      prelink_cmds_CXX='tpldir=Template.dir~
44559               rm -rf $tpldir~
44560               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
44561               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
44562	      old_archive_cmds_CXX='tpldir=Template.dir~
44563                rm -rf $tpldir~
44564                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
44565                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
44566                $RANLIB $oldlib'
44567	      archive_cmds_CXX='tpldir=Template.dir~
44568                rm -rf $tpldir~
44569                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
44570                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
44571	      archive_expsym_cmds_CXX='tpldir=Template.dir~
44572                rm -rf $tpldir~
44573                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
44574                $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'
44575	      ;;
44576	    *) # Version 6 and above use weak symbols
44577	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
44578	      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'
44579	      ;;
44580	    esac
44581
44582	    hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
44583	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
44584	    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'
44585            ;;
44586	  cxx*)
44587	    # Compaq C++
44588	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
44589	    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'
44590
44591	    runpath_var=LD_RUN_PATH
44592	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
44593	    hardcode_libdir_separator_CXX=:
44594
44595	    # Commands to make compiler produce verbose output that lists
44596	    # what "hidden" libraries, object files and flags are used when
44597	    # linking a shared library.
44598	    #
44599	    # There doesn't appear to be a way to prevent this compiler from
44600	    # explicitly linking system object files so we need to strip them
44601	    # from the output so that they don't get included in the library
44602	    # dependencies.
44603	    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'
44604	    ;;
44605	  xl* | mpixl* | bgxl*)
44606	    # IBM XL 8.0 on PPC, with GNU ld
44607	    hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
44608	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
44609	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
44610	    if test yes = "$supports_anon_versioning"; then
44611	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
44612                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44613                echo "local: *; };" >> $output_objdir/$libname.ver~
44614                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
44615	    fi
44616	    ;;
44617	  *)
44618	    case `$CC -V 2>&1 | sed 5q` in
44619	    *Sun\ C*)
44620	      # Sun C++ 5.9
44621	      no_undefined_flag_CXX=' -zdefs'
44622	      archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44623	      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'
44624	      hardcode_libdir_flag_spec_CXX='-R$libdir'
44625	      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'
44626	      compiler_needs_object_CXX=yes
44627
44628	      # Not sure whether something based on
44629	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
44630	      # would be better.
44631	      output_verbose_link_cmd='func_echo_all'
44632
44633	      # Archives containing C++ object files must be created using
44634	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
44635	      # necessary to make sure instantiated templates are included
44636	      # in the archive.
44637	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
44638	      ;;
44639	    esac
44640	    ;;
44641	esac
44642	;;
44643
44644      lynxos*)
44645        # FIXME: insert proper C++ library support
44646	ld_shlibs_CXX=no
44647	;;
44648
44649      m88k*)
44650        # FIXME: insert proper C++ library support
44651        ld_shlibs_CXX=no
44652	;;
44653
44654      mvs*)
44655        case $cc_basename in
44656          cxx*)
44657	    # FIXME: insert proper C++ library support
44658	    ld_shlibs_CXX=no
44659	    ;;
44660	  *)
44661	    # FIXME: insert proper C++ library support
44662	    ld_shlibs_CXX=no
44663	    ;;
44664	esac
44665	;;
44666
44667      netbsd*)
44668        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
44669	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
44670	  wlarc=
44671	  hardcode_libdir_flag_spec_CXX='-R$libdir'
44672	  hardcode_direct_CXX=yes
44673	  hardcode_shlibpath_var_CXX=no
44674	fi
44675	# Workaround some broken pre-1.5 toolchains
44676	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
44677	;;
44678
44679      *nto* | *qnx*)
44680        ld_shlibs_CXX=yes
44681	;;
44682
44683      openbsd* | bitrig*)
44684	if test -f /usr/libexec/ld.so; then
44685	  hardcode_direct_CXX=yes
44686	  hardcode_shlibpath_var_CXX=no
44687	  hardcode_direct_absolute_CXX=yes
44688	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
44689	  hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
44690	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
44691	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
44692	    export_dynamic_flag_spec_CXX='$wl-E'
44693	    whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
44694	  fi
44695	  output_verbose_link_cmd=func_echo_all
44696	else
44697	  ld_shlibs_CXX=no
44698	fi
44699	;;
44700
44701      osf3* | osf4* | osf5*)
44702        case $cc_basename in
44703          KCC*)
44704	    # Kuck and Associates, Inc. (KAI) C++ Compiler
44705
44706	    # KCC will only create a shared library if the output file
44707	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
44708	    # to its proper name (with version) after linking.
44709	    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'
44710
44711	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
44712	    hardcode_libdir_separator_CXX=:
44713
44714	    # Archives containing C++ object files must be created using
44715	    # the KAI C++ compiler.
44716	    case $host in
44717	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
44718	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
44719	    esac
44720	    ;;
44721          RCC*)
44722	    # Rational C++ 2.4.1
44723	    # FIXME: insert proper C++ library support
44724	    ld_shlibs_CXX=no
44725	    ;;
44726          cxx*)
44727	    case $host in
44728	      osf3*)
44729	        allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
44730	        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'
44731	        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
44732		;;
44733	      *)
44734	        allow_undefined_flag_CXX=' -expect_unresolved \*'
44735	        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'
44736	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
44737                  echo "-hidden">> $lib.exp~
44738                  $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~
44739                  $RM $lib.exp'
44740	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
44741		;;
44742	    esac
44743
44744	    hardcode_libdir_separator_CXX=:
44745
44746	    # Commands to make compiler produce verbose output that lists
44747	    # what "hidden" libraries, object files and flags are used when
44748	    # linking a shared library.
44749	    #
44750	    # There doesn't appear to be a way to prevent this compiler from
44751	    # explicitly linking system object files so we need to strip them
44752	    # from the output so that they don't get included in the library
44753	    # dependencies.
44754	    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"'
44755	    ;;
44756	  *)
44757	    if test yes,no = "$GXX,$with_gnu_ld"; then
44758	      allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
44759	      case $host in
44760	        osf3*)
44761	          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'
44762		  ;;
44763	        *)
44764	          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'
44765		  ;;
44766	      esac
44767
44768	      hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
44769	      hardcode_libdir_separator_CXX=:
44770
44771	      # Commands to make compiler produce verbose output that lists
44772	      # what "hidden" libraries, object files and flags are used when
44773	      # linking a shared library.
44774	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
44775
44776	    else
44777	      # FIXME: insert proper C++ library support
44778	      ld_shlibs_CXX=no
44779	    fi
44780	    ;;
44781        esac
44782        ;;
44783
44784      psos*)
44785        # FIXME: insert proper C++ library support
44786        ld_shlibs_CXX=no
44787        ;;
44788
44789      sunos4*)
44790        case $cc_basename in
44791          CC*)
44792	    # Sun C++ 4.x
44793	    # FIXME: insert proper C++ library support
44794	    ld_shlibs_CXX=no
44795	    ;;
44796          lcc*)
44797	    # Lucid
44798	    # FIXME: insert proper C++ library support
44799	    ld_shlibs_CXX=no
44800	    ;;
44801          *)
44802	    # FIXME: insert proper C++ library support
44803	    ld_shlibs_CXX=no
44804	    ;;
44805        esac
44806        ;;
44807
44808      solaris*)
44809        case $cc_basename in
44810          CC* | sunCC*)
44811	    # Sun C++ 4.2, 5.x and Centerline C++
44812            archive_cmds_need_lc_CXX=yes
44813	    no_undefined_flag_CXX=' -zdefs'
44814	    archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
44815	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
44816              $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'
44817
44818	    hardcode_libdir_flag_spec_CXX='-R$libdir'
44819	    hardcode_shlibpath_var_CXX=no
44820	    case $host_os in
44821	      solaris2.[0-5] | solaris2.[0-5].*) ;;
44822	      *)
44823		# The compiler driver will combine and reorder linker options,
44824		# but understands '-z linker_flag'.
44825	        # Supported since Solaris 2.6 (maybe 2.5.1?)
44826		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
44827	        ;;
44828	    esac
44829	    link_all_deplibs_CXX=yes
44830
44831	    output_verbose_link_cmd='func_echo_all'
44832
44833	    # Archives containing C++ object files must be created using
44834	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
44835	    # necessary to make sure instantiated templates are included
44836	    # in the archive.
44837	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
44838	    ;;
44839          gcx*)
44840	    # Green Hills C++ Compiler
44841	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
44842
44843	    # The C++ compiler must be used to create the archive.
44844	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
44845	    ;;
44846          *)
44847	    # GNU C++ compiler with Solaris linker
44848	    if test yes,no = "$GXX,$with_gnu_ld"; then
44849	      no_undefined_flag_CXX=' $wl-z ${wl}defs'
44850	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
44851	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
44852	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
44853                  $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'
44854
44855	        # Commands to make compiler produce verbose output that lists
44856	        # what "hidden" libraries, object files and flags are used when
44857	        # linking a shared library.
44858	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
44859	      else
44860	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
44861	        # platform.
44862	        archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
44863	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
44864                  $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'
44865
44866	        # Commands to make compiler produce verbose output that lists
44867	        # what "hidden" libraries, object files and flags are used when
44868	        # linking a shared library.
44869	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
44870	      fi
44871
44872	      hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
44873	      case $host_os in
44874		solaris2.[0-5] | solaris2.[0-5].*) ;;
44875		*)
44876		  whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
44877		  ;;
44878	      esac
44879	    fi
44880	    ;;
44881        esac
44882        ;;
44883
44884    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
44885      no_undefined_flag_CXX='$wl-z,text'
44886      archive_cmds_need_lc_CXX=no
44887      hardcode_shlibpath_var_CXX=no
44888      runpath_var='LD_RUN_PATH'
44889
44890      case $cc_basename in
44891        CC*)
44892	  archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44893	  archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44894	  ;;
44895	*)
44896	  archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44897	  archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44898	  ;;
44899      esac
44900      ;;
44901
44902      sysv5* | sco3.2v5* | sco5v6*)
44903	# Note: We CANNOT use -z defs as we might desire, because we do not
44904	# link with -lc, and that would cause any symbols used from libc to
44905	# always be unresolved, which means just about no library would
44906	# ever link correctly.  If we're not using GNU ld we use -z text
44907	# though, which does catch some bad symbols but isn't as heavy-handed
44908	# as -z defs.
44909	no_undefined_flag_CXX='$wl-z,text'
44910	allow_undefined_flag_CXX='$wl-z,nodefs'
44911	archive_cmds_need_lc_CXX=no
44912	hardcode_shlibpath_var_CXX=no
44913	hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
44914	hardcode_libdir_separator_CXX=':'
44915	link_all_deplibs_CXX=yes
44916	export_dynamic_flag_spec_CXX='$wl-Bexport'
44917	runpath_var='LD_RUN_PATH'
44918
44919	case $cc_basename in
44920          CC*)
44921	    archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44922	    archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44923	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
44924              '"$old_archive_cmds_CXX"
44925	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
44926              '"$reload_cmds_CXX"
44927	    ;;
44928	  *)
44929	    archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44930	    archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
44931	    ;;
44932	esac
44933      ;;
44934
44935      tandem*)
44936        case $cc_basename in
44937          NCC*)
44938	    # NonStop-UX NCC 3.20
44939	    # FIXME: insert proper C++ library support
44940	    ld_shlibs_CXX=no
44941	    ;;
44942          *)
44943	    # FIXME: insert proper C++ library support
44944	    ld_shlibs_CXX=no
44945	    ;;
44946        esac
44947        ;;
44948
44949      vxworks*)
44950        # FIXME: insert proper C++ library support
44951        ld_shlibs_CXX=no
44952        ;;
44953
44954      *)
44955        # FIXME: insert proper C++ library support
44956        ld_shlibs_CXX=no
44957        ;;
44958    esac
44959
44960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
44961$as_echo "$ld_shlibs_CXX" >&6; }
44962    test no = "$ld_shlibs_CXX" && can_build_shared=no
44963
44964    GCC_CXX=$GXX
44965    LD_CXX=$LD
44966
44967    ## CAVEAT EMPTOR:
44968    ## There is no encapsulation within the following macros, do not change
44969    ## the running order or otherwise move them around unless you know exactly
44970    ## what you are doing...
44971    # Dependencies to place before and after the object being linked:
44972predep_objects_CXX=
44973postdep_objects_CXX=
44974predeps_CXX=
44975postdeps_CXX=
44976compiler_lib_search_path_CXX=
44977
44978cat > conftest.$ac_ext <<_LT_EOF
44979class Foo
44980{
44981public:
44982  Foo (void) { a = 0; }
44983private:
44984  int a;
44985};
44986_LT_EOF
44987
44988
44989_lt_libdeps_save_CFLAGS=$CFLAGS
44990case "$CC $CFLAGS " in #(
44991*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
44992*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
44993*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
44994esac
44995
44996if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
44997  (eval $ac_compile) 2>&5
44998  ac_status=$?
44999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45000  test $ac_status = 0; }; then
45001  # Parse the compiler output and extract the necessary
45002  # objects, libraries and library flags.
45003
45004  # Sentinel used to keep track of whether or not we are before
45005  # the conftest object file.
45006  pre_test_object_deps_done=no
45007
45008  for p in `eval "$output_verbose_link_cmd"`; do
45009    case $prev$p in
45010
45011    -L* | -R* | -l*)
45012       # Some compilers place space between "-{L,R}" and the path.
45013       # Remove the space.
45014       if test x-L = "$p" ||
45015          test x-R = "$p"; then
45016	 prev=$p
45017	 continue
45018       fi
45019
45020       # Expand the sysroot to ease extracting the directories later.
45021       if test -z "$prev"; then
45022         case $p in
45023         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
45024         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
45025         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
45026         esac
45027       fi
45028       case $p in
45029       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
45030       esac
45031       if test no = "$pre_test_object_deps_done"; then
45032	 case $prev in
45033	 -L | -R)
45034	   # Internal compiler library paths should come after those
45035	   # provided the user.  The postdeps already come after the
45036	   # user supplied libs so there is no need to process them.
45037	   if test -z "$compiler_lib_search_path_CXX"; then
45038	     compiler_lib_search_path_CXX=$prev$p
45039	   else
45040	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
45041	   fi
45042	   ;;
45043	 # The "-l" case would never come before the object being
45044	 # linked, so don't bother handling this case.
45045	 esac
45046       else
45047	 if test -z "$postdeps_CXX"; then
45048	   postdeps_CXX=$prev$p
45049	 else
45050	   postdeps_CXX="${postdeps_CXX} $prev$p"
45051	 fi
45052       fi
45053       prev=
45054       ;;
45055
45056    *.lto.$objext) ;; # Ignore GCC LTO objects
45057    *.$objext)
45058       # This assumes that the test object file only shows up
45059       # once in the compiler output.
45060       if test "$p" = "conftest.$objext"; then
45061	 pre_test_object_deps_done=yes
45062	 continue
45063       fi
45064
45065       if test no = "$pre_test_object_deps_done"; then
45066	 if test -z "$predep_objects_CXX"; then
45067	   predep_objects_CXX=$p
45068	 else
45069	   predep_objects_CXX="$predep_objects_CXX $p"
45070	 fi
45071       else
45072	 if test -z "$postdep_objects_CXX"; then
45073	   postdep_objects_CXX=$p
45074	 else
45075	   postdep_objects_CXX="$postdep_objects_CXX $p"
45076	 fi
45077       fi
45078       ;;
45079
45080    *) ;; # Ignore the rest.
45081
45082    esac
45083  done
45084
45085  # Clean up.
45086  rm -f a.out a.exe
45087else
45088  echo "libtool.m4: error: problem compiling CXX test program"
45089fi
45090
45091$RM -f confest.$objext
45092CFLAGS=$_lt_libdeps_save_CFLAGS
45093
45094# PORTME: override above test on systems where it is broken
45095case $host_os in
45096interix[3-9]*)
45097  # Interix 3.5 installs completely hosed .la files for C++, so rather than
45098  # hack all around it, let's just trust "g++" to DTRT.
45099  predep_objects_CXX=
45100  postdep_objects_CXX=
45101  postdeps_CXX=
45102  ;;
45103esac
45104
45105
45106case " $postdeps_CXX " in
45107*" -lc "*) archive_cmds_need_lc_CXX=no ;;
45108esac
45109 compiler_lib_search_dirs_CXX=
45110if test -n "${compiler_lib_search_path_CXX}"; then
45111 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
45112fi
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136
45137
45138
45139
45140
45141
45142
45143
45144    lt_prog_compiler_wl_CXX=
45145lt_prog_compiler_pic_CXX=
45146lt_prog_compiler_static_CXX=
45147
45148
45149  # C++ specific cases for pic, static, wl, etc.
45150  if test yes = "$GXX"; then
45151    lt_prog_compiler_wl_CXX='-Wl,'
45152    lt_prog_compiler_static_CXX='-static'
45153
45154    case $host_os in
45155    aix*)
45156      # All AIX code is PIC.
45157      if test ia64 = "$host_cpu"; then
45158	# AIX 5 now supports IA64 processor
45159	lt_prog_compiler_static_CXX='-Bstatic'
45160      fi
45161      lt_prog_compiler_pic_CXX='-fPIC'
45162      ;;
45163
45164    amigaos*)
45165      case $host_cpu in
45166      powerpc)
45167            # see comment about AmigaOS4 .so support
45168            lt_prog_compiler_pic_CXX='-fPIC'
45169        ;;
45170      m68k)
45171            # FIXME: we need at least 68020 code to build shared libraries, but
45172            # adding the '-m68020' flag to GCC prevents building anything better,
45173            # like '-m68040'.
45174            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
45175        ;;
45176      esac
45177      ;;
45178
45179    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45180      # PIC is the default for these OSes.
45181      ;;
45182    mingw* | cygwin* | os2* | pw32* | cegcc*)
45183      # This hack is so that the source file can tell whether it is being
45184      # built for inclusion in a dll (and should export symbols for example).
45185      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45186      # (--disable-auto-import) libraries
45187      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
45188      case $host_os in
45189      os2*)
45190	lt_prog_compiler_static_CXX='$wl-static'
45191	;;
45192      esac
45193      ;;
45194    darwin* | rhapsody*)
45195      # PIC is the default on this platform
45196      # Common symbols not allowed in MH_DYLIB files
45197      lt_prog_compiler_pic_CXX='-fno-common'
45198      ;;
45199    *djgpp*)
45200      # DJGPP does not support shared libraries at all
45201      lt_prog_compiler_pic_CXX=
45202      ;;
45203    haiku*)
45204      # PIC is the default for Haiku.
45205      # The "-static" flag exists, but is broken.
45206      lt_prog_compiler_static_CXX=
45207      ;;
45208    interix[3-9]*)
45209      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
45210      # Instead, we relocate shared libraries at runtime.
45211      ;;
45212    sysv4*MP*)
45213      if test -d /usr/nec; then
45214	lt_prog_compiler_pic_CXX=-Kconform_pic
45215      fi
45216      ;;
45217    hpux*)
45218      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
45219      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
45220      # sets the default TLS model and affects inlining.
45221      case $host_cpu in
45222      hppa*64*)
45223	;;
45224      *)
45225	lt_prog_compiler_pic_CXX='-fPIC'
45226	;;
45227      esac
45228      ;;
45229    *qnx* | *nto*)
45230      # QNX uses GNU C++, but need to define -shared option too, otherwise
45231      # it will coredump.
45232      lt_prog_compiler_pic_CXX='-fPIC -shared'
45233      ;;
45234    *)
45235      lt_prog_compiler_pic_CXX='-fPIC'
45236      ;;
45237    esac
45238  else
45239    case $host_os in
45240      aix[4-9]*)
45241	# All AIX code is PIC.
45242	if test ia64 = "$host_cpu"; then
45243	  # AIX 5 now supports IA64 processor
45244	  lt_prog_compiler_static_CXX='-Bstatic'
45245	else
45246	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
45247	fi
45248	;;
45249      chorus*)
45250	case $cc_basename in
45251	cxch68*)
45252	  # Green Hills C++ Compiler
45253	  # _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"
45254	  ;;
45255	esac
45256	;;
45257      mingw* | cygwin* | os2* | pw32* | cegcc*)
45258	# This hack is so that the source file can tell whether it is being
45259	# built for inclusion in a dll (and should export symbols for example).
45260	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
45261	;;
45262      dgux*)
45263	case $cc_basename in
45264	  ec++*)
45265	    lt_prog_compiler_pic_CXX='-KPIC'
45266	    ;;
45267	  ghcx*)
45268	    # Green Hills C++ Compiler
45269	    lt_prog_compiler_pic_CXX='-pic'
45270	    ;;
45271	  *)
45272	    ;;
45273	esac
45274	;;
45275      freebsd* | dragonfly*)
45276	# FreeBSD uses GNU C++
45277	;;
45278      hpux9* | hpux10* | hpux11*)
45279	case $cc_basename in
45280	  CC*)
45281	    lt_prog_compiler_wl_CXX='-Wl,'
45282	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
45283	    if test ia64 != "$host_cpu"; then
45284	      lt_prog_compiler_pic_CXX='+Z'
45285	    fi
45286	    ;;
45287	  aCC*)
45288	    lt_prog_compiler_wl_CXX='-Wl,'
45289	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
45290	    case $host_cpu in
45291	    hppa*64*|ia64*)
45292	      # +Z the default
45293	      ;;
45294	    *)
45295	      lt_prog_compiler_pic_CXX='+Z'
45296	      ;;
45297	    esac
45298	    ;;
45299	  *)
45300	    ;;
45301	esac
45302	;;
45303      interix*)
45304	# This is c89, which is MS Visual C++ (no shared libs)
45305	# Anyone wants to do a port?
45306	;;
45307      irix5* | irix6* | nonstopux*)
45308	case $cc_basename in
45309	  CC*)
45310	    lt_prog_compiler_wl_CXX='-Wl,'
45311	    lt_prog_compiler_static_CXX='-non_shared'
45312	    # CC pic flag -KPIC is the default.
45313	    ;;
45314	  *)
45315	    ;;
45316	esac
45317	;;
45318      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
45319	case $cc_basename in
45320	  KCC*)
45321	    # KAI C++ Compiler
45322	    lt_prog_compiler_wl_CXX='--backend -Wl,'
45323	    lt_prog_compiler_pic_CXX='-fPIC'
45324	    ;;
45325	  ecpc* )
45326	    # old Intel C++ for x86_64, which still supported -KPIC.
45327	    lt_prog_compiler_wl_CXX='-Wl,'
45328	    lt_prog_compiler_pic_CXX='-KPIC'
45329	    lt_prog_compiler_static_CXX='-static'
45330	    ;;
45331	  icpc* )
45332	    # Intel C++, used to be incompatible with GCC.
45333	    # ICC 10 doesn't accept -KPIC any more.
45334	    lt_prog_compiler_wl_CXX='-Wl,'
45335	    lt_prog_compiler_pic_CXX='-fPIC'
45336	    lt_prog_compiler_static_CXX='-static'
45337	    ;;
45338	  pgCC* | pgcpp*)
45339	    # Portland Group C++ compiler
45340	    lt_prog_compiler_wl_CXX='-Wl,'
45341	    lt_prog_compiler_pic_CXX='-fpic'
45342	    lt_prog_compiler_static_CXX='-Bstatic'
45343	    ;;
45344	  cxx*)
45345	    # Compaq C++
45346	    # Make sure the PIC flag is empty.  It appears that all Alpha
45347	    # Linux and Compaq Tru64 Unix objects are PIC.
45348	    lt_prog_compiler_pic_CXX=
45349	    lt_prog_compiler_static_CXX='-non_shared'
45350	    ;;
45351	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
45352	    # IBM XL 8.0, 9.0 on PPC and BlueGene
45353	    lt_prog_compiler_wl_CXX='-Wl,'
45354	    lt_prog_compiler_pic_CXX='-qpic'
45355	    lt_prog_compiler_static_CXX='-qstaticlink'
45356	    ;;
45357	  *)
45358	    case `$CC -V 2>&1 | sed 5q` in
45359	    *Sun\ C*)
45360	      # Sun C++ 5.9
45361	      lt_prog_compiler_pic_CXX='-KPIC'
45362	      lt_prog_compiler_static_CXX='-Bstatic'
45363	      lt_prog_compiler_wl_CXX='-Qoption ld '
45364	      ;;
45365	    esac
45366	    ;;
45367	esac
45368	;;
45369      lynxos*)
45370	;;
45371      m88k*)
45372	;;
45373      mvs*)
45374	case $cc_basename in
45375	  cxx*)
45376	    lt_prog_compiler_pic_CXX='-W c,exportall'
45377	    ;;
45378	  *)
45379	    ;;
45380	esac
45381	;;
45382      netbsd*)
45383	;;
45384      *qnx* | *nto*)
45385        # QNX uses GNU C++, but need to define -shared option too, otherwise
45386        # it will coredump.
45387        lt_prog_compiler_pic_CXX='-fPIC -shared'
45388        ;;
45389      osf3* | osf4* | osf5*)
45390	case $cc_basename in
45391	  KCC*)
45392	    lt_prog_compiler_wl_CXX='--backend -Wl,'
45393	    ;;
45394	  RCC*)
45395	    # Rational C++ 2.4.1
45396	    lt_prog_compiler_pic_CXX='-pic'
45397	    ;;
45398	  cxx*)
45399	    # Digital/Compaq C++
45400	    lt_prog_compiler_wl_CXX='-Wl,'
45401	    # Make sure the PIC flag is empty.  It appears that all Alpha
45402	    # Linux and Compaq Tru64 Unix objects are PIC.
45403	    lt_prog_compiler_pic_CXX=
45404	    lt_prog_compiler_static_CXX='-non_shared'
45405	    ;;
45406	  *)
45407	    ;;
45408	esac
45409	;;
45410      psos*)
45411	;;
45412      solaris*)
45413	case $cc_basename in
45414	  CC* | sunCC*)
45415	    # Sun C++ 4.2, 5.x and Centerline C++
45416	    lt_prog_compiler_pic_CXX='-KPIC'
45417	    lt_prog_compiler_static_CXX='-Bstatic'
45418	    lt_prog_compiler_wl_CXX='-Qoption ld '
45419	    ;;
45420	  gcx*)
45421	    # Green Hills C++ Compiler
45422	    lt_prog_compiler_pic_CXX='-PIC'
45423	    ;;
45424	  *)
45425	    ;;
45426	esac
45427	;;
45428      sunos4*)
45429	case $cc_basename in
45430	  CC*)
45431	    # Sun C++ 4.x
45432	    lt_prog_compiler_pic_CXX='-pic'
45433	    lt_prog_compiler_static_CXX='-Bstatic'
45434	    ;;
45435	  lcc*)
45436	    # Lucid
45437	    lt_prog_compiler_pic_CXX='-pic'
45438	    ;;
45439	  *)
45440	    ;;
45441	esac
45442	;;
45443      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
45444	case $cc_basename in
45445	  CC*)
45446	    lt_prog_compiler_wl_CXX='-Wl,'
45447	    lt_prog_compiler_pic_CXX='-KPIC'
45448	    lt_prog_compiler_static_CXX='-Bstatic'
45449	    ;;
45450	esac
45451	;;
45452      tandem*)
45453	case $cc_basename in
45454	  NCC*)
45455	    # NonStop-UX NCC 3.20
45456	    lt_prog_compiler_pic_CXX='-KPIC'
45457	    ;;
45458	  *)
45459	    ;;
45460	esac
45461	;;
45462      vxworks*)
45463	;;
45464      *)
45465	lt_prog_compiler_can_build_shared_CXX=no
45466	;;
45467    esac
45468  fi
45469
45470case $host_os in
45471  # For platforms that do not support PIC, -DPIC is meaningless:
45472  *djgpp*)
45473    lt_prog_compiler_pic_CXX=
45474    ;;
45475  *)
45476    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
45477    ;;
45478esac
45479
45480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
45481$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
45482if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
45483  $as_echo_n "(cached) " >&6
45484else
45485  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
45486fi
45487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
45488$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
45489lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
45490
45491#
45492# Check to make sure the PIC flag actually works.
45493#
45494if test -n "$lt_prog_compiler_pic_CXX"; then
45495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
45496$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
45497if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
45498  $as_echo_n "(cached) " >&6
45499else
45500  lt_cv_prog_compiler_pic_works_CXX=no
45501   ac_outfile=conftest.$ac_objext
45502   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
45503   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"  ## exclude from sc_useless_quotes_in_assignment
45504   # Insert the option either (1) after the last *FLAGS variable, or
45505   # (2) before a word containing "conftest.", or (3) at the end.
45506   # Note that $ac_compile itself does not contain backslashes and begins
45507   # with a dollar sign (not a hyphen), so the echo should work correctly.
45508   # The option is referenced via a variable to avoid confusing sed.
45509   lt_compile=`echo "$ac_compile" | $SED \
45510   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
45511   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
45512   -e 's:$: $lt_compiler_flag:'`
45513   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
45514   (eval "$lt_compile" 2>conftest.err)
45515   ac_status=$?
45516   cat conftest.err >&5
45517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45518   if (exit $ac_status) && test -s "$ac_outfile"; then
45519     # The compiler can only warn and ignore the option if not recognized
45520     # So say no if there are warnings other than the usual output.
45521     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
45522     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
45523     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
45524       lt_cv_prog_compiler_pic_works_CXX=yes
45525     fi
45526   fi
45527   $RM conftest*
45528
45529fi
45530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
45531$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
45532
45533if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
45534    case $lt_prog_compiler_pic_CXX in
45535     "" | " "*) ;;
45536     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
45537     esac
45538else
45539    lt_prog_compiler_pic_CXX=
45540     lt_prog_compiler_can_build_shared_CXX=no
45541fi
45542
45543fi
45544
45545
45546
45547
45548
45549#
45550# Check to make sure the static flag actually works.
45551#
45552wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
45553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
45554$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
45555if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
45556  $as_echo_n "(cached) " >&6
45557else
45558  lt_cv_prog_compiler_static_works_CXX=no
45559   save_LDFLAGS=$LDFLAGS
45560   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
45561   echo "$lt_simple_link_test_code" > conftest.$ac_ext
45562   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
45563     # The linker can only warn and ignore the option if not recognized
45564     # So say no if there are warnings
45565     if test -s conftest.err; then
45566       # Append any errors to the config.log.
45567       cat conftest.err 1>&5
45568       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
45569       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
45570       if diff conftest.exp conftest.er2 >/dev/null; then
45571         lt_cv_prog_compiler_static_works_CXX=yes
45572       fi
45573     else
45574       lt_cv_prog_compiler_static_works_CXX=yes
45575     fi
45576   fi
45577   $RM -r conftest*
45578   LDFLAGS=$save_LDFLAGS
45579
45580fi
45581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
45582$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
45583
45584if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
45585    :
45586else
45587    lt_prog_compiler_static_CXX=
45588fi
45589
45590
45591
45592
45593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
45594$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
45595if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
45596  $as_echo_n "(cached) " >&6
45597else
45598  lt_cv_prog_compiler_c_o_CXX=no
45599   $RM -r conftest 2>/dev/null
45600   mkdir conftest
45601   cd conftest
45602   mkdir out
45603   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
45604
45605   lt_compiler_flag="-o out/conftest2.$ac_objext"
45606   # Insert the option either (1) after the last *FLAGS variable, or
45607   # (2) before a word containing "conftest.", or (3) at the end.
45608   # Note that $ac_compile itself does not contain backslashes and begins
45609   # with a dollar sign (not a hyphen), so the echo should work correctly.
45610   lt_compile=`echo "$ac_compile" | $SED \
45611   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
45612   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
45613   -e 's:$: $lt_compiler_flag:'`
45614   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
45615   (eval "$lt_compile" 2>out/conftest.err)
45616   ac_status=$?
45617   cat out/conftest.err >&5
45618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45619   if (exit $ac_status) && test -s out/conftest2.$ac_objext
45620   then
45621     # The compiler can only warn and ignore the option if not recognized
45622     # So say no if there are warnings
45623     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
45624     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
45625     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
45626       lt_cv_prog_compiler_c_o_CXX=yes
45627     fi
45628   fi
45629   chmod u+w . 2>&5
45630   $RM conftest*
45631   # SGI C++ compiler will create directory out/ii_files/ for
45632   # template instantiation
45633   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
45634   $RM out/* && rmdir out
45635   cd ..
45636   $RM -r conftest
45637   $RM conftest*
45638
45639fi
45640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
45641$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
45642
45643
45644
45645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
45646$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
45647if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
45648  $as_echo_n "(cached) " >&6
45649else
45650  lt_cv_prog_compiler_c_o_CXX=no
45651   $RM -r conftest 2>/dev/null
45652   mkdir conftest
45653   cd conftest
45654   mkdir out
45655   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
45656
45657   lt_compiler_flag="-o out/conftest2.$ac_objext"
45658   # Insert the option either (1) after the last *FLAGS variable, or
45659   # (2) before a word containing "conftest.", or (3) at the end.
45660   # Note that $ac_compile itself does not contain backslashes and begins
45661   # with a dollar sign (not a hyphen), so the echo should work correctly.
45662   lt_compile=`echo "$ac_compile" | $SED \
45663   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
45664   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
45665   -e 's:$: $lt_compiler_flag:'`
45666   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
45667   (eval "$lt_compile" 2>out/conftest.err)
45668   ac_status=$?
45669   cat out/conftest.err >&5
45670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
45671   if (exit $ac_status) && test -s out/conftest2.$ac_objext
45672   then
45673     # The compiler can only warn and ignore the option if not recognized
45674     # So say no if there are warnings
45675     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
45676     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
45677     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
45678       lt_cv_prog_compiler_c_o_CXX=yes
45679     fi
45680   fi
45681   chmod u+w . 2>&5
45682   $RM conftest*
45683   # SGI C++ compiler will create directory out/ii_files/ for
45684   # template instantiation
45685   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
45686   $RM out/* && rmdir out
45687   cd ..
45688   $RM -r conftest
45689   $RM conftest*
45690
45691fi
45692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
45693$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
45694
45695
45696
45697
45698hard_links=nottested
45699if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
45700  # do not overwrite the value of need_locks provided by the user
45701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
45702$as_echo_n "checking if we can lock with hard links... " >&6; }
45703  hard_links=yes
45704  $RM conftest*
45705  ln conftest.a conftest.b 2>/dev/null && hard_links=no
45706  touch conftest.a
45707  ln conftest.a conftest.b 2>&5 || hard_links=no
45708  ln conftest.a conftest.b 2>/dev/null && hard_links=no
45709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
45710$as_echo "$hard_links" >&6; }
45711  if test no = "$hard_links"; then
45712    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
45713$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
45714    need_locks=warn
45715  fi
45716else
45717  need_locks=no
45718fi
45719
45720
45721
45722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
45723$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
45724
45725  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
45726  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
45727  case $host_os in
45728  aix[4-9]*)
45729    # If we're using GNU nm, then we don't want the "-C" option.
45730    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
45731    # Without the "-l" option, or with the "-B" option, AIX nm treats
45732    # weak defined symbols like other global defined symbols, whereas
45733    # GNU nm marks them as "W".
45734    # While the 'weak' keyword is ignored in the Export File, we need
45735    # it in the Import File for the 'aix-soname' feature, so we have
45736    # to replace the "-B" option with "-P" for AIX nm.
45737    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
45738      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'
45739    else
45740      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'
45741    fi
45742    ;;
45743  pw32*)
45744    export_symbols_cmds_CXX=$ltdll_cmds
45745    ;;
45746  cygwin* | mingw* | cegcc*)
45747    case $cc_basename in
45748    cl*)
45749      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
45750      ;;
45751    *)
45752      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'
45753      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
45754      ;;
45755    esac
45756    ;;
45757  *)
45758    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
45759    ;;
45760  esac
45761
45762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
45763$as_echo "$ld_shlibs_CXX" >&6; }
45764test no = "$ld_shlibs_CXX" && can_build_shared=no
45765
45766with_gnu_ld_CXX=$with_gnu_ld
45767
45768
45769
45770
45771
45772
45773#
45774# Do we need to explicitly link libc?
45775#
45776case "x$archive_cmds_need_lc_CXX" in
45777x|xyes)
45778  # Assume -lc should be added
45779  archive_cmds_need_lc_CXX=yes
45780
45781  if test yes,yes = "$GCC,$enable_shared"; then
45782    case $archive_cmds_CXX in
45783    *'~'*)
45784      # FIXME: we may have to deal with multi-command sequences.
45785      ;;
45786    '$CC '*)
45787      # Test whether the compiler implicitly links with -lc since on some
45788      # systems, -lgcc has to come before -lc. If gcc already passes -lc
45789      # to ld, don't add -lc before -lgcc.
45790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
45791$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
45792if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
45793  $as_echo_n "(cached) " >&6
45794else
45795  $RM conftest*
45796	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
45797
45798	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
45799  (eval $ac_compile) 2>&5
45800  ac_status=$?
45801  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45802  test $ac_status = 0; } 2>conftest.err; then
45803	  soname=conftest
45804	  lib=conftest
45805	  libobjs=conftest.$ac_objext
45806	  deplibs=
45807	  wl=$lt_prog_compiler_wl_CXX
45808	  pic_flag=$lt_prog_compiler_pic_CXX
45809	  compiler_flags=-v
45810	  linker_flags=-v
45811	  verstring=
45812	  output_objdir=.
45813	  libname=conftest
45814	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
45815	  allow_undefined_flag_CXX=
45816	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
45817  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
45818  ac_status=$?
45819  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45820  test $ac_status = 0; }
45821	  then
45822	    lt_cv_archive_cmds_need_lc_CXX=no
45823	  else
45824	    lt_cv_archive_cmds_need_lc_CXX=yes
45825	  fi
45826	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
45827	else
45828	  cat conftest.err 1>&5
45829	fi
45830	$RM conftest*
45831
45832fi
45833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
45834$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
45835      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
45836      ;;
45837    esac
45838  fi
45839  ;;
45840esac
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
45903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
45904$as_echo_n "checking dynamic linker characteristics... " >&6; }
45905
45906library_names_spec=
45907libname_spec='lib$name'
45908soname_spec=
45909shrext_cmds=.so
45910postinstall_cmds=
45911postuninstall_cmds=
45912finish_cmds=
45913finish_eval=
45914shlibpath_var=
45915shlibpath_overrides_runpath=unknown
45916version_type=none
45917dynamic_linker="$host_os ld.so"
45918sys_lib_dlsearch_path_spec="/lib /usr/lib"
45919need_lib_prefix=unknown
45920hardcode_into_libs=no
45921
45922# when you set need_version to no, make sure it does not cause -set_version
45923# flags to be left without arguments
45924need_version=unknown
45925
45926
45927
45928case $host_os in
45929aix3*)
45930  version_type=linux # correct to gnu/linux during the next big refactor
45931  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
45932  shlibpath_var=LIBPATH
45933
45934  # AIX 3 has no versioning support, so we append a major version to the name.
45935  soname_spec='$libname$release$shared_ext$major'
45936  ;;
45937
45938aix[4-9]*)
45939  version_type=linux # correct to gnu/linux during the next big refactor
45940  need_lib_prefix=no
45941  need_version=no
45942  hardcode_into_libs=yes
45943  if test ia64 = "$host_cpu"; then
45944    # AIX 5 supports IA64
45945    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
45946    shlibpath_var=LD_LIBRARY_PATH
45947  else
45948    # With GCC up to 2.95.x, collect2 would create an import file
45949    # for dependence libraries.  The import file would start with
45950    # the line '#! .'.  This would cause the generated library to
45951    # depend on '.', always an invalid library.  This was fixed in
45952    # development snapshots of GCC prior to 3.0.
45953    case $host_os in
45954      aix4 | aix4.[01] | aix4.[01].*)
45955      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
45956	   echo ' yes '
45957	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
45958	:
45959      else
45960	can_build_shared=no
45961      fi
45962      ;;
45963    esac
45964    # Using Import Files as archive members, it is possible to support
45965    # filename-based versioning of shared library archives on AIX. While
45966    # this would work for both with and without runtime linking, it will
45967    # prevent static linking of such archives. So we do filename-based
45968    # shared library versioning with .so extension only, which is used
45969    # when both runtime linking and shared linking is enabled.
45970    # Unfortunately, runtime linking may impact performance, so we do
45971    # not want this to be the default eventually. Also, we use the
45972    # versioned .so libs for executables only if there is the -brtl
45973    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
45974    # To allow for filename-based versioning support, we need to create
45975    # libNAME.so.V as an archive file, containing:
45976    # *) an Import File, referring to the versioned filename of the
45977    #    archive as well as the shared archive member, telling the
45978    #    bitwidth (32 or 64) of that shared object, and providing the
45979    #    list of exported symbols of that shared object, eventually
45980    #    decorated with the 'weak' keyword
45981    # *) the shared object with the F_LOADONLY flag set, to really avoid
45982    #    it being seen by the linker.
45983    # At run time we better use the real file rather than another symlink,
45984    # but for link time we create the symlink libNAME.so -> libNAME.so.V
45985
45986    case $with_aix_soname,$aix_use_runtimelinking in
45987    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
45988    # soname into executable. Probably we can add versioning support to
45989    # collect2, so additional links can be useful in future.
45990    aix,yes) # traditional libtool
45991      dynamic_linker='AIX unversionable lib.so'
45992      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
45993      # instead of lib<name>.a to let people know that these are not
45994      # typical AIX shared libraries.
45995      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
45996      ;;
45997    aix,no) # traditional AIX only
45998      dynamic_linker='AIX lib.a(lib.so.V)'
45999      # We preserve .a as extension for shared libraries through AIX4.2
46000      # and later when we are not doing run time linking.
46001      library_names_spec='$libname$release.a $libname.a'
46002      soname_spec='$libname$release$shared_ext$major'
46003      ;;
46004    svr4,*) # full svr4 only
46005      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
46006      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
46007      # We do not specify a path in Import Files, so LIBPATH fires.
46008      shlibpath_overrides_runpath=yes
46009      ;;
46010    *,yes) # both, prefer svr4
46011      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
46012      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
46013      # unpreferred sharedlib libNAME.a needs extra handling
46014      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"'
46015      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"'
46016      # We do not specify a path in Import Files, so LIBPATH fires.
46017      shlibpath_overrides_runpath=yes
46018      ;;
46019    *,no) # both, prefer aix
46020      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
46021      library_names_spec='$libname$release.a $libname.a'
46022      soname_spec='$libname$release$shared_ext$major'
46023      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
46024      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)'
46025      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"'
46026      ;;
46027    esac
46028    shlibpath_var=LIBPATH
46029  fi
46030  ;;
46031
46032amigaos*)
46033  case $host_cpu in
46034  powerpc)
46035    # Since July 2007 AmigaOS4 officially supports .so libraries.
46036    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
46037    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46038    ;;
46039  m68k)
46040    library_names_spec='$libname.ixlibrary $libname.a'
46041    # Create ${libname}_ixlibrary.a entries in /sys/libs.
46042    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'
46043    ;;
46044  esac
46045  ;;
46046
46047beos*)
46048  library_names_spec='$libname$shared_ext'
46049  dynamic_linker="$host_os ld.so"
46050  shlibpath_var=LIBRARY_PATH
46051  ;;
46052
46053bsdi[45]*)
46054  version_type=linux # correct to gnu/linux during the next big refactor
46055  need_version=no
46056  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46057  soname_spec='$libname$release$shared_ext$major'
46058  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
46059  shlibpath_var=LD_LIBRARY_PATH
46060  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
46061  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
46062  # the default ld.so.conf also contains /usr/contrib/lib and
46063  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
46064  # libtool to hard-code these into programs
46065  ;;
46066
46067cygwin* | mingw* | pw32* | cegcc*)
46068  version_type=windows
46069  shrext_cmds=.dll
46070  need_version=no
46071  need_lib_prefix=no
46072
46073  case $GCC,$cc_basename in
46074  yes,*)
46075    # gcc
46076    library_names_spec='$libname.dll.a'
46077    # DLL is installed to $(libdir)/../bin by postinstall_cmds
46078    postinstall_cmds='base_file=`basename \$file`~
46079      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
46080      dldir=$destdir/`dirname \$dlpath`~
46081      test -d \$dldir || mkdir -p \$dldir~
46082      $install_prog $dir/$dlname \$dldir/$dlname~
46083      chmod a+x \$dldir/$dlname~
46084      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
46085        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
46086      fi'
46087    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
46088      dlpath=$dir/\$dldll~
46089       $RM \$dlpath'
46090    shlibpath_overrides_runpath=yes
46091
46092    case $host_os in
46093    cygwin*)
46094      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
46095      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
46096
46097      ;;
46098    mingw* | cegcc*)
46099      # MinGW DLLs use traditional 'lib' prefix
46100      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
46101      ;;
46102    pw32*)
46103      # pw32 DLLs use 'pw' prefix rather than 'lib'
46104      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
46105      ;;
46106    esac
46107    dynamic_linker='Win32 ld.exe'
46108    ;;
46109
46110  *,cl*)
46111    # Native MSVC
46112    libname_spec='$name'
46113    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
46114    library_names_spec='$libname.dll.lib'
46115
46116    case $build_os in
46117    mingw*)
46118      sys_lib_search_path_spec=
46119      lt_save_ifs=$IFS
46120      IFS=';'
46121      for lt_path in $LIB
46122      do
46123        IFS=$lt_save_ifs
46124        # Let DOS variable expansion print the short 8.3 style file name.
46125        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
46126        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
46127      done
46128      IFS=$lt_save_ifs
46129      # Convert to MSYS style.
46130      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
46131      ;;
46132    cygwin*)
46133      # Convert to unix form, then to dos form, then back to unix form
46134      # but this time dos style (no spaces!) so that the unix form looks
46135      # like /cygdrive/c/PROGRA~1:/cygdr...
46136      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
46137      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
46138      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
46139      ;;
46140    *)
46141      sys_lib_search_path_spec=$LIB
46142      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
46143        # It is most probably a Windows format PATH.
46144        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
46145      else
46146        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
46147      fi
46148      # FIXME: find the short name or the path components, as spaces are
46149      # common. (e.g. "Program Files" -> "PROGRA~1")
46150      ;;
46151    esac
46152
46153    # DLL is installed to $(libdir)/../bin by postinstall_cmds
46154    postinstall_cmds='base_file=`basename \$file`~
46155      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
46156      dldir=$destdir/`dirname \$dlpath`~
46157      test -d \$dldir || mkdir -p \$dldir~
46158      $install_prog $dir/$dlname \$dldir/$dlname'
46159    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
46160      dlpath=$dir/\$dldll~
46161       $RM \$dlpath'
46162    shlibpath_overrides_runpath=yes
46163    dynamic_linker='Win32 link.exe'
46164    ;;
46165
46166  *)
46167    # Assume MSVC wrapper
46168    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
46169    dynamic_linker='Win32 ld.exe'
46170    ;;
46171  esac
46172  # FIXME: first we should search . and the directory the executable is in
46173  shlibpath_var=PATH
46174  ;;
46175
46176darwin* | rhapsody*)
46177  dynamic_linker="$host_os dyld"
46178  version_type=darwin
46179  need_lib_prefix=no
46180  need_version=no
46181  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
46182  soname_spec='$libname$release$major$shared_ext'
46183  shlibpath_overrides_runpath=yes
46184  shlibpath_var=DYLD_LIBRARY_PATH
46185  shrext_cmds=`test .$module = .yes && echo .so || echo .dylib`
46186
46187  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
46188  ;;
46189
46190dgux*)
46191  version_type=linux # correct to gnu/linux during the next big refactor
46192  need_lib_prefix=no
46193  need_version=no
46194  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46195  soname_spec='$libname$release$shared_ext$major'
46196  shlibpath_var=LD_LIBRARY_PATH
46197  ;;
46198
46199freebsd* | dragonfly*)
46200  # DragonFly does not have aout.  When/if they implement a new
46201  # versioning mechanism, adjust this.
46202  if test -x /usr/bin/objformat; then
46203    objformat=`/usr/bin/objformat`
46204  else
46205    case $host_os in
46206    freebsd[23].*) objformat=aout ;;
46207    *) objformat=elf ;;
46208    esac
46209  fi
46210  version_type=freebsd-$objformat
46211  case $version_type in
46212    freebsd-elf*)
46213      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46214      soname_spec='$libname$release$shared_ext$major'
46215      need_version=no
46216      need_lib_prefix=no
46217      ;;
46218    freebsd-*)
46219      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
46220      need_version=yes
46221      ;;
46222  esac
46223  shlibpath_var=LD_LIBRARY_PATH
46224  case $host_os in
46225  freebsd2.*)
46226    shlibpath_overrides_runpath=yes
46227    ;;
46228  freebsd3.[01]* | freebsdelf3.[01]*)
46229    shlibpath_overrides_runpath=yes
46230    hardcode_into_libs=yes
46231    ;;
46232  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
46233  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
46234    shlibpath_overrides_runpath=no
46235    hardcode_into_libs=yes
46236    ;;
46237  *) # from 4.6 on, and DragonFly
46238    shlibpath_overrides_runpath=yes
46239    hardcode_into_libs=yes
46240    ;;
46241  esac
46242  ;;
46243
46244haiku*)
46245  version_type=linux # correct to gnu/linux during the next big refactor
46246  need_lib_prefix=no
46247  need_version=no
46248  dynamic_linker="$host_os runtime_loader"
46249  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46250  soname_spec='$libname$release$shared_ext$major'
46251  shlibpath_var=LIBRARY_PATH
46252  shlibpath_overrides_runpath=no
46253  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
46254  hardcode_into_libs=yes
46255  ;;
46256
46257hpux9* | hpux10* | hpux11*)
46258  # Give a soname corresponding to the major version so that dld.sl refuses to
46259  # link against other versions.
46260  version_type=sunos
46261  need_lib_prefix=no
46262  need_version=no
46263  case $host_cpu in
46264  ia64*)
46265    shrext_cmds='.so'
46266    hardcode_into_libs=yes
46267    dynamic_linker="$host_os dld.so"
46268    shlibpath_var=LD_LIBRARY_PATH
46269    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
46270    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46271    soname_spec='$libname$release$shared_ext$major'
46272    if test 32 = "$HPUX_IA64_MODE"; then
46273      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
46274      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
46275    else
46276      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
46277      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
46278    fi
46279    ;;
46280  hppa*64*)
46281    shrext_cmds='.sl'
46282    hardcode_into_libs=yes
46283    dynamic_linker="$host_os dld.sl"
46284    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
46285    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
46286    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46287    soname_spec='$libname$release$shared_ext$major'
46288    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
46289    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
46290    ;;
46291  *)
46292    shrext_cmds='.sl'
46293    dynamic_linker="$host_os dld.sl"
46294    shlibpath_var=SHLIB_PATH
46295    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
46296    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46297    soname_spec='$libname$release$shared_ext$major'
46298    ;;
46299  esac
46300  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
46301  postinstall_cmds='chmod 555 $lib'
46302  # or fails outright, so override atomically:
46303  install_override_mode=555
46304  ;;
46305
46306interix[3-9]*)
46307  version_type=linux # correct to gnu/linux during the next big refactor
46308  need_lib_prefix=no
46309  need_version=no
46310  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46311  soname_spec='$libname$release$shared_ext$major'
46312  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
46313  shlibpath_var=LD_LIBRARY_PATH
46314  shlibpath_overrides_runpath=no
46315  hardcode_into_libs=yes
46316  ;;
46317
46318irix5* | irix6* | nonstopux*)
46319  case $host_os in
46320    nonstopux*) version_type=nonstopux ;;
46321    *)
46322	if test yes = "$lt_cv_prog_gnu_ld"; then
46323		version_type=linux # correct to gnu/linux during the next big refactor
46324	else
46325		version_type=irix
46326	fi ;;
46327  esac
46328  need_lib_prefix=no
46329  need_version=no
46330  soname_spec='$libname$release$shared_ext$major'
46331  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
46332  case $host_os in
46333  irix5* | nonstopux*)
46334    libsuff= shlibsuff=
46335    ;;
46336  *)
46337    case $LD in # libtool.m4 will add one of these switches to LD
46338    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
46339      libsuff= shlibsuff= libmagic=32-bit;;
46340    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
46341      libsuff=32 shlibsuff=N32 libmagic=N32;;
46342    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
46343      libsuff=64 shlibsuff=64 libmagic=64-bit;;
46344    *) libsuff= shlibsuff= libmagic=never-match;;
46345    esac
46346    ;;
46347  esac
46348  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
46349  shlibpath_overrides_runpath=no
46350  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
46351  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
46352  hardcode_into_libs=yes
46353  ;;
46354
46355# No shared lib support for Linux oldld, aout, or coff.
46356linux*oldld* | linux*aout* | linux*coff*)
46357  dynamic_linker=no
46358  ;;
46359
46360linux*android*)
46361  version_type=none # Android doesn't support versioned libraries.
46362  need_lib_prefix=no
46363  need_version=no
46364  library_names_spec='$libname$release$shared_ext'
46365  soname_spec='$libname$release$shared_ext'
46366  finish_cmds=
46367  shlibpath_var=LD_LIBRARY_PATH
46368  shlibpath_overrides_runpath=yes
46369
46370  # This implies no fast_install, which is unacceptable.
46371  # Some rework will be needed to allow for fast_install
46372  # before this can be enabled.
46373  hardcode_into_libs=yes
46374
46375  dynamic_linker='Android linker'
46376  # Don't embed -rpath directories since the linker doesn't support them.
46377  hardcode_libdir_flag_spec_CXX='-L$libdir'
46378  ;;
46379
46380# This must be glibc/ELF.
46381linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
46382  version_type=linux # correct to gnu/linux during the next big refactor
46383  need_lib_prefix=no
46384  need_version=no
46385  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46386  soname_spec='$libname$release$shared_ext$major'
46387  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
46388  shlibpath_var=LD_LIBRARY_PATH
46389  shlibpath_overrides_runpath=no
46390
46391  # Some binutils ld are patched to set DT_RUNPATH
46392  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
46393  $as_echo_n "(cached) " >&6
46394else
46395  lt_cv_shlibpath_overrides_runpath=no
46396    save_LDFLAGS=$LDFLAGS
46397    save_libdir=$libdir
46398    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
46399	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
46400    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46401/* end confdefs.h.  */
46402
46403#ifdef F77_DUMMY_MAIN
46404
46405#  ifdef __cplusplus
46406     extern "C"
46407#  endif
46408   int F77_DUMMY_MAIN() { return 1; }
46409
46410#endif
46411int
46412main ()
46413{
46414
46415  ;
46416  return 0;
46417}
46418_ACEOF
46419if ac_fn_cxx_try_link "$LINENO"; then :
46420  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
46421  lt_cv_shlibpath_overrides_runpath=yes
46422fi
46423fi
46424rm -f core conftest.err conftest.$ac_objext \
46425    conftest$ac_exeext conftest.$ac_ext
46426    LDFLAGS=$save_LDFLAGS
46427    libdir=$save_libdir
46428
46429fi
46430
46431  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
46432
46433  # This implies no fast_install, which is unacceptable.
46434  # Some rework will be needed to allow for fast_install
46435  # before this can be enabled.
46436  hardcode_into_libs=yes
46437
46438  # Add ABI-specific directories to the system library path.
46439  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
46440
46441  # Ideally, we could use ldconfig to report *all* directores which are
46442  # searched for libraries, however this is still not possible.  Aside from not
46443  # being certain /sbin/ldconfig is available, command
46444  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
46445  # even though it is searched at run-time.  Try to do the best guess by
46446  # appending ld.so.conf contents (and includes) to the search path.
46447  if test -f /etc/ld.so.conf; then
46448    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' ' '`
46449    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
46450  fi
46451
46452  # We used to test for /lib/ld.so.1 and disable shared libraries on
46453  # powerpc, because MkLinux only supported shared libraries with the
46454  # GNU dynamic linker.  Since this was broken with cross compilers,
46455  # most powerpc-linux boxes support dynamic linking these days and
46456  # people can always --disable-shared, the test was removed, and we
46457  # assume the GNU/Linux dynamic linker is in use.
46458  dynamic_linker='GNU/Linux ld.so'
46459  ;;
46460
46461netbsd*)
46462  version_type=sunos
46463  need_lib_prefix=no
46464  need_version=no
46465  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
46466    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
46467    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
46468    dynamic_linker='NetBSD (a.out) ld.so'
46469  else
46470    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46471    soname_spec='$libname$release$shared_ext$major'
46472    dynamic_linker='NetBSD ld.elf_so'
46473  fi
46474  shlibpath_var=LD_LIBRARY_PATH
46475  shlibpath_overrides_runpath=yes
46476  hardcode_into_libs=yes
46477  ;;
46478
46479newsos6)
46480  version_type=linux # correct to gnu/linux during the next big refactor
46481  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46482  shlibpath_var=LD_LIBRARY_PATH
46483  shlibpath_overrides_runpath=yes
46484  ;;
46485
46486*nto* | *qnx*)
46487  version_type=qnx
46488  need_lib_prefix=no
46489  need_version=no
46490  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46491  soname_spec='$libname$release$shared_ext$major'
46492  shlibpath_var=LD_LIBRARY_PATH
46493  shlibpath_overrides_runpath=no
46494  hardcode_into_libs=yes
46495  dynamic_linker='ldqnx.so'
46496  ;;
46497
46498openbsd* | bitrig*)
46499  version_type=sunos
46500  sys_lib_dlsearch_path_spec=/usr/lib
46501  need_lib_prefix=no
46502  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
46503    need_version=no
46504  else
46505    need_version=yes
46506  fi
46507  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
46508  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
46509  shlibpath_var=LD_LIBRARY_PATH
46510  shlibpath_overrides_runpath=yes
46511  ;;
46512
46513os2*)
46514  libname_spec='$name'
46515  version_type=windows
46516  shrext_cmds=.dll
46517  need_version=no
46518  need_lib_prefix=no
46519  # OS/2 can only load a DLL with a base name of 8 characters or less.
46520  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
46521    v=$($ECHO $release$versuffix | tr -d .-);
46522    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
46523    $ECHO $n$v`$shared_ext'
46524  library_names_spec='${libname}_dll.$libext'
46525  dynamic_linker='OS/2 ld.exe'
46526  shlibpath_var=BEGINLIBPATH
46527  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
46528  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
46529  postinstall_cmds='base_file=`basename \$file`~
46530    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
46531    dldir=$destdir/`dirname \$dlpath`~
46532    test -d \$dldir || mkdir -p \$dldir~
46533    $install_prog $dir/$dlname \$dldir/$dlname~
46534    chmod a+x \$dldir/$dlname~
46535    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
46536      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
46537    fi'
46538  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
46539    dlpath=$dir/\$dldll~
46540    $RM \$dlpath'
46541  ;;
46542
46543osf3* | osf4* | osf5*)
46544  version_type=osf
46545  need_lib_prefix=no
46546  need_version=no
46547  soname_spec='$libname$release$shared_ext$major'
46548  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46549  shlibpath_var=LD_LIBRARY_PATH
46550  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
46551  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
46552  ;;
46553
46554rdos*)
46555  dynamic_linker=no
46556  ;;
46557
46558solaris*)
46559  version_type=linux # correct to gnu/linux during the next big refactor
46560  need_lib_prefix=no
46561  need_version=no
46562  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46563  soname_spec='$libname$release$shared_ext$major'
46564  shlibpath_var=LD_LIBRARY_PATH
46565  shlibpath_overrides_runpath=yes
46566  hardcode_into_libs=yes
46567  # ldd complains unless libraries are executable
46568  postinstall_cmds='chmod +x $lib'
46569  ;;
46570
46571sunos4*)
46572  version_type=sunos
46573  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
46574  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
46575  shlibpath_var=LD_LIBRARY_PATH
46576  shlibpath_overrides_runpath=yes
46577  if test yes = "$with_gnu_ld"; then
46578    need_lib_prefix=no
46579  fi
46580  need_version=yes
46581  ;;
46582
46583sysv4 | sysv4.3*)
46584  version_type=linux # correct to gnu/linux during the next big refactor
46585  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46586  soname_spec='$libname$release$shared_ext$major'
46587  shlibpath_var=LD_LIBRARY_PATH
46588  case $host_vendor in
46589    sni)
46590      shlibpath_overrides_runpath=no
46591      need_lib_prefix=no
46592      runpath_var=LD_RUN_PATH
46593      ;;
46594    siemens)
46595      need_lib_prefix=no
46596      ;;
46597    motorola)
46598      need_lib_prefix=no
46599      need_version=no
46600      shlibpath_overrides_runpath=no
46601      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
46602      ;;
46603  esac
46604  ;;
46605
46606sysv4*MP*)
46607  if test -d /usr/nec; then
46608    version_type=linux # correct to gnu/linux during the next big refactor
46609    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
46610    soname_spec='$libname$shared_ext.$major'
46611    shlibpath_var=LD_LIBRARY_PATH
46612  fi
46613  ;;
46614
46615sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
46616  version_type=sco
46617  need_lib_prefix=no
46618  need_version=no
46619  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
46620  soname_spec='$libname$release$shared_ext$major'
46621  shlibpath_var=LD_LIBRARY_PATH
46622  shlibpath_overrides_runpath=yes
46623  hardcode_into_libs=yes
46624  if test yes = "$with_gnu_ld"; then
46625    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
46626  else
46627    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
46628    case $host_os in
46629      sco3.2v5*)
46630        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
46631	;;
46632    esac
46633  fi
46634  sys_lib_dlsearch_path_spec='/usr/lib'
46635  ;;
46636
46637tpf*)
46638  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
46639  version_type=linux # correct to gnu/linux during the next big refactor
46640  need_lib_prefix=no
46641  need_version=no
46642  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46643  shlibpath_var=LD_LIBRARY_PATH
46644  shlibpath_overrides_runpath=no
46645  hardcode_into_libs=yes
46646  ;;
46647
46648uts4*)
46649  version_type=linux # correct to gnu/linux during the next big refactor
46650  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
46651  soname_spec='$libname$release$shared_ext$major'
46652  shlibpath_var=LD_LIBRARY_PATH
46653  ;;
46654
46655*)
46656  dynamic_linker=no
46657  ;;
46658esac
46659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
46660$as_echo "$dynamic_linker" >&6; }
46661test no = "$dynamic_linker" && can_build_shared=no
46662
46663variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
46664if test yes = "$GCC"; then
46665  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
46666fi
46667
46668if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
46669  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
46670fi
46671
46672if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
46673  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
46674fi
46675
46676# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
46677configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
46678
46679# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
46680func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
46681
46682# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
46683configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
46684
46685
46686
46687
46688
46689
46690
46691
46692
46693
46694
46695
46696
46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
46725$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
46726hardcode_action_CXX=
46727if test -n "$hardcode_libdir_flag_spec_CXX" ||
46728   test -n "$runpath_var_CXX" ||
46729   test yes = "$hardcode_automatic_CXX"; then
46730
46731  # We can hardcode non-existent directories.
46732  if test no != "$hardcode_direct_CXX" &&
46733     # If the only mechanism to avoid hardcoding is shlibpath_var, we
46734     # have to relink, otherwise we might link with an installed library
46735     # when we should be linking with a yet-to-be-installed one
46736     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
46737     test no != "$hardcode_minus_L_CXX"; then
46738    # Linking always hardcodes the temporary library directory.
46739    hardcode_action_CXX=relink
46740  else
46741    # We can link without hardcoding, and we can hardcode nonexisting dirs.
46742    hardcode_action_CXX=immediate
46743  fi
46744else
46745  # We cannot hardcode anything, or else we can only hardcode existing
46746  # directories.
46747  hardcode_action_CXX=unsupported
46748fi
46749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
46750$as_echo "$hardcode_action_CXX" >&6; }
46751
46752if test relink = "$hardcode_action_CXX" ||
46753   test yes = "$inherit_rpath_CXX"; then
46754  # Fast installation is not supported
46755  enable_fast_install=no
46756elif test yes = "$shlibpath_overrides_runpath" ||
46757     test no = "$enable_shared"; then
46758  # Fast installation is not necessary
46759  enable_fast_install=needless
46760fi
46761
46762
46763
46764
46765
46766
46767
46768  fi # test -n "$compiler"
46769
46770  CC=$lt_save_CC
46771  CFLAGS=$lt_save_CFLAGS
46772  LDCXX=$LD
46773  LD=$lt_save_LD
46774  GCC=$lt_save_GCC
46775  with_gnu_ld=$lt_save_with_gnu_ld
46776  lt_cv_path_LDCXX=$lt_cv_path_LD
46777  lt_cv_path_LD=$lt_save_path_LD
46778  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
46779  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
46780fi # test yes != "$_lt_caught_CXX_error"
46781
46782ac_ext=c
46783ac_cpp='$CPP $CPPFLAGS'
46784ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46785ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46786ac_compiler_gnu=$ac_cv_c_compiler_gnu
46787
46788
46789
46790      ac_ext=f
46791ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
46792ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46793ac_compiler_gnu=$ac_cv_f77_compiler_gnu
46794
46795if test -z "$F77" || test no = "$F77"; then
46796  _lt_disable_F77=yes
46797fi
46798
46799archive_cmds_need_lc_F77=no
46800allow_undefined_flag_F77=
46801always_export_symbols_F77=no
46802archive_expsym_cmds_F77=
46803export_dynamic_flag_spec_F77=
46804hardcode_direct_F77=no
46805hardcode_direct_absolute_F77=no
46806hardcode_libdir_flag_spec_F77=
46807hardcode_libdir_separator_F77=
46808hardcode_minus_L_F77=no
46809hardcode_automatic_F77=no
46810inherit_rpath_F77=no
46811module_cmds_F77=
46812module_expsym_cmds_F77=
46813link_all_deplibs_F77=unknown
46814old_archive_cmds_F77=$old_archive_cmds
46815reload_flag_F77=$reload_flag
46816reload_cmds_F77=$reload_cmds
46817no_undefined_flag_F77=
46818whole_archive_flag_spec_F77=
46819enable_shared_with_static_runtimes_F77=no
46820
46821# Source file extension for f77 test sources.
46822ac_ext=f
46823
46824# Object file extension for compiled f77 test sources.
46825objext=o
46826objext_F77=$objext
46827
46828# No sense in running all these tests if we already determined that
46829# the F77 compiler isn't working.  Some variables (like enable_shared)
46830# are currently assumed to apply to all compilers on this platform,
46831# and will be corrupted by setting them based on a non-working compiler.
46832if test yes != "$_lt_disable_F77"; then
46833  # Code to be used in simple compile tests
46834  lt_simple_compile_test_code="\
46835      subroutine t
46836      return
46837      end
46838"
46839
46840  # Code to be used in simple link tests
46841  lt_simple_link_test_code="\
46842      program t
46843      end
46844"
46845
46846  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
46847
46848
46849
46850
46851
46852
46853# If no C compiler was specified, use CC.
46854LTCC=${LTCC-"$CC"}
46855
46856# If no C compiler flags were specified, use CFLAGS.
46857LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
46858
46859# Allow CC to be a program name with arguments.
46860compiler=$CC
46861
46862
46863  # save warnings/boilerplate of simple test code
46864  ac_outfile=conftest.$ac_objext
46865echo "$lt_simple_compile_test_code" >conftest.$ac_ext
46866eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
46867_lt_compiler_boilerplate=`cat conftest.err`
46868$RM conftest*
46869
46870  ac_outfile=conftest.$ac_objext
46871echo "$lt_simple_link_test_code" >conftest.$ac_ext
46872eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
46873_lt_linker_boilerplate=`cat conftest.err`
46874$RM -r conftest*
46875
46876
46877  # Allow CC to be a program name with arguments.
46878  lt_save_CC=$CC
46879  lt_save_GCC=$GCC
46880  lt_save_CFLAGS=$CFLAGS
46881  CC=${F77-"f77"}
46882  CFLAGS=$FFLAGS
46883  compiler=$CC
46884  compiler_F77=$CC
46885  func_cc_basename $compiler
46886cc_basename=$func_cc_basename_result
46887
46888  GCC=$G77
46889  if test -n "$compiler"; then
46890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
46891$as_echo_n "checking if libtool supports shared libraries... " >&6; }
46892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
46893$as_echo "$can_build_shared" >&6; }
46894
46895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
46896$as_echo_n "checking whether to build shared libraries... " >&6; }
46897    test no = "$can_build_shared" && enable_shared=no
46898
46899    # On AIX, shared libraries and static libraries use the same namespace, and
46900    # are all built from PIC.
46901    case $host_os in
46902      aix3*)
46903        test yes = "$enable_shared" && enable_static=no
46904        if test -n "$RANLIB"; then
46905          archive_cmds="$archive_cmds~\$RANLIB \$lib"
46906          postinstall_cmds='$RANLIB $lib'
46907        fi
46908        ;;
46909      aix[4-9]*)
46910	if test ia64 != "$host_cpu"; then
46911	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
46912	  yes,aix,yes) ;;		# shared object as lib.so file only
46913	  yes,svr4,*) ;;		# shared object as lib.so archive member only
46914	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
46915	  esac
46916	fi
46917        ;;
46918    esac
46919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
46920$as_echo "$enable_shared" >&6; }
46921
46922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
46923$as_echo_n "checking whether to build static libraries... " >&6; }
46924    # Make sure either enable_shared or enable_static is yes.
46925    test yes = "$enable_shared" || enable_static=yes
46926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
46927$as_echo "$enable_static" >&6; }
46928
46929    GCC_F77=$G77
46930    LD_F77=$LD
46931
46932    ## CAVEAT EMPTOR:
46933    ## There is no encapsulation within the following macros, do not change
46934    ## the running order or otherwise move them around unless you know exactly
46935    ## what you are doing...
46936    lt_prog_compiler_wl_F77=
46937lt_prog_compiler_pic_F77=
46938lt_prog_compiler_static_F77=
46939
46940
46941  if test yes = "$GCC"; then
46942    lt_prog_compiler_wl_F77='-Wl,'
46943    lt_prog_compiler_static_F77='-static'
46944
46945    case $host_os in
46946      aix*)
46947      # All AIX code is PIC.
46948      if test ia64 = "$host_cpu"; then
46949	# AIX 5 now supports IA64 processor
46950	lt_prog_compiler_static_F77='-Bstatic'
46951      fi
46952      lt_prog_compiler_pic_F77='-fPIC'
46953      ;;
46954
46955    amigaos*)
46956      case $host_cpu in
46957      powerpc)
46958            # see comment about AmigaOS4 .so support
46959            lt_prog_compiler_pic_F77='-fPIC'
46960        ;;
46961      m68k)
46962            # FIXME: we need at least 68020 code to build shared libraries, but
46963            # adding the '-m68020' flag to GCC prevents building anything better,
46964            # like '-m68040'.
46965            lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
46966        ;;
46967      esac
46968      ;;
46969
46970    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
46971      # PIC is the default for these OSes.
46972      ;;
46973
46974    mingw* | cygwin* | pw32* | os2* | cegcc*)
46975      # This hack is so that the source file can tell whether it is being
46976      # built for inclusion in a dll (and should export symbols for example).
46977      # Although the cygwin gcc ignores -fPIC, still need this for old-style
46978      # (--disable-auto-import) libraries
46979      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
46980      case $host_os in
46981      os2*)
46982	lt_prog_compiler_static_F77='$wl-static'
46983	;;
46984      esac
46985      ;;
46986
46987    darwin* | rhapsody*)
46988      # PIC is the default on this platform
46989      # Common symbols not allowed in MH_DYLIB files
46990      lt_prog_compiler_pic_F77='-fno-common'
46991      ;;
46992
46993    haiku*)
46994      # PIC is the default for Haiku.
46995      # The "-static" flag exists, but is broken.
46996      lt_prog_compiler_static_F77=
46997      ;;
46998
46999    hpux*)
47000      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
47001      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
47002      # sets the default TLS model and affects inlining.
47003      case $host_cpu in
47004      hppa*64*)
47005	# +Z the default
47006	;;
47007      *)
47008	lt_prog_compiler_pic_F77='-fPIC'
47009	;;
47010      esac
47011      ;;
47012
47013    interix[3-9]*)
47014      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
47015      # Instead, we relocate shared libraries at runtime.
47016      ;;
47017
47018    msdosdjgpp*)
47019      # Just because we use GCC doesn't mean we suddenly get shared libraries
47020      # on systems that don't support them.
47021      lt_prog_compiler_can_build_shared_F77=no
47022      enable_shared=no
47023      ;;
47024
47025    *nto* | *qnx*)
47026      # QNX uses GNU C++, but need to define -shared option too, otherwise
47027      # it will coredump.
47028      lt_prog_compiler_pic_F77='-fPIC -shared'
47029      ;;
47030
47031    sysv4*MP*)
47032      if test -d /usr/nec; then
47033	lt_prog_compiler_pic_F77=-Kconform_pic
47034      fi
47035      ;;
47036
47037    *)
47038      lt_prog_compiler_pic_F77='-fPIC'
47039      ;;
47040    esac
47041
47042    case $cc_basename in
47043    nvcc*) # Cuda Compiler Driver 2.2
47044      lt_prog_compiler_wl_F77='-Xlinker '
47045      if test -n "$lt_prog_compiler_pic_F77"; then
47046        lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77"
47047      fi
47048      ;;
47049    esac
47050  else
47051    # PORTME Check for flag to pass linker flags through the system compiler.
47052    case $host_os in
47053    aix*)
47054      lt_prog_compiler_wl_F77='-Wl,'
47055      if test ia64 = "$host_cpu"; then
47056	# AIX 5 now supports IA64 processor
47057	lt_prog_compiler_static_F77='-Bstatic'
47058      else
47059	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
47060      fi
47061      ;;
47062
47063    darwin* | rhapsody*)
47064      # PIC is the default on this platform
47065      # Common symbols not allowed in MH_DYLIB files
47066      lt_prog_compiler_pic_F77='-fno-common'
47067      case $cc_basename in
47068      nagfor*)
47069        # NAG Fortran compiler
47070        lt_prog_compiler_wl_F77='-Wl,-Wl,,'
47071        lt_prog_compiler_pic_F77='-PIC'
47072        lt_prog_compiler_static_F77='-Bstatic'
47073        ;;
47074      esac
47075      ;;
47076
47077    mingw* | cygwin* | pw32* | os2* | cegcc*)
47078      # This hack is so that the source file can tell whether it is being
47079      # built for inclusion in a dll (and should export symbols for example).
47080      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
47081      case $host_os in
47082      os2*)
47083	lt_prog_compiler_static_F77='$wl-static'
47084	;;
47085      esac
47086      ;;
47087
47088    hpux9* | hpux10* | hpux11*)
47089      lt_prog_compiler_wl_F77='-Wl,'
47090      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
47091      # not for PA HP-UX.
47092      case $host_cpu in
47093      hppa*64*|ia64*)
47094	# +Z the default
47095	;;
47096      *)
47097	lt_prog_compiler_pic_F77='+Z'
47098	;;
47099      esac
47100      # Is there a better lt_prog_compiler_static that works with the bundled CC?
47101      lt_prog_compiler_static_F77='$wl-a ${wl}archive'
47102      ;;
47103
47104    irix5* | irix6* | nonstopux*)
47105      lt_prog_compiler_wl_F77='-Wl,'
47106      # PIC (with -KPIC) is the default.
47107      lt_prog_compiler_static_F77='-non_shared'
47108      ;;
47109
47110    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
47111      case $cc_basename in
47112      # old Intel for x86_64, which still supported -KPIC.
47113      ecc*)
47114	lt_prog_compiler_wl_F77='-Wl,'
47115	lt_prog_compiler_pic_F77='-KPIC'
47116	lt_prog_compiler_static_F77='-static'
47117        ;;
47118      # icc used to be incompatible with GCC.
47119      # ICC 10 doesn't accept -KPIC any more.
47120      icc* | ifort*)
47121	lt_prog_compiler_wl_F77='-Wl,'
47122	lt_prog_compiler_pic_F77='-fPIC'
47123	lt_prog_compiler_static_F77='-static'
47124        ;;
47125      # Lahey Fortran 8.1.
47126      lf95*)
47127	lt_prog_compiler_wl_F77='-Wl,'
47128	lt_prog_compiler_pic_F77='--shared'
47129	lt_prog_compiler_static_F77='--static'
47130	;;
47131      nagfor*)
47132	# NAG Fortran compiler
47133	lt_prog_compiler_wl_F77='-Wl,-Wl,,'
47134	lt_prog_compiler_pic_F77='-PIC'
47135	lt_prog_compiler_static_F77='-Bstatic'
47136	;;
47137      tcc*)
47138	# Fabrice Bellard et al's Tiny C Compiler
47139	lt_prog_compiler_wl_F77='-Wl,'
47140	lt_prog_compiler_pic_F77='-fPIC'
47141	lt_prog_compiler_static_F77='-static'
47142	;;
47143      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47144        # Portland Group compilers (*not* the Pentium gcc compiler,
47145	# which looks to be a dead project)
47146	lt_prog_compiler_wl_F77='-Wl,'
47147	lt_prog_compiler_pic_F77='-fpic'
47148	lt_prog_compiler_static_F77='-Bstatic'
47149        ;;
47150      ccc*)
47151        lt_prog_compiler_wl_F77='-Wl,'
47152        # All Alpha code is PIC.
47153        lt_prog_compiler_static_F77='-non_shared'
47154        ;;
47155      xl* | bgxl* | bgf* | mpixl*)
47156	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47157	lt_prog_compiler_wl_F77='-Wl,'
47158	lt_prog_compiler_pic_F77='-qpic'
47159	lt_prog_compiler_static_F77='-qstaticlink'
47160	;;
47161      *)
47162	case `$CC -V 2>&1 | sed 5q` in
47163	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
47164	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47165	  lt_prog_compiler_pic_F77='-KPIC'
47166	  lt_prog_compiler_static_F77='-Bstatic'
47167	  lt_prog_compiler_wl_F77=''
47168	  ;;
47169	*Sun\ F* | *Sun*Fortran*)
47170	  lt_prog_compiler_pic_F77='-KPIC'
47171	  lt_prog_compiler_static_F77='-Bstatic'
47172	  lt_prog_compiler_wl_F77='-Qoption ld '
47173	  ;;
47174	*Sun\ C*)
47175	  # Sun C 5.9
47176	  lt_prog_compiler_pic_F77='-KPIC'
47177	  lt_prog_compiler_static_F77='-Bstatic'
47178	  lt_prog_compiler_wl_F77='-Wl,'
47179	  ;;
47180        *Intel*\ [CF]*Compiler*)
47181	  lt_prog_compiler_wl_F77='-Wl,'
47182	  lt_prog_compiler_pic_F77='-fPIC'
47183	  lt_prog_compiler_static_F77='-static'
47184	  ;;
47185	*Portland\ Group*)
47186	  lt_prog_compiler_wl_F77='-Wl,'
47187	  lt_prog_compiler_pic_F77='-fpic'
47188	  lt_prog_compiler_static_F77='-Bstatic'
47189	  ;;
47190	esac
47191	;;
47192      esac
47193      ;;
47194
47195    newsos6)
47196      lt_prog_compiler_pic_F77='-KPIC'
47197      lt_prog_compiler_static_F77='-Bstatic'
47198      ;;
47199
47200    *nto* | *qnx*)
47201      # QNX uses GNU C++, but need to define -shared option too, otherwise
47202      # it will coredump.
47203      lt_prog_compiler_pic_F77='-fPIC -shared'
47204      ;;
47205
47206    osf3* | osf4* | osf5*)
47207      lt_prog_compiler_wl_F77='-Wl,'
47208      # All OSF/1 code is PIC.
47209      lt_prog_compiler_static_F77='-non_shared'
47210      ;;
47211
47212    rdos*)
47213      lt_prog_compiler_static_F77='-non_shared'
47214      ;;
47215
47216    solaris*)
47217      lt_prog_compiler_pic_F77='-KPIC'
47218      lt_prog_compiler_static_F77='-Bstatic'
47219      case $cc_basename in
47220      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
47221	lt_prog_compiler_wl_F77='-Qoption ld ';;
47222      *)
47223	lt_prog_compiler_wl_F77='-Wl,';;
47224      esac
47225      ;;
47226
47227    sunos4*)
47228      lt_prog_compiler_wl_F77='-Qoption ld '
47229      lt_prog_compiler_pic_F77='-PIC'
47230      lt_prog_compiler_static_F77='-Bstatic'
47231      ;;
47232
47233    sysv4 | sysv4.2uw2* | sysv4.3*)
47234      lt_prog_compiler_wl_F77='-Wl,'
47235      lt_prog_compiler_pic_F77='-KPIC'
47236      lt_prog_compiler_static_F77='-Bstatic'
47237      ;;
47238
47239    sysv4*MP*)
47240      if test -d /usr/nec; then
47241	lt_prog_compiler_pic_F77='-Kconform_pic'
47242	lt_prog_compiler_static_F77='-Bstatic'
47243      fi
47244      ;;
47245
47246    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
47247      lt_prog_compiler_wl_F77='-Wl,'
47248      lt_prog_compiler_pic_F77='-KPIC'
47249      lt_prog_compiler_static_F77='-Bstatic'
47250      ;;
47251
47252    unicos*)
47253      lt_prog_compiler_wl_F77='-Wl,'
47254      lt_prog_compiler_can_build_shared_F77=no
47255      ;;
47256
47257    uts4*)
47258      lt_prog_compiler_pic_F77='-pic'
47259      lt_prog_compiler_static_F77='-Bstatic'
47260      ;;
47261
47262    *)
47263      lt_prog_compiler_can_build_shared_F77=no
47264      ;;
47265    esac
47266  fi
47267
47268case $host_os in
47269  # For platforms that do not support PIC, -DPIC is meaningless:
47270  *djgpp*)
47271    lt_prog_compiler_pic_F77=
47272    ;;
47273  *)
47274    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
47275    ;;
47276esac
47277
47278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
47279$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
47280if ${lt_cv_prog_compiler_pic_F77+:} false; then :
47281  $as_echo_n "(cached) " >&6
47282else
47283  lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77
47284fi
47285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5
47286$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; }
47287lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77
47288
47289#
47290# Check to make sure the PIC flag actually works.
47291#
47292if test -n "$lt_prog_compiler_pic_F77"; then
47293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
47294$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; }
47295if ${lt_cv_prog_compiler_pic_works_F77+:} false; then :
47296  $as_echo_n "(cached) " >&6
47297else
47298  lt_cv_prog_compiler_pic_works_F77=no
47299   ac_outfile=conftest.$ac_objext
47300   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
47301   lt_compiler_flag="$lt_prog_compiler_pic_F77"  ## exclude from sc_useless_quotes_in_assignment
47302   # Insert the option either (1) after the last *FLAGS variable, or
47303   # (2) before a word containing "conftest.", or (3) at the end.
47304   # Note that $ac_compile itself does not contain backslashes and begins
47305   # with a dollar sign (not a hyphen), so the echo should work correctly.
47306   # The option is referenced via a variable to avoid confusing sed.
47307   lt_compile=`echo "$ac_compile" | $SED \
47308   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
47309   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
47310   -e 's:$: $lt_compiler_flag:'`
47311   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
47312   (eval "$lt_compile" 2>conftest.err)
47313   ac_status=$?
47314   cat conftest.err >&5
47315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
47316   if (exit $ac_status) && test -s "$ac_outfile"; then
47317     # The compiler can only warn and ignore the option if not recognized
47318     # So say no if there are warnings other than the usual output.
47319     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
47320     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
47321     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
47322       lt_cv_prog_compiler_pic_works_F77=yes
47323     fi
47324   fi
47325   $RM conftest*
47326
47327fi
47328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5
47329$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; }
47330
47331if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then
47332    case $lt_prog_compiler_pic_F77 in
47333     "" | " "*) ;;
47334     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
47335     esac
47336else
47337    lt_prog_compiler_pic_F77=
47338     lt_prog_compiler_can_build_shared_F77=no
47339fi
47340
47341fi
47342
47343
47344
47345
47346
47347#
47348# Check to make sure the static flag actually works.
47349#
47350wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
47351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
47352$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
47353if ${lt_cv_prog_compiler_static_works_F77+:} false; then :
47354  $as_echo_n "(cached) " >&6
47355else
47356  lt_cv_prog_compiler_static_works_F77=no
47357   save_LDFLAGS=$LDFLAGS
47358   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
47359   echo "$lt_simple_link_test_code" > conftest.$ac_ext
47360   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
47361     # The linker can only warn and ignore the option if not recognized
47362     # So say no if there are warnings
47363     if test -s conftest.err; then
47364       # Append any errors to the config.log.
47365       cat conftest.err 1>&5
47366       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
47367       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
47368       if diff conftest.exp conftest.er2 >/dev/null; then
47369         lt_cv_prog_compiler_static_works_F77=yes
47370       fi
47371     else
47372       lt_cv_prog_compiler_static_works_F77=yes
47373     fi
47374   fi
47375   $RM -r conftest*
47376   LDFLAGS=$save_LDFLAGS
47377
47378fi
47379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5
47380$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; }
47381
47382if test yes = "$lt_cv_prog_compiler_static_works_F77"; then
47383    :
47384else
47385    lt_prog_compiler_static_F77=
47386fi
47387
47388
47389
47390
47391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
47392$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
47393if ${lt_cv_prog_compiler_c_o_F77+:} false; then :
47394  $as_echo_n "(cached) " >&6
47395else
47396  lt_cv_prog_compiler_c_o_F77=no
47397   $RM -r conftest 2>/dev/null
47398   mkdir conftest
47399   cd conftest
47400   mkdir out
47401   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
47402
47403   lt_compiler_flag="-o out/conftest2.$ac_objext"
47404   # Insert the option either (1) after the last *FLAGS variable, or
47405   # (2) before a word containing "conftest.", or (3) at the end.
47406   # Note that $ac_compile itself does not contain backslashes and begins
47407   # with a dollar sign (not a hyphen), so the echo should work correctly.
47408   lt_compile=`echo "$ac_compile" | $SED \
47409   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
47410   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
47411   -e 's:$: $lt_compiler_flag:'`
47412   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
47413   (eval "$lt_compile" 2>out/conftest.err)
47414   ac_status=$?
47415   cat out/conftest.err >&5
47416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
47417   if (exit $ac_status) && test -s out/conftest2.$ac_objext
47418   then
47419     # The compiler can only warn and ignore the option if not recognized
47420     # So say no if there are warnings
47421     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
47422     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
47423     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
47424       lt_cv_prog_compiler_c_o_F77=yes
47425     fi
47426   fi
47427   chmod u+w . 2>&5
47428   $RM conftest*
47429   # SGI C++ compiler will create directory out/ii_files/ for
47430   # template instantiation
47431   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
47432   $RM out/* && rmdir out
47433   cd ..
47434   $RM -r conftest
47435   $RM conftest*
47436
47437fi
47438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5
47439$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
47440
47441
47442
47443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
47444$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
47445if ${lt_cv_prog_compiler_c_o_F77+:} false; then :
47446  $as_echo_n "(cached) " >&6
47447else
47448  lt_cv_prog_compiler_c_o_F77=no
47449   $RM -r conftest 2>/dev/null
47450   mkdir conftest
47451   cd conftest
47452   mkdir out
47453   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
47454
47455   lt_compiler_flag="-o out/conftest2.$ac_objext"
47456   # Insert the option either (1) after the last *FLAGS variable, or
47457   # (2) before a word containing "conftest.", or (3) at the end.
47458   # Note that $ac_compile itself does not contain backslashes and begins
47459   # with a dollar sign (not a hyphen), so the echo should work correctly.
47460   lt_compile=`echo "$ac_compile" | $SED \
47461   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
47462   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
47463   -e 's:$: $lt_compiler_flag:'`
47464   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
47465   (eval "$lt_compile" 2>out/conftest.err)
47466   ac_status=$?
47467   cat out/conftest.err >&5
47468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
47469   if (exit $ac_status) && test -s out/conftest2.$ac_objext
47470   then
47471     # The compiler can only warn and ignore the option if not recognized
47472     # So say no if there are warnings
47473     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
47474     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
47475     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
47476       lt_cv_prog_compiler_c_o_F77=yes
47477     fi
47478   fi
47479   chmod u+w . 2>&5
47480   $RM conftest*
47481   # SGI C++ compiler will create directory out/ii_files/ for
47482   # template instantiation
47483   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
47484   $RM out/* && rmdir out
47485   cd ..
47486   $RM -r conftest
47487   $RM conftest*
47488
47489fi
47490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5
47491$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
47492
47493
47494
47495
47496hard_links=nottested
47497if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then
47498  # do not overwrite the value of need_locks provided by the user
47499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
47500$as_echo_n "checking if we can lock with hard links... " >&6; }
47501  hard_links=yes
47502  $RM conftest*
47503  ln conftest.a conftest.b 2>/dev/null && hard_links=no
47504  touch conftest.a
47505  ln conftest.a conftest.b 2>&5 || hard_links=no
47506  ln conftest.a conftest.b 2>/dev/null && hard_links=no
47507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
47508$as_echo "$hard_links" >&6; }
47509  if test no = "$hard_links"; then
47510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
47511$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
47512    need_locks=warn
47513  fi
47514else
47515  need_locks=no
47516fi
47517
47518
47519
47520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
47521$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
47522
47523  runpath_var=
47524  allow_undefined_flag_F77=
47525  always_export_symbols_F77=no
47526  archive_cmds_F77=
47527  archive_expsym_cmds_F77=
47528  compiler_needs_object_F77=no
47529  enable_shared_with_static_runtimes_F77=no
47530  export_dynamic_flag_spec_F77=
47531  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
47532  hardcode_automatic_F77=no
47533  hardcode_direct_F77=no
47534  hardcode_direct_absolute_F77=no
47535  hardcode_libdir_flag_spec_F77=
47536  hardcode_libdir_separator_F77=
47537  hardcode_minus_L_F77=no
47538  hardcode_shlibpath_var_F77=unsupported
47539  inherit_rpath_F77=no
47540  link_all_deplibs_F77=unknown
47541  module_cmds_F77=
47542  module_expsym_cmds_F77=
47543  old_archive_from_new_cmds_F77=
47544  old_archive_from_expsyms_cmds_F77=
47545  thread_safe_flag_spec_F77=
47546  whole_archive_flag_spec_F77=
47547  # include_expsyms should be a list of space-separated symbols to be *always*
47548  # included in the symbol list
47549  include_expsyms_F77=
47550  # exclude_expsyms can be an extended regexp of symbols to exclude
47551  # it will be wrapped by ' (' and ')$', so one must not match beginning or
47552  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
47553  # as well as any symbol that contains 'd'.
47554  exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
47555  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
47556  # platforms (ab)use it in PIC code, but their linkers get confused if
47557  # the symbol is explicitly referenced.  Since portable code cannot
47558  # rely on this symbol name, it's probably fine to never include it in
47559  # preloaded symbol tables.
47560  # Exclude shared library initialization/finalization symbols.
47561  extract_expsyms_cmds=
47562
47563  case $host_os in
47564  cygwin* | mingw* | pw32* | cegcc*)
47565    # FIXME: the MSVC++ port hasn't been tested in a loooong time
47566    # When not using gcc, we currently assume that we are using
47567    # Microsoft Visual C++.
47568    if test yes != "$GCC"; then
47569      with_gnu_ld=no
47570    fi
47571    ;;
47572  interix*)
47573    # we just hope/assume this is gcc and not c89 (= MSVC++)
47574    with_gnu_ld=yes
47575    ;;
47576  openbsd* | bitrig*)
47577    with_gnu_ld=no
47578    ;;
47579  esac
47580
47581  ld_shlibs_F77=yes
47582
47583  # On some targets, GNU ld is compatible enough with the native linker
47584  # that we're better off using the native interface for both.
47585  lt_use_gnu_ld_interface=no
47586  if test yes = "$with_gnu_ld"; then
47587    case $host_os in
47588      aix*)
47589	# The AIX port of GNU ld has always aspired to compatibility
47590	# with the native linker.  However, as the warning in the GNU ld
47591	# block says, versions before 2.19.5* couldn't really create working
47592	# shared libraries, regardless of the interface used.
47593	case `$LD -v 2>&1` in
47594	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
47595	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
47596	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
47597	  *)
47598	    lt_use_gnu_ld_interface=yes
47599	    ;;
47600	esac
47601	;;
47602      *)
47603	lt_use_gnu_ld_interface=yes
47604	;;
47605    esac
47606  fi
47607
47608  if test yes = "$lt_use_gnu_ld_interface"; then
47609    # If archive_cmds runs LD, not CC, wlarc should be empty
47610    wlarc='$wl'
47611
47612    # Set some defaults for GNU ld with shared library support. These
47613    # are reset later if shared libraries are not supported. Putting them
47614    # here allows them to be overridden if necessary.
47615    runpath_var=LD_RUN_PATH
47616    hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
47617    export_dynamic_flag_spec_F77='$wl--export-dynamic'
47618    # ancient GNU ld didn't support --whole-archive et. al.
47619    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
47620      whole_archive_flag_spec_F77=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
47621    else
47622      whole_archive_flag_spec_F77=
47623    fi
47624    supports_anon_versioning=no
47625    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
47626      *GNU\ gold*) supports_anon_versioning=yes ;;
47627      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
47628      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
47629      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
47630      *\ 2.11.*) ;; # other 2.11 versions
47631      *) supports_anon_versioning=yes ;;
47632    esac
47633
47634    # See if GNU ld supports shared libraries.
47635    case $host_os in
47636    aix[3-9]*)
47637      # On AIX/PPC, the GNU linker is very broken
47638      if test ia64 != "$host_cpu"; then
47639	ld_shlibs_F77=no
47640	cat <<_LT_EOF 1>&2
47641
47642*** Warning: the GNU linker, at least up to release 2.19, is reported
47643*** to be unable to reliably create shared libraries on AIX.
47644*** Therefore, libtool is disabling shared libraries support.  If you
47645*** really care for shared libraries, you may want to install binutils
47646*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
47647*** You will then need to restart the configuration process.
47648
47649_LT_EOF
47650      fi
47651      ;;
47652
47653    amigaos*)
47654      case $host_cpu in
47655      powerpc)
47656            # see comment about AmigaOS4 .so support
47657            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47658            archive_expsym_cmds_F77=''
47659        ;;
47660      m68k)
47661            archive_cmds_F77='$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)'
47662            hardcode_libdir_flag_spec_F77='-L$libdir'
47663            hardcode_minus_L_F77=yes
47664        ;;
47665      esac
47666      ;;
47667
47668    beos*)
47669      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
47670	allow_undefined_flag_F77=unsupported
47671	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
47672	# support --undefined.  This deserves some investigation.  FIXME
47673	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47674      else
47675	ld_shlibs_F77=no
47676      fi
47677      ;;
47678
47679    cygwin* | mingw* | pw32* | cegcc*)
47680      # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
47681      # as there is no search path for DLLs.
47682      hardcode_libdir_flag_spec_F77='-L$libdir'
47683      export_dynamic_flag_spec_F77='$wl--export-all-symbols'
47684      allow_undefined_flag_F77=unsupported
47685      always_export_symbols_F77=no
47686      enable_shared_with_static_runtimes_F77=yes
47687      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
47688      exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
47689
47690      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
47691        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
47692	# If the export-symbols file already is a .def file, use it as
47693	# is; otherwise, prepend EXPORTS...
47694	archive_expsym_cmds_F77='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
47695          cp $export_symbols $output_objdir/$soname.def;
47696        else
47697          echo EXPORTS > $output_objdir/$soname.def;
47698          cat $export_symbols >> $output_objdir/$soname.def;
47699        fi~
47700        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
47701      else
47702	ld_shlibs_F77=no
47703      fi
47704      ;;
47705
47706    haiku*)
47707      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47708      link_all_deplibs_F77=yes
47709      ;;
47710
47711    os2*)
47712      hardcode_libdir_flag_spec_F77='-L$libdir'
47713      hardcode_minus_L_F77=yes
47714      allow_undefined_flag_F77=unsupported
47715      shrext_cmds=.dll
47716      archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
47717	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
47718	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
47719	$ECHO EXPORTS >> $output_objdir/$libname.def~
47720	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
47721	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
47722	emximp -o $lib $output_objdir/$libname.def'
47723      archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
47724	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
47725	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
47726	$ECHO EXPORTS >> $output_objdir/$libname.def~
47727	prefix_cmds="$SED"~
47728	if test EXPORTS = "`$SED 1q $export_symbols`"; then
47729	  prefix_cmds="$prefix_cmds -e 1d";
47730	fi~
47731	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
47732	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
47733	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
47734	emximp -o $lib $output_objdir/$libname.def'
47735      old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
47736      enable_shared_with_static_runtimes_F77=yes
47737      ;;
47738
47739    interix[3-9]*)
47740      hardcode_direct_F77=no
47741      hardcode_shlibpath_var_F77=no
47742      hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
47743      export_dynamic_flag_spec_F77='$wl-E'
47744      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
47745      # Instead, shared libraries are loaded at an image base (0x10000000 by
47746      # default) and relocated if they conflict, which is a slow very memory
47747      # consuming and fragmenting process.  To avoid this, we pick a random,
47748      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
47749      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
47750      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
47751      archive_expsym_cmds_F77='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'
47752      ;;
47753
47754    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
47755      tmp_diet=no
47756      if test linux-dietlibc = "$host_os"; then
47757	case $cc_basename in
47758	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
47759	esac
47760      fi
47761      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
47762	 && test no = "$tmp_diet"
47763      then
47764	tmp_addflag=' $pic_flag'
47765	tmp_sharedflag='-shared'
47766	case $cc_basename,$host_cpu in
47767        pgcc*)				# Portland Group C compiler
47768	  whole_archive_flag_spec_F77='$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'
47769	  tmp_addflag=' $pic_flag'
47770	  ;;
47771	pgf77* | pgf90* | pgf95* | pgfortran*)
47772					# Portland Group f77 and f90 compilers
47773	  whole_archive_flag_spec_F77='$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'
47774	  tmp_addflag=' $pic_flag -Mnomain' ;;
47775	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
47776	  tmp_addflag=' -i_dynamic' ;;
47777	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
47778	  tmp_addflag=' -i_dynamic -nofor_main' ;;
47779	ifc* | ifort*)			# Intel Fortran compiler
47780	  tmp_addflag=' -nofor_main' ;;
47781	lf95*)				# Lahey Fortran 8.1
47782	  whole_archive_flag_spec_F77=
47783	  tmp_sharedflag='--shared' ;;
47784        nagfor*)                        # NAGFOR 5.3
47785          tmp_sharedflag='-Wl,-shared' ;;
47786	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
47787	  tmp_sharedflag='-qmkshrobj'
47788	  tmp_addflag= ;;
47789	nvcc*)	# Cuda Compiler Driver 2.2
47790	  whole_archive_flag_spec_F77='$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'
47791	  compiler_needs_object_F77=yes
47792	  ;;
47793	esac
47794	case `$CC -V 2>&1 | sed 5q` in
47795	*Sun\ C*)			# Sun C 5.9
47796	  whole_archive_flag_spec_F77='$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'
47797	  compiler_needs_object_F77=yes
47798	  tmp_sharedflag='-G' ;;
47799	*Sun\ F*)			# Sun Fortran 8.3
47800	  tmp_sharedflag='-G' ;;
47801	esac
47802	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47803
47804        if test yes = "$supports_anon_versioning"; then
47805          archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
47806            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
47807            echo "local: *; };" >> $output_objdir/$libname.ver~
47808            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
47809        fi
47810
47811	case $cc_basename in
47812	tcc*)
47813	  export_dynamic_flag_spec_F77='-rdynamic'
47814	  ;;
47815	xlf* | bgf* | bgxlf* | mpixlf*)
47816	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
47817	  whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive'
47818	  hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
47819	  archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
47820	  if test yes = "$supports_anon_versioning"; then
47821	    archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
47822              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
47823              echo "local: *; };" >> $output_objdir/$libname.ver~
47824              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
47825	  fi
47826	  ;;
47827	esac
47828      else
47829        ld_shlibs_F77=no
47830      fi
47831      ;;
47832
47833    netbsd*)
47834      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
47835	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
47836	wlarc=
47837      else
47838	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47839	archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
47840      fi
47841      ;;
47842
47843    solaris*)
47844      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
47845	ld_shlibs_F77=no
47846	cat <<_LT_EOF 1>&2
47847
47848*** Warning: The releases 2.8.* of the GNU linker cannot reliably
47849*** create shared libraries on Solaris systems.  Therefore, libtool
47850*** is disabling shared libraries support.  We urge you to upgrade GNU
47851*** binutils to release 2.9.1 or newer.  Another option is to modify
47852*** your PATH or compiler configuration so that the native linker is
47853*** used, and then restart.
47854
47855_LT_EOF
47856      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
47857	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47858	archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
47859      else
47860	ld_shlibs_F77=no
47861      fi
47862      ;;
47863
47864    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
47865      case `$LD -v 2>&1` in
47866        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
47867	ld_shlibs_F77=no
47868	cat <<_LT_EOF 1>&2
47869
47870*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
47871*** reliably create shared libraries on SCO systems.  Therefore, libtool
47872*** is disabling shared libraries support.  We urge you to upgrade GNU
47873*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
47874*** your PATH or compiler configuration so that the native linker is
47875*** used, and then restart.
47876
47877_LT_EOF
47878	;;
47879	*)
47880	  # For security reasons, it is highly recommended that you always
47881	  # use absolute paths for naming shared libraries, and exclude the
47882	  # DT_RUNPATH tag from executables and libraries.  But doing so
47883	  # requires that you compile everything twice, which is a pain.
47884	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
47885	    hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
47886	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47887	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
47888	  else
47889	    ld_shlibs_F77=no
47890	  fi
47891	;;
47892      esac
47893      ;;
47894
47895    sunos4*)
47896      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
47897      wlarc=
47898      hardcode_direct_F77=yes
47899      hardcode_shlibpath_var_F77=no
47900      ;;
47901
47902    *)
47903      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
47904	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47905	archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
47906      else
47907	ld_shlibs_F77=no
47908      fi
47909      ;;
47910    esac
47911
47912    if test no = "$ld_shlibs_F77"; then
47913      runpath_var=
47914      hardcode_libdir_flag_spec_F77=
47915      export_dynamic_flag_spec_F77=
47916      whole_archive_flag_spec_F77=
47917    fi
47918  else
47919    # PORTME fill in a description of your system's linker (not GNU ld)
47920    case $host_os in
47921    aix3*)
47922      allow_undefined_flag_F77=unsupported
47923      always_export_symbols_F77=yes
47924      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
47925      # Note: this linker hardcodes the directories in LIBPATH if there
47926      # are no directories specified by -L.
47927      hardcode_minus_L_F77=yes
47928      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
47929	# Neither direct hardcoding nor static linking is supported with a
47930	# broken collect2.
47931	hardcode_direct_F77=unsupported
47932      fi
47933      ;;
47934
47935    aix[4-9]*)
47936      if test ia64 = "$host_cpu"; then
47937	# On IA64, the linker does run time linking by default, so we don't
47938	# have to do anything special.
47939	aix_use_runtimelinking=no
47940	exp_sym_flag='-Bexport'
47941	no_entry_flag=
47942      else
47943	# If we're using GNU nm, then we don't want the "-C" option.
47944	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
47945	# Without the "-l" option, or with the "-B" option, AIX nm treats
47946	# weak defined symbols like other global defined symbols, whereas
47947	# GNU nm marks them as "W".
47948	# While the 'weak' keyword is ignored in the Export File, we need
47949	# it in the Import File for the 'aix-soname' feature, so we have
47950	# to replace the "-B" option with "-P" for AIX nm.
47951	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
47952	  export_symbols_cmds_F77='$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'
47953	else
47954	  export_symbols_cmds_F77='`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'
47955	fi
47956	aix_use_runtimelinking=no
47957
47958	# Test if we are trying to use run time linking or normal
47959	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
47960	# have runtime linking enabled, and use it for executables.
47961	# For shared libraries, we enable/disable runtime linking
47962	# depending on the kind of the shared library created -
47963	# when "with_aix_soname,aix_use_runtimelinking" is:
47964	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
47965	# "aix,yes"  lib.so          shared, rtl:yes, for executables
47966	#            lib.a           static archive
47967	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
47968	#            lib.a(lib.so.V) shared, rtl:no,  for executables
47969	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
47970	#            lib.a(lib.so.V) shared, rtl:no
47971	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
47972	#            lib.a           static archive
47973	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
47974	  for ld_flag in $LDFLAGS; do
47975	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
47976	    aix_use_runtimelinking=yes
47977	    break
47978	  fi
47979	  done
47980	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
47981	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
47982	    # so we don't have lib.a shared libs to link our executables.
47983	    # We have to force runtime linking in this case.
47984	    aix_use_runtimelinking=yes
47985	    LDFLAGS="$LDFLAGS -Wl,-brtl"
47986	  fi
47987	  ;;
47988	esac
47989
47990	exp_sym_flag='-bexport'
47991	no_entry_flag='-bnoentry'
47992      fi
47993
47994      # When large executables or shared objects are built, AIX ld can
47995      # have problems creating the table of contents.  If linking a library
47996      # or program results in "error TOC overflow" add -mminimal-toc to
47997      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
47998      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
47999
48000      archive_cmds_F77=''
48001      hardcode_direct_F77=yes
48002      hardcode_direct_absolute_F77=yes
48003      hardcode_libdir_separator_F77=':'
48004      link_all_deplibs_F77=yes
48005      file_list_spec_F77='$wl-f,'
48006      case $with_aix_soname,$aix_use_runtimelinking in
48007      aix,*) ;; # traditional, no import file
48008      svr4,* | *,yes) # use import file
48009	# The Import File defines what to hardcode.
48010	hardcode_direct_F77=no
48011	hardcode_direct_absolute_F77=no
48012	;;
48013      esac
48014
48015      if test yes = "$GCC"; then
48016	case $host_os in aix4.[012]|aix4.[012].*)
48017	# We only want to do this on AIX 4.2 and lower, the check
48018	# below for broken collect2 doesn't work under 4.3+
48019	  collect2name=`$CC -print-prog-name=collect2`
48020	  if test -f "$collect2name" &&
48021	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
48022	  then
48023	  # We have reworked collect2
48024	  :
48025	  else
48026	  # We have old collect2
48027	  hardcode_direct_F77=unsupported
48028	  # It fails to find uninstalled libraries when the uninstalled
48029	  # path is not listed in the libpath.  Setting hardcode_minus_L
48030	  # to unsupported forces relinking
48031	  hardcode_minus_L_F77=yes
48032	  hardcode_libdir_flag_spec_F77='-L$libdir'
48033	  hardcode_libdir_separator_F77=
48034	  fi
48035	  ;;
48036	esac
48037	shared_flag='-shared'
48038	if test yes = "$aix_use_runtimelinking"; then
48039	  shared_flag="$shared_flag "'$wl-G'
48040	fi
48041	# Need to ensure runtime linking is disabled for the traditional
48042	# shared library, or the linker may eventually find shared libraries
48043	# /with/ Import File - we do not want to mix them.
48044	shared_flag_aix='-shared'
48045	shared_flag_svr4='-shared $wl-G'
48046      else
48047	# not using gcc
48048	if test ia64 = "$host_cpu"; then
48049	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
48050	# chokes on -Wl,-G. The following line is correct:
48051	  shared_flag='-G'
48052	else
48053	  if test yes = "$aix_use_runtimelinking"; then
48054	    shared_flag='$wl-G'
48055	  else
48056	    shared_flag='$wl-bM:SRE'
48057	  fi
48058	  shared_flag_aix='$wl-bM:SRE'
48059	  shared_flag_svr4='$wl-G'
48060	fi
48061      fi
48062
48063      export_dynamic_flag_spec_F77='$wl-bexpall'
48064      # It seems that -bexpall does not export symbols beginning with
48065      # underscore (_), so it is better to generate a list of symbols to export.
48066      always_export_symbols_F77=yes
48067      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
48068	# Warning - without using the other runtime loading flags (-brtl),
48069	# -berok will link without error, but may produce a broken library.
48070	allow_undefined_flag_F77='-berok'
48071        # Determine the default libpath from the value encoded in an
48072        # empty executable.
48073        if test set = "${lt_cv_aix_libpath+set}"; then
48074  aix_libpath=$lt_cv_aix_libpath
48075else
48076  if ${lt_cv_aix_libpath__F77+:} false; then :
48077  $as_echo_n "(cached) " >&6
48078else
48079  cat > conftest.$ac_ext <<_ACEOF
48080      program main
48081
48082      end
48083_ACEOF
48084if ac_fn_f77_try_link "$LINENO"; then :
48085
48086  lt_aix_libpath_sed='
48087      /Import File Strings/,/^$/ {
48088	  /^0/ {
48089	      s/^0  *\([^ ]*\) *$/\1/
48090	      p
48091	  }
48092      }'
48093  lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
48094  # Check for a 64-bit object if we didn't find anything.
48095  if test -z "$lt_cv_aix_libpath__F77"; then
48096    lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
48097  fi
48098fi
48099rm -f core conftest.err conftest.$ac_objext \
48100    conftest$ac_exeext conftest.$ac_ext
48101  if test -z "$lt_cv_aix_libpath__F77"; then
48102    lt_cv_aix_libpath__F77=/usr/lib:/lib
48103  fi
48104
48105fi
48106
48107  aix_libpath=$lt_cv_aix_libpath__F77
48108fi
48109
48110        hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath"
48111        archive_expsym_cmds_F77='$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
48112      else
48113	if test ia64 = "$host_cpu"; then
48114	  hardcode_libdir_flag_spec_F77='$wl-R $libdir:/usr/lib:/lib'
48115	  allow_undefined_flag_F77="-z nodefs"
48116	  archive_expsym_cmds_F77="\$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"
48117	else
48118	 # Determine the default libpath from the value encoded in an
48119	 # empty executable.
48120	 if test set = "${lt_cv_aix_libpath+set}"; then
48121  aix_libpath=$lt_cv_aix_libpath
48122else
48123  if ${lt_cv_aix_libpath__F77+:} false; then :
48124  $as_echo_n "(cached) " >&6
48125else
48126  cat > conftest.$ac_ext <<_ACEOF
48127      program main
48128
48129      end
48130_ACEOF
48131if ac_fn_f77_try_link "$LINENO"; then :
48132
48133  lt_aix_libpath_sed='
48134      /Import File Strings/,/^$/ {
48135	  /^0/ {
48136	      s/^0  *\([^ ]*\) *$/\1/
48137	      p
48138	  }
48139      }'
48140  lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
48141  # Check for a 64-bit object if we didn't find anything.
48142  if test -z "$lt_cv_aix_libpath__F77"; then
48143    lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
48144  fi
48145fi
48146rm -f core conftest.err conftest.$ac_objext \
48147    conftest$ac_exeext conftest.$ac_ext
48148  if test -z "$lt_cv_aix_libpath__F77"; then
48149    lt_cv_aix_libpath__F77=/usr/lib:/lib
48150  fi
48151
48152fi
48153
48154  aix_libpath=$lt_cv_aix_libpath__F77
48155fi
48156
48157	 hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath"
48158	  # Warning - without using the other run time loading flags,
48159	  # -berok will link without error, but may produce a broken library.
48160	  no_undefined_flag_F77=' $wl-bernotok'
48161	  allow_undefined_flag_F77=' $wl-berok'
48162	  if test yes = "$with_gnu_ld"; then
48163	    # We only use this code for GNU lds that support --whole-archive.
48164	    whole_archive_flag_spec_F77='$wl--whole-archive$convenience $wl--no-whole-archive'
48165	  else
48166	    # Exported symbols can be pulled into shared objects from archives
48167	    whole_archive_flag_spec_F77='$convenience'
48168	  fi
48169	  archive_cmds_need_lc_F77=yes
48170	  archive_expsym_cmds_F77='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
48171	  # -brtl affects multiple linker settings, -berok does not and is overridden later
48172	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
48173	  if test svr4 != "$with_aix_soname"; then
48174	    # This is similar to how AIX traditionally builds its shared libraries.
48175	    archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$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'
48176	  fi
48177	  if test aix != "$with_aix_soname"; then
48178	    archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$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'
48179	  else
48180	    # used by -dlpreopen to get the symbols
48181	    archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
48182	  fi
48183	  archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$RM -r $output_objdir/$realname.d'
48184	fi
48185      fi
48186      ;;
48187
48188    amigaos*)
48189      case $host_cpu in
48190      powerpc)
48191            # see comment about AmigaOS4 .so support
48192            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
48193            archive_expsym_cmds_F77=''
48194        ;;
48195      m68k)
48196            archive_cmds_F77='$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)'
48197            hardcode_libdir_flag_spec_F77='-L$libdir'
48198            hardcode_minus_L_F77=yes
48199        ;;
48200      esac
48201      ;;
48202
48203    bsdi[45]*)
48204      export_dynamic_flag_spec_F77=-rdynamic
48205      ;;
48206
48207    cygwin* | mingw* | pw32* | cegcc*)
48208      # When not using gcc, we currently assume that we are using
48209      # Microsoft Visual C++.
48210      # hardcode_libdir_flag_spec is actually meaningless, as there is
48211      # no search path for DLLs.
48212      case $cc_basename in
48213      cl*)
48214	# Native MSVC
48215	hardcode_libdir_flag_spec_F77=' '
48216	allow_undefined_flag_F77=unsupported
48217	always_export_symbols_F77=yes
48218	file_list_spec_F77='@'
48219	# Tell ltmain to make .lib files, not .a files.
48220	libext=lib
48221	# Tell ltmain to make .dll files, not .so files.
48222	shrext_cmds=.dll
48223	# FIXME: Setting linknames here is a bad hack.
48224	archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
48225	archive_expsym_cmds_F77='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
48226            cp "$export_symbols" "$output_objdir/$soname.def";
48227            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
48228          else
48229            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
48230          fi~
48231          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
48232          linknames='
48233	# The linker will not automatically build a static lib if we build a DLL.
48234	# _LT_TAGVAR(old_archive_from_new_cmds, F77)='true'
48235	enable_shared_with_static_runtimes_F77=yes
48236	exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
48237	export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
48238	# Don't use ranlib
48239	old_postinstall_cmds_F77='chmod 644 $oldlib'
48240	postlink_cmds_F77='lt_outputfile="@OUTPUT@"~
48241          lt_tool_outputfile="@TOOL_OUTPUT@"~
48242          case $lt_outputfile in
48243            *.exe|*.EXE) ;;
48244            *)
48245              lt_outputfile=$lt_outputfile.exe
48246              lt_tool_outputfile=$lt_tool_outputfile.exe
48247              ;;
48248          esac~
48249          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
48250            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
48251            $RM "$lt_outputfile.manifest";
48252          fi'
48253	;;
48254      *)
48255	# Assume MSVC wrapper
48256	hardcode_libdir_flag_spec_F77=' '
48257	allow_undefined_flag_F77=unsupported
48258	# Tell ltmain to make .lib files, not .a files.
48259	libext=lib
48260	# Tell ltmain to make .dll files, not .so files.
48261	shrext_cmds=.dll
48262	# FIXME: Setting linknames here is a bad hack.
48263	archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
48264	# The linker will automatically build a .lib file if we build a DLL.
48265	old_archive_from_new_cmds_F77='true'
48266	# FIXME: Should let the user specify the lib program.
48267	old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
48268	enable_shared_with_static_runtimes_F77=yes
48269	;;
48270      esac
48271      ;;
48272
48273    darwin* | rhapsody*)
48274
48275
48276  archive_cmds_need_lc_F77=no
48277  hardcode_direct_F77=no
48278  hardcode_automatic_F77=yes
48279  hardcode_shlibpath_var_F77=unsupported
48280  if test yes = "$lt_cv_ld_force_load"; then
48281    whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
48282    compiler_needs_object_F77=yes
48283  else
48284    whole_archive_flag_spec_F77=''
48285  fi
48286  link_all_deplibs_F77=yes
48287  allow_undefined_flag_F77=$_lt_dar_allow_undefined
48288  case $cc_basename in
48289     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
48290     *) _lt_dar_can_shared=$GCC ;;
48291  esac
48292  if test yes = "$_lt_dar_can_shared"; then
48293    output_verbose_link_cmd=func_echo_all
48294    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
48295    module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
48296    archive_expsym_cmds_F77="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"
48297    module_expsym_cmds_F77="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"
48298
48299  else
48300  ld_shlibs_F77=no
48301  fi
48302
48303      ;;
48304
48305    dgux*)
48306      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48307      hardcode_libdir_flag_spec_F77='-L$libdir'
48308      hardcode_shlibpath_var_F77=no
48309      ;;
48310
48311    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
48312    # support.  Future versions do this automatically, but an explicit c++rt0.o
48313    # does not break anything, and helps significantly (at the cost of a little
48314    # extra space).
48315    freebsd2.2*)
48316      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
48317      hardcode_libdir_flag_spec_F77='-R$libdir'
48318      hardcode_direct_F77=yes
48319      hardcode_shlibpath_var_F77=no
48320      ;;
48321
48322    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
48323    freebsd2.*)
48324      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
48325      hardcode_direct_F77=yes
48326      hardcode_minus_L_F77=yes
48327      hardcode_shlibpath_var_F77=no
48328      ;;
48329
48330    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
48331    freebsd* | dragonfly*)
48332      archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48333      hardcode_libdir_flag_spec_F77='-R$libdir'
48334      hardcode_direct_F77=yes
48335      hardcode_shlibpath_var_F77=no
48336      ;;
48337
48338    hpux9*)
48339      if test yes = "$GCC"; then
48340	archive_cmds_F77='$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'
48341      else
48342	archive_cmds_F77='$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'
48343      fi
48344      hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
48345      hardcode_libdir_separator_F77=:
48346      hardcode_direct_F77=yes
48347
48348      # hardcode_minus_L: Not really in the search PATH,
48349      # but as the default location of the library.
48350      hardcode_minus_L_F77=yes
48351      export_dynamic_flag_spec_F77='$wl-E'
48352      ;;
48353
48354    hpux10*)
48355      if test yes,no = "$GCC,$with_gnu_ld"; then
48356	archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48357      else
48358	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
48359      fi
48360      if test no = "$with_gnu_ld"; then
48361	hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
48362	hardcode_libdir_separator_F77=:
48363	hardcode_direct_F77=yes
48364	hardcode_direct_absolute_F77=yes
48365	export_dynamic_flag_spec_F77='$wl-E'
48366	# hardcode_minus_L: Not really in the search PATH,
48367	# but as the default location of the library.
48368	hardcode_minus_L_F77=yes
48369      fi
48370      ;;
48371
48372    hpux11*)
48373      if test yes,no = "$GCC,$with_gnu_ld"; then
48374	case $host_cpu in
48375	hppa*64*)
48376	  archive_cmds_F77='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
48377	  ;;
48378	ia64*)
48379	  archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
48380	  ;;
48381	*)
48382	  archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48383	  ;;
48384	esac
48385      else
48386	case $host_cpu in
48387	hppa*64*)
48388	  archive_cmds_F77='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
48389	  ;;
48390	ia64*)
48391	  archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
48392	  ;;
48393	*)
48394	archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48395	  ;;
48396	esac
48397      fi
48398      if test no = "$with_gnu_ld"; then
48399	hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
48400	hardcode_libdir_separator_F77=:
48401
48402	case $host_cpu in
48403	hppa*64*|ia64*)
48404	  hardcode_direct_F77=no
48405	  hardcode_shlibpath_var_F77=no
48406	  ;;
48407	*)
48408	  hardcode_direct_F77=yes
48409	  hardcode_direct_absolute_F77=yes
48410	  export_dynamic_flag_spec_F77='$wl-E'
48411
48412	  # hardcode_minus_L: Not really in the search PATH,
48413	  # but as the default location of the library.
48414	  hardcode_minus_L_F77=yes
48415	  ;;
48416	esac
48417      fi
48418      ;;
48419
48420    irix5* | irix6* | nonstopux*)
48421      if test yes = "$GCC"; then
48422	archive_cmds_F77='$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'
48423	# Try to use the -exported_symbol ld option, if it does not
48424	# work, assume that -exports_file does not work either and
48425	# implicitly export all symbols.
48426	# This should be the same for all languages, so no per-tag cache variable.
48427	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
48428$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
48429if ${lt_cv_irix_exported_symbol+:} false; then :
48430  $as_echo_n "(cached) " >&6
48431else
48432  save_LDFLAGS=$LDFLAGS
48433	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
48434	   cat > conftest.$ac_ext <<_ACEOF
48435
48436      subroutine foo
48437      end
48438_ACEOF
48439if ac_fn_f77_try_link "$LINENO"; then :
48440  lt_cv_irix_exported_symbol=yes
48441else
48442  lt_cv_irix_exported_symbol=no
48443fi
48444rm -f core conftest.err conftest.$ac_objext \
48445    conftest$ac_exeext conftest.$ac_ext
48446           LDFLAGS=$save_LDFLAGS
48447fi
48448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
48449$as_echo "$lt_cv_irix_exported_symbol" >&6; }
48450	if test yes = "$lt_cv_irix_exported_symbol"; then
48451          archive_expsym_cmds_F77='$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'
48452	fi
48453      else
48454	archive_cmds_F77='$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'
48455	archive_expsym_cmds_F77='$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'
48456      fi
48457      archive_cmds_need_lc_F77='no'
48458      hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
48459      hardcode_libdir_separator_F77=:
48460      inherit_rpath_F77=yes
48461      link_all_deplibs_F77=yes
48462      ;;
48463
48464    linux*)
48465      case $cc_basename in
48466      tcc*)
48467	# Fabrice Bellard et al's Tiny C Compiler
48468	ld_shlibs_F77=yes
48469	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48470	;;
48471      esac
48472      ;;
48473
48474    netbsd*)
48475      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
48476	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
48477      else
48478	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
48479      fi
48480      hardcode_libdir_flag_spec_F77='-R$libdir'
48481      hardcode_direct_F77=yes
48482      hardcode_shlibpath_var_F77=no
48483      ;;
48484
48485    newsos6)
48486      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48487      hardcode_direct_F77=yes
48488      hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
48489      hardcode_libdir_separator_F77=:
48490      hardcode_shlibpath_var_F77=no
48491      ;;
48492
48493    *nto* | *qnx*)
48494      ;;
48495
48496    openbsd* | bitrig*)
48497      if test -f /usr/libexec/ld.so; then
48498	hardcode_direct_F77=yes
48499	hardcode_shlibpath_var_F77=no
48500	hardcode_direct_absolute_F77=yes
48501	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
48502	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48503	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
48504	  hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
48505	  export_dynamic_flag_spec_F77='$wl-E'
48506	else
48507	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48508	  hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
48509	fi
48510      else
48511	ld_shlibs_F77=no
48512      fi
48513      ;;
48514
48515    os2*)
48516      hardcode_libdir_flag_spec_F77='-L$libdir'
48517      hardcode_minus_L_F77=yes
48518      allow_undefined_flag_F77=unsupported
48519      shrext_cmds=.dll
48520      archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
48521	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
48522	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
48523	$ECHO EXPORTS >> $output_objdir/$libname.def~
48524	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
48525	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
48526	emximp -o $lib $output_objdir/$libname.def'
48527      archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
48528	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
48529	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
48530	$ECHO EXPORTS >> $output_objdir/$libname.def~
48531	prefix_cmds="$SED"~
48532	if test EXPORTS = "`$SED 1q $export_symbols`"; then
48533	  prefix_cmds="$prefix_cmds -e 1d";
48534	fi~
48535	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
48536	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
48537	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
48538	emximp -o $lib $output_objdir/$libname.def'
48539      old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
48540      enable_shared_with_static_runtimes_F77=yes
48541      ;;
48542
48543    osf3*)
48544      if test yes = "$GCC"; then
48545	allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*'
48546	archive_cmds_F77='$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'
48547      else
48548	allow_undefined_flag_F77=' -expect_unresolved \*'
48549	archive_cmds_F77='$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'
48550      fi
48551      archive_cmds_need_lc_F77='no'
48552      hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
48553      hardcode_libdir_separator_F77=:
48554      ;;
48555
48556    osf4* | osf5*)	# as osf3* with the addition of -msym flag
48557      if test yes = "$GCC"; then
48558	allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*'
48559	archive_cmds_F77='$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'
48560	hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
48561      else
48562	allow_undefined_flag_F77=' -expect_unresolved \*'
48563	archive_cmds_F77='$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'
48564	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
48565          $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'
48566
48567	# Both c and cxx compiler support -rpath directly
48568	hardcode_libdir_flag_spec_F77='-rpath $libdir'
48569      fi
48570      archive_cmds_need_lc_F77='no'
48571      hardcode_libdir_separator_F77=:
48572      ;;
48573
48574    solaris*)
48575      no_undefined_flag_F77=' -z defs'
48576      if test yes = "$GCC"; then
48577	wlarc='$wl'
48578	archive_cmds_F77='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
48579	archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
48580          $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'
48581      else
48582	case `$CC -V 2>&1` in
48583	*"Compilers 5.0"*)
48584	  wlarc=''
48585	  archive_cmds_F77='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
48586	  archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
48587            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
48588	  ;;
48589	*)
48590	  wlarc='$wl'
48591	  archive_cmds_F77='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
48592	  archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
48593            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
48594	  ;;
48595	esac
48596      fi
48597      hardcode_libdir_flag_spec_F77='-R$libdir'
48598      hardcode_shlibpath_var_F77=no
48599      case $host_os in
48600      solaris2.[0-5] | solaris2.[0-5].*) ;;
48601      *)
48602	# The compiler driver will combine and reorder linker options,
48603	# but understands '-z linker_flag'.  GCC discards it without '$wl',
48604	# but is careful enough not to reorder.
48605	# Supported since Solaris 2.6 (maybe 2.5.1?)
48606	if test yes = "$GCC"; then
48607	  whole_archive_flag_spec_F77='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
48608	else
48609	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
48610	fi
48611	;;
48612      esac
48613      link_all_deplibs_F77=yes
48614      ;;
48615
48616    sunos4*)
48617      if test sequent = "$host_vendor"; then
48618	# Use $CC to link under sequent, because it throws in some extra .o
48619	# files that make .init and .fini sections work.
48620	archive_cmds_F77='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
48621      else
48622	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
48623      fi
48624      hardcode_libdir_flag_spec_F77='-L$libdir'
48625      hardcode_direct_F77=yes
48626      hardcode_minus_L_F77=yes
48627      hardcode_shlibpath_var_F77=no
48628      ;;
48629
48630    sysv4)
48631      case $host_vendor in
48632	sni)
48633	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48634	  hardcode_direct_F77=yes # is this really true???
48635	;;
48636	siemens)
48637	  ## LD is ld it makes a PLAMLIB
48638	  ## CC just makes a GrossModule.
48639	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
48640	  reload_cmds_F77='$CC -r -o $output$reload_objs'
48641	  hardcode_direct_F77=no
48642        ;;
48643	motorola)
48644	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48645	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
48646	;;
48647      esac
48648      runpath_var='LD_RUN_PATH'
48649      hardcode_shlibpath_var_F77=no
48650      ;;
48651
48652    sysv4.3*)
48653      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48654      hardcode_shlibpath_var_F77=no
48655      export_dynamic_flag_spec_F77='-Bexport'
48656      ;;
48657
48658    sysv4*MP*)
48659      if test -d /usr/nec; then
48660	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48661	hardcode_shlibpath_var_F77=no
48662	runpath_var=LD_RUN_PATH
48663	hardcode_runpath_var=yes
48664	ld_shlibs_F77=yes
48665      fi
48666      ;;
48667
48668    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
48669      no_undefined_flag_F77='$wl-z,text'
48670      archive_cmds_need_lc_F77=no
48671      hardcode_shlibpath_var_F77=no
48672      runpath_var='LD_RUN_PATH'
48673
48674      if test yes = "$GCC"; then
48675	archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48676	archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48677      else
48678	archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48679	archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48680      fi
48681      ;;
48682
48683    sysv5* | sco3.2v5* | sco5v6*)
48684      # Note: We CANNOT use -z defs as we might desire, because we do not
48685      # link with -lc, and that would cause any symbols used from libc to
48686      # always be unresolved, which means just about no library would
48687      # ever link correctly.  If we're not using GNU ld we use -z text
48688      # though, which does catch some bad symbols but isn't as heavy-handed
48689      # as -z defs.
48690      no_undefined_flag_F77='$wl-z,text'
48691      allow_undefined_flag_F77='$wl-z,nodefs'
48692      archive_cmds_need_lc_F77=no
48693      hardcode_shlibpath_var_F77=no
48694      hardcode_libdir_flag_spec_F77='$wl-R,$libdir'
48695      hardcode_libdir_separator_F77=':'
48696      link_all_deplibs_F77=yes
48697      export_dynamic_flag_spec_F77='$wl-Bexport'
48698      runpath_var='LD_RUN_PATH'
48699
48700      if test yes = "$GCC"; then
48701	archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48702	archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48703      else
48704	archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48705	archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48706      fi
48707      ;;
48708
48709    uts4*)
48710      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48711      hardcode_libdir_flag_spec_F77='-L$libdir'
48712      hardcode_shlibpath_var_F77=no
48713      ;;
48714
48715    *)
48716      ld_shlibs_F77=no
48717      ;;
48718    esac
48719
48720    if test sni = "$host_vendor"; then
48721      case $host in
48722      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
48723	export_dynamic_flag_spec_F77='$wl-Blargedynsym'
48724	;;
48725      esac
48726    fi
48727  fi
48728
48729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5
48730$as_echo "$ld_shlibs_F77" >&6; }
48731test no = "$ld_shlibs_F77" && can_build_shared=no
48732
48733with_gnu_ld_F77=$with_gnu_ld
48734
48735
48736
48737
48738
48739
48740#
48741# Do we need to explicitly link libc?
48742#
48743case "x$archive_cmds_need_lc_F77" in
48744x|xyes)
48745  # Assume -lc should be added
48746  archive_cmds_need_lc_F77=yes
48747
48748  if test yes,yes = "$GCC,$enable_shared"; then
48749    case $archive_cmds_F77 in
48750    *'~'*)
48751      # FIXME: we may have to deal with multi-command sequences.
48752      ;;
48753    '$CC '*)
48754      # Test whether the compiler implicitly links with -lc since on some
48755      # systems, -lgcc has to come before -lc. If gcc already passes -lc
48756      # to ld, don't add -lc before -lgcc.
48757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
48758$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
48759if ${lt_cv_archive_cmds_need_lc_F77+:} false; then :
48760  $as_echo_n "(cached) " >&6
48761else
48762  $RM conftest*
48763	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
48764
48765	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
48766  (eval $ac_compile) 2>&5
48767  ac_status=$?
48768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48769  test $ac_status = 0; } 2>conftest.err; then
48770	  soname=conftest
48771	  lib=conftest
48772	  libobjs=conftest.$ac_objext
48773	  deplibs=
48774	  wl=$lt_prog_compiler_wl_F77
48775	  pic_flag=$lt_prog_compiler_pic_F77
48776	  compiler_flags=-v
48777	  linker_flags=-v
48778	  verstring=
48779	  output_objdir=.
48780	  libname=conftest
48781	  lt_save_allow_undefined_flag=$allow_undefined_flag_F77
48782	  allow_undefined_flag_F77=
48783	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
48784  (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
48785  ac_status=$?
48786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48787  test $ac_status = 0; }
48788	  then
48789	    lt_cv_archive_cmds_need_lc_F77=no
48790	  else
48791	    lt_cv_archive_cmds_need_lc_F77=yes
48792	  fi
48793	  allow_undefined_flag_F77=$lt_save_allow_undefined_flag
48794	else
48795	  cat conftest.err 1>&5
48796	fi
48797	$RM conftest*
48798
48799fi
48800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5
48801$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; }
48802      archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77
48803      ;;
48804    esac
48805  fi
48806  ;;
48807esac
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
48871$as_echo_n "checking dynamic linker characteristics... " >&6; }
48872
48873library_names_spec=
48874libname_spec='lib$name'
48875soname_spec=
48876shrext_cmds=.so
48877postinstall_cmds=
48878postuninstall_cmds=
48879finish_cmds=
48880finish_eval=
48881shlibpath_var=
48882shlibpath_overrides_runpath=unknown
48883version_type=none
48884dynamic_linker="$host_os ld.so"
48885sys_lib_dlsearch_path_spec="/lib /usr/lib"
48886need_lib_prefix=unknown
48887hardcode_into_libs=no
48888
48889# when you set need_version to no, make sure it does not cause -set_version
48890# flags to be left without arguments
48891need_version=unknown
48892
48893
48894
48895case $host_os in
48896aix3*)
48897  version_type=linux # correct to gnu/linux during the next big refactor
48898  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
48899  shlibpath_var=LIBPATH
48900
48901  # AIX 3 has no versioning support, so we append a major version to the name.
48902  soname_spec='$libname$release$shared_ext$major'
48903  ;;
48904
48905aix[4-9]*)
48906  version_type=linux # correct to gnu/linux during the next big refactor
48907  need_lib_prefix=no
48908  need_version=no
48909  hardcode_into_libs=yes
48910  if test ia64 = "$host_cpu"; then
48911    # AIX 5 supports IA64
48912    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
48913    shlibpath_var=LD_LIBRARY_PATH
48914  else
48915    # With GCC up to 2.95.x, collect2 would create an import file
48916    # for dependence libraries.  The import file would start with
48917    # the line '#! .'.  This would cause the generated library to
48918    # depend on '.', always an invalid library.  This was fixed in
48919    # development snapshots of GCC prior to 3.0.
48920    case $host_os in
48921      aix4 | aix4.[01] | aix4.[01].*)
48922      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
48923	   echo ' yes '
48924	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
48925	:
48926      else
48927	can_build_shared=no
48928      fi
48929      ;;
48930    esac
48931    # Using Import Files as archive members, it is possible to support
48932    # filename-based versioning of shared library archives on AIX. While
48933    # this would work for both with and without runtime linking, it will
48934    # prevent static linking of such archives. So we do filename-based
48935    # shared library versioning with .so extension only, which is used
48936    # when both runtime linking and shared linking is enabled.
48937    # Unfortunately, runtime linking may impact performance, so we do
48938    # not want this to be the default eventually. Also, we use the
48939    # versioned .so libs for executables only if there is the -brtl
48940    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
48941    # To allow for filename-based versioning support, we need to create
48942    # libNAME.so.V as an archive file, containing:
48943    # *) an Import File, referring to the versioned filename of the
48944    #    archive as well as the shared archive member, telling the
48945    #    bitwidth (32 or 64) of that shared object, and providing the
48946    #    list of exported symbols of that shared object, eventually
48947    #    decorated with the 'weak' keyword
48948    # *) the shared object with the F_LOADONLY flag set, to really avoid
48949    #    it being seen by the linker.
48950    # At run time we better use the real file rather than another symlink,
48951    # but for link time we create the symlink libNAME.so -> libNAME.so.V
48952
48953    case $with_aix_soname,$aix_use_runtimelinking in
48954    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
48955    # soname into executable. Probably we can add versioning support to
48956    # collect2, so additional links can be useful in future.
48957    aix,yes) # traditional libtool
48958      dynamic_linker='AIX unversionable lib.so'
48959      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
48960      # instead of lib<name>.a to let people know that these are not
48961      # typical AIX shared libraries.
48962      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
48963      ;;
48964    aix,no) # traditional AIX only
48965      dynamic_linker='AIX lib.a(lib.so.V)'
48966      # We preserve .a as extension for shared libraries through AIX4.2
48967      # and later when we are not doing run time linking.
48968      library_names_spec='$libname$release.a $libname.a'
48969      soname_spec='$libname$release$shared_ext$major'
48970      ;;
48971    svr4,*) # full svr4 only
48972      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
48973      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
48974      # We do not specify a path in Import Files, so LIBPATH fires.
48975      shlibpath_overrides_runpath=yes
48976      ;;
48977    *,yes) # both, prefer svr4
48978      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
48979      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
48980      # unpreferred sharedlib libNAME.a needs extra handling
48981      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"'
48982      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"'
48983      # We do not specify a path in Import Files, so LIBPATH fires.
48984      shlibpath_overrides_runpath=yes
48985      ;;
48986    *,no) # both, prefer aix
48987      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
48988      library_names_spec='$libname$release.a $libname.a'
48989      soname_spec='$libname$release$shared_ext$major'
48990      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
48991      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)'
48992      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"'
48993      ;;
48994    esac
48995    shlibpath_var=LIBPATH
48996  fi
48997  ;;
48998
48999amigaos*)
49000  case $host_cpu in
49001  powerpc)
49002    # Since July 2007 AmigaOS4 officially supports .so libraries.
49003    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
49004    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49005    ;;
49006  m68k)
49007    library_names_spec='$libname.ixlibrary $libname.a'
49008    # Create ${libname}_ixlibrary.a entries in /sys/libs.
49009    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'
49010    ;;
49011  esac
49012  ;;
49013
49014beos*)
49015  library_names_spec='$libname$shared_ext'
49016  dynamic_linker="$host_os ld.so"
49017  shlibpath_var=LIBRARY_PATH
49018  ;;
49019
49020bsdi[45]*)
49021  version_type=linux # correct to gnu/linux during the next big refactor
49022  need_version=no
49023  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49024  soname_spec='$libname$release$shared_ext$major'
49025  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
49026  shlibpath_var=LD_LIBRARY_PATH
49027  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
49028  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
49029  # the default ld.so.conf also contains /usr/contrib/lib and
49030  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
49031  # libtool to hard-code these into programs
49032  ;;
49033
49034cygwin* | mingw* | pw32* | cegcc*)
49035  version_type=windows
49036  shrext_cmds=.dll
49037  need_version=no
49038  need_lib_prefix=no
49039
49040  case $GCC,$cc_basename in
49041  yes,*)
49042    # gcc
49043    library_names_spec='$libname.dll.a'
49044    # DLL is installed to $(libdir)/../bin by postinstall_cmds
49045    postinstall_cmds='base_file=`basename \$file`~
49046      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
49047      dldir=$destdir/`dirname \$dlpath`~
49048      test -d \$dldir || mkdir -p \$dldir~
49049      $install_prog $dir/$dlname \$dldir/$dlname~
49050      chmod a+x \$dldir/$dlname~
49051      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
49052        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
49053      fi'
49054    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
49055      dlpath=$dir/\$dldll~
49056       $RM \$dlpath'
49057    shlibpath_overrides_runpath=yes
49058
49059    case $host_os in
49060    cygwin*)
49061      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
49062      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
49063
49064      ;;
49065    mingw* | cegcc*)
49066      # MinGW DLLs use traditional 'lib' prefix
49067      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
49068      ;;
49069    pw32*)
49070      # pw32 DLLs use 'pw' prefix rather than 'lib'
49071      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
49072      ;;
49073    esac
49074    dynamic_linker='Win32 ld.exe'
49075    ;;
49076
49077  *,cl*)
49078    # Native MSVC
49079    libname_spec='$name'
49080    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
49081    library_names_spec='$libname.dll.lib'
49082
49083    case $build_os in
49084    mingw*)
49085      sys_lib_search_path_spec=
49086      lt_save_ifs=$IFS
49087      IFS=';'
49088      for lt_path in $LIB
49089      do
49090        IFS=$lt_save_ifs
49091        # Let DOS variable expansion print the short 8.3 style file name.
49092        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
49093        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
49094      done
49095      IFS=$lt_save_ifs
49096      # Convert to MSYS style.
49097      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
49098      ;;
49099    cygwin*)
49100      # Convert to unix form, then to dos form, then back to unix form
49101      # but this time dos style (no spaces!) so that the unix form looks
49102      # like /cygdrive/c/PROGRA~1:/cygdr...
49103      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
49104      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
49105      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
49106      ;;
49107    *)
49108      sys_lib_search_path_spec=$LIB
49109      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
49110        # It is most probably a Windows format PATH.
49111        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
49112      else
49113        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
49114      fi
49115      # FIXME: find the short name or the path components, as spaces are
49116      # common. (e.g. "Program Files" -> "PROGRA~1")
49117      ;;
49118    esac
49119
49120    # DLL is installed to $(libdir)/../bin by postinstall_cmds
49121    postinstall_cmds='base_file=`basename \$file`~
49122      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
49123      dldir=$destdir/`dirname \$dlpath`~
49124      test -d \$dldir || mkdir -p \$dldir~
49125      $install_prog $dir/$dlname \$dldir/$dlname'
49126    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
49127      dlpath=$dir/\$dldll~
49128       $RM \$dlpath'
49129    shlibpath_overrides_runpath=yes
49130    dynamic_linker='Win32 link.exe'
49131    ;;
49132
49133  *)
49134    # Assume MSVC wrapper
49135    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
49136    dynamic_linker='Win32 ld.exe'
49137    ;;
49138  esac
49139  # FIXME: first we should search . and the directory the executable is in
49140  shlibpath_var=PATH
49141  ;;
49142
49143darwin* | rhapsody*)
49144  dynamic_linker="$host_os dyld"
49145  version_type=darwin
49146  need_lib_prefix=no
49147  need_version=no
49148  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
49149  soname_spec='$libname$release$major$shared_ext'
49150  shlibpath_overrides_runpath=yes
49151  shlibpath_var=DYLD_LIBRARY_PATH
49152  shrext_cmds=`test .$module = .yes && echo .so || echo .dylib`
49153
49154  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
49155  ;;
49156
49157dgux*)
49158  version_type=linux # correct to gnu/linux during the next big refactor
49159  need_lib_prefix=no
49160  need_version=no
49161  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49162  soname_spec='$libname$release$shared_ext$major'
49163  shlibpath_var=LD_LIBRARY_PATH
49164  ;;
49165
49166freebsd* | dragonfly*)
49167  # DragonFly does not have aout.  When/if they implement a new
49168  # versioning mechanism, adjust this.
49169  if test -x /usr/bin/objformat; then
49170    objformat=`/usr/bin/objformat`
49171  else
49172    case $host_os in
49173    freebsd[23].*) objformat=aout ;;
49174    *) objformat=elf ;;
49175    esac
49176  fi
49177  version_type=freebsd-$objformat
49178  case $version_type in
49179    freebsd-elf*)
49180      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49181      soname_spec='$libname$release$shared_ext$major'
49182      need_version=no
49183      need_lib_prefix=no
49184      ;;
49185    freebsd-*)
49186      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
49187      need_version=yes
49188      ;;
49189  esac
49190  shlibpath_var=LD_LIBRARY_PATH
49191  case $host_os in
49192  freebsd2.*)
49193    shlibpath_overrides_runpath=yes
49194    ;;
49195  freebsd3.[01]* | freebsdelf3.[01]*)
49196    shlibpath_overrides_runpath=yes
49197    hardcode_into_libs=yes
49198    ;;
49199  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
49200  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
49201    shlibpath_overrides_runpath=no
49202    hardcode_into_libs=yes
49203    ;;
49204  *) # from 4.6 on, and DragonFly
49205    shlibpath_overrides_runpath=yes
49206    hardcode_into_libs=yes
49207    ;;
49208  esac
49209  ;;
49210
49211haiku*)
49212  version_type=linux # correct to gnu/linux during the next big refactor
49213  need_lib_prefix=no
49214  need_version=no
49215  dynamic_linker="$host_os runtime_loader"
49216  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49217  soname_spec='$libname$release$shared_ext$major'
49218  shlibpath_var=LIBRARY_PATH
49219  shlibpath_overrides_runpath=no
49220  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
49221  hardcode_into_libs=yes
49222  ;;
49223
49224hpux9* | hpux10* | hpux11*)
49225  # Give a soname corresponding to the major version so that dld.sl refuses to
49226  # link against other versions.
49227  version_type=sunos
49228  need_lib_prefix=no
49229  need_version=no
49230  case $host_cpu in
49231  ia64*)
49232    shrext_cmds='.so'
49233    hardcode_into_libs=yes
49234    dynamic_linker="$host_os dld.so"
49235    shlibpath_var=LD_LIBRARY_PATH
49236    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
49237    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49238    soname_spec='$libname$release$shared_ext$major'
49239    if test 32 = "$HPUX_IA64_MODE"; then
49240      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
49241      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
49242    else
49243      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
49244      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
49245    fi
49246    ;;
49247  hppa*64*)
49248    shrext_cmds='.sl'
49249    hardcode_into_libs=yes
49250    dynamic_linker="$host_os dld.sl"
49251    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
49252    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
49253    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49254    soname_spec='$libname$release$shared_ext$major'
49255    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
49256    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
49257    ;;
49258  *)
49259    shrext_cmds='.sl'
49260    dynamic_linker="$host_os dld.sl"
49261    shlibpath_var=SHLIB_PATH
49262    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
49263    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49264    soname_spec='$libname$release$shared_ext$major'
49265    ;;
49266  esac
49267  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
49268  postinstall_cmds='chmod 555 $lib'
49269  # or fails outright, so override atomically:
49270  install_override_mode=555
49271  ;;
49272
49273interix[3-9]*)
49274  version_type=linux # correct to gnu/linux during the next big refactor
49275  need_lib_prefix=no
49276  need_version=no
49277  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49278  soname_spec='$libname$release$shared_ext$major'
49279  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
49280  shlibpath_var=LD_LIBRARY_PATH
49281  shlibpath_overrides_runpath=no
49282  hardcode_into_libs=yes
49283  ;;
49284
49285irix5* | irix6* | nonstopux*)
49286  case $host_os in
49287    nonstopux*) version_type=nonstopux ;;
49288    *)
49289	if test yes = "$lt_cv_prog_gnu_ld"; then
49290		version_type=linux # correct to gnu/linux during the next big refactor
49291	else
49292		version_type=irix
49293	fi ;;
49294  esac
49295  need_lib_prefix=no
49296  need_version=no
49297  soname_spec='$libname$release$shared_ext$major'
49298  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
49299  case $host_os in
49300  irix5* | nonstopux*)
49301    libsuff= shlibsuff=
49302    ;;
49303  *)
49304    case $LD in # libtool.m4 will add one of these switches to LD
49305    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
49306      libsuff= shlibsuff= libmagic=32-bit;;
49307    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
49308      libsuff=32 shlibsuff=N32 libmagic=N32;;
49309    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
49310      libsuff=64 shlibsuff=64 libmagic=64-bit;;
49311    *) libsuff= shlibsuff= libmagic=never-match;;
49312    esac
49313    ;;
49314  esac
49315  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
49316  shlibpath_overrides_runpath=no
49317  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
49318  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
49319  hardcode_into_libs=yes
49320  ;;
49321
49322# No shared lib support for Linux oldld, aout, or coff.
49323linux*oldld* | linux*aout* | linux*coff*)
49324  dynamic_linker=no
49325  ;;
49326
49327linux*android*)
49328  version_type=none # Android doesn't support versioned libraries.
49329  need_lib_prefix=no
49330  need_version=no
49331  library_names_spec='$libname$release$shared_ext'
49332  soname_spec='$libname$release$shared_ext'
49333  finish_cmds=
49334  shlibpath_var=LD_LIBRARY_PATH
49335  shlibpath_overrides_runpath=yes
49336
49337  # This implies no fast_install, which is unacceptable.
49338  # Some rework will be needed to allow for fast_install
49339  # before this can be enabled.
49340  hardcode_into_libs=yes
49341
49342  dynamic_linker='Android linker'
49343  # Don't embed -rpath directories since the linker doesn't support them.
49344  hardcode_libdir_flag_spec_F77='-L$libdir'
49345  ;;
49346
49347# This must be glibc/ELF.
49348linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
49349  version_type=linux # correct to gnu/linux during the next big refactor
49350  need_lib_prefix=no
49351  need_version=no
49352  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49353  soname_spec='$libname$release$shared_ext$major'
49354  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
49355  shlibpath_var=LD_LIBRARY_PATH
49356  shlibpath_overrides_runpath=no
49357
49358  # Some binutils ld are patched to set DT_RUNPATH
49359  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
49360  $as_echo_n "(cached) " >&6
49361else
49362  lt_cv_shlibpath_overrides_runpath=no
49363    save_LDFLAGS=$LDFLAGS
49364    save_libdir=$libdir
49365    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \
49366	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\""
49367    cat > conftest.$ac_ext <<_ACEOF
49368      program main
49369
49370      end
49371_ACEOF
49372if ac_fn_f77_try_link "$LINENO"; then :
49373  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
49374  lt_cv_shlibpath_overrides_runpath=yes
49375fi
49376fi
49377rm -f core conftest.err conftest.$ac_objext \
49378    conftest$ac_exeext conftest.$ac_ext
49379    LDFLAGS=$save_LDFLAGS
49380    libdir=$save_libdir
49381
49382fi
49383
49384  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
49385
49386  # This implies no fast_install, which is unacceptable.
49387  # Some rework will be needed to allow for fast_install
49388  # before this can be enabled.
49389  hardcode_into_libs=yes
49390
49391  # Add ABI-specific directories to the system library path.
49392  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
49393
49394  # Ideally, we could use ldconfig to report *all* directores which are
49395  # searched for libraries, however this is still not possible.  Aside from not
49396  # being certain /sbin/ldconfig is available, command
49397  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
49398  # even though it is searched at run-time.  Try to do the best guess by
49399  # appending ld.so.conf contents (and includes) to the search path.
49400  if test -f /etc/ld.so.conf; then
49401    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' ' '`
49402    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
49403  fi
49404
49405  # We used to test for /lib/ld.so.1 and disable shared libraries on
49406  # powerpc, because MkLinux only supported shared libraries with the
49407  # GNU dynamic linker.  Since this was broken with cross compilers,
49408  # most powerpc-linux boxes support dynamic linking these days and
49409  # people can always --disable-shared, the test was removed, and we
49410  # assume the GNU/Linux dynamic linker is in use.
49411  dynamic_linker='GNU/Linux ld.so'
49412  ;;
49413
49414netbsd*)
49415  version_type=sunos
49416  need_lib_prefix=no
49417  need_version=no
49418  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
49419    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
49420    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
49421    dynamic_linker='NetBSD (a.out) ld.so'
49422  else
49423    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49424    soname_spec='$libname$release$shared_ext$major'
49425    dynamic_linker='NetBSD ld.elf_so'
49426  fi
49427  shlibpath_var=LD_LIBRARY_PATH
49428  shlibpath_overrides_runpath=yes
49429  hardcode_into_libs=yes
49430  ;;
49431
49432newsos6)
49433  version_type=linux # correct to gnu/linux during the next big refactor
49434  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49435  shlibpath_var=LD_LIBRARY_PATH
49436  shlibpath_overrides_runpath=yes
49437  ;;
49438
49439*nto* | *qnx*)
49440  version_type=qnx
49441  need_lib_prefix=no
49442  need_version=no
49443  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49444  soname_spec='$libname$release$shared_ext$major'
49445  shlibpath_var=LD_LIBRARY_PATH
49446  shlibpath_overrides_runpath=no
49447  hardcode_into_libs=yes
49448  dynamic_linker='ldqnx.so'
49449  ;;
49450
49451openbsd* | bitrig*)
49452  version_type=sunos
49453  sys_lib_dlsearch_path_spec=/usr/lib
49454  need_lib_prefix=no
49455  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
49456    need_version=no
49457  else
49458    need_version=yes
49459  fi
49460  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
49461  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
49462  shlibpath_var=LD_LIBRARY_PATH
49463  shlibpath_overrides_runpath=yes
49464  ;;
49465
49466os2*)
49467  libname_spec='$name'
49468  version_type=windows
49469  shrext_cmds=.dll
49470  need_version=no
49471  need_lib_prefix=no
49472  # OS/2 can only load a DLL with a base name of 8 characters or less.
49473  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
49474    v=$($ECHO $release$versuffix | tr -d .-);
49475    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
49476    $ECHO $n$v`$shared_ext'
49477  library_names_spec='${libname}_dll.$libext'
49478  dynamic_linker='OS/2 ld.exe'
49479  shlibpath_var=BEGINLIBPATH
49480  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
49481  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
49482  postinstall_cmds='base_file=`basename \$file`~
49483    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
49484    dldir=$destdir/`dirname \$dlpath`~
49485    test -d \$dldir || mkdir -p \$dldir~
49486    $install_prog $dir/$dlname \$dldir/$dlname~
49487    chmod a+x \$dldir/$dlname~
49488    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
49489      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
49490    fi'
49491  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
49492    dlpath=$dir/\$dldll~
49493    $RM \$dlpath'
49494  ;;
49495
49496osf3* | osf4* | osf5*)
49497  version_type=osf
49498  need_lib_prefix=no
49499  need_version=no
49500  soname_spec='$libname$release$shared_ext$major'
49501  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49502  shlibpath_var=LD_LIBRARY_PATH
49503  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
49504  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
49505  ;;
49506
49507rdos*)
49508  dynamic_linker=no
49509  ;;
49510
49511solaris*)
49512  version_type=linux # correct to gnu/linux during the next big refactor
49513  need_lib_prefix=no
49514  need_version=no
49515  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49516  soname_spec='$libname$release$shared_ext$major'
49517  shlibpath_var=LD_LIBRARY_PATH
49518  shlibpath_overrides_runpath=yes
49519  hardcode_into_libs=yes
49520  # ldd complains unless libraries are executable
49521  postinstall_cmds='chmod +x $lib'
49522  ;;
49523
49524sunos4*)
49525  version_type=sunos
49526  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
49527  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
49528  shlibpath_var=LD_LIBRARY_PATH
49529  shlibpath_overrides_runpath=yes
49530  if test yes = "$with_gnu_ld"; then
49531    need_lib_prefix=no
49532  fi
49533  need_version=yes
49534  ;;
49535
49536sysv4 | sysv4.3*)
49537  version_type=linux # correct to gnu/linux during the next big refactor
49538  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49539  soname_spec='$libname$release$shared_ext$major'
49540  shlibpath_var=LD_LIBRARY_PATH
49541  case $host_vendor in
49542    sni)
49543      shlibpath_overrides_runpath=no
49544      need_lib_prefix=no
49545      runpath_var=LD_RUN_PATH
49546      ;;
49547    siemens)
49548      need_lib_prefix=no
49549      ;;
49550    motorola)
49551      need_lib_prefix=no
49552      need_version=no
49553      shlibpath_overrides_runpath=no
49554      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
49555      ;;
49556  esac
49557  ;;
49558
49559sysv4*MP*)
49560  if test -d /usr/nec; then
49561    version_type=linux # correct to gnu/linux during the next big refactor
49562    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
49563    soname_spec='$libname$shared_ext.$major'
49564    shlibpath_var=LD_LIBRARY_PATH
49565  fi
49566  ;;
49567
49568sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
49569  version_type=sco
49570  need_lib_prefix=no
49571  need_version=no
49572  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
49573  soname_spec='$libname$release$shared_ext$major'
49574  shlibpath_var=LD_LIBRARY_PATH
49575  shlibpath_overrides_runpath=yes
49576  hardcode_into_libs=yes
49577  if test yes = "$with_gnu_ld"; then
49578    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
49579  else
49580    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
49581    case $host_os in
49582      sco3.2v5*)
49583        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
49584	;;
49585    esac
49586  fi
49587  sys_lib_dlsearch_path_spec='/usr/lib'
49588  ;;
49589
49590tpf*)
49591  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
49592  version_type=linux # correct to gnu/linux during the next big refactor
49593  need_lib_prefix=no
49594  need_version=no
49595  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49596  shlibpath_var=LD_LIBRARY_PATH
49597  shlibpath_overrides_runpath=no
49598  hardcode_into_libs=yes
49599  ;;
49600
49601uts4*)
49602  version_type=linux # correct to gnu/linux during the next big refactor
49603  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
49604  soname_spec='$libname$release$shared_ext$major'
49605  shlibpath_var=LD_LIBRARY_PATH
49606  ;;
49607
49608*)
49609  dynamic_linker=no
49610  ;;
49611esac
49612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
49613$as_echo "$dynamic_linker" >&6; }
49614test no = "$dynamic_linker" && can_build_shared=no
49615
49616variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
49617if test yes = "$GCC"; then
49618  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
49619fi
49620
49621if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
49622  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
49623fi
49624
49625if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
49626  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
49627fi
49628
49629# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
49630configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
49631
49632# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
49633func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
49634
49635# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
49636configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
49678$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
49679hardcode_action_F77=
49680if test -n "$hardcode_libdir_flag_spec_F77" ||
49681   test -n "$runpath_var_F77" ||
49682   test yes = "$hardcode_automatic_F77"; then
49683
49684  # We can hardcode non-existent directories.
49685  if test no != "$hardcode_direct_F77" &&
49686     # If the only mechanism to avoid hardcoding is shlibpath_var, we
49687     # have to relink, otherwise we might link with an installed library
49688     # when we should be linking with a yet-to-be-installed one
49689     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" &&
49690     test no != "$hardcode_minus_L_F77"; then
49691    # Linking always hardcodes the temporary library directory.
49692    hardcode_action_F77=relink
49693  else
49694    # We can link without hardcoding, and we can hardcode nonexisting dirs.
49695    hardcode_action_F77=immediate
49696  fi
49697else
49698  # We cannot hardcode anything, or else we can only hardcode existing
49699  # directories.
49700  hardcode_action_F77=unsupported
49701fi
49702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
49703$as_echo "$hardcode_action_F77" >&6; }
49704
49705if test relink = "$hardcode_action_F77" ||
49706   test yes = "$inherit_rpath_F77"; then
49707  # Fast installation is not supported
49708  enable_fast_install=no
49709elif test yes = "$shlibpath_overrides_runpath" ||
49710     test no = "$enable_shared"; then
49711  # Fast installation is not necessary
49712  enable_fast_install=needless
49713fi
49714
49715
49716
49717
49718
49719
49720
49721  fi # test -n "$compiler"
49722
49723  GCC=$lt_save_GCC
49724  CC=$lt_save_CC
49725  CFLAGS=$lt_save_CFLAGS
49726fi # test yes != "$_lt_disable_F77"
49727
49728ac_ext=c
49729ac_cpp='$CPP $CPPFLAGS'
49730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49732ac_compiler_gnu=$ac_cv_c_compiler_gnu
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746        ac_config_commands="$ac_config_commands libtool"
49747
49748
49749
49750
49751# Only expand once:
49752
49753
49754
49755# Avoid to link all the dep from others libraries (*.la included by LIBADD)
49756link_all_deplibs=no
49757
49758# Check to see if building shared libraries
49759libtool_build_shared_libs=no
49760if test "$enable_shared" = "yes"; then
49761  libtool_build_shared_libs=yes
49762fi
49763
49764# Check to see if building static libraries
49765libtool_build_static_libs=no
49766if test "$enable_static" = "yes"; then
49767  libtool_build_static_libs=yes
49768fi
49769
49770# AM_CONDITIONAL(ENABLE_STATIC, test "$libtool_build_static_libs" = yes)
49771# Fake to disable the static build
49772 if test "$libtool_build_static_libs" = xxxx; then
49773  ENABLE_STATIC_TRUE=
49774  ENABLE_STATIC_FALSE='#'
49775else
49776  ENABLE_STATIC_TRUE='#'
49777  ENABLE_STATIC_FALSE=
49778fi
49779
49780
49781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
49782$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
49783if ${ac_cv_c_const+:} false; then :
49784  $as_echo_n "(cached) " >&6
49785else
49786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49787/* end confdefs.h.  */
49788
49789#ifdef F77_DUMMY_MAIN
49790
49791#  ifdef __cplusplus
49792     extern "C"
49793#  endif
49794   int F77_DUMMY_MAIN() { return 1; }
49795
49796#endif
49797int
49798main ()
49799{
49800
49801#ifndef __cplusplus
49802  /* Ultrix mips cc rejects this sort of thing.  */
49803  typedef int charset[2];
49804  const charset cs = { 0, 0 };
49805  /* SunOS 4.1.1 cc rejects this.  */
49806  char const *const *pcpcc;
49807  char **ppc;
49808  /* NEC SVR4.0.2 mips cc rejects this.  */
49809  struct point {int x, y;};
49810  static struct point const zero = {0,0};
49811  /* AIX XL C 1.02.0.0 rejects this.
49812     It does not let you subtract one const X* pointer from another in
49813     an arm of an if-expression whose if-part is not a constant
49814     expression */
49815  const char *g = "string";
49816  pcpcc = &g + (g ? g-g : 0);
49817  /* HPUX 7.0 cc rejects these. */
49818  ++pcpcc;
49819  ppc = (char**) pcpcc;
49820  pcpcc = (char const *const *) ppc;
49821  { /* SCO 3.2v4 cc rejects this sort of thing.  */
49822    char tx;
49823    char *t = &tx;
49824    char const *s = 0 ? (char *) 0 : (char const *) 0;
49825
49826    *t++ = 0;
49827    if (s) return 0;
49828  }
49829  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
49830    int x[] = {25, 17};
49831    const int *foo = &x[0];
49832    ++foo;
49833  }
49834  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
49835    typedef const int *iptr;
49836    iptr p = 0;
49837    ++p;
49838  }
49839  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
49840       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
49841    struct s { int j; const int *ap[3]; } bx;
49842    struct s *b = &bx; b->j = 5;
49843  }
49844  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
49845    const int foo = 10;
49846    if (!foo) return 0;
49847  }
49848  return !cs[0] && !zero.x;
49849#endif
49850
49851  ;
49852  return 0;
49853}
49854_ACEOF
49855if ac_fn_c_try_compile "$LINENO"; then :
49856  ac_cv_c_const=yes
49857else
49858  ac_cv_c_const=no
49859fi
49860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49861fi
49862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
49863$as_echo "$ac_cv_c_const" >&6; }
49864if test $ac_cv_c_const = no; then
49865
49866$as_echo "#define const /**/" >>confdefs.h
49867
49868fi
49869
49870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
49871$as_echo_n "checking for inline... " >&6; }
49872if ${ac_cv_c_inline+:} false; then :
49873  $as_echo_n "(cached) " >&6
49874else
49875  ac_cv_c_inline=no
49876for ac_kw in inline __inline__ __inline; do
49877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49878/* end confdefs.h.  */
49879#ifndef __cplusplus
49880typedef int foo_t;
49881static $ac_kw foo_t static_foo () {return 0; }
49882$ac_kw foo_t foo () {return 0; }
49883#endif
49884
49885_ACEOF
49886if ac_fn_c_try_compile "$LINENO"; then :
49887  ac_cv_c_inline=$ac_kw
49888fi
49889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49890  test "$ac_cv_c_inline" != no && break
49891done
49892
49893fi
49894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
49895$as_echo "$ac_cv_c_inline" >&6; }
49896
49897case $ac_cv_c_inline in
49898  inline | yes) ;;
49899  *)
49900    case $ac_cv_c_inline in
49901      no) ac_val=;;
49902      *) ac_val=$ac_cv_c_inline;;
49903    esac
49904    cat >>confdefs.h <<_ACEOF
49905#ifndef __cplusplus
49906#define inline $ac_val
49907#endif
49908_ACEOF
49909    ;;
49910esac
49911
49912
49913
49914
49915#------------------------------
49916# backtrace support (for glibc)
49917#------------------------------
49918
49919# Basic backtrace functionnality
49920
49921have_glibc_backtrace=no
49922
49923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc backtrace" >&5
49924$as_echo_n "checking for glibc backtrace... " >&6; }
49925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49926/* end confdefs.h.  */
49927#if defined(__GNUC__)
49928#define _GNU_SOURCE
49929#include <memory.h>
49930#include <execinfo.h>
49931#endif
49932#ifdef F77_DUMMY_MAIN
49933
49934#  ifdef __cplusplus
49935     extern "C"
49936#  endif
49937   int F77_DUMMY_MAIN() { return 1; }
49938
49939#endif
49940int
49941main ()
49942{
49943 void *tr_array[10]; backtrace(tr_array, 10);
49944  ;
49945  return 0;
49946}
49947_ACEOF
49948if ac_fn_c_try_link "$LINENO"; then :
49949  have_glibc_backtrace=yes
49950else
49951  have_glibc_backtrace=no
49952fi
49953rm -f core conftest.err conftest.$ac_objext \
49954    conftest$ac_exeext conftest.$ac_ext
49955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_backtrace" >&5
49956$as_echo "$have_glibc_backtrace" >&6; }
49957
49958if test "x$have_glibc_backtrace" = "xyes"; then
49959
49960    ac_ext=c
49961ac_cpp='$CPP $CPPFLAGS'
49962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49964ac_compiler_gnu=$ac_cv_c_compiler_gnu
49965
49966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler accepts \"-rdynamic\"" >&5
49967$as_echo_n "checking if the C compiler accepts \"-rdynamic\"... " >&6; }
49968    ac_save_CFLAGS="$CFLAGS"
49969    CFLAGS="$CFLAGS $"-rdynamic""
49970
49971    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49972/* end confdefs.h.  */
49973
49974#ifdef F77_DUMMY_MAIN
49975
49976#  ifdef __cplusplus
49977     extern "C"
49978#  endif
49979   int F77_DUMMY_MAIN() { return 1; }
49980
49981#endif
49982int
49983main ()
49984{
49985
49986  ;
49987  return 0;
49988}
49989_ACEOF
49990if ac_fn_c_try_compile "$LINENO"; then :
49991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49992$as_echo "yes" >&6; }
49993       BACKTRACE_CFLAGS=""-rdynamic""
49994
49995else
49996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49997$as_echo "no" >&6; }
49998
49999fi
50000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50001    CFLAGS="$ac_save_CFLAGS";
50002    ac_ext=c
50003ac_cpp='$CPP $CPPFLAGS'
50004ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50005ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50006ac_compiler_gnu=$ac_cv_c_compiler_gnu
50007
50008
50009
50010
50011    ac_ext=cpp
50012ac_cpp='$CXXCPP $CPPFLAGS'
50013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50016
50017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler accepts \"-rdynamic\"" >&5
50018$as_echo_n "checking if the C++ compiler accepts \"-rdynamic\"... " >&6; }
50019    ac_save_CXXFLAGS="$CXXFLAGS"
50020    CXXFLAGS="$CXXFLAGS $"-rdynamic""
50021
50022    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50023/* end confdefs.h.  */
50024
50025#ifdef F77_DUMMY_MAIN
50026
50027#  ifdef __cplusplus
50028     extern "C"
50029#  endif
50030   int F77_DUMMY_MAIN() { return 1; }
50031
50032#endif
50033int
50034main ()
50035{
50036
50037  ;
50038  return 0;
50039}
50040_ACEOF
50041if ac_fn_cxx_try_compile "$LINENO"; then :
50042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50043$as_echo "yes" >&6; }
50044       BACKTRACE_CXXFLAGS=""-rdynamic""
50045
50046else
50047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50048$as_echo "no" >&6; }
50049
50050fi
50051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50052    CXXFLAGS="$ac_save_CXXFLAGS";
50053    ac_ext=c
50054ac_cpp='$CPP $CPPFLAGS'
50055ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50056ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50057ac_compiler_gnu=$ac_cv_c_compiler_gnu
50058
50059
50060
50061
50062    ac_ext=f
50063ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
50064ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50065ac_compiler_gnu=$ac_cv_f77_compiler_gnu
50066
50067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Fortran 77 compiler accepts \"-rdynamic\"" >&5
50068$as_echo_n "checking if the Fortran 77 compiler accepts \"-rdynamic\"... " >&6; }
50069    ac_save_FFLAGS="$FFLAGS"
50070    FFLAGS="$FFLAGS $"-rdynamic""
50071
50072    cat > conftest.$ac_ext <<_ACEOF
50073      program main
50074
50075      end
50076_ACEOF
50077if ac_fn_f77_try_compile "$LINENO"; then :
50078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50079$as_echo "yes" >&6; }
50080       BACKTRACE_FFLAGS=""-rdynamic""
50081
50082else
50083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50084$as_echo "no" >&6; }
50085
50086fi
50087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50088    FFLAGS="$ac_save_FFLAGS";
50089    ac_ext=c
50090ac_cpp='$CPP $CPPFLAGS'
50091ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50092ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50093ac_compiler_gnu=$ac_cv_c_compiler_gnu
50094
50095
50096
50097
50098
50099$as_echo "#define HAVE_GLIBC_BACKTRACE 1" >>confdefs.h
50100
50101fi
50102
50103# C++ demangling
50104
50105have_cplus_demangle=no
50106
50107ac_ext=cpp
50108ac_cpp='$CXXCPP $CPPFLAGS'
50109ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50110ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50111ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50112
50113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdc++ abi::__cxa_demangle" >&5
50114$as_echo_n "checking for stdc++ abi::__cxa_demangle... " >&6; }
50115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50116/* end confdefs.h.  */
50117#include <cxxabi.h>
50118#ifdef F77_DUMMY_MAIN
50119
50120#  ifdef __cplusplus
50121     extern "C"
50122#  endif
50123   int F77_DUMMY_MAIN() { return 1; }
50124
50125#endif
50126int
50127main ()
50128{
50129
50130  std::size_t length = 0;  int cc;   char* ret = abi::__cxa_demangle("3barI5emptyLi17EE", 0, &length, &cc);
50131  ;
50132  return 0;
50133}
50134_ACEOF
50135if ac_fn_cxx_try_link "$LINENO"; then :
50136  have_cplus_demangle=yes
50137else
50138  have_cplus_demangle=no
50139fi
50140rm -f core conftest.err conftest.$ac_objext \
50141    conftest$ac_exeext conftest.$ac_ext
50142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_cplus_demangle" >&5
50143$as_echo "$have_cplus_demangle" >&6; }
50144
50145if test "x$have_cplus_demangle" = "xyes"; then
50146
50147
50148    ac_ext=c
50149ac_cpp='$CPP $CPPFLAGS'
50150ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50151ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50152ac_compiler_gnu=$ac_cv_c_compiler_gnu
50153
50154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler accepts \"-rdynamic\"" >&5
50155$as_echo_n "checking if the C compiler accepts \"-rdynamic\"... " >&6; }
50156    ac_save_CFLAGS="$CFLAGS"
50157    CFLAGS="$CFLAGS $"-rdynamic""
50158
50159    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50160/* end confdefs.h.  */
50161
50162#ifdef F77_DUMMY_MAIN
50163
50164#  ifdef __cplusplus
50165     extern "C"
50166#  endif
50167   int F77_DUMMY_MAIN() { return 1; }
50168
50169#endif
50170int
50171main ()
50172{
50173
50174  ;
50175  return 0;
50176}
50177_ACEOF
50178if ac_fn_c_try_compile "$LINENO"; then :
50179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50180$as_echo "yes" >&6; }
50181       BACKTRACE_CFLAGS=""-rdynamic""
50182
50183else
50184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50185$as_echo "no" >&6; }
50186
50187fi
50188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50189    CFLAGS="$ac_save_CFLAGS";
50190    ac_ext=cpp
50191ac_cpp='$CXXCPP $CPPFLAGS'
50192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50195
50196
50197
50198
50199    ac_ext=cpp
50200ac_cpp='$CXXCPP $CPPFLAGS'
50201ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50202ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50203ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50204
50205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler accepts \"-rdynamic\"" >&5
50206$as_echo_n "checking if the C++ compiler accepts \"-rdynamic\"... " >&6; }
50207    ac_save_CXXFLAGS="$CXXFLAGS"
50208    CXXFLAGS="$CXXFLAGS $"-rdynamic""
50209
50210    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50211/* end confdefs.h.  */
50212
50213#ifdef F77_DUMMY_MAIN
50214
50215#  ifdef __cplusplus
50216     extern "C"
50217#  endif
50218   int F77_DUMMY_MAIN() { return 1; }
50219
50220#endif
50221int
50222main ()
50223{
50224
50225  ;
50226  return 0;
50227}
50228_ACEOF
50229if ac_fn_cxx_try_compile "$LINENO"; then :
50230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50231$as_echo "yes" >&6; }
50232       BACKTRACE_CXXFLAGS=""-rdynamic""
50233
50234else
50235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50236$as_echo "no" >&6; }
50237
50238fi
50239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50240    CXXFLAGS="$ac_save_CXXFLAGS";
50241    ac_ext=cpp
50242ac_cpp='$CXXCPP $CPPFLAGS'
50243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50246
50247
50248
50249
50250    ac_ext=f
50251ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
50252ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50253ac_compiler_gnu=$ac_cv_f77_compiler_gnu
50254
50255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Fortran 77 compiler accepts \"-rdynamic\"" >&5
50256$as_echo_n "checking if the Fortran 77 compiler accepts \"-rdynamic\"... " >&6; }
50257    ac_save_FFLAGS="$FFLAGS"
50258    FFLAGS="$FFLAGS $"-rdynamic""
50259
50260    cat > conftest.$ac_ext <<_ACEOF
50261      program main
50262
50263      end
50264_ACEOF
50265if ac_fn_f77_try_compile "$LINENO"; then :
50266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50267$as_echo "yes" >&6; }
50268       BACKTRACE_FFLAGS=""-rdynamic""
50269
50270else
50271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50272$as_echo "no" >&6; }
50273
50274fi
50275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50276    FFLAGS="$ac_save_FFLAGS";
50277    ac_ext=cpp
50278ac_cpp='$CXXCPP $CPPFLAGS'
50279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50282
50283
50284
50285
50286
50287$as_echo "#define HAVE_CPLUS_DEMANGLE 1" >>confdefs.h
50288
50289fi
50290ac_ext=c
50291ac_cpp='$CPP $CPPFLAGS'
50292ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50293ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50294ac_compiler_gnu=$ac_cv_c_compiler_gnu
50295
50296
50297
50298##########
50299##### Code quality
50300##########
50301# Extract the first word of "splint", so it can be a program name with args.
50302set dummy splint; ac_word=$2
50303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50304$as_echo_n "checking for $ac_word... " >&6; }
50305if ${ac_cv_path_SPLINT+:} false; then :
50306  $as_echo_n "(cached) " >&6
50307else
50308  case $SPLINT in
50309  [\\/]* | ?:[\\/]*)
50310  ac_cv_path_SPLINT="$SPLINT" # Let the user override the test with a path.
50311  ;;
50312  *)
50313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50314for as_dir in $PATH
50315do
50316  IFS=$as_save_IFS
50317  test -z "$as_dir" && as_dir=.
50318    for ac_exec_ext in '' $ac_executable_extensions; do
50319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50320    ac_cv_path_SPLINT="$as_dir/$ac_word$ac_exec_ext"
50321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50322    break 2
50323  fi
50324done
50325  done
50326IFS=$as_save_IFS
50327
50328  test -z "$ac_cv_path_SPLINT" && ac_cv_path_SPLINT="no"
50329  ;;
50330esac
50331fi
50332SPLINT=$ac_cv_path_SPLINT
50333if test -n "$SPLINT"; then
50334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPLINT" >&5
50335$as_echo "$SPLINT" >&6; }
50336else
50337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50338$as_echo "no" >&6; }
50339fi
50340
50341
50342
50343##########
50344##### Detect ccache and use it by default if available
50345##########
50346
50347# Check whether --enable-ccache was given.
50348if test "${enable_ccache+set}" = set; then :
50349  enableval=$enable_ccache;
50350fi
50351
50352# Extract the first word of "ccache", so it can be a program name with args.
50353set dummy ccache; ac_word=$2
50354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50355$as_echo_n "checking for $ac_word... " >&6; }
50356if ${ac_cv_path_CCACHE+:} false; then :
50357  $as_echo_n "(cached) " >&6
50358else
50359  case $CCACHE in
50360  [\\/]* | ?:[\\/]*)
50361  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50362  ;;
50363  *)
50364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50365for as_dir in $PATH
50366do
50367  IFS=$as_save_IFS
50368  test -z "$as_dir" && as_dir=.
50369    for ac_exec_ext in '' $ac_executable_extensions; do
50370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50371    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50373    break 2
50374  fi
50375done
50376  done
50377IFS=$as_save_IFS
50378
50379  ;;
50380esac
50381fi
50382CCACHE=$ac_cv_path_CCACHE
50383if test -n "$CCACHE"; then
50384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50385$as_echo "$CCACHE" >&6; }
50386else
50387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50388$as_echo "no" >&6; }
50389fi
50390
50391
50392if test x"$CCACHE" != x -a "$enable_ccache" != no; then
50393  CC="$CCACHE $CC"
50394  CXX="$CCACHE $CXX"
50395fi
50396
50397#######################
50398###### Creation of the header file (machine.h)
50399#######################
50400
50401
50402cat >>confdefs.h <<_ACEOF
50403#define PATH_SEPARATOR "$PATH_SEPARATOR"
50404_ACEOF
50405
50406
50407
50408
50409
50410
50411# Define the standard extension of a dynamic library
50412
50413cat >>confdefs.h <<_ACEOF
50414#define SHARED_LIB_EXT "$shrext_cmds"
50415_ACEOF
50416
50417
50418cat >>confdefs.h <<_ACEOF
50419#define SHARED_LIB_EXTW L"$shrext_cmds"
50420_ACEOF
50421
50422
50423
50424
50425#################
50426## Update the years in the various part of the code.
50427#################
50428
50429if test ! -f modules/core/src/cpp/banner.cpp; then
50430   as_fn_error $? "Could not find the Scilab banner file." "$LINENO" 5
50431fi
50432
50433CURRENT_YEAR=`date "+%Y"`
50434DETECTED_YEAR=`grep "Copyright (c) 2017-" modules/core/src/cpp/banner.cpp|sed -e "s/.*Copyright (c) 2017-\([0-9]*\).*/\1/g"`
50435
50436if test "$CURRENT_YEAR" != "$DETECTED_YEAR"; then
50437   sed -i -e "s| 2017-$DETECTED_YEAR | 2017-$CURRENT_YEAR |g" modules/core/src/cpp/banner.cpp modules/windows_tools/src/c/scilab_windows/console.c
50438   sed -i -e "s| 2017-$DETECTED_YEAR ESI Group| 2017-$CURRENT_YEAR ESI Group|g" etc/Info.plist.in
50439   sed -i -e "s|VALUE \"LegalCopyright\", \"Copyright (C) $DETECTED_YEAR|VALUE \"LegalCopyright\", \"Copyright (C) $CURRENT_YEAR|" $(find . -iname '*.rc')
50440   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: New year ($CURRENT_YEAR) detected. Copyright files updated. Please commit them ASAP." >&5
50441$as_echo "$as_me: WARNING: New year ($CURRENT_YEAR) detected. Copyright files updated. Please commit them ASAP." >&2;}
50442fi
50443
50444
50445#########
50446## Check extra CC / CXX compiler flags to ease runtime behaviors
50447#########
50448
50449
50450# Check whether --enable-static-system-lib was given.
50451if test "${enable_static_system_lib+set}" = set; then :
50452  enableval=$enable_static_system_lib;
50453fi
50454
50455
50456# Check if -static-libstdc++ and -static-libgcc are supported.
50457saved_LDFLAGS="$LDFLAGS"
50458
50459compiler_manage_static_libs=no
50460USE_STATIC_SYSTEM_LIB=no
50461
50462if test "x$enable_static_system_lib" == "xyes"; then
50463# The user ask for an explicit enable.
50464   USE_STATIC_SYSTEM_LIB=yes
50465fi
50466
50467
50468LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
50469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
50470$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
50471ac_ext=cpp
50472ac_cpp='$CXXCPP $CPPFLAGS'
50473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50476
50477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50478/* end confdefs.h.  */
50479
50480#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
50481#error -static-libstdc++ not implemented
50482#endif
50483int main() {return 0;}
50484_ACEOF
50485if ac_fn_cxx_try_link "$LINENO"; then :
50486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50487$as_echo "yes" >&6; }; compiler_manage_static_libs=yes
50488else
50489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50490$as_echo "no" >&6; }
50491fi
50492rm -f core conftest.err conftest.$ac_objext \
50493    conftest$ac_exeext conftest.$ac_ext
50494ac_ext=c
50495ac_cpp='$CPP $CPPFLAGS'
50496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50498ac_compiler_gnu=$ac_cv_c_compiler_gnu
50499
50500
50501LDFLAGS="$saved_LDFLAGS"
50502if test "x$compiler_manage_static_libs" == "xno" -a "x$enable_static_system_lib" == "xyes"; then
50503   as_fn_error $? "The $CC compiler does not support the options -static-libstdc++/-static-libgcc. Update your compiler or use the option --disable-static-system-lib" "$LINENO" 5
50504fi
50505
50506if test "x$compiler_manage_static_libs" == "xno"; then
50507   echo "-static-libstdc++ -static-libgcc unsupported by the compiler. Skipped"
50508   USE_STATIC_SYSTEM_LIB=no
50509fi
50510
50511 if test "$USE_STATIC_SYSTEM_LIB" == yes; then
50512  USE_STATIC_SYSTEM_LIB_TRUE=
50513  USE_STATIC_SYSTEM_LIB_FALSE='#'
50514else
50515  USE_STATIC_SYSTEM_LIB_TRUE='#'
50516  USE_STATIC_SYSTEM_LIB_FALSE=
50517fi
50518
50519
50520
50521
50522
50523# Check whether --enable-address-sanitizer was given.
50524if test "${enable_address_sanitizer+set}" = set; then :
50525  enableval=$enable_address_sanitizer;
50526fi
50527
50528
50529# Check if -fsanitize=address is supported at compile time and link time
50530saved_CFLAGS="$CFLAGS"
50531saved_LDFLAGS="$LDFLAGS"
50532asan_supported=no
50533
50534CFLAGS="$CFLAGS -fsanitize=address"
50535LDFLAGS="$LDFLAGS -fsanitize=address"
50536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=address" >&5
50537$as_echo_n "checking whether the C compiler accepts -fsanitize=address... " >&6; }
50538ac_ext=c
50539ac_cpp='$CPP $CPPFLAGS'
50540ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50541ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50542ac_compiler_gnu=$ac_cv_c_compiler_gnu
50543
50544if test "$cross_compiling" = yes; then :
50545  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50547as_fn_error $? "cannot run test program while cross compiling
50548See \`config.log' for more details" "$LINENO" 5; }
50549else
50550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50551/* end confdefs.h.  */
50552const char hw[] = "Hello, AddressSanitizer\n";
50553#ifdef F77_DUMMY_MAIN
50554
50555#  ifdef __cplusplus
50556     extern "C"
50557#  endif
50558   int F77_DUMMY_MAIN() { return 1; }
50559
50560#endif
50561int
50562main ()
50563{
50564
50565  ;
50566  return 0;
50567}
50568_ACEOF
50569if ac_fn_c_try_run "$LINENO"; then :
50570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50571$as_echo "yes" >&6; }; asan_supported=yes
50572else
50573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50574$as_echo "no" >&6; }
50575fi
50576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50577  conftest.$ac_objext conftest.beam conftest.$ac_ext
50578fi
50579
50580ac_ext=c
50581ac_cpp='$CPP $CPPFLAGS'
50582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50584ac_compiler_gnu=$ac_cv_c_compiler_gnu
50585
50586
50587CFLAGS="$saved_CFLAGS"
50588LDFLAGS="$saved_LDFLAGS"
50589if test "x$asan_supported" == "xno" -a "x$enable_address_sanitizer" == "xyes"; then
50590    as_fn_error $? "The $CC compiler does not support the options -fsanitize=address . Update your compiler and/or install the AddressSanitizer runtime library." "$LINENO" 5
50591elif test "x$enable_address_sanitizer" == "xyes"; then
50592    COMPILER_CFLAGS="$COMPILER_CFLAGS -fsanitize=address"
50593    COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fsanitize=address"
50594    COMPILER_LDFLAGS="$COMPILER_LDFLAGS -fsanitize=address"
50595fi
50596
50597 if test "x$enable_address_sanitizer" == "xyes"; then
50598  USE_ADDRESS_SANITIZER_TRUE=
50599  USE_ADDRESS_SANITIZER_FALSE='#'
50600else
50601  USE_ADDRESS_SANITIZER_TRUE='#'
50602  USE_ADDRESS_SANITIZER_FALSE=
50603fi
50604
50605
50606
50607
50608#################
50609## stop on warning
50610#################
50611
50612# Stop to compile scilab when a warning is found ...
50613# This stuff is at the end of the configure.ac because it causes some
50614# problem with AC_COMPILE (the -Werror is added to the test)
50615#
50616if test "$enable_stop_on_warning" = yes; then
50617    WARNING_CFLAGS="-Werror=implicit-function-declaration -Werror=declaration-after-statement "
50618    WARNING_CXXFLAGS="-Werror=implicit-function-declaration "
50619fi
50620
50621# SCI_*FLAGS contains all defaults values detected on configure
50622SCI_CFLAGS=$(echo                                             \
50623             $LARGEFILE_CFLAGS                                \
50624             $CODECOVERAGE_CFLAGS                             \
50625             $DEBUG_CFLAGS                                    \
50626             $ARCH_CFLAGS                                     \
50627             $COMPILER_CFLAGS                                 \
50628             $SCILIBS_CFLAGS                                  \
50629             $SSE_CFLAGS                                      \
50630             $BACKTRACE_CFLAGS                                \
50631             $WARNING_CFLAGS                                  )
50632SCI_CXXFLAGS=$(echo                                           \
50633               $STDCXX_CXXFLAGS                               \
50634               $LARGEFILE_CXXFLAGS                            \
50635               $CODECOVERAGE_CXXFLAGS                         \
50636               $DEBUG_CXXFLAGS                                \
50637               $ARCH_CXXFLAGS                                 \
50638               $COMPILER_CXXFLAGS                             \
50639               $SCILIBS_CXXFLAGS                              \
50640               $SSE_CXXFLAGS                                  \
50641               $BACKTRACE_CXXFLAGS                            \
50642               $WARNING_CXXFLAGS                              )
50643SCI_FFLAGS=$(echo                                             \
50644             $LARGEFILE_FFLAGS                                \
50645             $CODECOVERAGE_FFLAGS                             \
50646             $DEBUG_FFLAGS                                    \
50647             $ARCH_FFLAGS                                     \
50648             $COMPILER_FFLAGS                                 \
50649             $SCILIBS_FFLAGS                                  \
50650             $SSE_FFLAGS                                      \
50651             $BACKTRACE_FFLAGS                                \
50652             $WARNING_FFLAGS                                  )
50653SCI_LDFLAGS=$(echo                                            \
50654              $LARGEFILE_LDFLAGS                              \
50655              $CODECOVERAGE_LDFLAGS                           \
50656              $DEBUG_LDFLAGS                                  \
50657              $ARCH_LDFLAGS                                   \
50658              $COMPILER_LDFLAGS                               \
50659              $SCILIBS_LDFLAGS                                \
50660              $SSE_LDFLAGS                                    \
50661              $BACKTRACE_LDFLAGS                              \
50662              $WARNING_LDFLAGS                                )
50663
50664
50665
50666
50667
50668ac_config_files="$ac_config_files contrib/Makefile desktop/images/icons/Makefile desktop/Makefile modules/threads/Makefile modules/ast/Makefile modules/functions_manager/Makefile modules/helptools/Makefile modules/data_structures/Makefile modules/differential_equations/Makefile modules/optimization/Makefile modules/elementary_functions/Makefile modules/special_functions/Makefile modules/io/Makefile modules/completion/Makefile modules/history_manager/Makefile modules/jvm/Makefile modules/commons/Makefile modules/sound/Makefile modules/statistics/Makefile modules/mexlib/Makefile modules/sparse/Makefile modules/linear_algebra/Makefile modules/polynomials/Makefile modules/signal_processing/Makefile modules/arnoldi/Makefile modules/interpolation/Makefile modules/localization/Makefile modules/cacsd/Makefile modules/boolean/Makefile modules/integer/Makefile modules/fileio/Makefile modules/spreadsheet/Makefile modules/string/Makefile modules/time/Makefile modules/graphics/Makefile modules/graphic_export/Makefile modules/graphic_objects/Makefile modules/renderer/Makefile modules/action_binding/Makefile modules/gui/Makefile modules/mpi/Makefile modules/randlib/Makefile modules/tclsci/Makefile modules/windows_tools/Makefile modules/core/Makefile modules/prebuildjava/Makefile modules/api_scilab/Makefile modules/call_scilab/Makefile modules/types/Makefile modules/hdf5/Makefile modules/fftw/Makefile modules/umfpack/Makefile modules/scicos/Makefile modules/scicos_blocks/Makefile modules/functions/Makefile modules/dynamic_link/Makefile modules/overloading/Makefile modules/javasci/Makefile modules/m2sci/Makefile modules/development_tools/Makefile modules/output_stream/Makefile modules/console/Makefile modules/demo_tools/Makefile modules/parameters/Makefile modules/matio/Makefile modules/atoms/Makefile modules/xcos/Makefile modules/scinotes/Makefile modules/ui_data/Makefile modules/graph/Makefile modules/parallel/Makefile modules/modules_manager/Makefile modules/history_browser/Makefile modules/preferences/Makefile modules/xml/Makefile modules/external_objects/Makefile modules/external_objects_java/Makefile modules/slint/Makefile modules/coverage/Makefile modules/webtools/Makefile modules/Makefile Makefile scilab.pc etc/modules.xml etc/classpath.xml etc/Info.plist etc/logging.properties scilab.properties scilab-lib.properties scilab-lib-doc.properties modules/helptools/etc/SciDocConf.xml modules/core/includes/version.h modules/atoms/etc/repositories modules/atoms/tests/unit_tests/repositories.orig"
50669
50670
50671# This script is used by Xcos in order to regenerate the function/block list
50672
50673
50674cat >confcache <<\_ACEOF
50675# This file is a shell script that caches the results of configure
50676# tests run on this system so they can be shared between configure
50677# scripts and configure runs, see configure's option --config-cache.
50678# It is not useful on other systems.  If it contains results you don't
50679# want to keep, you may remove or edit it.
50680#
50681# config.status only pays attention to the cache file if you give it
50682# the --recheck option to rerun configure.
50683#
50684# `ac_cv_env_foo' variables (set or unset) will be overridden when
50685# loading this file, other *unset* `ac_cv_foo' will be assigned the
50686# following values.
50687
50688_ACEOF
50689
50690# The following way of writing the cache mishandles newlines in values,
50691# but we know of no workaround that is simple, portable, and efficient.
50692# So, we kill variables containing newlines.
50693# Ultrix sh set writes to stderr and can't be redirected directly,
50694# and sets the high bit in the cache file unless we assign to the vars.
50695(
50696  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50697    eval ac_val=\$$ac_var
50698    case $ac_val in #(
50699    *${as_nl}*)
50700      case $ac_var in #(
50701      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50702$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50703      esac
50704      case $ac_var in #(
50705      _ | IFS | as_nl) ;; #(
50706      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50707      *) { eval $ac_var=; unset $ac_var;} ;;
50708      esac ;;
50709    esac
50710  done
50711
50712  (set) 2>&1 |
50713    case $as_nl`(ac_space=' '; set) 2>&1` in #(
50714    *${as_nl}ac_space=\ *)
50715      # `set' does not quote correctly, so add quotes: double-quote
50716      # substitution turns \\\\ into \\, and sed turns \\ into \.
50717      sed -n \
50718	"s/'/'\\\\''/g;
50719	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50720      ;; #(
50721    *)
50722      # `set' quotes correctly as required by POSIX, so do not add quotes.
50723      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50724      ;;
50725    esac |
50726    sort
50727) |
50728  sed '
50729     /^ac_cv_env_/b end
50730     t clear
50731     :clear
50732     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50733     t end
50734     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50735     :end' >>confcache
50736if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50737  if test -w "$cache_file"; then
50738    if test "x$cache_file" != "x/dev/null"; then
50739      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50740$as_echo "$as_me: updating cache $cache_file" >&6;}
50741      if test ! -f "$cache_file" || test -h "$cache_file"; then
50742	cat confcache >"$cache_file"
50743      else
50744        case $cache_file in #(
50745        */* | ?:*)
50746	  mv -f confcache "$cache_file"$$ &&
50747	  mv -f "$cache_file"$$ "$cache_file" ;; #(
50748        *)
50749	  mv -f confcache "$cache_file" ;;
50750	esac
50751      fi
50752    fi
50753  else
50754    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50755$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50756  fi
50757fi
50758rm -f confcache
50759
50760test "x$prefix" = xNONE && prefix=$ac_default_prefix
50761# Let make expand exec_prefix.
50762test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50763
50764DEFS=-DHAVE_CONFIG_H
50765
50766ac_libobjs=
50767ac_ltlibobjs=
50768U=
50769for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50770  # 1. Remove the extension, and $U if already installed.
50771  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50772  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50773  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50774  #    will be set to the directory where LIBOBJS objects are built.
50775  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50776  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50777done
50778LIBOBJS=$ac_libobjs
50779
50780LTLIBOBJS=$ac_ltlibobjs
50781
50782
50783if test -z "${RELOCATABLE_VIA_LD_TRUE}" && test -z "${RELOCATABLE_VIA_LD_FALSE}"; then
50784  as_fn_error $? "conditional \"RELOCATABLE_VIA_LD\" was never defined.
50785Usually this means the macro was only invoked conditionally." "$LINENO" 5
50786fi
50787if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
50788  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
50789Usually this means the macro was only invoked conditionally." "$LINENO" 5
50790fi
50791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
50792$as_echo_n "checking that generated files are newer than configure... " >&6; }
50793   if test -n "$am_sleep_pid"; then
50794     # Hide warnings about reused PIDs.
50795     wait $am_sleep_pid 2>/dev/null
50796   fi
50797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
50798$as_echo "done" >&6; }
50799if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
50800  as_fn_error $? "conditional \"AMDEP\" was never defined.
50801Usually this means the macro was only invoked conditionally." "$LINENO" 5
50802fi
50803if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
50804  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
50805Usually this means the macro was only invoked conditionally." "$LINENO" 5
50806fi
50807 if test -n "$EXEEXT"; then
50808  am__EXEEXT_TRUE=
50809  am__EXEEXT_FALSE='#'
50810else
50811  am__EXEEXT_TRUE='#'
50812  am__EXEEXT_FALSE=
50813fi
50814
50815if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
50816  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
50817Usually this means the macro was only invoked conditionally." "$LINENO" 5
50818fi
50819if test -z "${IS_MACOSX_TRUE}" && test -z "${IS_MACOSX_FALSE}"; then
50820  as_fn_error $? "conditional \"IS_MACOSX\" was never defined.
50821Usually this means the macro was only invoked conditionally." "$LINENO" 5
50822fi
50823if test -z "${IS_HPUX_TRUE}" && test -z "${IS_HPUX_FALSE}"; then
50824  as_fn_error $? "conditional \"IS_HPUX\" was never defined.
50825Usually this means the macro was only invoked conditionally." "$LINENO" 5
50826fi
50827if test -z "${IS_SPARC_TRUE}" && test -z "${IS_SPARC_FALSE}"; then
50828  as_fn_error $? "conditional \"IS_SPARC\" was never defined.
50829Usually this means the macro was only invoked conditionally." "$LINENO" 5
50830fi
50831if test -z "${IS_SOLARIS_TRUE}" && test -z "${IS_SOLARIS_FALSE}"; then
50832  as_fn_error $? "conditional \"IS_SOLARIS\" was never defined.
50833Usually this means the macro was only invoked conditionally." "$LINENO" 5
50834fi
50835if test -z "${IS_MIPS_SGI_IRIX_TRUE}" && test -z "${IS_MIPS_SGI_IRIX_FALSE}"; then
50836  as_fn_error $? "conditional \"IS_MIPS_SGI_IRIX\" was never defined.
50837Usually this means the macro was only invoked conditionally." "$LINENO" 5
50838fi
50839if test -z "${CODE_COVERAGE_TRUE}" && test -z "${CODE_COVERAGE_FALSE}"; then
50840  as_fn_error $? "conditional \"CODE_COVERAGE\" was never defined.
50841Usually this means the macro was only invoked conditionally." "$LINENO" 5
50842fi
50843if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then
50844  as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined.
50845Usually this means the macro was only invoked conditionally." "$LINENO" 5
50846fi
50847if test -z "${IS_64_BITS_CPU_TRUE}" && test -z "${IS_64_BITS_CPU_FALSE}"; then
50848  as_fn_error $? "conditional \"IS_64_BITS_CPU\" was never defined.
50849Usually this means the macro was only invoked conditionally." "$LINENO" 5
50850fi
50851if test -z "${BUILD_PARSER_TRUE}" && test -z "${BUILD_PARSER_FALSE}"; then
50852  as_fn_error $? "conditional \"BUILD_PARSER\" was never defined.
50853Usually this means the macro was only invoked conditionally." "$LINENO" 5
50854fi
50855if test -z "${EXTERNAL_SCIRENDERER_TRUE}" && test -z "${EXTERNAL_SCIRENDERER_FALSE}"; then
50856  as_fn_error $? "conditional \"EXTERNAL_SCIRENDERER\" was never defined.
50857Usually this means the macro was only invoked conditionally." "$LINENO" 5
50858fi
50859if test -z "${OCAML_TRUE}" && test -z "${OCAML_FALSE}"; then
50860  as_fn_error $? "conditional \"OCAML\" was never defined.
50861Usually this means the macro was only invoked conditionally." "$LINENO" 5
50862fi
50863if test -z "${XCOS_TRUE}" && test -z "${XCOS_FALSE}"; then
50864  as_fn_error $? "conditional \"XCOS\" was never defined.
50865Usually this means the macro was only invoked conditionally." "$LINENO" 5
50866fi
50867if test -z "${NEED_JAVA_TRUE}" && test -z "${NEED_JAVA_FALSE}"; then
50868  as_fn_error $? "conditional \"NEED_JAVA\" was never defined.
50869Usually this means the macro was only invoked conditionally." "$LINENO" 5
50870fi
50871if test -z "${GUI_TRUE}" && test -z "${GUI_FALSE}"; then
50872  as_fn_error $? "conditional \"GUI\" was never defined.
50873Usually this means the macro was only invoked conditionally." "$LINENO" 5
50874fi
50875if test -z "${JAVASCI_TRUE}" && test -z "${JAVASCI_FALSE}"; then
50876  as_fn_error $? "conditional \"JAVASCI\" was never defined.
50877Usually this means the macro was only invoked conditionally." "$LINENO" 5
50878fi
50879if test -z "${SWIG_TRUE}" && test -z "${SWIG_FALSE}"; then
50880  as_fn_error $? "conditional \"SWIG\" was never defined.
50881Usually this means the macro was only invoked conditionally." "$LINENO" 5
50882fi
50883if test -z "${GIWS_TRUE}" && test -z "${GIWS_FALSE}"; then
50884  as_fn_error $? "conditional \"GIWS\" was never defined.
50885Usually this means the macro was only invoked conditionally." "$LINENO" 5
50886fi
50887if test -z "${FFTW_TRUE}" && test -z "${FFTW_FALSE}"; then
50888  as_fn_error $? "conditional \"FFTW\" was never defined.
50889Usually this means the macro was only invoked conditionally." "$LINENO" 5
50890fi
50891if test -z "${MPI_TRUE}" && test -z "${MPI_FALSE}"; then
50892  as_fn_error $? "conditional \"MPI\" was never defined.
50893Usually this means the macro was only invoked conditionally." "$LINENO" 5
50894fi
50895if test -z "${OPENMP_TRUE}" && test -z "${OPENMP_FALSE}"; then
50896  as_fn_error $? "conditional \"OPENMP\" was never defined.
50897Usually this means the macro was only invoked conditionally." "$LINENO" 5
50898fi
50899if test -z "${GENERATE_LOCALIZATION_FILES_TRUE}" && test -z "${GENERATE_LOCALIZATION_FILES_FALSE}"; then
50900  as_fn_error $? "conditional \"GENERATE_LOCALIZATION_FILES\" was never defined.
50901Usually this means the macro was only invoked conditionally." "$LINENO" 5
50902fi
50903if test -z "${ARPACK_NG_TRUE}" && test -z "${ARPACK_NG_FALSE}"; then
50904  as_fn_error $? "conditional \"ARPACK_NG\" was never defined.
50905Usually this means the macro was only invoked conditionally." "$LINENO" 5
50906fi
50907if test -z "${UMFPACK_TRUE}" && test -z "${UMFPACK_FALSE}"; then
50908  as_fn_error $? "conditional \"UMFPACK\" was never defined.
50909Usually this means the macro was only invoked conditionally." "$LINENO" 5
50910fi
50911if test -z "${TCLTK_TRUE}" && test -z "${TCLTK_FALSE}"; then
50912  as_fn_error $? "conditional \"TCLTK\" was never defined.
50913Usually this means the macro was only invoked conditionally." "$LINENO" 5
50914fi
50915if test -z "${MATIO_TRUE}" && test -z "${MATIO_FALSE}"; then
50916  as_fn_error $? "conditional \"MATIO\" was never defined.
50917Usually this means the macro was only invoked conditionally." "$LINENO" 5
50918fi
50919if test -z "${BUILD_HELP_TRUE}" && test -z "${BUILD_HELP_FALSE}"; then
50920  as_fn_error $? "conditional \"BUILD_HELP\" was never defined.
50921Usually this means the macro was only invoked conditionally." "$LINENO" 5
50922fi
50923if test -z "${INSTALL_HELP_XML_TRUE}" && test -z "${INSTALL_HELP_XML_FALSE}"; then
50924  as_fn_error $? "conditional \"INSTALL_HELP_XML\" was never defined.
50925Usually this means the macro was only invoked conditionally." "$LINENO" 5
50926fi
50927if test -z "${DOXYGEN_TRUE}" && test -z "${DOXYGEN_FALSE}"; then
50928  as_fn_error $? "conditional \"DOXYGEN\" was never defined.
50929Usually this means the macro was only invoked conditionally." "$LINENO" 5
50930fi
50931if test -z "${COMPILATION_TESTS_TRUE}" && test -z "${COMPILATION_TESTS_FALSE}"; then
50932  as_fn_error $? "conditional \"COMPILATION_TESTS\" was never defined.
50933Usually this means the macro was only invoked conditionally." "$LINENO" 5
50934fi
50935if test -z "${FORCE_LINK_TRUE}" && test -z "${FORCE_LINK_FALSE}"; then
50936  as_fn_error $? "conditional \"FORCE_LINK\" was never defined.
50937Usually this means the macro was only invoked conditionally." "$LINENO" 5
50938fi
50939if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then
50940  as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined.
50941Usually this means the macro was only invoked conditionally." "$LINENO" 5
50942fi
50943if test -z "${USE_STATIC_SYSTEM_LIB_TRUE}" && test -z "${USE_STATIC_SYSTEM_LIB_FALSE}"; then
50944  as_fn_error $? "conditional \"USE_STATIC_SYSTEM_LIB\" was never defined.
50945Usually this means the macro was only invoked conditionally." "$LINENO" 5
50946fi
50947if test -z "${USE_ADDRESS_SANITIZER_TRUE}" && test -z "${USE_ADDRESS_SANITIZER_FALSE}"; then
50948  as_fn_error $? "conditional \"USE_ADDRESS_SANITIZER\" was never defined.
50949Usually this means the macro was only invoked conditionally." "$LINENO" 5
50950fi
50951
50952: "${CONFIG_STATUS=./config.status}"
50953ac_write_fail=0
50954ac_clean_files_save=$ac_clean_files
50955ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50956{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50957$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50958as_write_fail=0
50959cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50960#! $SHELL
50961# Generated by $as_me.
50962# Run this file to recreate the current configuration.
50963# Compiler output produced by configure, useful for debugging
50964# configure, is in config.log if it exists.
50965
50966debug=false
50967ac_cs_recheck=false
50968ac_cs_silent=false
50969
50970SHELL=\${CONFIG_SHELL-$SHELL}
50971export SHELL
50972_ASEOF
50973cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50974## -------------------- ##
50975## M4sh Initialization. ##
50976## -------------------- ##
50977
50978# Be more Bourne compatible
50979DUALCASE=1; export DUALCASE # for MKS sh
50980if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50981  emulate sh
50982  NULLCMD=:
50983  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50984  # is contrary to our usage.  Disable this feature.
50985  alias -g '${1+"$@"}'='"$@"'
50986  setopt NO_GLOB_SUBST
50987else
50988  case `(set -o) 2>/dev/null` in #(
50989  *posix*) :
50990    set -o posix ;; #(
50991  *) :
50992     ;;
50993esac
50994fi
50995
50996
50997as_nl='
50998'
50999export as_nl
51000# Printing a long string crashes Solaris 7 /usr/bin/printf.
51001as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51002as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51003as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51004# Prefer a ksh shell builtin over an external printf program on Solaris,
51005# but without wasting forks for bash or zsh.
51006if test -z "$BASH_VERSION$ZSH_VERSION" \
51007    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51008  as_echo='print -r --'
51009  as_echo_n='print -rn --'
51010elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51011  as_echo='printf %s\n'
51012  as_echo_n='printf %s'
51013else
51014  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51015    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51016    as_echo_n='/usr/ucb/echo -n'
51017  else
51018    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51019    as_echo_n_body='eval
51020      arg=$1;
51021      case $arg in #(
51022      *"$as_nl"*)
51023	expr "X$arg" : "X\\(.*\\)$as_nl";
51024	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51025      esac;
51026      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51027    '
51028    export as_echo_n_body
51029    as_echo_n='sh -c $as_echo_n_body as_echo'
51030  fi
51031  export as_echo_body
51032  as_echo='sh -c $as_echo_body as_echo'
51033fi
51034
51035# The user is always right.
51036if test "${PATH_SEPARATOR+set}" != set; then
51037  PATH_SEPARATOR=:
51038  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51039    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51040      PATH_SEPARATOR=';'
51041  }
51042fi
51043
51044
51045# IFS
51046# We need space, tab and new line, in precisely that order.  Quoting is
51047# there to prevent editors from complaining about space-tab.
51048# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51049# splitting by setting IFS to empty value.)
51050IFS=" ""	$as_nl"
51051
51052# Find who we are.  Look in the path if we contain no directory separator.
51053as_myself=
51054case $0 in #((
51055  *[\\/]* ) as_myself=$0 ;;
51056  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51057for as_dir in $PATH
51058do
51059  IFS=$as_save_IFS
51060  test -z "$as_dir" && as_dir=.
51061    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51062  done
51063IFS=$as_save_IFS
51064
51065     ;;
51066esac
51067# We did not find ourselves, most probably we were run as `sh COMMAND'
51068# in which case we are not to be found in the path.
51069if test "x$as_myself" = x; then
51070  as_myself=$0
51071fi
51072if test ! -f "$as_myself"; then
51073  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51074  exit 1
51075fi
51076
51077# Unset variables that we do not need and which cause bugs (e.g. in
51078# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51079# suppresses any "Segmentation fault" message there.  '((' could
51080# trigger a bug in pdksh 5.2.14.
51081for as_var in BASH_ENV ENV MAIL MAILPATH
51082do eval test x\${$as_var+set} = xset \
51083  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51084done
51085PS1='$ '
51086PS2='> '
51087PS4='+ '
51088
51089# NLS nuisances.
51090LC_ALL=C
51091export LC_ALL
51092LANGUAGE=C
51093export LANGUAGE
51094
51095# CDPATH.
51096(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51097
51098
51099# as_fn_error STATUS ERROR [LINENO LOG_FD]
51100# ----------------------------------------
51101# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51102# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51103# script with STATUS, using 1 if that was 0.
51104as_fn_error ()
51105{
51106  as_status=$1; test $as_status -eq 0 && as_status=1
51107  if test "$4"; then
51108    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51109    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51110  fi
51111  $as_echo "$as_me: error: $2" >&2
51112  as_fn_exit $as_status
51113} # as_fn_error
51114
51115
51116# as_fn_set_status STATUS
51117# -----------------------
51118# Set $? to STATUS, without forking.
51119as_fn_set_status ()
51120{
51121  return $1
51122} # as_fn_set_status
51123
51124# as_fn_exit STATUS
51125# -----------------
51126# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51127as_fn_exit ()
51128{
51129  set +e
51130  as_fn_set_status $1
51131  exit $1
51132} # as_fn_exit
51133
51134# as_fn_unset VAR
51135# ---------------
51136# Portably unset VAR.
51137as_fn_unset ()
51138{
51139  { eval $1=; unset $1;}
51140}
51141as_unset=as_fn_unset
51142# as_fn_append VAR VALUE
51143# ----------------------
51144# Append the text in VALUE to the end of the definition contained in VAR. Take
51145# advantage of any shell optimizations that allow amortized linear growth over
51146# repeated appends, instead of the typical quadratic growth present in naive
51147# implementations.
51148if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51149  eval 'as_fn_append ()
51150  {
51151    eval $1+=\$2
51152  }'
51153else
51154  as_fn_append ()
51155  {
51156    eval $1=\$$1\$2
51157  }
51158fi # as_fn_append
51159
51160# as_fn_arith ARG...
51161# ------------------
51162# Perform arithmetic evaluation on the ARGs, and store the result in the
51163# global $as_val. Take advantage of shells that can avoid forks. The arguments
51164# must be portable across $(()) and expr.
51165if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51166  eval 'as_fn_arith ()
51167  {
51168    as_val=$(( $* ))
51169  }'
51170else
51171  as_fn_arith ()
51172  {
51173    as_val=`expr "$@" || test $? -eq 1`
51174  }
51175fi # as_fn_arith
51176
51177
51178if expr a : '\(a\)' >/dev/null 2>&1 &&
51179   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51180  as_expr=expr
51181else
51182  as_expr=false
51183fi
51184
51185if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51186  as_basename=basename
51187else
51188  as_basename=false
51189fi
51190
51191if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51192  as_dirname=dirname
51193else
51194  as_dirname=false
51195fi
51196
51197as_me=`$as_basename -- "$0" ||
51198$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51199	 X"$0" : 'X\(//\)$' \| \
51200	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51201$as_echo X/"$0" |
51202    sed '/^.*\/\([^/][^/]*\)\/*$/{
51203	    s//\1/
51204	    q
51205	  }
51206	  /^X\/\(\/\/\)$/{
51207	    s//\1/
51208	    q
51209	  }
51210	  /^X\/\(\/\).*/{
51211	    s//\1/
51212	    q
51213	  }
51214	  s/.*/./; q'`
51215
51216# Avoid depending upon Character Ranges.
51217as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51218as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51219as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51220as_cr_digits='0123456789'
51221as_cr_alnum=$as_cr_Letters$as_cr_digits
51222
51223ECHO_C= ECHO_N= ECHO_T=
51224case `echo -n x` in #(((((
51225-n*)
51226  case `echo 'xy\c'` in
51227  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51228  xy)  ECHO_C='\c';;
51229  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51230       ECHO_T='	';;
51231  esac;;
51232*)
51233  ECHO_N='-n';;
51234esac
51235
51236rm -f conf$$ conf$$.exe conf$$.file
51237if test -d conf$$.dir; then
51238  rm -f conf$$.dir/conf$$.file
51239else
51240  rm -f conf$$.dir
51241  mkdir conf$$.dir 2>/dev/null
51242fi
51243if (echo >conf$$.file) 2>/dev/null; then
51244  if ln -s conf$$.file conf$$ 2>/dev/null; then
51245    as_ln_s='ln -s'
51246    # ... but there are two gotchas:
51247    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51248    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51249    # In both cases, we have to default to `cp -pR'.
51250    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51251      as_ln_s='cp -pR'
51252  elif ln conf$$.file conf$$ 2>/dev/null; then
51253    as_ln_s=ln
51254  else
51255    as_ln_s='cp -pR'
51256  fi
51257else
51258  as_ln_s='cp -pR'
51259fi
51260rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51261rmdir conf$$.dir 2>/dev/null
51262
51263
51264# as_fn_mkdir_p
51265# -------------
51266# Create "$as_dir" as a directory, including parents if necessary.
51267as_fn_mkdir_p ()
51268{
51269
51270  case $as_dir in #(
51271  -*) as_dir=./$as_dir;;
51272  esac
51273  test -d "$as_dir" || eval $as_mkdir_p || {
51274    as_dirs=
51275    while :; do
51276      case $as_dir in #(
51277      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51278      *) as_qdir=$as_dir;;
51279      esac
51280      as_dirs="'$as_qdir' $as_dirs"
51281      as_dir=`$as_dirname -- "$as_dir" ||
51282$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51283	 X"$as_dir" : 'X\(//\)[^/]' \| \
51284	 X"$as_dir" : 'X\(//\)$' \| \
51285	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51286$as_echo X"$as_dir" |
51287    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51288	    s//\1/
51289	    q
51290	  }
51291	  /^X\(\/\/\)[^/].*/{
51292	    s//\1/
51293	    q
51294	  }
51295	  /^X\(\/\/\)$/{
51296	    s//\1/
51297	    q
51298	  }
51299	  /^X\(\/\).*/{
51300	    s//\1/
51301	    q
51302	  }
51303	  s/.*/./; q'`
51304      test -d "$as_dir" && break
51305    done
51306    test -z "$as_dirs" || eval "mkdir $as_dirs"
51307  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51308
51309
51310} # as_fn_mkdir_p
51311if mkdir -p . 2>/dev/null; then
51312  as_mkdir_p='mkdir -p "$as_dir"'
51313else
51314  test -d ./-p && rmdir ./-p
51315  as_mkdir_p=false
51316fi
51317
51318
51319# as_fn_executable_p FILE
51320# -----------------------
51321# Test if FILE is an executable regular file.
51322as_fn_executable_p ()
51323{
51324  test -f "$1" && test -x "$1"
51325} # as_fn_executable_p
51326as_test_x='test -x'
51327as_executable_p=as_fn_executable_p
51328
51329# Sed expression to map a string onto a valid CPP name.
51330as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51331
51332# Sed expression to map a string onto a valid variable name.
51333as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51334
51335
51336exec 6>&1
51337## ----------------------------------- ##
51338## Main body of $CONFIG_STATUS script. ##
51339## ----------------------------------- ##
51340_ASEOF
51341test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51342
51343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51344# Save the log message, to keep $0 and so on meaningful, and to
51345# report actual input values of CONFIG_FILES etc. instead of their
51346# values after options handling.
51347ac_log="
51348This file was extended by Scilab $as_me 6, which was
51349generated by GNU Autoconf 2.69.  Invocation command line was
51350
51351  CONFIG_FILES    = $CONFIG_FILES
51352  CONFIG_HEADERS  = $CONFIG_HEADERS
51353  CONFIG_LINKS    = $CONFIG_LINKS
51354  CONFIG_COMMANDS = $CONFIG_COMMANDS
51355  $ $0 $@
51356
51357on `(hostname || uname -n) 2>/dev/null | sed 1q`
51358"
51359
51360_ACEOF
51361
51362case $ac_config_files in *"
51363"*) set x $ac_config_files; shift; ac_config_files=$*;;
51364esac
51365
51366case $ac_config_headers in *"
51367"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
51368esac
51369
51370
51371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51372# Files that config.status was made for.
51373config_files="$ac_config_files"
51374config_headers="$ac_config_headers"
51375config_commands="$ac_config_commands"
51376
51377_ACEOF
51378
51379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51380ac_cs_usage="\
51381\`$as_me' instantiates files and other configuration actions
51382from templates according to the current configuration.  Unless the files
51383and actions are specified as TAGs, all are instantiated by default.
51384
51385Usage: $0 [OPTION]... [TAG]...
51386
51387  -h, --help       print this help, then exit
51388  -V, --version    print version number and configuration settings, then exit
51389      --config     print configuration, then exit
51390  -q, --quiet, --silent
51391                   do not print progress messages
51392  -d, --debug      don't remove temporary files
51393      --recheck    update $as_me by reconfiguring in the same conditions
51394      --file=FILE[:TEMPLATE]
51395                   instantiate the configuration file FILE
51396      --header=FILE[:TEMPLATE]
51397                   instantiate the configuration header FILE
51398
51399Configuration files:
51400$config_files
51401
51402Configuration headers:
51403$config_headers
51404
51405Configuration commands:
51406$config_commands
51407
51408Report bugs to <http://bugzilla.scilab.org/>."
51409
51410_ACEOF
51411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51412ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51413ac_cs_version="\\
51414Scilab config.status 6
51415configured by $0, generated by GNU Autoconf 2.69,
51416  with options \\"\$ac_cs_config\\"
51417
51418Copyright (C) 2012 Free Software Foundation, Inc.
51419This config.status script is free software; the Free Software Foundation
51420gives unlimited permission to copy, distribute and modify it."
51421
51422ac_pwd='$ac_pwd'
51423srcdir='$srcdir'
51424INSTALL='$INSTALL'
51425MKDIR_P='$MKDIR_P'
51426AWK='$AWK'
51427test -n "\$AWK" || AWK=awk
51428_ACEOF
51429
51430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51431# The default lists apply if the user does not specify any file.
51432ac_need_defaults=:
51433while test $# != 0
51434do
51435  case $1 in
51436  --*=?*)
51437    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51438    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51439    ac_shift=:
51440    ;;
51441  --*=)
51442    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51443    ac_optarg=
51444    ac_shift=:
51445    ;;
51446  *)
51447    ac_option=$1
51448    ac_optarg=$2
51449    ac_shift=shift
51450    ;;
51451  esac
51452
51453  case $ac_option in
51454  # Handling of the options.
51455  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51456    ac_cs_recheck=: ;;
51457  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51458    $as_echo "$ac_cs_version"; exit ;;
51459  --config | --confi | --conf | --con | --co | --c )
51460    $as_echo "$ac_cs_config"; exit ;;
51461  --debug | --debu | --deb | --de | --d | -d )
51462    debug=: ;;
51463  --file | --fil | --fi | --f )
51464    $ac_shift
51465    case $ac_optarg in
51466    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51467    '') as_fn_error $? "missing file argument" ;;
51468    esac
51469    as_fn_append CONFIG_FILES " '$ac_optarg'"
51470    ac_need_defaults=false;;
51471  --header | --heade | --head | --hea )
51472    $ac_shift
51473    case $ac_optarg in
51474    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51475    esac
51476    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
51477    ac_need_defaults=false;;
51478  --he | --h)
51479    # Conflict between --help and --header
51480    as_fn_error $? "ambiguous option: \`$1'
51481Try \`$0 --help' for more information.";;
51482  --help | --hel | -h )
51483    $as_echo "$ac_cs_usage"; exit ;;
51484  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51485  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51486    ac_cs_silent=: ;;
51487
51488  # This is an error.
51489  -*) as_fn_error $? "unrecognized option: \`$1'
51490Try \`$0 --help' for more information." ;;
51491
51492  *) as_fn_append ac_config_targets " $1"
51493     ac_need_defaults=false ;;
51494
51495  esac
51496  shift
51497done
51498
51499ac_configure_extra_args=
51500
51501if $ac_cs_silent; then
51502  exec 6>/dev/null
51503  ac_configure_extra_args="$ac_configure_extra_args --silent"
51504fi
51505
51506_ACEOF
51507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51508if \$ac_cs_recheck; then
51509  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51510  shift
51511  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51512  CONFIG_SHELL='$SHELL'
51513  export CONFIG_SHELL
51514  exec "\$@"
51515fi
51516
51517_ACEOF
51518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51519exec 5>>config.log
51520{
51521  echo
51522  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51523## Running $as_me. ##
51524_ASBOX
51525  $as_echo "$ac_log"
51526} >&5
51527
51528_ACEOF
51529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51530#
51531# INIT-COMMANDS
51532#
51533AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
51534# Capture the value of obsolete ALL_LINGUAS because we need it to compute
51535    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
51536    # from automake < 1.5.
51537    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
51538    # Capture the value of LINGUAS because we need it to compute CATALOGS.
51539    LINGUAS="${LINGUAS-%UNSET%}"
51540
51541
51542
51543# The HP-UX ksh and POSIX shell print the target directory to stdout
51544# if CDPATH is set.
51545(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51546
51547sed_quote_subst='$sed_quote_subst'
51548double_quote_subst='$double_quote_subst'
51549delay_variable_subst='$delay_variable_subst'
51550macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
51551macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
51552enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
51553enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
51554pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
51555enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
51556shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
51557SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
51558ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
51559PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
51560host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
51561host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
51562host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
51563build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
51564build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
51565build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
51566SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
51567Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
51568GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
51569EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
51570FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
51571LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
51572NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
51573LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
51574max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
51575ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
51576exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
51577lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
51578lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
51579lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
51580lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
51581lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
51582reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
51583reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
51584OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
51585deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
51586file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
51587file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
51588want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
51589DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
51590sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
51591AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
51592AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
51593archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
51594STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
51595RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
51596old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
51597old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
51598old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
51599lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
51600CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
51601CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
51602compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
51603GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
51604lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
51605lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
51606lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
51607lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
51608lt_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"`'
51609lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
51610nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
51611lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
51612lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
51613objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
51614MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
51615lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
51616lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
51617lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
51618lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
51619lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
51620need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
51621MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
51622DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
51623NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
51624LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
51625OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
51626OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
51627libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
51628shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
51629extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
51630archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
51631enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
51632export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
51633whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
51634compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
51635old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
51636old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
51637archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
51638archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
51639module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
51640module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
51641with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
51642allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
51643no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
51644hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
51645hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
51646hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
51647hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
51648hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
51649hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
51650hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
51651inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
51652link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
51653always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
51654export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
51655exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
51656include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
51657prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
51658postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
51659file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
51660variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
51661need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
51662need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
51663version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
51664runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
51665shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
51666shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
51667libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
51668library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
51669soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
51670install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
51671postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
51672postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
51673finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
51674finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
51675hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
51676sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
51677configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
51678configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
51679hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
51680enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
51681enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
51682enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
51683old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
51684striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
51685compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
51686predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
51687postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
51688predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
51689postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
51690compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
51691LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
51692LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`'
51693reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
51694reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`'
51695reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51696reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`'
51697old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51698old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`'
51699compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
51700compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`'
51701GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
51702GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`'
51703lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
51704lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`'
51705lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
51706lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`'
51707lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
51708lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`'
51709lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
51710lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`'
51711lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
51712lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`'
51713archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
51714archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`'
51715enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
51716enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`'
51717export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
51718export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
51719whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
51720whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
51721compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
51722compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`'
51723old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51724old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`'
51725old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51726old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`'
51727archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51728archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`'
51729archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51730archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`'
51731module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51732module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`'
51733module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51734module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`'
51735with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
51736with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`'
51737allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
51738allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`'
51739no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
51740no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`'
51741hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
51742hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
51743hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
51744hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`'
51745hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
51746hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`'
51747hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
51748hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`'
51749hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
51750hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`'
51751hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
51752hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`'
51753hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
51754hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`'
51755inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
51756inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`'
51757link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
51758link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`'
51759always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
51760always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`'
51761export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51762export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`'
51763exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
51764exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`'
51765include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
51766include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`'
51767prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51768prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`'
51769postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
51770postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`'
51771file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
51772file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`'
51773hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
51774hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`'
51775compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
51776compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`'
51777predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
51778predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`'
51779postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
51780postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`'
51781predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
51782predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`'
51783postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
51784postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`'
51785compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
51786compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`'
51787
51788LTCC='$LTCC'
51789LTCFLAGS='$LTCFLAGS'
51790compiler='$compiler_DEFAULT'
51791
51792# A function that is used when there is no print builtin or printf.
51793func_fallback_echo ()
51794{
51795  eval 'cat <<_LTECHO_EOF
51796\$1
51797_LTECHO_EOF'
51798}
51799
51800# Quote evaled strings.
51801for var in SHELL \
51802ECHO \
51803PATH_SEPARATOR \
51804SED \
51805GREP \
51806EGREP \
51807FGREP \
51808LD \
51809NM \
51810LN_S \
51811lt_SP2NL \
51812lt_NL2SP \
51813reload_flag \
51814OBJDUMP \
51815deplibs_check_method \
51816file_magic_cmd \
51817file_magic_glob \
51818want_nocaseglob \
51819DLLTOOL \
51820sharedlib_from_linklib_cmd \
51821AR \
51822AR_FLAGS \
51823archiver_list_spec \
51824STRIP \
51825RANLIB \
51826CC \
51827CFLAGS \
51828compiler \
51829lt_cv_sys_global_symbol_pipe \
51830lt_cv_sys_global_symbol_to_cdecl \
51831lt_cv_sys_global_symbol_to_import \
51832lt_cv_sys_global_symbol_to_c_name_address \
51833lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
51834lt_cv_nm_interface \
51835nm_file_list_spec \
51836lt_cv_truncate_bin \
51837lt_prog_compiler_no_builtin_flag \
51838lt_prog_compiler_pic \
51839lt_prog_compiler_wl \
51840lt_prog_compiler_static \
51841lt_cv_prog_compiler_c_o \
51842need_locks \
51843MANIFEST_TOOL \
51844DSYMUTIL \
51845NMEDIT \
51846LIPO \
51847OTOOL \
51848OTOOL64 \
51849shrext_cmds \
51850export_dynamic_flag_spec \
51851whole_archive_flag_spec \
51852compiler_needs_object \
51853with_gnu_ld \
51854allow_undefined_flag \
51855no_undefined_flag \
51856hardcode_libdir_flag_spec \
51857hardcode_libdir_separator \
51858exclude_expsyms \
51859include_expsyms \
51860file_list_spec \
51861variables_saved_for_relink \
51862libname_spec \
51863library_names_spec \
51864soname_spec \
51865install_override_mode \
51866finish_eval \
51867old_striplib \
51868striplib \
51869compiler_lib_search_dirs \
51870predep_objects \
51871postdep_objects \
51872predeps \
51873postdeps \
51874compiler_lib_search_path \
51875LD_CXX \
51876LD_F77 \
51877reload_flag_CXX \
51878reload_flag_F77 \
51879compiler_CXX \
51880compiler_F77 \
51881lt_prog_compiler_no_builtin_flag_CXX \
51882lt_prog_compiler_no_builtin_flag_F77 \
51883lt_prog_compiler_pic_CXX \
51884lt_prog_compiler_pic_F77 \
51885lt_prog_compiler_wl_CXX \
51886lt_prog_compiler_wl_F77 \
51887lt_prog_compiler_static_CXX \
51888lt_prog_compiler_static_F77 \
51889lt_cv_prog_compiler_c_o_CXX \
51890lt_cv_prog_compiler_c_o_F77 \
51891export_dynamic_flag_spec_CXX \
51892export_dynamic_flag_spec_F77 \
51893whole_archive_flag_spec_CXX \
51894whole_archive_flag_spec_F77 \
51895compiler_needs_object_CXX \
51896compiler_needs_object_F77 \
51897with_gnu_ld_CXX \
51898with_gnu_ld_F77 \
51899allow_undefined_flag_CXX \
51900allow_undefined_flag_F77 \
51901no_undefined_flag_CXX \
51902no_undefined_flag_F77 \
51903hardcode_libdir_flag_spec_CXX \
51904hardcode_libdir_flag_spec_F77 \
51905hardcode_libdir_separator_CXX \
51906hardcode_libdir_separator_F77 \
51907exclude_expsyms_CXX \
51908exclude_expsyms_F77 \
51909include_expsyms_CXX \
51910include_expsyms_F77 \
51911file_list_spec_CXX \
51912file_list_spec_F77 \
51913compiler_lib_search_dirs_CXX \
51914compiler_lib_search_dirs_F77 \
51915predep_objects_CXX \
51916predep_objects_F77 \
51917postdep_objects_CXX \
51918postdep_objects_F77 \
51919predeps_CXX \
51920predeps_F77 \
51921postdeps_CXX \
51922postdeps_F77 \
51923compiler_lib_search_path_CXX \
51924compiler_lib_search_path_F77; do
51925    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
51926    *[\\\\\\\`\\"\\\$]*)
51927      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
51928      ;;
51929    *)
51930      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
51931      ;;
51932    esac
51933done
51934
51935# Double-quote double-evaled strings.
51936for var in reload_cmds \
51937old_postinstall_cmds \
51938old_postuninstall_cmds \
51939old_archive_cmds \
51940extract_expsyms_cmds \
51941old_archive_from_new_cmds \
51942old_archive_from_expsyms_cmds \
51943archive_cmds \
51944archive_expsym_cmds \
51945module_cmds \
51946module_expsym_cmds \
51947export_symbols_cmds \
51948prelink_cmds \
51949postlink_cmds \
51950postinstall_cmds \
51951postuninstall_cmds \
51952finish_cmds \
51953sys_lib_search_path_spec \
51954configure_time_dlsearch_path \
51955configure_time_lt_sys_library_path \
51956reload_cmds_CXX \
51957reload_cmds_F77 \
51958old_archive_cmds_CXX \
51959old_archive_cmds_F77 \
51960old_archive_from_new_cmds_CXX \
51961old_archive_from_new_cmds_F77 \
51962old_archive_from_expsyms_cmds_CXX \
51963old_archive_from_expsyms_cmds_F77 \
51964archive_cmds_CXX \
51965archive_cmds_F77 \
51966archive_expsym_cmds_CXX \
51967archive_expsym_cmds_F77 \
51968module_cmds_CXX \
51969module_cmds_F77 \
51970module_expsym_cmds_CXX \
51971module_expsym_cmds_F77 \
51972export_symbols_cmds_CXX \
51973export_symbols_cmds_F77 \
51974prelink_cmds_CXX \
51975prelink_cmds_F77 \
51976postlink_cmds_CXX \
51977postlink_cmds_F77; do
51978    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
51979    *[\\\\\\\`\\"\\\$]*)
51980      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
51981      ;;
51982    *)
51983      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
51984      ;;
51985    esac
51986done
51987
51988ac_aux_dir='$ac_aux_dir'
51989
51990# See if we are running on zsh, and set the options that allow our
51991# commands through without removal of \ escapes INIT.
51992if test -n "\${ZSH_VERSION+set}"; then
51993   setopt NO_GLOB_SUBST
51994fi
51995
51996
51997    PACKAGE='$PACKAGE'
51998    VERSION='$VERSION'
51999    RM='$RM'
52000    ofile='$ofile'
52001
52002
52003
52004
52005
52006
52007
52008
52009_ACEOF
52010
52011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52012
52013# Handling of arguments.
52014for ac_config_target in $ac_config_targets
52015do
52016  case $ac_config_target in
52017    "modules/core/includes/machine.h") CONFIG_HEADERS="$CONFIG_HEADERS modules/core/includes/machine.h" ;;
52018    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
52019    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
52020    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
52021    "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
52022    "desktop/images/icons/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/images/icons/Makefile" ;;
52023    "desktop/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/Makefile" ;;
52024    "modules/threads/Makefile") CONFIG_FILES="$CONFIG_FILES modules/threads/Makefile" ;;
52025    "modules/ast/Makefile") CONFIG_FILES="$CONFIG_FILES modules/ast/Makefile" ;;
52026    "modules/functions_manager/Makefile") CONFIG_FILES="$CONFIG_FILES modules/functions_manager/Makefile" ;;
52027    "modules/helptools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/helptools/Makefile" ;;
52028    "modules/data_structures/Makefile") CONFIG_FILES="$CONFIG_FILES modules/data_structures/Makefile" ;;
52029    "modules/differential_equations/Makefile") CONFIG_FILES="$CONFIG_FILES modules/differential_equations/Makefile" ;;
52030    "modules/optimization/Makefile") CONFIG_FILES="$CONFIG_FILES modules/optimization/Makefile" ;;
52031    "modules/elementary_functions/Makefile") CONFIG_FILES="$CONFIG_FILES modules/elementary_functions/Makefile" ;;
52032    "modules/special_functions/Makefile") CONFIG_FILES="$CONFIG_FILES modules/special_functions/Makefile" ;;
52033    "modules/io/Makefile") CONFIG_FILES="$CONFIG_FILES modules/io/Makefile" ;;
52034    "modules/completion/Makefile") CONFIG_FILES="$CONFIG_FILES modules/completion/Makefile" ;;
52035    "modules/history_manager/Makefile") CONFIG_FILES="$CONFIG_FILES modules/history_manager/Makefile" ;;
52036    "modules/jvm/Makefile") CONFIG_FILES="$CONFIG_FILES modules/jvm/Makefile" ;;
52037    "modules/commons/Makefile") CONFIG_FILES="$CONFIG_FILES modules/commons/Makefile" ;;
52038    "modules/sound/Makefile") CONFIG_FILES="$CONFIG_FILES modules/sound/Makefile" ;;
52039    "modules/statistics/Makefile") CONFIG_FILES="$CONFIG_FILES modules/statistics/Makefile" ;;
52040    "modules/mexlib/Makefile") CONFIG_FILES="$CONFIG_FILES modules/mexlib/Makefile" ;;
52041    "modules/sparse/Makefile") CONFIG_FILES="$CONFIG_FILES modules/sparse/Makefile" ;;
52042    "modules/linear_algebra/Makefile") CONFIG_FILES="$CONFIG_FILES modules/linear_algebra/Makefile" ;;
52043    "modules/polynomials/Makefile") CONFIG_FILES="$CONFIG_FILES modules/polynomials/Makefile" ;;
52044    "modules/signal_processing/Makefile") CONFIG_FILES="$CONFIG_FILES modules/signal_processing/Makefile" ;;
52045    "modules/arnoldi/Makefile") CONFIG_FILES="$CONFIG_FILES modules/arnoldi/Makefile" ;;
52046    "modules/interpolation/Makefile") CONFIG_FILES="$CONFIG_FILES modules/interpolation/Makefile" ;;
52047    "modules/localization/Makefile") CONFIG_FILES="$CONFIG_FILES modules/localization/Makefile" ;;
52048    "modules/cacsd/Makefile") CONFIG_FILES="$CONFIG_FILES modules/cacsd/Makefile" ;;
52049    "modules/boolean/Makefile") CONFIG_FILES="$CONFIG_FILES modules/boolean/Makefile" ;;
52050    "modules/integer/Makefile") CONFIG_FILES="$CONFIG_FILES modules/integer/Makefile" ;;
52051    "modules/fileio/Makefile") CONFIG_FILES="$CONFIG_FILES modules/fileio/Makefile" ;;
52052    "modules/spreadsheet/Makefile") CONFIG_FILES="$CONFIG_FILES modules/spreadsheet/Makefile" ;;
52053    "modules/string/Makefile") CONFIG_FILES="$CONFIG_FILES modules/string/Makefile" ;;
52054    "modules/time/Makefile") CONFIG_FILES="$CONFIG_FILES modules/time/Makefile" ;;
52055    "modules/graphics/Makefile") CONFIG_FILES="$CONFIG_FILES modules/graphics/Makefile" ;;
52056    "modules/graphic_export/Makefile") CONFIG_FILES="$CONFIG_FILES modules/graphic_export/Makefile" ;;
52057    "modules/graphic_objects/Makefile") CONFIG_FILES="$CONFIG_FILES modules/graphic_objects/Makefile" ;;
52058    "modules/renderer/Makefile") CONFIG_FILES="$CONFIG_FILES modules/renderer/Makefile" ;;
52059    "modules/action_binding/Makefile") CONFIG_FILES="$CONFIG_FILES modules/action_binding/Makefile" ;;
52060    "modules/gui/Makefile") CONFIG_FILES="$CONFIG_FILES modules/gui/Makefile" ;;
52061    "modules/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES modules/mpi/Makefile" ;;
52062    "modules/randlib/Makefile") CONFIG_FILES="$CONFIG_FILES modules/randlib/Makefile" ;;
52063    "modules/tclsci/Makefile") CONFIG_FILES="$CONFIG_FILES modules/tclsci/Makefile" ;;
52064    "modules/windows_tools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/windows_tools/Makefile" ;;
52065    "modules/core/Makefile") CONFIG_FILES="$CONFIG_FILES modules/core/Makefile" ;;
52066    "modules/prebuildjava/Makefile") CONFIG_FILES="$CONFIG_FILES modules/prebuildjava/Makefile" ;;
52067    "modules/api_scilab/Makefile") CONFIG_FILES="$CONFIG_FILES modules/api_scilab/Makefile" ;;
52068    "modules/call_scilab/Makefile") CONFIG_FILES="$CONFIG_FILES modules/call_scilab/Makefile" ;;
52069    "modules/types/Makefile") CONFIG_FILES="$CONFIG_FILES modules/types/Makefile" ;;
52070    "modules/hdf5/Makefile") CONFIG_FILES="$CONFIG_FILES modules/hdf5/Makefile" ;;
52071    "modules/fftw/Makefile") CONFIG_FILES="$CONFIG_FILES modules/fftw/Makefile" ;;
52072    "modules/umfpack/Makefile") CONFIG_FILES="$CONFIG_FILES modules/umfpack/Makefile" ;;
52073    "modules/scicos/Makefile") CONFIG_FILES="$CONFIG_FILES modules/scicos/Makefile" ;;
52074    "modules/scicos_blocks/Makefile") CONFIG_FILES="$CONFIG_FILES modules/scicos_blocks/Makefile" ;;
52075    "modules/functions/Makefile") CONFIG_FILES="$CONFIG_FILES modules/functions/Makefile" ;;
52076    "modules/dynamic_link/Makefile") CONFIG_FILES="$CONFIG_FILES modules/dynamic_link/Makefile" ;;
52077    "modules/overloading/Makefile") CONFIG_FILES="$CONFIG_FILES modules/overloading/Makefile" ;;
52078    "modules/javasci/Makefile") CONFIG_FILES="$CONFIG_FILES modules/javasci/Makefile" ;;
52079    "modules/m2sci/Makefile") CONFIG_FILES="$CONFIG_FILES modules/m2sci/Makefile" ;;
52080    "modules/development_tools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/development_tools/Makefile" ;;
52081    "modules/output_stream/Makefile") CONFIG_FILES="$CONFIG_FILES modules/output_stream/Makefile" ;;
52082    "modules/console/Makefile") CONFIG_FILES="$CONFIG_FILES modules/console/Makefile" ;;
52083    "modules/demo_tools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/demo_tools/Makefile" ;;
52084    "modules/parameters/Makefile") CONFIG_FILES="$CONFIG_FILES modules/parameters/Makefile" ;;
52085    "modules/matio/Makefile") CONFIG_FILES="$CONFIG_FILES modules/matio/Makefile" ;;
52086    "modules/atoms/Makefile") CONFIG_FILES="$CONFIG_FILES modules/atoms/Makefile" ;;
52087    "modules/xcos/Makefile") CONFIG_FILES="$CONFIG_FILES modules/xcos/Makefile" ;;
52088    "modules/scinotes/Makefile") CONFIG_FILES="$CONFIG_FILES modules/scinotes/Makefile" ;;
52089    "modules/ui_data/Makefile") CONFIG_FILES="$CONFIG_FILES modules/ui_data/Makefile" ;;
52090    "modules/graph/Makefile") CONFIG_FILES="$CONFIG_FILES modules/graph/Makefile" ;;
52091    "modules/parallel/Makefile") CONFIG_FILES="$CONFIG_FILES modules/parallel/Makefile" ;;
52092    "modules/modules_manager/Makefile") CONFIG_FILES="$CONFIG_FILES modules/modules_manager/Makefile" ;;
52093    "modules/history_browser/Makefile") CONFIG_FILES="$CONFIG_FILES modules/history_browser/Makefile" ;;
52094    "modules/preferences/Makefile") CONFIG_FILES="$CONFIG_FILES modules/preferences/Makefile" ;;
52095    "modules/xml/Makefile") CONFIG_FILES="$CONFIG_FILES modules/xml/Makefile" ;;
52096    "modules/external_objects/Makefile") CONFIG_FILES="$CONFIG_FILES modules/external_objects/Makefile" ;;
52097    "modules/external_objects_java/Makefile") CONFIG_FILES="$CONFIG_FILES modules/external_objects_java/Makefile" ;;
52098    "modules/slint/Makefile") CONFIG_FILES="$CONFIG_FILES modules/slint/Makefile" ;;
52099    "modules/coverage/Makefile") CONFIG_FILES="$CONFIG_FILES modules/coverage/Makefile" ;;
52100    "modules/webtools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/webtools/Makefile" ;;
52101    "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;;
52102    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
52103    "scilab.pc") CONFIG_FILES="$CONFIG_FILES scilab.pc" ;;
52104    "etc/modules.xml") CONFIG_FILES="$CONFIG_FILES etc/modules.xml" ;;
52105    "etc/classpath.xml") CONFIG_FILES="$CONFIG_FILES etc/classpath.xml" ;;
52106    "etc/Info.plist") CONFIG_FILES="$CONFIG_FILES etc/Info.plist" ;;
52107    "etc/logging.properties") CONFIG_FILES="$CONFIG_FILES etc/logging.properties" ;;
52108    "scilab.properties") CONFIG_FILES="$CONFIG_FILES scilab.properties" ;;
52109    "scilab-lib.properties") CONFIG_FILES="$CONFIG_FILES scilab-lib.properties" ;;
52110    "scilab-lib-doc.properties") CONFIG_FILES="$CONFIG_FILES scilab-lib-doc.properties" ;;
52111    "modules/helptools/etc/SciDocConf.xml") CONFIG_FILES="$CONFIG_FILES modules/helptools/etc/SciDocConf.xml" ;;
52112    "modules/core/includes/version.h") CONFIG_FILES="$CONFIG_FILES modules/core/includes/version.h" ;;
52113    "modules/atoms/etc/repositories") CONFIG_FILES="$CONFIG_FILES modules/atoms/etc/repositories" ;;
52114    "modules/atoms/tests/unit_tests/repositories.orig") CONFIG_FILES="$CONFIG_FILES modules/atoms/tests/unit_tests/repositories.orig" ;;
52115
52116  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52117  esac
52118done
52119
52120
52121# If the user did not use the arguments to specify the items to instantiate,
52122# then the envvar interface is used.  Set only those that are not.
52123# We use the long form for the default assignment because of an extremely
52124# bizarre bug on SunOS 4.1.3.
52125if $ac_need_defaults; then
52126  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52127  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
52128  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
52129fi
52130
52131# Have a temporary directory for convenience.  Make it in the build tree
52132# simply because there is no reason against having it here, and in addition,
52133# creating and moving files from /tmp can sometimes cause problems.
52134# Hook for its removal unless debugging.
52135# Note that there is a small window in which the directory will not be cleaned:
52136# after its creation but before its name has been assigned to `$tmp'.
52137$debug ||
52138{
52139  tmp= ac_tmp=
52140  trap 'exit_status=$?
52141  : "${ac_tmp:=$tmp}"
52142  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52143' 0
52144  trap 'as_fn_exit 1' 1 2 13 15
52145}
52146# Create a (secure) tmp directory for tmp files.
52147
52148{
52149  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52150  test -d "$tmp"
52151}  ||
52152{
52153  tmp=./conf$$-$RANDOM
52154  (umask 077 && mkdir "$tmp")
52155} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52156ac_tmp=$tmp
52157
52158# Set up the scripts for CONFIG_FILES section.
52159# No need to generate them if there are no CONFIG_FILES.
52160# This happens for instance with `./config.status config.h'.
52161if test -n "$CONFIG_FILES"; then
52162
52163
52164ac_cr=`echo X | tr X '\015'`
52165# On cygwin, bash can eat \r inside `` if the user requested igncr.
52166# But we know of no other shell where ac_cr would be empty at this
52167# point, so we can use a bashism as a fallback.
52168if test "x$ac_cr" = x; then
52169  eval ac_cr=\$\'\\r\'
52170fi
52171ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52172if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52173  ac_cs_awk_cr='\\r'
52174else
52175  ac_cs_awk_cr=$ac_cr
52176fi
52177
52178echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52179_ACEOF
52180
52181
52182{
52183  echo "cat >conf$$subs.awk <<_ACEOF" &&
52184  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52185  echo "_ACEOF"
52186} >conf$$subs.sh ||
52187  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52188ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52189ac_delim='%!_!# '
52190for ac_last_try in false false false false false :; do
52191  . ./conf$$subs.sh ||
52192    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52193
52194  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52195  if test $ac_delim_n = $ac_delim_num; then
52196    break
52197  elif $ac_last_try; then
52198    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52199  else
52200    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52201  fi
52202done
52203rm -f conf$$subs.sh
52204
52205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52206cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52207_ACEOF
52208sed -n '
52209h
52210s/^/S["/; s/!.*/"]=/
52211p
52212g
52213s/^[^!]*!//
52214:repl
52215t repl
52216s/'"$ac_delim"'$//
52217t delim
52218:nl
52219h
52220s/\(.\{148\}\)..*/\1/
52221t more1
52222s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52223p
52224n
52225b repl
52226:more1
52227s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52228p
52229g
52230s/.\{148\}//
52231t nl
52232:delim
52233h
52234s/\(.\{148\}\)..*/\1/
52235t more2
52236s/["\\]/\\&/g; s/^/"/; s/$/"/
52237p
52238b
52239:more2
52240s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52241p
52242g
52243s/.\{148\}//
52244t delim
52245' <conf$$subs.awk | sed '
52246/^[^""]/{
52247  N
52248  s/\n//
52249}
52250' >>$CONFIG_STATUS || ac_write_fail=1
52251rm -f conf$$subs.awk
52252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52253_ACAWK
52254cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52255  for (key in S) S_is_set[key] = 1
52256  FS = ""
52257
52258}
52259{
52260  line = $ 0
52261  nfields = split(line, field, "@")
52262  substed = 0
52263  len = length(field[1])
52264  for (i = 2; i < nfields; i++) {
52265    key = field[i]
52266    keylen = length(key)
52267    if (S_is_set[key]) {
52268      value = S[key]
52269      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52270      len += length(value) + length(field[++i])
52271      substed = 1
52272    } else
52273      len += 1 + keylen
52274  }
52275
52276  print line
52277}
52278
52279_ACAWK
52280_ACEOF
52281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52282if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52283  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52284else
52285  cat
52286fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52287  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52288_ACEOF
52289
52290# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52291# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52292# trailing colons and then remove the whole line if VPATH becomes empty
52293# (actually we leave an empty line to preserve line numbers).
52294if test "x$srcdir" = x.; then
52295  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52296h
52297s///
52298s/^/:/
52299s/[	 ]*$/:/
52300s/:\$(srcdir):/:/g
52301s/:\${srcdir}:/:/g
52302s/:@srcdir@:/:/g
52303s/^:*//
52304s/:*$//
52305x
52306s/\(=[	 ]*\).*/\1/
52307G
52308s/\n//
52309s/^[^=]*=[	 ]*$//
52310}'
52311fi
52312
52313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52314fi # test -n "$CONFIG_FILES"
52315
52316# Set up the scripts for CONFIG_HEADERS section.
52317# No need to generate them if there are no CONFIG_HEADERS.
52318# This happens for instance with `./config.status Makefile'.
52319if test -n "$CONFIG_HEADERS"; then
52320cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
52321BEGIN {
52322_ACEOF
52323
52324# Transform confdefs.h into an awk script `defines.awk', embedded as
52325# here-document in config.status, that substitutes the proper values into
52326# config.h.in to produce config.h.
52327
52328# Create a delimiter string that does not exist in confdefs.h, to ease
52329# handling of long lines.
52330ac_delim='%!_!# '
52331for ac_last_try in false false :; do
52332  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
52333  if test -z "$ac_tt"; then
52334    break
52335  elif $ac_last_try; then
52336    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
52337  else
52338    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52339  fi
52340done
52341
52342# For the awk script, D is an array of macro values keyed by name,
52343# likewise P contains macro parameters if any.  Preserve backslash
52344# newline sequences.
52345
52346ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
52347sed -n '
52348s/.\{148\}/&'"$ac_delim"'/g
52349t rset
52350:rset
52351s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
52352t def
52353d
52354:def
52355s/\\$//
52356t bsnl
52357s/["\\]/\\&/g
52358s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
52359D["\1"]=" \3"/p
52360s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
52361d
52362:bsnl
52363s/["\\]/\\&/g
52364s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
52365D["\1"]=" \3\\\\\\n"\\/p
52366t cont
52367s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
52368t cont
52369d
52370:cont
52371n
52372s/.\{148\}/&'"$ac_delim"'/g
52373t clear
52374:clear
52375s/\\$//
52376t bsnlc
52377s/["\\]/\\&/g; s/^/"/; s/$/"/p
52378d
52379:bsnlc
52380s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
52381b cont
52382' <confdefs.h | sed '
52383s/'"$ac_delim"'/"\\\
52384"/g' >>$CONFIG_STATUS || ac_write_fail=1
52385
52386cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52387  for (key in D) D_is_set[key] = 1
52388  FS = ""
52389}
52390/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
52391  line = \$ 0
52392  split(line, arg, " ")
52393  if (arg[1] == "#") {
52394    defundef = arg[2]
52395    mac1 = arg[3]
52396  } else {
52397    defundef = substr(arg[1], 2)
52398    mac1 = arg[2]
52399  }
52400  split(mac1, mac2, "(") #)
52401  macro = mac2[1]
52402  prefix = substr(line, 1, index(line, defundef) - 1)
52403  if (D_is_set[macro]) {
52404    # Preserve the white space surrounding the "#".
52405    print prefix "define", macro P[macro] D[macro]
52406    next
52407  } else {
52408    # Replace #undef with comments.  This is necessary, for example,
52409    # in the case of _POSIX_SOURCE, which is predefined and required
52410    # on some systems where configure will not decide to define it.
52411    if (defundef == "undef") {
52412      print "/*", prefix defundef, macro, "*/"
52413      next
52414    }
52415  }
52416}
52417{ print }
52418_ACAWK
52419_ACEOF
52420cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52421  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
52422fi # test -n "$CONFIG_HEADERS"
52423
52424
52425eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
52426shift
52427for ac_tag
52428do
52429  case $ac_tag in
52430  :[FHLC]) ac_mode=$ac_tag; continue;;
52431  esac
52432  case $ac_mode$ac_tag in
52433  :[FHL]*:*);;
52434  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52435  :[FH]-) ac_tag=-:-;;
52436  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52437  esac
52438  ac_save_IFS=$IFS
52439  IFS=:
52440  set x $ac_tag
52441  IFS=$ac_save_IFS
52442  shift
52443  ac_file=$1
52444  shift
52445
52446  case $ac_mode in
52447  :L) ac_source=$1;;
52448  :[FH])
52449    ac_file_inputs=
52450    for ac_f
52451    do
52452      case $ac_f in
52453      -) ac_f="$ac_tmp/stdin";;
52454      *) # Look for the file first in the build tree, then in the source tree
52455	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52456	 # because $ac_f cannot contain `:'.
52457	 test -f "$ac_f" ||
52458	   case $ac_f in
52459	   [\\/$]*) false;;
52460	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52461	   esac ||
52462	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52463      esac
52464      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52465      as_fn_append ac_file_inputs " '$ac_f'"
52466    done
52467
52468    # Let's still pretend it is `configure' which instantiates (i.e., don't
52469    # use $as_me), people would be surprised to read:
52470    #    /* config.h.  Generated by config.status.  */
52471    configure_input='Generated from '`
52472	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52473	`' by configure.'
52474    if test x"$ac_file" != x-; then
52475      configure_input="$ac_file.  $configure_input"
52476      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52477$as_echo "$as_me: creating $ac_file" >&6;}
52478    fi
52479    # Neutralize special characters interpreted by sed in replacement strings.
52480    case $configure_input in #(
52481    *\&* | *\|* | *\\* )
52482       ac_sed_conf_input=`$as_echo "$configure_input" |
52483       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52484    *) ac_sed_conf_input=$configure_input;;
52485    esac
52486
52487    case $ac_tag in
52488    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52489      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52490    esac
52491    ;;
52492  esac
52493
52494  ac_dir=`$as_dirname -- "$ac_file" ||
52495$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52496	 X"$ac_file" : 'X\(//\)[^/]' \| \
52497	 X"$ac_file" : 'X\(//\)$' \| \
52498	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52499$as_echo X"$ac_file" |
52500    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52501	    s//\1/
52502	    q
52503	  }
52504	  /^X\(\/\/\)[^/].*/{
52505	    s//\1/
52506	    q
52507	  }
52508	  /^X\(\/\/\)$/{
52509	    s//\1/
52510	    q
52511	  }
52512	  /^X\(\/\).*/{
52513	    s//\1/
52514	    q
52515	  }
52516	  s/.*/./; q'`
52517  as_dir="$ac_dir"; as_fn_mkdir_p
52518  ac_builddir=.
52519
52520case "$ac_dir" in
52521.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52522*)
52523  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52524  # A ".." for each directory in $ac_dir_suffix.
52525  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52526  case $ac_top_builddir_sub in
52527  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52528  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52529  esac ;;
52530esac
52531ac_abs_top_builddir=$ac_pwd
52532ac_abs_builddir=$ac_pwd$ac_dir_suffix
52533# for backward compatibility:
52534ac_top_builddir=$ac_top_build_prefix
52535
52536case $srcdir in
52537  .)  # We are building in place.
52538    ac_srcdir=.
52539    ac_top_srcdir=$ac_top_builddir_sub
52540    ac_abs_top_srcdir=$ac_pwd ;;
52541  [\\/]* | ?:[\\/]* )  # Absolute name.
52542    ac_srcdir=$srcdir$ac_dir_suffix;
52543    ac_top_srcdir=$srcdir
52544    ac_abs_top_srcdir=$srcdir ;;
52545  *) # Relative name.
52546    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52547    ac_top_srcdir=$ac_top_build_prefix$srcdir
52548    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52549esac
52550ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52551
52552
52553  case $ac_mode in
52554  :F)
52555  #
52556  # CONFIG_FILE
52557  #
52558
52559  case $INSTALL in
52560  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
52561  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
52562  esac
52563  ac_MKDIR_P=$MKDIR_P
52564  case $MKDIR_P in
52565  [\\/$]* | ?:[\\/]* ) ;;
52566  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
52567  esac
52568_ACEOF
52569
52570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52571# If the template does not know about datarootdir, expand it.
52572# FIXME: This hack should be removed a few years after 2.60.
52573ac_datarootdir_hack=; ac_datarootdir_seen=
52574ac_sed_dataroot='
52575/datarootdir/ {
52576  p
52577  q
52578}
52579/@datadir@/p
52580/@docdir@/p
52581/@infodir@/p
52582/@localedir@/p
52583/@mandir@/p'
52584case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52585*datarootdir*) ac_datarootdir_seen=yes;;
52586*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52587  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52588$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52589_ACEOF
52590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52591  ac_datarootdir_hack='
52592  s&@datadir@&$datadir&g
52593  s&@docdir@&$docdir&g
52594  s&@infodir@&$infodir&g
52595  s&@localedir@&$localedir&g
52596  s&@mandir@&$mandir&g
52597  s&\\\${datarootdir}&$datarootdir&g' ;;
52598esac
52599_ACEOF
52600
52601# Neutralize VPATH when `$srcdir' = `.'.
52602# Shell code in configure.ac might set extrasub.
52603# FIXME: do we really want to maintain this feature?
52604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52605ac_sed_extra="$ac_vpsub
52606$extrasub
52607_ACEOF
52608cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52609:t
52610/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52611s|@configure_input@|$ac_sed_conf_input|;t t
52612s&@top_builddir@&$ac_top_builddir_sub&;t t
52613s&@top_build_prefix@&$ac_top_build_prefix&;t t
52614s&@srcdir@&$ac_srcdir&;t t
52615s&@abs_srcdir@&$ac_abs_srcdir&;t t
52616s&@top_srcdir@&$ac_top_srcdir&;t t
52617s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52618s&@builddir@&$ac_builddir&;t t
52619s&@abs_builddir@&$ac_abs_builddir&;t t
52620s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52621s&@INSTALL@&$ac_INSTALL&;t t
52622s&@MKDIR_P@&$ac_MKDIR_P&;t t
52623$ac_datarootdir_hack
52624"
52625eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52626  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52627
52628test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52629  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52630  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52631      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52632  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52633which seems to be undefined.  Please make sure it is defined" >&5
52634$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52635which seems to be undefined.  Please make sure it is defined" >&2;}
52636
52637  rm -f "$ac_tmp/stdin"
52638  case $ac_file in
52639  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52640  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52641  esac \
52642  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52643 ;;
52644  :H)
52645  #
52646  # CONFIG_HEADER
52647  #
52648  if test x"$ac_file" != x-; then
52649    {
52650      $as_echo "/* $configure_input  */" \
52651      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
52652    } >"$ac_tmp/config.h" \
52653      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52654    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
52655      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
52656$as_echo "$as_me: $ac_file is unchanged" >&6;}
52657    else
52658      rm -f "$ac_file"
52659      mv "$ac_tmp/config.h" "$ac_file" \
52660	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
52661    fi
52662  else
52663    $as_echo "/* $configure_input  */" \
52664      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
52665      || as_fn_error $? "could not create -" "$LINENO" 5
52666  fi
52667# Compute "$ac_file"'s index in $config_headers.
52668_am_arg="$ac_file"
52669_am_stamp_count=1
52670for _am_header in $config_headers :; do
52671  case $_am_header in
52672    $_am_arg | $_am_arg:* )
52673      break ;;
52674    * )
52675      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
52676  esac
52677done
52678echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
52679$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52680	 X"$_am_arg" : 'X\(//\)[^/]' \| \
52681	 X"$_am_arg" : 'X\(//\)$' \| \
52682	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
52683$as_echo X"$_am_arg" |
52684    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52685	    s//\1/
52686	    q
52687	  }
52688	  /^X\(\/\/\)[^/].*/{
52689	    s//\1/
52690	    q
52691	  }
52692	  /^X\(\/\/\)$/{
52693	    s//\1/
52694	    q
52695	  }
52696	  /^X\(\/\).*/{
52697	    s//\1/
52698	    q
52699	  }
52700	  s/.*/./; q'`/stamp-h$_am_stamp_count
52701 ;;
52702
52703  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
52704$as_echo "$as_me: executing $ac_file commands" >&6;}
52705 ;;
52706  esac
52707
52708
52709  case $ac_file$ac_mode in
52710    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
52711  # Older Autoconf quotes --file arguments for eval, but not when files
52712  # are listed without --file.  Let's play safe and only enable the eval
52713  # if we detect the quoting.
52714  # TODO: see whether this extra hack can be removed once we start
52715  # requiring Autoconf 2.70 or later.
52716  case $CONFIG_FILES in #(
52717  *\'*) :
52718    eval set x "$CONFIG_FILES" ;; #(
52719  *) :
52720    set x $CONFIG_FILES ;; #(
52721  *) :
52722     ;;
52723esac
52724  shift
52725  # Used to flag and report bootstrapping failures.
52726  am_rc=0
52727  for am_mf
52728  do
52729    # Strip MF so we end up with the name of the file.
52730    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
52731    # Check whether this is an Automake generated Makefile which includes
52732    # dependency-tracking related rules and includes.
52733    # Grep'ing the whole file directly is not great: AIX grep has a line
52734    # limit of 2048, but all sed's we know have understand at least 4000.
52735    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
52736      || continue
52737    am_dirpart=`$as_dirname -- "$am_mf" ||
52738$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52739	 X"$am_mf" : 'X\(//\)[^/]' \| \
52740	 X"$am_mf" : 'X\(//\)$' \| \
52741	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
52742$as_echo X"$am_mf" |
52743    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52744	    s//\1/
52745	    q
52746	  }
52747	  /^X\(\/\/\)[^/].*/{
52748	    s//\1/
52749	    q
52750	  }
52751	  /^X\(\/\/\)$/{
52752	    s//\1/
52753	    q
52754	  }
52755	  /^X\(\/\).*/{
52756	    s//\1/
52757	    q
52758	  }
52759	  s/.*/./; q'`
52760    am_filepart=`$as_basename -- "$am_mf" ||
52761$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
52762	 X"$am_mf" : 'X\(//\)$' \| \
52763	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
52764$as_echo X/"$am_mf" |
52765    sed '/^.*\/\([^/][^/]*\)\/*$/{
52766	    s//\1/
52767	    q
52768	  }
52769	  /^X\/\(\/\/\)$/{
52770	    s//\1/
52771	    q
52772	  }
52773	  /^X\/\(\/\).*/{
52774	    s//\1/
52775	    q
52776	  }
52777	  s/.*/./; q'`
52778    { echo "$as_me:$LINENO: cd "$am_dirpart" \
52779      && sed -e '/# am--include-marker/d' "$am_filepart" \
52780        | $MAKE -f - am--depfiles" >&5
52781   (cd "$am_dirpart" \
52782      && sed -e '/# am--include-marker/d' "$am_filepart" \
52783        | $MAKE -f - am--depfiles) >&5 2>&5
52784   ac_status=$?
52785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
52786   (exit $ac_status); } || am_rc=$?
52787  done
52788  if test $am_rc -ne 0; then
52789    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
52790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
52791as_fn_error $? "Something went wrong bootstrapping makefile fragments
52792    for automatic dependency tracking.  Try re-running configure with the
52793    '--disable-dependency-tracking' option to at least be able to build
52794    the package (albeit without support for automatic dependency tracking).
52795See \`config.log' for more details" "$LINENO" 5; }
52796  fi
52797  { am_dirpart=; unset am_dirpart;}
52798  { am_filepart=; unset am_filepart;}
52799  { am_mf=; unset am_mf;}
52800  { am_rc=; unset am_rc;}
52801  rm -f conftest-deps.mk
52802}
52803 ;;
52804    "po-directories":C)
52805    for ac_file in $CONFIG_FILES; do
52806      # Support "outfile[:infile[:infile...]]"
52807      case "$ac_file" in
52808        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
52809      esac
52810      # PO directories have a Makefile.in generated from Makefile.in.in.
52811      case "$ac_file" in */Makefile.in)
52812        # Adjust a relative srcdir.
52813        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
52814        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
52815        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
52816        # In autoconf-2.13 it is called $ac_given_srcdir.
52817        # In autoconf-2.50 it is called $srcdir.
52818        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
52819        case "$ac_given_srcdir" in
52820          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
52821          /*) top_srcdir="$ac_given_srcdir" ;;
52822          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
52823        esac
52824        # Treat a directory as a PO directory if and only if it has a
52825        # POTFILES.in file. This allows packages to have multiple PO
52826        # directories under different names or in different locations.
52827        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
52828          rm -f "$ac_dir/POTFILES"
52829          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
52830          gt_tab=`printf '\t'`
52831          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
52832          POMAKEFILEDEPS="POTFILES.in"
52833          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
52834          # on $ac_dir but don't depend on user-specified configuration
52835          # parameters.
52836          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
52837            # The LINGUAS file contains the set of available languages.
52838            if test -n "$OBSOLETE_ALL_LINGUAS"; then
52839              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
52840            fi
52841            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
52842            # Hide the ALL_LINGUAS assignment from automake < 1.5.
52843            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
52844            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
52845          else
52846            # The set of available languages was given in configure.in.
52847            # Hide the ALL_LINGUAS assignment from automake < 1.5.
52848            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
52849          fi
52850          # Compute POFILES
52851          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
52852          # Compute UPDATEPOFILES
52853          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
52854          # Compute DUMMYPOFILES
52855          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
52856          # Compute GMOFILES
52857          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
52858          case "$ac_given_srcdir" in
52859            .) srcdirpre= ;;
52860            *) srcdirpre='$(srcdir)/' ;;
52861          esac
52862          POFILES=
52863          UPDATEPOFILES=
52864          DUMMYPOFILES=
52865          GMOFILES=
52866          for lang in $ALL_LINGUAS; do
52867            POFILES="$POFILES $srcdirpre$lang.po"
52868            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
52869            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
52870            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
52871          done
52872          # CATALOGS depends on both $ac_dir and the user's LINGUAS
52873          # environment variable.
52874          INST_LINGUAS=
52875          if test -n "$ALL_LINGUAS"; then
52876            for presentlang in $ALL_LINGUAS; do
52877              useit=no
52878              if test "%UNSET%" != "$LINGUAS"; then
52879                desiredlanguages="$LINGUAS"
52880              else
52881                desiredlanguages="$ALL_LINGUAS"
52882              fi
52883              for desiredlang in $desiredlanguages; do
52884                # Use the presentlang catalog if desiredlang is
52885                #   a. equal to presentlang, or
52886                #   b. a variant of presentlang (because in this case,
52887                #      presentlang can be used as a fallback for messages
52888                #      which are not translated in the desiredlang catalog).
52889                case "$desiredlang" in
52890                  "$presentlang"*) useit=yes;;
52891                esac
52892              done
52893              if test $useit = yes; then
52894                INST_LINGUAS="$INST_LINGUAS $presentlang"
52895              fi
52896            done
52897          fi
52898          CATALOGS=
52899          if test -n "$INST_LINGUAS"; then
52900            for lang in $INST_LINGUAS; do
52901              CATALOGS="$CATALOGS $lang.gmo"
52902            done
52903          fi
52904          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
52905          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
52906          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
52907            if test -f "$f"; then
52908              case "$f" in
52909                *.orig | *.bak | *~) ;;
52910                *) cat "$f" >> "$ac_dir/Makefile" ;;
52911              esac
52912            fi
52913          done
52914        fi
52915        ;;
52916      esac
52917    done ;;
52918    "libtool":C)
52919
52920    # See if we are running on zsh, and set the options that allow our
52921    # commands through without removal of \ escapes.
52922    if test -n "${ZSH_VERSION+set}"; then
52923      setopt NO_GLOB_SUBST
52924    fi
52925
52926    cfgfile=${ofile}T
52927    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
52928    $RM "$cfgfile"
52929
52930    cat <<_LT_EOF >> "$cfgfile"
52931#! $SHELL
52932# Generated automatically by $as_me ($PACKAGE) $VERSION
52933# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
52934# NOTE: Changes made to this file will be lost: look at ltmain.sh.
52935
52936# Provide generalized library-building support services.
52937# Written by Gordon Matzigkeit, 1996
52938
52939# Copyright (C) 2014 Free Software Foundation, Inc.
52940# This is free software; see the source for copying conditions.  There is NO
52941# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
52942
52943# GNU Libtool is free software; you can redistribute it and/or modify
52944# it under the terms of the GNU General Public License as published by
52945# the Free Software Foundation; either version 2 of of the License, or
52946# (at your option) any later version.
52947#
52948# As a special exception to the GNU General Public License, if you
52949# distribute this file as part of a program or library that is built
52950# using GNU Libtool, you may include this file under the  same
52951# distribution terms that you use for the rest of that program.
52952#
52953# GNU Libtool is distributed in the hope that it will be useful, but
52954# WITHOUT ANY WARRANTY; without even the implied warranty of
52955# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52956# GNU General Public License for more details.
52957#
52958# You should have received a copy of the GNU General Public License
52959# along with this program.  If not, see <http://www.gnu.org/licenses/>.
52960
52961
52962# The names of the tagged configurations supported by this script.
52963available_tags='CXX F77 '
52964
52965# Configured defaults for sys_lib_dlsearch_path munging.
52966: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
52967
52968# ### BEGIN LIBTOOL CONFIG
52969
52970# Which release of libtool.m4 was used?
52971macro_version=$macro_version
52972macro_revision=$macro_revision
52973
52974# Whether or not to build shared libraries.
52975build_libtool_libs=$enable_shared
52976
52977# Whether or not to build static libraries.
52978build_old_libs=$enable_static
52979
52980# What type of objects to build.
52981pic_mode=$pic_mode
52982
52983# Whether or not to optimize for fast installation.
52984fast_install=$enable_fast_install
52985
52986# Shared archive member basename,for filename based shared library versioning on AIX.
52987shared_archive_member_spec=$shared_archive_member_spec
52988
52989# Shell to use when invoking shell scripts.
52990SHELL=$lt_SHELL
52991
52992# An echo program that protects backslashes.
52993ECHO=$lt_ECHO
52994
52995# The PATH separator for the build system.
52996PATH_SEPARATOR=$lt_PATH_SEPARATOR
52997
52998# The host system.
52999host_alias=$host_alias
53000host=$host
53001host_os=$host_os
53002
53003# The build system.
53004build_alias=$build_alias
53005build=$build
53006build_os=$build_os
53007
53008# A sed program that does not truncate output.
53009SED=$lt_SED
53010
53011# Sed that helps us avoid accidentally triggering echo(1) options like -n.
53012Xsed="\$SED -e 1s/^X//"
53013
53014# A grep program that handles long lines.
53015GREP=$lt_GREP
53016
53017# An ERE matcher.
53018EGREP=$lt_EGREP
53019
53020# A literal string matcher.
53021FGREP=$lt_FGREP
53022
53023# A BSD- or MS-compatible name lister.
53024NM=$lt_NM
53025
53026# Whether we need soft or hard links.
53027LN_S=$lt_LN_S
53028
53029# What is the maximum length of a command?
53030max_cmd_len=$max_cmd_len
53031
53032# Object file suffix (normally "o").
53033objext=$ac_objext
53034
53035# Executable file suffix (normally "").
53036exeext=$exeext
53037
53038# whether the shell understands "unset".
53039lt_unset=$lt_unset
53040
53041# turn spaces into newlines.
53042SP2NL=$lt_lt_SP2NL
53043
53044# turn newlines into spaces.
53045NL2SP=$lt_lt_NL2SP
53046
53047# convert \$build file names to \$host format.
53048to_host_file_cmd=$lt_cv_to_host_file_cmd
53049
53050# convert \$build files to toolchain format.
53051to_tool_file_cmd=$lt_cv_to_tool_file_cmd
53052
53053# An object symbol dumper.
53054OBJDUMP=$lt_OBJDUMP
53055
53056# Method to check whether dependent libraries are shared objects.
53057deplibs_check_method=$lt_deplibs_check_method
53058
53059# Command to use when deplibs_check_method = "file_magic".
53060file_magic_cmd=$lt_file_magic_cmd
53061
53062# How to find potential files when deplibs_check_method = "file_magic".
53063file_magic_glob=$lt_file_magic_glob
53064
53065# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
53066want_nocaseglob=$lt_want_nocaseglob
53067
53068# DLL creation program.
53069DLLTOOL=$lt_DLLTOOL
53070
53071# Command to associate shared and link libraries.
53072sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
53073
53074# The archiver.
53075AR=$lt_AR
53076
53077# Flags to create an archive.
53078AR_FLAGS=$lt_AR_FLAGS
53079
53080# How to feed a file listing to the archiver.
53081archiver_list_spec=$lt_archiver_list_spec
53082
53083# A symbol stripping program.
53084STRIP=$lt_STRIP
53085
53086# Commands used to install an old-style archive.
53087RANLIB=$lt_RANLIB
53088old_postinstall_cmds=$lt_old_postinstall_cmds
53089old_postuninstall_cmds=$lt_old_postuninstall_cmds
53090
53091# Whether to use a lock for old archive extraction.
53092lock_old_archive_extraction=$lock_old_archive_extraction
53093
53094# A C compiler.
53095LTCC=$lt_CC
53096
53097# LTCC compiler flags.
53098LTCFLAGS=$lt_CFLAGS
53099
53100# Take the output of nm and produce a listing of raw symbols and C names.
53101global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
53102
53103# Transform the output of nm in a proper C declaration.
53104global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
53105
53106# Transform the output of nm into a list of symbols to manually relocate.
53107global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
53108
53109# Transform the output of nm in a C name address pair.
53110global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
53111
53112# Transform the output of nm in a C name address pair when lib prefix is needed.
53113global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
53114
53115# The name lister interface.
53116nm_interface=$lt_lt_cv_nm_interface
53117
53118# Specify filename containing input files for \$NM.
53119nm_file_list_spec=$lt_nm_file_list_spec
53120
53121# The root where to search for dependent libraries,and where our libraries should be installed.
53122lt_sysroot=$lt_sysroot
53123
53124# Command to truncate a binary pipe.
53125lt_truncate_bin=$lt_lt_cv_truncate_bin
53126
53127# The name of the directory that contains temporary libtool files.
53128objdir=$objdir
53129
53130# Used to examine libraries when file_magic_cmd begins with "file".
53131MAGIC_CMD=$MAGIC_CMD
53132
53133# Must we lock files when doing compilation?
53134need_locks=$lt_need_locks
53135
53136# Manifest tool.
53137MANIFEST_TOOL=$lt_MANIFEST_TOOL
53138
53139# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
53140DSYMUTIL=$lt_DSYMUTIL
53141
53142# Tool to change global to local symbols on Mac OS X.
53143NMEDIT=$lt_NMEDIT
53144
53145# Tool to manipulate fat objects and archives on Mac OS X.
53146LIPO=$lt_LIPO
53147
53148# ldd/readelf like tool for Mach-O binaries on Mac OS X.
53149OTOOL=$lt_OTOOL
53150
53151# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
53152OTOOL64=$lt_OTOOL64
53153
53154# Old archive suffix (normally "a").
53155libext=$libext
53156
53157# Shared library suffix (normally ".so").
53158shrext_cmds=$lt_shrext_cmds
53159
53160# The commands to extract the exported symbol list from a shared archive.
53161extract_expsyms_cmds=$lt_extract_expsyms_cmds
53162
53163# Variables whose values should be saved in libtool wrapper scripts and
53164# restored at link time.
53165variables_saved_for_relink=$lt_variables_saved_for_relink
53166
53167# Do we need the "lib" prefix for modules?
53168need_lib_prefix=$need_lib_prefix
53169
53170# Do we need a version for libraries?
53171need_version=$need_version
53172
53173# Library versioning type.
53174version_type=$version_type
53175
53176# Shared library runtime path variable.
53177runpath_var=$runpath_var
53178
53179# Shared library path variable.
53180shlibpath_var=$shlibpath_var
53181
53182# Is shlibpath searched before the hard-coded library search path?
53183shlibpath_overrides_runpath=$shlibpath_overrides_runpath
53184
53185# Format of library name prefix.
53186libname_spec=$lt_libname_spec
53187
53188# List of archive names.  First name is the real one, the rest are links.
53189# The last name is the one that the linker finds with -lNAME
53190library_names_spec=$lt_library_names_spec
53191
53192# The coded name of the library, if different from the real name.
53193soname_spec=$lt_soname_spec
53194
53195# Permission mode override for installation of shared libraries.
53196install_override_mode=$lt_install_override_mode
53197
53198# Command to use after installation of a shared archive.
53199postinstall_cmds=$lt_postinstall_cmds
53200
53201# Command to use after uninstallation of a shared archive.
53202postuninstall_cmds=$lt_postuninstall_cmds
53203
53204# Commands used to finish a libtool library installation in a directory.
53205finish_cmds=$lt_finish_cmds
53206
53207# As "finish_cmds", except a single script fragment to be evaled but
53208# not shown.
53209finish_eval=$lt_finish_eval
53210
53211# Whether we should hardcode library paths into libraries.
53212hardcode_into_libs=$hardcode_into_libs
53213
53214# Compile-time system search path for libraries.
53215sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
53216
53217# Detected run-time system search path for libraries.
53218sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
53219
53220# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
53221configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
53222
53223# Whether dlopen is supported.
53224dlopen_support=$enable_dlopen
53225
53226# Whether dlopen of programs is supported.
53227dlopen_self=$enable_dlopen_self
53228
53229# Whether dlopen of statically linked programs is supported.
53230dlopen_self_static=$enable_dlopen_self_static
53231
53232# Commands to strip libraries.
53233old_striplib=$lt_old_striplib
53234striplib=$lt_striplib
53235
53236
53237# The linker used to build libraries.
53238LD=$lt_LD
53239
53240# How to create reloadable object files.
53241reload_flag=$lt_reload_flag
53242reload_cmds=$lt_reload_cmds
53243
53244# Commands used to build an old-style archive.
53245old_archive_cmds=$lt_old_archive_cmds
53246
53247# A language specific compiler.
53248CC=$lt_compiler
53249
53250# Is the compiler the GNU compiler?
53251with_gcc=$GCC
53252
53253# Compiler flag to turn off builtin functions.
53254no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
53255
53256# Additional compiler flags for building library objects.
53257pic_flag=$lt_lt_prog_compiler_pic
53258
53259# How to pass a linker flag through the compiler.
53260wl=$lt_lt_prog_compiler_wl
53261
53262# Compiler flag to prevent dynamic linking.
53263link_static_flag=$lt_lt_prog_compiler_static
53264
53265# Does compiler simultaneously support -c and -o options?
53266compiler_c_o=$lt_lt_cv_prog_compiler_c_o
53267
53268# Whether or not to add -lc for building shared libraries.
53269build_libtool_need_lc=$archive_cmds_need_lc
53270
53271# Whether or not to disallow shared libs when runtime libs are static.
53272allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
53273
53274# Compiler flag to allow reflexive dlopens.
53275export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
53276
53277# Compiler flag to generate shared objects directly from archives.
53278whole_archive_flag_spec=$lt_whole_archive_flag_spec
53279
53280# Whether the compiler copes with passing no objects directly.
53281compiler_needs_object=$lt_compiler_needs_object
53282
53283# Create an old-style archive from a shared archive.
53284old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
53285
53286# Create a temporary old-style archive to link instead of a shared archive.
53287old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
53288
53289# Commands used to build a shared archive.
53290archive_cmds=$lt_archive_cmds
53291archive_expsym_cmds=$lt_archive_expsym_cmds
53292
53293# Commands used to build a loadable module if different from building
53294# a shared archive.
53295module_cmds=$lt_module_cmds
53296module_expsym_cmds=$lt_module_expsym_cmds
53297
53298# Whether we are building with GNU ld or not.
53299with_gnu_ld=$lt_with_gnu_ld
53300
53301# Flag that allows shared libraries with undefined symbols to be built.
53302allow_undefined_flag=$lt_allow_undefined_flag
53303
53304# Flag that enforces no undefined symbols.
53305no_undefined_flag=$lt_no_undefined_flag
53306
53307# Flag to hardcode \$libdir into a binary during linking.
53308# This must work even if \$libdir does not exist
53309hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
53310
53311# Whether we need a single "-rpath" flag with a separated argument.
53312hardcode_libdir_separator=$lt_hardcode_libdir_separator
53313
53314# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
53315# DIR into the resulting binary.
53316hardcode_direct=$hardcode_direct
53317
53318# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
53319# DIR into the resulting binary and the resulting library dependency is
53320# "absolute",i.e impossible to change by setting \$shlibpath_var if the
53321# library is relocated.
53322hardcode_direct_absolute=$hardcode_direct_absolute
53323
53324# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
53325# into the resulting binary.
53326hardcode_minus_L=$hardcode_minus_L
53327
53328# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
53329# into the resulting binary.
53330hardcode_shlibpath_var=$hardcode_shlibpath_var
53331
53332# Set to "yes" if building a shared library automatically hardcodes DIR
53333# into the library and all subsequent libraries and executables linked
53334# against it.
53335hardcode_automatic=$hardcode_automatic
53336
53337# Set to yes if linker adds runtime paths of dependent libraries
53338# to runtime path list.
53339inherit_rpath=$inherit_rpath
53340
53341# Whether libtool must link a program against all its dependency libraries.
53342link_all_deplibs=$link_all_deplibs
53343
53344# Set to "yes" if exported symbols are required.
53345always_export_symbols=$always_export_symbols
53346
53347# The commands to list exported symbols.
53348export_symbols_cmds=$lt_export_symbols_cmds
53349
53350# Symbols that should not be listed in the preloaded symbols.
53351exclude_expsyms=$lt_exclude_expsyms
53352
53353# Symbols that must always be exported.
53354include_expsyms=$lt_include_expsyms
53355
53356# Commands necessary for linking programs (against libraries) with templates.
53357prelink_cmds=$lt_prelink_cmds
53358
53359# Commands necessary for finishing linking programs.
53360postlink_cmds=$lt_postlink_cmds
53361
53362# Specify filename containing input files.
53363file_list_spec=$lt_file_list_spec
53364
53365# How to hardcode a shared library path into an executable.
53366hardcode_action=$hardcode_action
53367
53368# The directories searched by this compiler when creating a shared library.
53369compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
53370
53371# Dependencies to place before and after the objects being linked to
53372# create a shared library.
53373predep_objects=$lt_predep_objects
53374postdep_objects=$lt_postdep_objects
53375predeps=$lt_predeps
53376postdeps=$lt_postdeps
53377
53378# The library search path used internally by the compiler when linking
53379# a shared library.
53380compiler_lib_search_path=$lt_compiler_lib_search_path
53381
53382# ### END LIBTOOL CONFIG
53383
53384_LT_EOF
53385
53386    cat <<'_LT_EOF' >> "$cfgfile"
53387
53388# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
53389
53390# func_munge_path_list VARIABLE PATH
53391# -----------------------------------
53392# VARIABLE is name of variable containing _space_ separated list of
53393# directories to be munged by the contents of PATH, which is string
53394# having a format:
53395# "DIR[:DIR]:"
53396#       string "DIR[ DIR]" will be prepended to VARIABLE
53397# ":DIR[:DIR]"
53398#       string "DIR[ DIR]" will be appended to VARIABLE
53399# "DIRP[:DIRP]::[DIRA:]DIRA"
53400#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
53401#       "DIRA[ DIRA]" will be appended to VARIABLE
53402# "DIR[:DIR]"
53403#       VARIABLE will be replaced by "DIR[ DIR]"
53404func_munge_path_list ()
53405{
53406    case x$2 in
53407    x)
53408        ;;
53409    *:)
53410        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
53411        ;;
53412    x:*)
53413        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
53414        ;;
53415    *::*)
53416        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
53417        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
53418        ;;
53419    *)
53420        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
53421        ;;
53422    esac
53423}
53424
53425
53426# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
53427func_cc_basename ()
53428{
53429    for cc_temp in $*""; do
53430      case $cc_temp in
53431        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
53432        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
53433        \-*) ;;
53434        *) break;;
53435      esac
53436    done
53437    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
53438}
53439
53440
53441# ### END FUNCTIONS SHARED WITH CONFIGURE
53442
53443_LT_EOF
53444
53445  case $host_os in
53446  aix3*)
53447    cat <<\_LT_EOF >> "$cfgfile"
53448# AIX sometimes has problems with the GCC collect2 program.  For some
53449# reason, if we set the COLLECT_NAMES environment variable, the problems
53450# vanish in a puff of smoke.
53451if test set != "${COLLECT_NAMES+set}"; then
53452  COLLECT_NAMES=
53453  export COLLECT_NAMES
53454fi
53455_LT_EOF
53456    ;;
53457  esac
53458
53459
53460ltmain=$ac_aux_dir/ltmain.sh
53461
53462
53463  # We use sed instead of cat because bash on DJGPP gets confused if
53464  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
53465  # text mode, it properly converts lines to CR/LF.  This bash problem
53466  # is reportedly fixed, but why not run on old versions too?
53467  sed '$q' "$ltmain" >> "$cfgfile" \
53468     || (rm -f "$cfgfile"; exit 1)
53469
53470   mv -f "$cfgfile" "$ofile" ||
53471    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
53472  chmod +x "$ofile"
53473
53474
53475    cat <<_LT_EOF >> "$ofile"
53476
53477# ### BEGIN LIBTOOL TAG CONFIG: CXX
53478
53479# The linker used to build libraries.
53480LD=$lt_LD_CXX
53481
53482# How to create reloadable object files.
53483reload_flag=$lt_reload_flag_CXX
53484reload_cmds=$lt_reload_cmds_CXX
53485
53486# Commands used to build an old-style archive.
53487old_archive_cmds=$lt_old_archive_cmds_CXX
53488
53489# A language specific compiler.
53490CC=$lt_compiler_CXX
53491
53492# Is the compiler the GNU compiler?
53493with_gcc=$GCC_CXX
53494
53495# Compiler flag to turn off builtin functions.
53496no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
53497
53498# Additional compiler flags for building library objects.
53499pic_flag=$lt_lt_prog_compiler_pic_CXX
53500
53501# How to pass a linker flag through the compiler.
53502wl=$lt_lt_prog_compiler_wl_CXX
53503
53504# Compiler flag to prevent dynamic linking.
53505link_static_flag=$lt_lt_prog_compiler_static_CXX
53506
53507# Does compiler simultaneously support -c and -o options?
53508compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
53509
53510# Whether or not to add -lc for building shared libraries.
53511build_libtool_need_lc=$archive_cmds_need_lc_CXX
53512
53513# Whether or not to disallow shared libs when runtime libs are static.
53514allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
53515
53516# Compiler flag to allow reflexive dlopens.
53517export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
53518
53519# Compiler flag to generate shared objects directly from archives.
53520whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
53521
53522# Whether the compiler copes with passing no objects directly.
53523compiler_needs_object=$lt_compiler_needs_object_CXX
53524
53525# Create an old-style archive from a shared archive.
53526old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
53527
53528# Create a temporary old-style archive to link instead of a shared archive.
53529old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
53530
53531# Commands used to build a shared archive.
53532archive_cmds=$lt_archive_cmds_CXX
53533archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
53534
53535# Commands used to build a loadable module if different from building
53536# a shared archive.
53537module_cmds=$lt_module_cmds_CXX
53538module_expsym_cmds=$lt_module_expsym_cmds_CXX
53539
53540# Whether we are building with GNU ld or not.
53541with_gnu_ld=$lt_with_gnu_ld_CXX
53542
53543# Flag that allows shared libraries with undefined symbols to be built.
53544allow_undefined_flag=$lt_allow_undefined_flag_CXX
53545
53546# Flag that enforces no undefined symbols.
53547no_undefined_flag=$lt_no_undefined_flag_CXX
53548
53549# Flag to hardcode \$libdir into a binary during linking.
53550# This must work even if \$libdir does not exist
53551hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
53552
53553# Whether we need a single "-rpath" flag with a separated argument.
53554hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
53555
53556# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
53557# DIR into the resulting binary.
53558hardcode_direct=$hardcode_direct_CXX
53559
53560# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
53561# DIR into the resulting binary and the resulting library dependency is
53562# "absolute",i.e impossible to change by setting \$shlibpath_var if the
53563# library is relocated.
53564hardcode_direct_absolute=$hardcode_direct_absolute_CXX
53565
53566# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
53567# into the resulting binary.
53568hardcode_minus_L=$hardcode_minus_L_CXX
53569
53570# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
53571# into the resulting binary.
53572hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
53573
53574# Set to "yes" if building a shared library automatically hardcodes DIR
53575# into the library and all subsequent libraries and executables linked
53576# against it.
53577hardcode_automatic=$hardcode_automatic_CXX
53578
53579# Set to yes if linker adds runtime paths of dependent libraries
53580# to runtime path list.
53581inherit_rpath=$inherit_rpath_CXX
53582
53583# Whether libtool must link a program against all its dependency libraries.
53584link_all_deplibs=$link_all_deplibs_CXX
53585
53586# Set to "yes" if exported symbols are required.
53587always_export_symbols=$always_export_symbols_CXX
53588
53589# The commands to list exported symbols.
53590export_symbols_cmds=$lt_export_symbols_cmds_CXX
53591
53592# Symbols that should not be listed in the preloaded symbols.
53593exclude_expsyms=$lt_exclude_expsyms_CXX
53594
53595# Symbols that must always be exported.
53596include_expsyms=$lt_include_expsyms_CXX
53597
53598# Commands necessary for linking programs (against libraries) with templates.
53599prelink_cmds=$lt_prelink_cmds_CXX
53600
53601# Commands necessary for finishing linking programs.
53602postlink_cmds=$lt_postlink_cmds_CXX
53603
53604# Specify filename containing input files.
53605file_list_spec=$lt_file_list_spec_CXX
53606
53607# How to hardcode a shared library path into an executable.
53608hardcode_action=$hardcode_action_CXX
53609
53610# The directories searched by this compiler when creating a shared library.
53611compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
53612
53613# Dependencies to place before and after the objects being linked to
53614# create a shared library.
53615predep_objects=$lt_predep_objects_CXX
53616postdep_objects=$lt_postdep_objects_CXX
53617predeps=$lt_predeps_CXX
53618postdeps=$lt_postdeps_CXX
53619
53620# The library search path used internally by the compiler when linking
53621# a shared library.
53622compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
53623
53624# ### END LIBTOOL TAG CONFIG: CXX
53625_LT_EOF
53626
53627
53628    cat <<_LT_EOF >> "$ofile"
53629
53630# ### BEGIN LIBTOOL TAG CONFIG: F77
53631
53632# The linker used to build libraries.
53633LD=$lt_LD_F77
53634
53635# How to create reloadable object files.
53636reload_flag=$lt_reload_flag_F77
53637reload_cmds=$lt_reload_cmds_F77
53638
53639# Commands used to build an old-style archive.
53640old_archive_cmds=$lt_old_archive_cmds_F77
53641
53642# A language specific compiler.
53643CC=$lt_compiler_F77
53644
53645# Is the compiler the GNU compiler?
53646with_gcc=$GCC_F77
53647
53648# Compiler flag to turn off builtin functions.
53649no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
53650
53651# Additional compiler flags for building library objects.
53652pic_flag=$lt_lt_prog_compiler_pic_F77
53653
53654# How to pass a linker flag through the compiler.
53655wl=$lt_lt_prog_compiler_wl_F77
53656
53657# Compiler flag to prevent dynamic linking.
53658link_static_flag=$lt_lt_prog_compiler_static_F77
53659
53660# Does compiler simultaneously support -c and -o options?
53661compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
53662
53663# Whether or not to add -lc for building shared libraries.
53664build_libtool_need_lc=$archive_cmds_need_lc_F77
53665
53666# Whether or not to disallow shared libs when runtime libs are static.
53667allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
53668
53669# Compiler flag to allow reflexive dlopens.
53670export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
53671
53672# Compiler flag to generate shared objects directly from archives.
53673whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
53674
53675# Whether the compiler copes with passing no objects directly.
53676compiler_needs_object=$lt_compiler_needs_object_F77
53677
53678# Create an old-style archive from a shared archive.
53679old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
53680
53681# Create a temporary old-style archive to link instead of a shared archive.
53682old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
53683
53684# Commands used to build a shared archive.
53685archive_cmds=$lt_archive_cmds_F77
53686archive_expsym_cmds=$lt_archive_expsym_cmds_F77
53687
53688# Commands used to build a loadable module if different from building
53689# a shared archive.
53690module_cmds=$lt_module_cmds_F77
53691module_expsym_cmds=$lt_module_expsym_cmds_F77
53692
53693# Whether we are building with GNU ld or not.
53694with_gnu_ld=$lt_with_gnu_ld_F77
53695
53696# Flag that allows shared libraries with undefined symbols to be built.
53697allow_undefined_flag=$lt_allow_undefined_flag_F77
53698
53699# Flag that enforces no undefined symbols.
53700no_undefined_flag=$lt_no_undefined_flag_F77
53701
53702# Flag to hardcode \$libdir into a binary during linking.
53703# This must work even if \$libdir does not exist
53704hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
53705
53706# Whether we need a single "-rpath" flag with a separated argument.
53707hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
53708
53709# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
53710# DIR into the resulting binary.
53711hardcode_direct=$hardcode_direct_F77
53712
53713# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
53714# DIR into the resulting binary and the resulting library dependency is
53715# "absolute",i.e impossible to change by setting \$shlibpath_var if the
53716# library is relocated.
53717hardcode_direct_absolute=$hardcode_direct_absolute_F77
53718
53719# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
53720# into the resulting binary.
53721hardcode_minus_L=$hardcode_minus_L_F77
53722
53723# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
53724# into the resulting binary.
53725hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
53726
53727# Set to "yes" if building a shared library automatically hardcodes DIR
53728# into the library and all subsequent libraries and executables linked
53729# against it.
53730hardcode_automatic=$hardcode_automatic_F77
53731
53732# Set to yes if linker adds runtime paths of dependent libraries
53733# to runtime path list.
53734inherit_rpath=$inherit_rpath_F77
53735
53736# Whether libtool must link a program against all its dependency libraries.
53737link_all_deplibs=$link_all_deplibs_F77
53738
53739# Set to "yes" if exported symbols are required.
53740always_export_symbols=$always_export_symbols_F77
53741
53742# The commands to list exported symbols.
53743export_symbols_cmds=$lt_export_symbols_cmds_F77
53744
53745# Symbols that should not be listed in the preloaded symbols.
53746exclude_expsyms=$lt_exclude_expsyms_F77
53747
53748# Symbols that must always be exported.
53749include_expsyms=$lt_include_expsyms_F77
53750
53751# Commands necessary for linking programs (against libraries) with templates.
53752prelink_cmds=$lt_prelink_cmds_F77
53753
53754# Commands necessary for finishing linking programs.
53755postlink_cmds=$lt_postlink_cmds_F77
53756
53757# Specify filename containing input files.
53758file_list_spec=$lt_file_list_spec_F77
53759
53760# How to hardcode a shared library path into an executable.
53761hardcode_action=$hardcode_action_F77
53762
53763# The directories searched by this compiler when creating a shared library.
53764compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
53765
53766# Dependencies to place before and after the objects being linked to
53767# create a shared library.
53768predep_objects=$lt_predep_objects_F77
53769postdep_objects=$lt_postdep_objects_F77
53770predeps=$lt_predeps_F77
53771postdeps=$lt_postdeps_F77
53772
53773# The library search path used internally by the compiler when linking
53774# a shared library.
53775compiler_lib_search_path=$lt_compiler_lib_search_path_F77
53776
53777# ### END LIBTOOL TAG CONFIG: F77
53778_LT_EOF
53779
53780 ;;
53781
53782  esac
53783done # for ac_tag
53784
53785
53786as_fn_exit 0
53787_ACEOF
53788ac_clean_files=$ac_clean_files_save
53789
53790test $ac_write_fail = 0 ||
53791  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53792
53793chmod +x $SCI_SRCDIR_FULL/modules/scicos_blocks/src/scripts/GenBlocks.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/scicompile.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/compilerDetection.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/configure
53794
53795# configure is writing to config.log, and then calls config.status.
53796# config.status does its own redirection, appending to config.log.
53797# Unfortunately, on DOS this fails, as config.log is still kept open
53798# by configure, so config.status won't be able to write to it; its
53799# output is simply discarded.  So we exec the FD to /dev/null,
53800# effectively closing config.log, so it can be properly (re)opened and
53801# appended to by config.status.  When coming back to configure, we
53802# need to make the FD available again.
53803if test "$no_create" != yes; then
53804  ac_cs_success=:
53805  ac_config_status_args=
53806  test "$silent" = yes &&
53807    ac_config_status_args="$ac_config_status_args --quiet"
53808  exec 5>/dev/null
53809  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53810  exec 5>>config.log
53811  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53812  # would make configure fail if this is the last instruction.
53813  $ac_cs_success || as_fn_exit 1
53814fi
53815if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53816  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53817$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53818fi
53819
53820
53821# To distribution packager, you can uncomment this stuff is you want to
53822# disable the rpath issue
53823# However, you will have to set all the LD_LIBRARY_PATH to .libs/ directory
53824# since scilab is compiling macros and help into the source tree (ie before
53825# the "make install")
53826# You should consider using chrpath:
53827# http://directory.fsf.org/project/chrpath/
53828# to remove it before the make install
53829
53830#case ${host} in
53831#  *-pc-linux-gnu)
53832#    AC_MSG_RESULT([Fixing libtool for -rpath problems.])
53833#    sed < libtool > libtool-2 \
53834#    's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
53835#    mv libtool-2 libtool
53836#    chmod 755 libtool
53837#  ;;
53838#esac
53839#
53840
53841echo ""
53842
53843echo "Scilab is configured as follows. Please verify that this configuration"
53844echo "matches your expectations."
53845echo ""
53846echo "Host system type : $host"
53847echo ""
53848echo "                  Option                        Value"
53849echo "-------------------------------------------------------------------------"
53850echo "Shared libraries.......      --enable-shared=$libtool_build_shared_libs"
53851echo "Static libraries.......      --enable-static=$libtool_build_static_libs"
53852echo "GNU ld.................      --with-gnu-ld=$with_gnu_ld"
53853echo "Enable debug ..........      --enable-debug=$enable_debug"
53854echo "Enable debug C.........      --enable-debug-C=$enable_debug_C"
53855echo "Enable debug C++.......      --enable-debug-CXX=$enable_debug_CXX"
53856echo "Enable debug Java......      --enable-debug-java=$enable_debug_java"
53857echo "Enable debug Fortran...      --enable-debug-fortran=$enable_debug_fortran"
53858echo "Enable stop on warning.      --enable-stop-on-warning=$enable_stop_on_warning"
53859
53860echo ""
53861echo "Compiler Configuration:"
53862echo "  Intel (--with-intelcompilers) .... =        $with_intelcompilers"
53863echo "  GNU gcc (--with-gcc) ............. =        $with_gcc"
53864echo "  GNU Fortran 95 (--with-gfortran) . =        $with_gfortran"
53865echo ""
53866echo "Options:"
53867echo "  Do not use TCL/TK (--without-tk) ................. = $with_tk"
53868echo "  TCL include (--with-tcl-include) ................. = $USER_TCL_INC_PATH"
53869echo "  TCL library (--with-tcl-library) ................. = $USER_TCL_LIB_PATH"
53870echo "  TK include (--with-tk-include) ................... = $USER_TK_INC_PATH"
53871echo "  TK library (--with-tk-library) ................... = $USER_TK_LIB_PATH"
53872echo "  Install XML Help (--with-install-help-xml) ....... = $with_install_help_xml"
53873echo "  Compilation tests (--enable-compilation-tests) ... = $COMPILATION_TESTS"
53874echo "  Make the package relocatable (--enable-relocatable)= $RELOCATABLE"
53875echo "  Use FFTW (--without-fftw) ........................ = $with_fftw"
53876echo "  Use MATIO (--without-matio) ...................... = $with_matio"
53877echo ""
53878echo "  Compile with Scilab thirdparties ................. = $WITH_DEVTOOLS"
53879
53880echo ""
53881if test "$with_gui" = no; then
53882   echo "Not using Xcos because of the option --without-gui"
53883else
53884if test $XCOS_ENABLE = yes; then
53885   echo "Xcos enable"
53886   echo "Build modelica compiler (--without-modelica) ....... = $with_modelica"
53887   echo ""
53888   if test "$with_modelica" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then
53889     echo "Ocaml Configuration (for Modelica compiler):"
53890     echo "  OCAMLC ............. = $OCAMLC"
53891     echo "  OCAMLCFLAGS ........ = $OCAMLCFLAGS"
53892     echo "  OCAMLOPT ........... = $OCAMLOPT"
53893     echo "  OCAMLOPTFLAGS ...... = $OCAMLOPTFLAGS"
53894     echo "  OCAMLDEP ........... = $OCAMLDEP"
53895   else
53896     echo "Will not build Modelica compiler"
53897   fi
53898else
53899   echo "Not using Xcos"
53900fi
53901fi
53902
53903echo ""
53904if test "$enable_code_coverage" = yes;  then
53905   echo "Code coverage configuration:"
53906   echo "  LCOV .............. = $LCOV"
53907   echo "  GENHTML ........... = $GENHTML"
53908else
53909   echo "Not using code coverage"
53910fi
53911
53912echo ""
53913if test $OPENMP_ENABLE = yes; then
53914   echo "OpenMP Configuration:"
53915   echo "OpenMP CFLAGS ...... = $OPENMP_CFLAGS"
53916   echo "OpenMP CXXFLAGS .... = $OPENMP_CXXFLAGS"
53917   echo "OpenMP LIBS ........ = $OPENMP_LIBS"
53918   echo "OpenMP LDFLAGS ..... = $OPENMP_LDFLAGS"
53919else
53920   echo "Not using OpenMP"
53921fi
53922
53923echo ""
53924if test $FFTW_ENABLE = yes;  then
53925   echo "FFTW Configuration:"
53926   echo "  FFTW LIBS .......... = $FFTW3_LIB"
53927   echo "  FFTW CFLAGS ........ = $FFTW3_CFLAGS"
53928else
53929   echo "Not using FFTW"
53930fi
53931
53932echo ""
53933echo "Eigen3 Configuration:"
53934echo "  EIGEN CPPFLAGS ...... = $EIGEN_CPPFLAGS"
53935
53936echo ""
53937if test $MATIO_ENABLE = yes;  then
53938   echo "MATIO Configuration:"
53939   echo "  MATIO LIBS .......... = $MATIO_LIBS"
53940   echo "  MATIO CFLAGS ........ = $MATIO_CFLAGS"
53941else
53942   echo "Not using MATIO"
53943fi
53944
53945echo ""
53946if test $UMFPACK_ENABLE = yes;  then
53947   echo "UMFPACK Configuration:"
53948   echo "  UMFPACK LIBS ....... = $UMFPACK_LIB"
53949   echo "  UMFPACK CFLAGS ..... = $UMFPACK_CFLAGS"
53950   if test $SUITESPARSE = yes; then
53951      echo "  UMFPACK SUITESPARSE  = Yes"
53952   else
53953      echo "  UMFPACK SUITESPARSE  = No"
53954   fi
53955else
53956   echo "Not using UMFPACK"
53957fi
53958
53959
53960echo ""
53961echo "BLAS/LAPACK/ATLAS Configuration:"
53962echo "  BLAS LIBS ............. = $BLAS_LIBS"
53963echo "  BLAS TYPE ............. = $BLAS_TYPE"
53964echo "  LAPACK LIBS ........... = $LAPACK_LIBS"
53965echo "  LAPACK TYPE ........... = $LAPACK_TYPE"
53966echo "  ARPACK LIBS ........... = $ARPACK_LIBS"
53967echo ""
53968
53969
53970if test "$with_mpi" == yes; then
53971   echo "OpenMPI Configuration:"
53972   echo "OpenMPI LIBS ........... = $OPENMPI_LIBS"
53973   echo "OpenMPI C Compiler ..... = $OPENMPI_CC"
53974   echo "OpenMPI C++ Compiler ... = $OPENMPI_CXX"
53975   echo "OpenMPI F77 Compiler ... = $MPIF77"
53976else
53977   echo "Not using MPI"
53978fi
53979
53980echo ""
53981if test $BUILD_LOCALIZATION_ENABLE != no; then
53982   echo "Gettext/localization configuration:"
53983   echo "  xgettext ............... = $XGETTEXT"
53984   echo "  msgfmt  ................ = $MSGFMT"
53985   echo "  msgfmt_opts ............ = $MSGFMT_OPTS"
53986   echo "  msgcat  ................ = $MSGCAT"
53987else
53988   echo "Won't generate localization files"
53989fi
53990
53991echo ""
53992if test $HELP_ENABLE = yes; then
53993   echo "Documentation building configuration:"
53994   echo "  Docbook XSL path ....... = $DOCBOOK_ROOT"
53995   echo "  Saxon XSLT ............. = $SAXON"
53996   echo "  XML commons external ... = $XML_APIS_EXT"
53997else
53998   echo "No documentation generated"
53999fi
54000
54001echo ""
54002echo "Java Configuration:"
54003if test ! -z "$JAVAC"; then
54004echo "  JAVA_HOME ........... = $JAVA_HOME"
54005echo "  JAVAC ............... = $JAVAC"
54006echo "  JAVA_CLASSPATH ...... = $JAVA_CLASSPATH"
54007echo "  JAVA_VERSION ........ = $JAVA_VERSION"
54008echo "  JAVAC_FLAGS ......... = $JAVAC_FLAGS"
54009echo "  JAVA_JNI_INCLUDE .... = $JAVA_JNI_INCLUDE"
54010echo "  JAVA_JNI_LIBS ....... = $JAVA_JNI_LIBS"
54011echo "  JAVA_JNI_LIBS_PRELOAD = $JAVA_JNI_LIBS_PRELOAD"
54012echo "  JAVA ................ = $JAVA"
54013echo "  JAVADOC ............. = $JAVADOC"
54014echo "  JAR ................. = $JAR"
54015echo "  ANT ................. = $ANT"
54016else
54017echo "  JAVA disabled"
54018fi
54019
54020
54021echo ""
54022echo "Java dependencies:"
54023if test ! -z "$JAVAC"; then
54024echo "  Flexdock ............ = $FLEXDOCK"
54025echo "  JOGL 2............... = $JOGL2"
54026echo "  JOGL 2 LIBS (JNI) ... = $JOGL2_LIBS"
54027echo "  Gluegen 2 ........... = $GLUEGEN2_RT"
54028echo "  Gluegen 2 LIBS (JNI)  = $GLUEGEN2_RT_LIBS"
54029echo "  Jeuclid (MathML) .... = $JEUCLID_CORE"
54030echo "  Jhall  .............. = $JHALL"
54031echo "  Jrosetta (API) ...... = $JROSETTA_API"
54032echo "  Jrosetta (Engine) ... = $JROSETTA_ENGINE"
54033echo "  Commons Logging ..... = $COMMONS_LOGGING"
54034echo "  JGraph X ............ = $JGRAPHX"
54035echo "  SciRenderer ......... = $SCIRENDERER"
54036echo "  JLaTeXMath .......... = $JLATEXMATH"
54037echo "  ECJ ................. = $ECJ"
54038fi
54039
54040echo ""
54041if test ! -z "$JAVAC"; then
54042echo "Documentation, graphic export:"
54043echo "  FOP (XML => PDF) .... = $FOP"
54044echo "  JLaTeXMath Fop ...... = $JLATEXMATH_FOP"
54045echo "  Batik (SVG) ......... = $BATIK"
54046echo "  Avalon Framework .... = $AVALON_FRAMEWORK"
54047echo "  Commons I/O ......... = $COMMONS_IO"
54048echo "  XML graphics commons  = $XMLGRAPHICS_COMMONS"
54049fi
54050
54051
54052echo ""
54053echo "Code quality (optional):"
54054echo "  Checkstyle .......... = $CHECKSTYLE"
54055echo "  Commons-beanutils ... = $COMMONS_BEANUTILS"
54056echo "  Antlr ............... = $ANTLR"
54057echo "  Junit4 .............. = $JUNIT4"
54058echo "  Hamcrest ............ = $HAMCREST"
54059echo "  Cobertura ........... = $COBERTURA"
54060echo "  splint .............. = $SPLINT"
54061
54062echo ""
54063echo "TCL/TK configuration:"
54064echo "  TK_INC_PATH ........ = $TK_INC_PATH"
54065echo "  TCL_INC_PATH ....... = $TCL_INC_PATH"
54066echo "  TCLTK_LIBS ......... = $TCLTK_LIBS"
54067echo "  TCL_SERIAL_VERSION . = $TCL_SERIAL_VERSION"
54068echo "  TK_SERIAL_VERSION .. = $TK_SERIAL_VERSION"
54069
54070echo ""
54071echo "XML configuration:"
54072echo "  XML_FLAGS .......... = $XML_FLAGS"
54073echo "  XML_LIBS ........... = $XML_LIBS"
54074echo "  XML_VERSION ........ = $XML_VERSION"
54075
54076echo ""
54077echo "HDF5 configuration:"
54078echo "  HDF5 CFLAGS ......... = $HDF5_CFLAGS"
54079echo "  HDF5 LIBS ........... = $HDF5_LIBS"
54080
54081echo ""
54082echo "PCRE configuration:"
54083echo "  PCRE_CFLAGS ........ = $PCRE_CFLAGS"
54084echo "  PCRE_LIBS .......... = $PCRE_LIBS"
54085echo "  PCRE_VERSION ....... = $PCRE_VERSION"
54086
54087echo ""
54088echo "Regenerate Scilab's parser"
54089if test "$enable_build_parser" != no; then
54090echo "  YACC ............... = $YACC"
54091echo "  LEX ................ = $LEX"
54092echo "  YFLAGS ............. = $YFLAGS"
54093else
54094echo "  Regenerate parser disabled (will use embedded sources)"
54095fi
54096
54097echo ""
54098echo "CURL configuration:"
54099echo "  CURL_CFLAGS ........ = $CURL_CFLAGS"
54100echo "  CURL_LIBS .......... = $CURL_LIBS"
54101echo "  CURL_VERSION ....... = $CURL_VERSION"
54102
54103echo ""
54104echo "SWIG Configuration:"
54105if test ! -z "$SWIG_BIN"; then
54106echo "  SWIG_BIN ........... = $SWIG_BIN"
54107echo "  SWIG_JAVA .......... = $SWIG_JAVA"
54108else
54109echo "  SWIG generation disabled"
54110fi
54111
54112echo ""
54113echo "GIWS Configuration:"
54114if test ! -z "$GIWS_BIN"; then
54115echo "  GIWS_BIN ........... = $GIWS_BIN"
54116else
54117echo "  GIWS generation disabled"
54118fi
54119
54120echo ""
54121echo "Valgrind configuration:"
54122echo "  VALGRIND_CFLAGS .... = $VALGRIND_CFLAGS"
54123echo "  VALGRIND_LIBS ...... = $VALGRIND_LIBS"
54124echo ""
54125
54126echo ""
54127echo "Libtool config:"
54128echo "  objext .............. = $objext"
54129echo "  libext (static) ..... = $libext"
54130echo "  shrext_cmds ......... = $shrext_cmds"
54131echo "  exeext .............. = $exeext"
54132
54133echo ""
54134
54135echo "Compilation paths:"
54136echo "  srcdir .............. = $SCI_SRCDIR"
54137echo "  srcdir_full ......... = $SCI_SRCDIR_FULL"
54138echo "  builddir ............ = $SCI_BUILDDIR"
54139if test "$SCI_SRCDIR_FULL" != "$SCI_BUILDDIR"; then
54140echo "  VPATH build ......... = Activated"
54141fi
54142
54143echo ""
54144echo "Platform information:"
54145echo "  host ........... = $host"
54146echo "  host_cpu ....... = $host_cpu"
54147echo "  host_vendor .... = $host_vendor"
54148echo "  host_os ... .... = $host_os"
54149echo "  hostname ....... = $ac_hostname"
54150echo "  CPU 64 bits .... = $IS_64_BITS_CPU"
54151if test -n "$MAC_DETECTED_ARCH"; then
54152echo "  Mac OS X arch .. = $MAC_DETECTED_ARCH"
54153echo "  Mac OS X version = $macosx_version"
54154fi
54155
54156echo ""
54157echo "Options used to compile and link:"
54158echo "  prefix ......... = $prefix"
54159echo "  localedir ...... = $localedir"
54160echo "  VERSION ........ = $PACKAGE_VERSION"
54161echo "  CC ............. = $CC"
54162echo "  CFLAGS ......... = $CFLAGS"
54163echo "  SCI_CFLAGS ..... = $SCI_CFLAGS"
54164echo "  DEFS ........... = $DEFS"
54165echo "  LD ............. = $LD"
54166echo "  LDFLAGS ........ = $LDFLAGS"
54167echo "  SCI_LDFLAGS .... = $SCI_LDFLAGS"
54168echo "  LIBS ........... = $LIBS"
54169echo "  CXX ............ = $CXX"
54170echo "  CXXFLAGS ....... = $CXXFLAGS"
54171echo "  SCI_CXXFLAGS ... = $SCI_CXXFLAGS"
54172echo "  F77 ............ = $F77"
54173echo "  FFLAGS ......... = $FFLAGS"
54174echo "  SCI_FFLAGS ..... = $SCI_FFLAGS"
54175echo "  F77_LDFLAGS .... = $F77_LDFLAGS"
54176echo "  FLIBS...... .... = $FLIBS"
54177echo "  TERMCAP_LIB .... = $TERMCAP_LIB"
54178echo ""
54179